2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse a3_parse
69 #define yyerror a3_error
70 #define yylval a3_lval
71 #define yychar a3_char
72 #define yydebug a3_debug
73 #define yynerrs a3_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
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 a3_error(char*s)
283 syntaxerror("%s", s);
284 return 0; //make gcc happy
288 static char* concat2(const char* t1, const char* t2)
292 char*text = malloc(l1+l2+1);
293 memcpy(text , t1, l1);
294 memcpy(text+l1, t2, l2);
298 static char* concat3(const char* t1, const char* t2, const char* t3)
303 char*text = malloc(l1+l2+l3+1);
304 memcpy(text , t1, l1);
305 memcpy(text+l1, t2, l2);
306 memcpy(text+l1+l2, t3, l3);
311 typedef struct _import {
315 DECLARE_LIST(import);
317 typedef struct _classstate {
323 char has_constructor;
326 typedef struct _methodstate {
335 abc_exception_list_t*exceptions;
338 typedef struct _state {
343 import_list_t*wildcard_imports;
345 char has_own_imports;
348 methodstate_t*method;
355 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;
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 global->init->method->body->code = c;
485 void initialize_file(char*filename)
488 state->package = filename;
490 state->method = rfx_calloc(sizeof(methodstate_t));
491 state->method->variable_count = 1;
496 if(!state || state->level!=1) {
497 syntaxerror("unexpected end of file");
499 state_destroy(state);state=0;
502 void* finish_parser()
504 code_t*c = global->init->method->body->code;
505 /*c = abc_findpropstrict(c, "[package]::trace");
506 c = abc_pushstring(c, "[leaving global init function]");
507 c = abc_callpropvoid(c, "[package]::trace", 1);*/
508 c = abc_returnvoid(c);
509 global->init->method->body->code = c;
514 static void xx_scopetest()
516 /* findpropstrict doesn't just return a scope object- it
517 also makes it "active" somehow. Push local_0 on the
518 scope stack and read it back with findpropstrict, it'll
519 contain properties like "trace". Trying to find the same
520 property on a "vanilla" local_0 yields only a "undefined" */
521 //c = abc_findpropstrict(c, "[package]::trace");
523 /*c = abc_getlocal_0(c);
524 c = abc_findpropstrict(c, "[package]::trace");
526 c = abc_setlocal_1(c);
528 c = abc_pushbyte(c, 0);
529 c = abc_setlocal_2(c);
531 code_t*xx = c = abc_label(c);
532 c = abc_findpropstrict(c, "[package]::trace");
533 c = abc_pushstring(c, "prop:");
534 c = abc_hasnext2(c, 1, 2);
536 c = abc_setlocal_3(c);
537 c = abc_callpropvoid(c, "[package]::trace", 2);
538 c = abc_getlocal_3(c);
540 c = abc_iftrue(c,xx);*/
544 typedef struct _variable {
550 static variable_t* find_variable(char*name)
556 v = dict_lookup(s->vars, name);
564 static variable_t* find_variable_safe(char*name)
566 variable_t* v = find_variable(name);
568 syntaxerror("undefined variable: %s", name);
571 static char variable_exists(char*name)
573 return dict_lookup(state->vars, name)!=0;
575 code_t*defaultvalue(code_t*c, classinfo_t*type);
576 static int new_variable(char*name, classinfo_t*type, char init)
579 v->index = state->method->variable_count;
583 dict_put(state->vars, name, v);
585 return state->method->variable_count++;
587 #define TEMPVARNAME "__as3_temp__"
588 static int gettempvar()
590 variable_t*v = find_variable(TEMPVARNAME);
593 return new_variable(TEMPVARNAME, 0, 0);
596 code_t* var_block(code_t*body)
602 for(t=0;t<state->vars->hashsize;t++) {
603 dictentry_t*e = state->vars->slots[t];
605 variable_t*v = (variable_t*)e->data;
606 if(v->type && v->init) {
607 c = defaultvalue(c, v->type);
608 c = abc_setlocal(c, v->index);
609 k = abc_kill(k, v->index);
619 if(x->opcode== OPCODE___BREAK__ ||
620 x->opcode== OPCODE___CONTINUE__) {
621 /* link kill code before break/continue */
622 code_t*e = code_dup(k);
623 code_t*s = code_start(e);
635 c = code_append(c, body);
636 c = code_append(c, k);
640 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
642 c = code_append(c, header);
643 c = code_append(c, var_block(body));
644 /* append return if necessary */
645 if(!c || (c->opcode != OPCODE_RETURNVOID &&
646 c->opcode != OPCODE_RETURNVALUE)) {
647 c = abc_returnvoid(c);
653 static void startpackage(char*name)
656 /*printf("entering package \"%s\"\n", name);*/
657 state->package = strdup(name);
659 static void endpackage()
661 /*printf("leaving package \"%s\"\n", state->package);*/
663 //used e.g. in classinfo_register:
664 //free(state->package);state->package=0;
669 void parserassert(int b)
671 if(!b) syntaxerror("internal error: assertion failed");
675 char*as3_globalclass=0;
676 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
679 syntaxerror("inner classes now allowed");
682 state->cls = rfx_calloc(sizeof(classstate_t));
683 state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
684 state->method->variable_count = 1;
687 classinfo_list_t*mlist=0;
689 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
690 syntaxerror("invalid modifier(s)");
692 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
693 syntaxerror("public and internal not supported at the same time.");
695 /* create the class name, together with the proper attributes */
699 if(!(flags&FLAG_PUBLIC) && !state->package) {
700 access = ACCESS_PRIVATE; package = current_filename;
701 } else if(!(flags&FLAG_PUBLIC) && state->package) {
702 access = ACCESS_PACKAGEINTERNAL; package = state->package;
703 } else if(state->package) {
704 access = ACCESS_PACKAGE; package = state->package;
706 syntaxerror("public classes only allowed inside a package");
710 if(registry_findclass(package, classname)) {
711 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
713 /* build info struct */
714 int num_interfaces = (list_length(implements));
715 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
719 state->cls->info = registry_findclass(package, classname);
720 parserassert((int)state->cls->info);
722 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
723 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
725 classinfo_list_t*l = implements;
726 for(l=implements;l;l=l->next) {
727 state->cls->info->interfaces[pos++] = l->classinfo;
730 /* generate the abc code for this class */
731 MULTINAME(classname2,state->cls->info);
732 multiname_t*extends2 = sig2mname(extends);
734 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
735 if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
736 if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
738 state->cls->info->flags |= CLASS_INTERFACE;
739 abc_class_interface(state->cls->abc);
742 abc_class_protectedNS(state->cls->abc, classname);
744 for(mlist=implements;mlist;mlist=mlist->next) {
745 MULTINAME(m, mlist->classinfo);
746 abc_class_add_interface(state->cls->abc, &m);
749 /* write the construction code for this class to the global init
751 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
753 abc_method_body_t*m = global->init->method->body;
754 __ getglobalscope(m);
755 classinfo_t*s = extends;
760 //TODO: take a look at the current scope stack, maybe
761 // we can re-use something
766 multiname_t*s2 = sig2mname(s);
768 multiname_destroy(s2);
770 __ pushscope(m); count++;
771 m->code = m->code->prev->prev; // invert
773 /* continue appending after last op end */
774 while(m->code && m->code->next) m->code = m->code->next;
776 /* TODO: if this is one of *our* classes, we can also
777 do a getglobalscope/getslot <nr> (which references
778 the init function's slots) */
780 __ getlex2(m, extends2);
782 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
783 stack is not the superclass */
784 __ pushscope(m);count++;
787 /* notice: we get a verify error #1107 if the top element on the scope
788 stack is not the global object */
790 __ pushscope(m);count++;
792 __ newclass(m,state->cls->abc);
796 __ setslot(m, slotindex);
797 multiname_destroy(extends2);
799 /* flash.display.MovieClip handling */
801 if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
802 if(state->package && state->package[0]) {
803 as3_globalclass = concat3(state->package, ".", classname);
805 as3_globalclass = strdup(classname);
811 static void endclass()
814 if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
816 c = abc_getlocal_0(c);
817 c = abc_constructsuper(c, 0);
818 state->cls->init = code_append(state->cls->init, c);
820 if(!state->method->late_binding) {
821 // class initialization code uses late binding
823 c = abc_getlocal_0(c);
824 c = abc_pushscope(c);
825 state->cls->static_init = code_append(c, state->cls->static_init);
828 if(state->cls->init) {
829 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
830 m->body->code = wrap_function(0, state->cls->init, m->body->code);
832 if(state->cls->static_init) {
833 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
834 m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
841 void check_code_for_break(code_t*c)
844 if(c->opcode == OPCODE___BREAK__) {
845 char*name = string_cstr(c->data[0]);
846 syntaxerror("Unresolved \"break %s\"", name);
848 if(c->opcode == OPCODE___CONTINUE__) {
849 char*name = string_cstr(c->data[0]);
850 syntaxerror("Unresolved \"continue %s\"", name);
857 static void check_constant_against_type(classinfo_t*t, constant_t*c)
859 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
860 if(TYPE_IS_NUMBER(t)) {
861 xassert(c->type == CONSTANT_FLOAT
862 || c->type == CONSTANT_INT
863 || c->type == CONSTANT_UINT);
864 } else if(TYPE_IS_UINT(t)) {
865 xassert(c->type == CONSTANT_UINT ||
866 (c->type == CONSTANT_INT && c->i>0));
867 } else if(TYPE_IS_INT(t)) {
868 xassert(c->type == CONSTANT_INT);
869 } else if(TYPE_IS_BOOLEAN(t)) {
870 xassert(c->type == CONSTANT_TRUE
871 || c->type == CONSTANT_FALSE);
876 static int flags2access(int flags)
879 if(flags&FLAG_PUBLIC) {
880 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
881 syntaxerror("invalid combination of access levels");
882 access = ACCESS_PACKAGE;
883 } else if(flags&FLAG_PRIVATE) {
884 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
885 syntaxerror("invalid combination of access levels");
886 access = ACCESS_PRIVATE;
887 } else if(flags&FLAG_PROTECTED) {
888 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
889 syntaxerror("invalid combination of access levels");
890 access = ACCESS_PROTECTED;
892 access = ACCESS_PACKAGEINTERNAL;
898 static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
900 memberinfo_t*minfo = 0;
903 minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
904 minfo->return_type = return_type;
905 } else if(getset != KW_GET && getset != KW_SET) {
907 if((minfo = registry_findmember(state->cls->info, name, 0))) {
908 if(minfo->parent == state->cls->info) {
909 syntaxerror("class already contains a member/method called '%s'", name);
910 } else if(!minfo->parent) {
911 syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
913 if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
914 syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
917 minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
918 minfo->return_type = return_type;
919 // getslot on a member slot only returns "undefined", so no need
920 // to actually store these
921 //state->minfo->slot = state->method->abc->method->trait->slot_id;
923 //class getter/setter
924 int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
928 else if(params->list)
929 type = params->list->param->type;
930 // not sure wether to look into superclasses here, too
931 if((minfo=registry_findmember(state->cls->info, name, 0))) {
932 if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
933 syntaxerror("class already contains a member or method called '%s'", name);
935 syntaxerror("getter/setter for '%s' already defined", name);
936 /* make a setter or getter into a getset */
941 if(type && minfo->type != type)
942 syntaxerror("different type in getter and setter");
944 minfo = memberinfo_register(state->cls->info, name, gs);
947 /* can't assign a slot as getter and setter might have different slots */
948 //minfo->slot = slot;
950 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
951 if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
952 if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
953 if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
954 if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
955 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
959 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
961 parserassert(state->method && state->method->info);
962 memberinfo_t*parent_method = state->method->info;
971 state->method = rfx_calloc(sizeof(methodstate_t));
972 state->method->inner = 1;
973 state->method->variable_count = 0;
975 memberinfo_t*minfo = 0;
977 /* TODO: we need some better way to pass things from pass1 to pass2 */
979 sprintf(myname, "as3-innerfunction-%d-%d", current_line, current_column);
982 minfo = rfx_calloc(sizeof(memberinfo_t));
984 if(!parent_method->subfunctions)
985 parent_method->subfunctions = dict_new();
987 dict_put(parent_method->subfunctions, name, minfo);
988 dict_put(parent_method->subfunctions, myname, minfo);
992 minfo = dict_lookup(parent_method->subfunctions, myname);
995 minfo->return_type = return_type;
997 new_variable("FIXME", 0, 0); //FIXME: is local_0 "this"?
999 for(p=params->list;p;p=p->next) {
1000 new_variable(p->param->name, p->param->type, 0);
1003 state->method->info = minfo;
1006 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1007 params_t*params, classinfo_t*return_type)
1009 if(state->method && state->method->info) {
1010 syntaxerror("not able to start another method scope");
1013 state->method = rfx_calloc(sizeof(methodstate_t));
1014 state->method->has_super = 0;
1015 state->method->variable_count = 0;
1018 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1019 state->cls->has_constructor |= state->method->is_constructor;
1021 state->method->is_global = 1;
1022 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1024 if(state->method->is_constructor)
1025 name = "__as3_constructor__";
1029 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1033 /* retrieve the member info that we stored in the first pass.
1034 TODO: better getter/setter support? */
1035 if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
1036 else state->method->info = registry_findmember(state->cls->info, name, 0);
1037 state->method->info->return_type = return_type;
1039 /* state->vars is initialized by state_new */
1040 if(!state->method->is_global)
1041 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
1043 new_variable("globalscope", 0, 0);
1045 for(p=params->list;p;p=p->next) {
1046 new_variable(p->param->name, p->param->type, 0);
1051 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1052 params_t*params, classinfo_t*return_type, code_t*body)
1061 multiname_t*type2 = sig2mname(return_type);
1063 if(state->method->inner) {
1064 f = abc_method_new(global->file, type2, 1);
1065 } else if(state->method->is_constructor) {
1066 f = abc_class_getconstructor(state->cls->abc, type2);
1067 } else if(!state->method->is_global) {
1068 namespace_t mname_ns = flags2namespace(flags, "");
1069 multiname_t mname = {QNAME, &mname_ns, 0, name};
1071 if(flags&FLAG_STATIC)
1072 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1074 f = abc_class_method(state->cls->abc, type2, &mname);
1075 slot = f->trait->slot_id;
1077 namespace_t mname_ns = flags2namespace(flags, state->package);
1078 multiname_t mname = {QNAME, &mname_ns, 0, name};
1080 f = abc_method_new(global->file, type2, 1);
1081 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1082 //abc_code_t*c = global->init->method->body->code;
1084 //flash doesn't seem to allow us to access function slots
1085 //state->method->info->slot = slot;
1087 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1088 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1089 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1090 if(params->varargs) f->flags |= METHOD_NEED_REST;
1094 for(p=params->list;p;p=p->next) {
1095 if(params->varargs && !p->next) {
1096 break; //varargs: omit last parameter in function signature
1098 multiname_t*m = sig2mname(p->param->type);
1099 list_append(f->parameters, m);
1100 if(p->param->value) {
1101 check_constant_against_type(p->param->type, p->param->value);
1102 opt=1;list_append(f->optional_parameters, p->param->value);
1104 syntaxerror("non-optional parameter not allowed after optional parameters");
1107 check_code_for_break(body);
1110 f->body->code = body;
1111 f->body->exceptions = state->method->exceptions;
1112 } else { //interface
1114 syntaxerror("interface methods can't have a method body");
1121 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1126 void breakjumpsto(code_t*c, char*name, code_t*jump)
1129 if(c->opcode == OPCODE___BREAK__) {
1130 string_t*name2 = c->data[0];
1131 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1132 c->opcode = OPCODE_JUMP;
1139 void continuejumpsto(code_t*c, char*name, code_t*jump)
1142 if(c->opcode == OPCODE___CONTINUE__) {
1143 string_t*name2 = c->data[0];
1144 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1145 c->opcode = OPCODE_JUMP;
1153 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1154 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1155 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1157 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1159 if(!type1 || !type2)
1160 return registry_getanytype();
1161 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1162 return registry_getanytype();
1165 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1174 return registry_getanytype();
1176 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1181 return abc_coerce_a(c);
1185 // cast an "any" type to a specific type. subject to
1186 // runtime exceptions
1187 return abc_coerce2(c, &m);
1190 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1191 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1192 // allow conversion between number types
1193 return abc_coerce2(c, &m);
1195 //printf("%s.%s\n", from.package, from.name);
1196 //printf("%s.%s\n", to.package, to.name);
1198 classinfo_t*supertype = from;
1200 if(supertype == to) {
1201 // target type is one of from's superclasses
1202 return abc_coerce2(c, &m);
1205 while(supertype->interfaces[t]) {
1206 if(supertype->interfaces[t]==to) {
1207 // target type is one of from's interfaces
1208 return abc_coerce2(c, &m);
1212 supertype = supertype->superclass;
1214 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1216 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1218 syntaxerror("can't convert type %s to %s", from->name, to->name);
1219 return 0; // make gcc happy
1222 code_t*defaultvalue(code_t*c, classinfo_t*type)
1224 if(TYPE_IS_INT(type)) {
1225 c = abc_pushbyte(c, 0);
1226 } else if(TYPE_IS_UINT(type)) {
1227 c = abc_pushuint(c, 0);
1228 } else if(TYPE_IS_FLOAT(type)) {
1230 } else if(TYPE_IS_BOOLEAN(type)) {
1231 c = abc_pushfalse(c);
1233 //c = abc_pushundefined(c);
1235 c = abc_pushnull(c);
1237 c = abc_coerce2(c, &m);
1242 char is_pushundefined(code_t*c)
1244 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1247 static classinfo_t* find_class(char*name)
1251 c = registry_findclass(state->package, name);
1254 /* try explicit imports */
1255 dictentry_t* e = dict_get_slot(state->imports, name);
1258 if(!strcmp(e->key, name)) {
1259 c = (classinfo_t*)e->data;
1265 /* try package.* imports */
1266 import_list_t*l = state->wildcard_imports;
1268 //printf("does package %s contain a class %s?\n", l->import->package, name);
1269 c = registry_findclass(l->import->package, name);
1274 /* try global package */
1275 c = registry_findclass("", name);
1278 /* try local "filename" package */
1279 c = registry_findclass(current_filename_short, name);
1285 static char is_getlocal(code_t*c)
1287 if(!c || c->prev || c->next)
1289 return(c->opcode == OPCODE_GETLOCAL
1290 || c->opcode == OPCODE_GETLOCAL_0
1291 || c->opcode == OPCODE_GETLOCAL_1
1292 || c->opcode == OPCODE_GETLOCAL_2
1293 || c->opcode == OPCODE_GETLOCAL_3);
1295 static int getlocalnr(code_t*c)
1297 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1298 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1299 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1300 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1301 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1302 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1306 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1310 [prefix code] [read instruction]
1314 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1317 if(in && in->opcode == OPCODE_COERCE_A) {
1318 in = code_cutlast(in);
1321 syntaxerror("internal error");
1323 /* chop off read instruction */
1327 prefix = r->prev;r->prev = 0;
1333 char use_temp_var = readbefore;
1335 /* generate the write instruction, and maybe append a dup to the prefix code */
1336 code_t* write = abc_nop(0);
1337 if(r->opcode == OPCODE_GETPROPERTY) {
1338 write->opcode = OPCODE_SETPROPERTY;
1339 multiname_t*m = (multiname_t*)r->data[0];
1340 write->data[0] = multiname_clone(m);
1341 if(m->type == QNAME || m->type == MULTINAME) {
1343 prefix = abc_dup(prefix); // we need the object, too
1346 } else if(m->type == MULTINAMEL) {
1348 /* dupping two values on the stack requires 5 operations and one register-
1349 couldn't adobe just have given us a dup2? */
1350 int temp = gettempvar();
1351 prefix = abc_setlocal(prefix, temp);
1352 prefix = abc_dup(prefix);
1353 prefix = abc_getlocal(prefix, temp);
1354 prefix = abc_swap(prefix);
1355 prefix = abc_getlocal(prefix, temp);
1357 prefix = abc_kill(prefix, temp);
1361 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1363 } else if(r->opcode == OPCODE_GETSLOT) {
1364 write->opcode = OPCODE_SETSLOT;
1365 write->data[0] = r->data[0];
1367 prefix = abc_dup(prefix); // we need the object, too
1370 } else if(r->opcode == OPCODE_GETLOCAL) {
1371 write->opcode = OPCODE_SETLOCAL;
1372 write->data[0] = r->data[0];
1373 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1374 write->opcode = OPCODE_SETLOCAL_0;
1375 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1376 write->opcode = OPCODE_SETLOCAL_1;
1377 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1378 write->opcode = OPCODE_SETLOCAL_2;
1379 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1380 write->opcode = OPCODE_SETLOCAL_3;
1383 syntaxerror("illegal lvalue: can't assign a value to this expression");
1390 /* with getproperty/getslot, we have to be extra careful not
1391 to execute the read code twice, as it might have side-effects
1392 (e.g. if the property is in fact a setter/getter combination)
1394 So read the value, modify it, and write it again,
1395 using prefix only once and making sure (by using a temporary
1396 register) that the return value is what we just wrote */
1397 temp = gettempvar();
1398 c = code_append(c, prefix);
1399 c = code_append(c, r);
1402 c = abc_setlocal(c, temp);
1404 c = code_append(c, middlepart);
1407 c = abc_setlocal(c, temp);
1409 c = code_append(c, write);
1410 c = abc_getlocal(c, temp);
1411 c = abc_kill(c, temp);
1413 /* if we're allowed to execute the read code twice *and*
1414 the middlepart doesn't modify the code, things are easier.
1416 code_t* r2 = code_dup(r);
1417 //c = code_append(c, prefix);
1418 parserassert(!prefix);
1419 c = code_append(c, r);
1420 c = code_append(c, middlepart);
1421 c = code_append(c, write);
1422 c = code_append(c, r2);
1425 /* even smaller version: overwrite the value without reading
1429 c = code_append(c, prefix);
1432 c = code_append(c, middlepart);
1433 c = code_append(c, write);
1434 c = code_append(c, r);
1436 temp = gettempvar();
1438 c = code_append(c, prefix);
1440 c = code_append(c, middlepart);
1442 c = abc_setlocal(c, temp);
1443 c = code_append(c, write);
1444 c = abc_getlocal(c, temp);
1445 c = abc_kill(c, temp);
1451 char is_break_or_jump(code_t*c)
1455 if(c->opcode == OPCODE_JUMP ||
1456 c->opcode == OPCODE___BREAK__ ||
1457 c->opcode == OPCODE___CONTINUE__ ||
1458 c->opcode == OPCODE_THROW ||
1459 c->opcode == OPCODE_RETURNVOID ||
1460 c->opcode == OPCODE_RETURNVALUE) {
1467 #define IS_FINALLY_TARGET(op) \
1468 ((op) == OPCODE___CONTINUE__ || \
1469 (op) == OPCODE___BREAK__ || \
1470 (op) == OPCODE_RETURNVOID || \
1471 (op) == OPCODE_RETURNVALUE || \
1472 (op) == OPCODE___RETHROW__)
1474 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1476 #define NEED_EXTRA_STACK_ARG
1477 code_t*finally_label = abc_nop(0);
1478 NEW(lookupswitch_t, l);
1484 code_t*prev = i->prev;
1485 if(IS_FINALLY_TARGET(i->opcode)) {
1488 if(i->opcode == OPCODE___RETHROW__ ||
1489 i->opcode == OPCODE_RETURNVALUE) {
1490 if(i->opcode == OPCODE___RETHROW__)
1491 i->opcode = OPCODE_THROW;
1493 p = abc_coerce_a(p);
1494 p = abc_setlocal(p, tempvar);
1496 p = abc_pushbyte(p, count++);
1497 p = abc_jump(p, finally_label);
1498 code_t*target = p = abc_label(p);
1499 #ifdef NEED_EXTRA_STACK_ARG
1503 p = abc_getlocal(p, tempvar);
1506 p->next = i;i->prev = p;
1507 list_append(l->targets, target);
1513 c = abc_pushbyte(c, -1);
1514 c = code_append(c, finally_label);
1515 c = code_append(c, finally);
1517 #ifdef NEED_EXTRA_STACK_ARG
1520 c = abc_lookupswitch(c, l);
1521 c = l->def = abc_label(c);
1522 #ifdef NEED_EXTRA_STACK_ARG
1529 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1533 code_t*prev = i->prev;
1534 if(IS_FINALLY_TARGET(i->opcode)) {
1535 if(i->opcode == OPCODE___RETHROW__)
1536 i->opcode = OPCODE_THROW;
1537 code_t*end = code_dup(finally);
1538 code_t*start = code_start(end);
1539 if(prev) prev->next = start;
1546 return code_append(c, finally);
1549 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1555 int num_insertion_points=0;
1557 if(IS_FINALLY_TARGET(i->opcode))
1558 num_insertion_points++;
1565 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1570 int simple_version_cost = (1+num_insertion_points)*code_size;
1571 int lookup_version_cost = 4*num_insertion_points + 5;
1573 if(cantdup || simple_version_cost > lookup_version_cost) {
1574 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1575 return insert_finally_lookup(c, finally, tempvar);
1577 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1578 return insert_finally_simple(c, finally, tempvar);
1582 #define PASS1 }} if(as3_pass == 1) {{
1583 #define PASS1END }} if(as3_pass == 2) {{
1584 #define PASS2 }} if(as3_pass == 2) {{
1585 #define PASS12 }} {{
1586 #define PASS12END }} if(as3_pass == 2) {{
1590 /* Line 273 of skeleton.m4 */
1591 #line 1592 "parser.tab.c"
1598 typedef YYTYPE_UINT8 yytype_uint8;
1600 typedef unsigned char yytype_uint8;
1604 typedef YYTYPE_INT8 yytype_int8;
1605 #elif (defined __STDC__ || defined __C99__FUNC__ \
1606 || defined __cplusplus || defined _MSC_VER)
1607 typedef signed char yytype_int8;
1609 typedef short int yytype_int8;
1612 #ifdef YYTYPE_UINT16
1613 typedef YYTYPE_UINT16 yytype_uint16;
1615 typedef unsigned short int yytype_uint16;
1619 typedef YYTYPE_INT16 yytype_int16;
1621 typedef short int yytype_int16;
1625 # ifdef __SIZE_TYPE__
1626 # define YYSIZE_T __SIZE_TYPE__
1627 # elif defined size_t
1628 # define YYSIZE_T size_t
1629 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1630 || defined __cplusplus || defined _MSC_VER)
1631 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1632 # define YYSIZE_T size_t
1634 # define YYSIZE_T unsigned int
1638 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1643 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1644 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1648 # define YY_(msgid) msgid
1652 /* Suppress unused-variable warnings by "using" E. */
1653 #if ! defined lint || defined __GNUC__
1654 # define YYUSE(e) ((void) (e))
1656 # define YYUSE(e) /* empty */
1659 /* Identity function, used to suppress warnings about constant conditions. */
1661 # define YYID(n) (n)
1663 #if (defined __STDC__ || defined __C99__FUNC__ \
1664 || defined __cplusplus || defined _MSC_VER)
1677 #if ! defined yyoverflow || YYERROR_VERBOSE
1679 /* The parser invokes alloca or malloc; define the necessary symbols. */
1681 # ifdef YYSTACK_USE_ALLOCA
1682 # if YYSTACK_USE_ALLOCA
1684 # define YYSTACK_ALLOC __builtin_alloca
1685 # elif defined __BUILTIN_VA_ARG_INCR
1686 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1688 # define YYSTACK_ALLOC __alloca
1689 # elif defined _MSC_VER
1690 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1691 # define alloca _alloca
1693 # define YYSTACK_ALLOC alloca
1694 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1695 || defined __cplusplus || defined _MSC_VER)
1696 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1698 # define _STDLIB_H 1
1705 # ifdef YYSTACK_ALLOC
1706 /* Pacify GCC's `empty if-body' warning. */
1707 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1708 # ifndef YYSTACK_ALLOC_MAXIMUM
1709 /* The OS might guarantee only one guard page at the bottom of the stack,
1710 and a page size can be as small as 4096 bytes. So we cannot safely
1711 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1712 to allow for a few compiler-allocated temporary stack slots. */
1713 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1716 # define YYSTACK_ALLOC YYMALLOC
1717 # define YYSTACK_FREE YYFREE
1718 # ifndef YYSTACK_ALLOC_MAXIMUM
1719 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1721 # if (defined __cplusplus && ! defined _STDLIB_H \
1722 && ! ((defined YYMALLOC || defined malloc) \
1723 && (defined YYFREE || defined free)))
1724 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1726 # define _STDLIB_H 1
1730 # define YYMALLOC malloc
1731 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1732 || defined __cplusplus || defined _MSC_VER)
1733 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1737 # define YYFREE free
1738 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1739 || defined __cplusplus || defined _MSC_VER)
1740 void free (void *); /* INFRINGES ON USER NAME SPACE */
1744 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1747 #if (! defined yyoverflow \
1748 && (! defined __cplusplus \
1749 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1751 /* A type that is properly aligned for any stack member. */
1754 yytype_int16 yyss_alloc;
1758 /* The size of the maximum gap between one aligned stack and the next. */
1759 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1761 /* The size of an array large to enough to hold all stacks, each with
1763 # define YYSTACK_BYTES(N) \
1764 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1765 + YYSTACK_GAP_MAXIMUM)
1767 /* Copy COUNT objects from FROM to TO. The source and destination do
1770 # if defined __GNUC__ && 1 < __GNUC__
1771 # define YYCOPY(To, From, Count) \
1772 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1774 # define YYCOPY(To, From, Count) \
1778 for (yyi = 0; yyi < (Count); yyi++) \
1779 (To)[yyi] = (From)[yyi]; \
1785 /* Relocate STACK from its old location to the new one. The
1786 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1787 elements in the stack, and YYPTR gives the new location of the
1788 stack. Advance YYPTR to a properly aligned location for the next
1790 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1793 YYSIZE_T yynewbytes; \
1794 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1795 Stack = &yyptr->Stack_alloc; \
1796 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1797 yyptr += yynewbytes / sizeof (*yyptr); \
1803 /* YYFINAL -- State number of the termination state. */
1805 /* YYLAST -- Last index in YYTABLE. */
1808 /* YYNTOKENS -- Number of terminals. */
1809 #define YYNTOKENS 130
1810 /* YYNNTS -- Number of nonterminals. */
1812 /* YYNRULES -- Number of rules. */
1813 #define YYNRULES 286
1814 /* YYNRULES -- Number of states. */
1815 #define YYNSTATES 479
1817 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1818 #define YYUNDEFTOK 2
1819 #define YYMAXUTOK 360
1821 #define YYTRANSLATE(YYX) \
1822 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1824 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1825 static const yytype_uint8 yytranslate[] =
1827 0, 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, 116, 2, 2, 2, 114, 106, 2,
1831 126, 129, 113, 111, 97, 110, 123, 112, 2, 2,
1832 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
1833 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
1834 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1835 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1836 2, 120, 2, 121, 105, 2, 2, 2, 2, 2,
1837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1839 2, 2, 2, 122, 104, 128, 115, 2, 2, 2,
1840 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1842 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1843 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1852 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1853 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1854 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1855 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1856 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1857 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1858 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1859 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1860 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1861 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1862 95, 98, 100, 101, 109, 117, 118, 119, 124, 125,
1867 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1869 static const yytype_uint16 yyprhs[] =
1871 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
1872 19, 21, 23, 25, 27, 28, 30, 32, 35, 37,
1873 39, 41, 43, 45, 47, 49, 50, 53, 55, 57,
1874 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
1875 79, 81, 83, 85, 87, 89, 91, 93, 97, 100,
1876 103, 105, 107, 110, 111, 114, 117, 119, 123, 127,
1877 128, 131, 132, 140, 141, 143, 145, 149, 151, 154,
1878 158, 167, 174, 175, 182, 183, 191, 193, 196, 198,
1879 201, 202, 204, 206, 209, 211, 214, 219, 223, 224,
1880 233, 234, 244, 245, 251, 253, 256, 258, 261, 263,
1881 264, 271, 274, 276, 282, 284, 286, 290, 292, 293,
1882 300, 301, 307, 310, 315, 316, 318, 320, 323, 325,
1883 327, 329, 331, 333, 335, 337, 339, 341, 342, 345,
1884 346, 349, 350, 353, 354, 364, 365, 374, 375, 377,
1885 379, 382, 384, 386, 388, 390, 391, 393, 395, 398,
1886 400, 403, 412, 414, 416, 422, 423, 426, 428, 430,
1887 432, 434, 436, 438, 440, 442, 443, 445, 448, 453,
1888 457, 459, 464, 467, 469, 471, 472, 473, 486, 488,
1889 489, 490, 501, 503, 507, 509, 511, 513, 517, 519,
1890 521, 523, 526, 527, 528, 532, 533, 535, 537, 541,
1891 545, 550, 555, 558, 560, 563, 565, 567, 571, 573,
1892 575, 577, 579, 581, 583, 585, 587, 589, 591, 593,
1893 595, 597, 599, 601, 603, 605, 607, 611, 615, 619,
1894 623, 627, 631, 635, 639, 643, 647, 650, 653, 657,
1895 661, 665, 669, 673, 677, 681, 685, 689, 693, 697,
1896 701, 705, 709, 713, 718, 721, 723, 727, 730, 735,
1897 739, 740, 742, 746, 752, 756, 760, 764, 768, 772,
1898 776, 780, 784, 788, 792, 796, 802, 805, 808, 811,
1899 814, 818, 822, 824, 828, 834, 840
1902 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1903 static const yytype_int16 yyrhs[] =
1905 131, 0, -1, 132, -1, -1, 133, -1, 134, -1,
1906 133, 134, -1, 180, -1, 192, -1, 190, -1, 208,
1907 -1, 201, -1, 143, -1, 96, -1, -1, 136, -1,
1908 137, -1, 136, 137, -1, 192, -1, 190, -1, 208,
1909 -1, 201, -1, 143, -1, 96, -1, 139, -1, -1,
1910 139, 141, -1, 141, -1, 183, -1, 154, -1, 155,
1911 -1, 156, -1, 158, -1, 166, -1, 149, -1, 177,
1912 -1, 174, -1, 228, -1, 96, -1, 140, -1, 145,
1913 -1, 160, -1, 161, -1, 225, -1, 176, -1, 234,
1914 -1, 235, -1, 122, 139, 128, -1, 122, 128, -1,
1915 141, 96, -1, 141, -1, 140, -1, 99, 226, -1,
1916 -1, 45, 146, -1, 31, 146, -1, 147, -1, 146,
1917 97, 147, -1, 3, 218, 144, -1, -1, 64, 142,
1918 -1, -1, 63, 126, 150, 227, 129, 142, 148, -1,
1919 -1, 145, -1, 228, -1, 45, 3, 218, -1, 3,
1920 -1, 12, 126, -1, 12, 49, 126, -1, 153, 151,
1921 96, 227, 96, 228, 129, 142, -1, 153, 152, 67,
1922 227, 129, 142, -1, -1, 13, 126, 157, 227, 129,
1923 142, -1, -1, 14, 159, 142, 13, 126, 227, 129,
1924 -1, 65, -1, 65, 3, -1, 29, -1, 29, 3,
1925 -1, -1, 163, -1, 165, -1, 163, 165, -1, 164,
1926 -1, 163, 164, -1, 33, 229, 103, 138, -1, 61,
1927 103, 138, -1, -1, 15, 126, 167, 229, 129, 122,
1928 162, 128, -1, -1, 32, 126, 3, 218, 129, 169,
1929 122, 138, 128, -1, -1, 27, 122, 171, 138, 128,
1930 -1, 168, -1, 172, 168, -1, 172, -1, 172, 170,
1931 -1, 170, -1, -1, 51, 122, 175, 138, 128, 173,
1932 -1, 36, 227, -1, 36, -1, 38, 126, 227, 129,
1933 142, -1, 3, -1, 18, -1, 179, 123, 178, -1,
1934 178, -1, -1, 18, 179, 122, 181, 135, 128, -1,
1935 -1, 18, 122, 182, 135, 128, -1, 40, 215, -1,
1936 40, 179, 123, 113, -1, -1, 185, -1, 186, -1,
1937 185, 186, -1, 20, -1, 21, -1, 19, -1, 37,
1938 -1, 46, -1, 48, -1, 47, -1, 25, -1, 23,
1939 -1, -1, 53, 215, -1, -1, 53, 216, -1, -1,
1940 16, 216, -1, -1, 184, 30, 3, 187, 189, 122,
1941 191, 194, 128, -1, -1, 184, 43, 3, 188, 122,
1942 193, 197, 128, -1, -1, 195, -1, 196, -1, 195,
1943 196, -1, 96, -1, 201, -1, 208, -1, 140, -1,
1944 -1, 198, -1, 199, -1, 198, 199, -1, 96, -1,
1945 45, 3, -1, 184, 26, 207, 3, 126, 204, 129,
1946 218, -1, 45, -1, 31, -1, 184, 200, 3, 218,
1947 144, -1, -1, 99, 203, -1, 9, -1, 7, -1,
1948 8, -1, 11, -1, 4, -1, 55, -1, 54, -1,
1949 44, -1, -1, 205, -1, 90, 206, -1, 205, 97,
1950 90, 206, -1, 205, 97, 206, -1, 206, -1, 3,
1951 103, 217, 202, -1, 3, 202, -1, 50, -1, 34,
1952 -1, -1, -1, 184, 26, 207, 3, 126, 204, 129,
1953 218, 122, 209, 138, 128, -1, 3, -1, -1, -1,
1954 26, 210, 126, 204, 129, 218, 122, 212, 138, 128,
1955 -1, 3, -1, 179, 123, 3, -1, 214, -1, 213,
1956 -1, 215, -1, 216, 97, 215, -1, 215, -1, 113,
1957 -1, 35, -1, 103, 217, -1, -1, -1, 126, 220,
1958 129, -1, -1, 221, -1, 226, -1, 221, 97, 226,
1959 -1, 24, 213, 219, -1, 229, 126, 220, 129, -1,
1960 52, 126, 220, 129, -1, 62, 229, -1, 41, -1,
1961 41, 227, -1, 229, -1, 229, -1, 227, 97, 229,
1962 -1, 227, -1, 211, -1, 230, -1, 233, -1, 222,
1963 -1, 224, -1, 5, -1, 9, -1, 10, -1, 7,
1964 -1, 8, -1, 11, -1, 4, -1, 28, -1, 55,
1965 -1, 54, -1, 44, -1, 223, -1, 229, 107, 229,
1966 -1, 229, 108, 229, -1, 229, 73, 229, -1, 229,
1967 74, 229, -1, 229, 69, 229, -1, 229, 70, 229,
1968 -1, 229, 72, 229, -1, 229, 71, 229, -1, 229,
1969 84, 229, -1, 229, 85, 229, -1, 116, 229, -1,
1970 115, 229, -1, 229, 106, 229, -1, 229, 105, 229,
1971 -1, 229, 104, 229, -1, 229, 93, 229, -1, 229,
1972 92, 229, -1, 229, 91, 229, -1, 229, 112, 229,
1973 -1, 229, 114, 229, -1, 229, 111, 229, -1, 229,
1974 110, 229, -1, 229, 113, 229, -1, 229, 67, 229,
1975 -1, 229, 68, 229, -1, 229, 39, 229, -1, 229,
1976 66, 229, -1, 42, 126, 229, 129, -1, 35, 229,
1977 -1, 35, -1, 126, 227, 129, -1, 110, 229, -1,
1978 229, 120, 229, 121, -1, 120, 220, 121, -1, -1,
1979 232, -1, 226, 103, 226, -1, 232, 97, 226, 103,
1980 226, -1, 122, 231, 128, -1, 229, 78, 229, -1,
1981 229, 77, 229, -1, 229, 82, 229, -1, 229, 81,
1982 229, -1, 229, 83, 229, -1, 229, 76, 229, -1,
1983 229, 75, 229, -1, 229, 79, 229, -1, 229, 80,
1984 229, -1, 229, 99, 229, -1, 229, 102, 229, 103,
1985 229, -1, 229, 88, -1, 229, 87, -1, 88, 229,
1986 -1, 87, 229, -1, 52, 123, 3, -1, 229, 123,
1987 3, -1, 3, -1, 184, 17, 3, -1, 184, 17,
1988 3, 99, 3, -1, 184, 17, 3, 99, 4, -1,
1992 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1993 static const yytype_uint16 yyrline[] =
1995 0, 1566, 1566, 1568, 1568, 1569, 1570, 1572, 1573, 1574,
1996 1575, 1576, 1577, 1578, 1580, 1580, 1581, 1582, 1584, 1585,
1997 1586, 1587, 1588, 1589, 1591, 1592, 1594, 1595, 1598, 1599,
1998 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1610, 1611,
1999 1612, 1613, 1614, 1615, 1616, 1618, 1619, 1621, 1622, 1623,
2000 1624, 1628, 1635, 1636, 1640, 1641, 1643, 1644, 1646, 1687,
2001 1688, 1691, 1691, 1710, 1711, 1712, 1715, 1718, 1722, 1723,
2002 1725, 1745, 1788, 1788, 1807, 1807, 1822, 1825, 1828, 1831,
2003 1835, 1836, 1837, 1838, 1839, 1840, 1842, 1853, 1856, 1856,
2004 1885, 1885, 1905, 1905, 1922, 1923, 1924, 1925, 1933, 1942,
2005 1942, 1987, 1991, 2002, 2011, 2012, 2014, 2015, 2017, 2017,
2006 2019, 2019, 2022, 2030, 2040, 2041, 2042, 2043, 2045, 2046,
2007 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2055, 2056, 2058,
2008 2059, 2061, 2062, 2066, 2064, 2072, 2070, 2078, 2079, 2080,
2009 2081, 2082, 2083, 2084, 2086, 2092, 2093, 2094, 2095, 2096,
2010 2097, 2100, 2112, 2112, 2114, 2173, 2174, 2176, 2177, 2178,
2011 2179, 2180, 2182, 2183, 2184, 2189, 2192, 2197, 2202, 2209,
2012 2213, 2218, 2224, 2230, 2231, 2232, 2235, 2234, 2257, 2258,
2013 2260, 2259, 2279, 2287, 2295, 2296, 2298, 2299, 2301, 2302,
2014 2303, 2312, 2313, 2317, 2318, 2320, 2321, 2322, 2325, 2330,
2015 2354, 2402, 2422, 2443, 2446, 2453, 2454, 2455, 2461, 2467,
2016 2469, 2471, 2473, 2475, 2477, 2494, 2499, 2502, 2505, 2508,
2017 2511, 2514, 2517, 2520, 2523, 2527, 2528, 2531, 2534, 2537,
2018 2540, 2543, 2546, 2549, 2553, 2564, 2582, 2587, 2592, 2597,
2019 2602, 2607, 2611, 2615, 2620, 2624, 2628, 2637, 2646, 2656,
2020 2661, 2673, 2679, 2684, 2690, 2696, 2700, 2702, 2713, 2722,
2021 2729, 2730, 2732, 2738, 2747, 2754, 2766, 2772, 2778, 2784,
2022 2790, 2796, 2802, 2815, 2826, 2833, 2846, 2873, 2887, 2901,
2023 2915, 2930, 2964, 3062, 3063, 3064, 3066
2027 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2028 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2029 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2030 static const char *const yytname[] =
2032 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
2033 "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
2034 "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
2035 "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
2036 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
2037 "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
2038 "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2039 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2040 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2041 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2042 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2043 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2044 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2045 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
2046 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
2047 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2048 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2049 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2050 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2051 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2052 "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
2053 "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
2054 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2055 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2056 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2057 "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
2058 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2059 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2060 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2061 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2062 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2063 "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
2064 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2065 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2066 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2067 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2068 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2069 "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
2070 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2071 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2072 "$@13", "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE",
2073 "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2074 "EXPRESSION_LIST", "NEW", "FUNCTIONCALL", "DELETE", "RETURN",
2075 "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E", "CONSTANT",
2076 "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2077 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2082 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2084 static const yytype_uint16 yytoknum[] =
2086 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2087 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2088 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2089 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2090 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2091 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2092 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2093 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2094 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2095 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
2096 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
2097 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
2098 91, 93, 123, 46, 358, 359, 40, 360, 125, 41
2102 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2103 static const yytype_uint8 yyr1[] =
2105 0, 130, 131, 132, 132, 133, 133, 134, 134, 134,
2106 134, 134, 134, 134, 135, 135, 136, 136, 137, 137,
2107 137, 137, 137, 137, 138, 138, 139, 139, 140, 140,
2108 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
2109 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
2110 142, 143, 144, 144, 145, 145, 146, 146, 147, 148,
2111 148, 150, 149, 151, 151, 151, 152, 152, 153, 153,
2112 154, 155, 157, 156, 159, 158, 160, 160, 161, 161,
2113 162, 162, 162, 162, 163, 163, 164, 165, 167, 166,
2114 169, 168, 171, 170, 172, 172, 173, 173, 173, 175,
2115 174, 176, 176, 177, 178, 178, 179, 179, 181, 180,
2116 182, 180, 183, 183, 184, 184, 185, 185, 186, 186,
2117 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
2118 188, 189, 189, 191, 190, 193, 192, 194, 194, 195,
2119 195, 196, 196, 196, 196, 197, 197, 198, 198, 199,
2120 199, 199, 200, 200, 201, 202, 202, 203, 203, 203,
2121 203, 203, 203, 203, 203, 204, 204, 204, 204, 205,
2122 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
2123 212, 211, 213, 214, 215, 215, 216, 216, 217, 217,
2124 217, 218, 218, 219, 219, 220, 220, 221, 221, 222,
2125 223, 223, 224, 225, 225, 226, 227, 227, 228, 229,
2126 229, 229, 229, 229, 229, 230, 230, 230, 230, 230,
2127 230, 230, 230, 230, 230, 229, 229, 229, 229, 229,
2128 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2129 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2130 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2131 231, 231, 232, 232, 229, 229, 229, 229, 229, 229,
2132 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2133 229, 229, 233, 234, 234, 234, 235
2136 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2137 static const yytype_uint8 yyr2[] =
2139 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2140 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
2141 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
2142 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2143 1, 1, 1, 1, 1, 1, 1, 3, 2, 2,
2144 1, 1, 2, 0, 2, 2, 1, 3, 3, 0,
2145 2, 0, 7, 0, 1, 1, 3, 1, 2, 3,
2146 8, 6, 0, 6, 0, 7, 1, 2, 1, 2,
2147 0, 1, 1, 2, 1, 2, 4, 3, 0, 8,
2148 0, 9, 0, 5, 1, 2, 1, 2, 1, 0,
2149 6, 2, 1, 5, 1, 1, 3, 1, 0, 6,
2150 0, 5, 2, 4, 0, 1, 1, 2, 1, 1,
2151 1, 1, 1, 1, 1, 1, 1, 0, 2, 0,
2152 2, 0, 2, 0, 9, 0, 8, 0, 1, 1,
2153 2, 1, 1, 1, 1, 0, 1, 1, 2, 1,
2154 2, 8, 1, 1, 5, 0, 2, 1, 1, 1,
2155 1, 1, 1, 1, 1, 0, 1, 2, 4, 3,
2156 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
2157 0, 10, 1, 3, 1, 1, 1, 3, 1, 1,
2158 1, 2, 0, 0, 3, 0, 1, 1, 3, 3,
2159 4, 4, 2, 1, 2, 1, 1, 3, 1, 1,
2160 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2161 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
2162 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
2163 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2164 3, 3, 3, 4, 2, 1, 3, 2, 4, 3,
2165 0, 1, 3, 5, 3, 3, 3, 3, 3, 3,
2166 3, 3, 3, 3, 3, 5, 2, 2, 2, 2,
2170 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2171 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2172 means the default is an error. */
2173 static const yytype_uint16 yydefact[] =
2175 114, 282, 220, 214, 217, 218, 215, 216, 219, 0,
2176 0, 74, 0, 0, 120, 118, 119, 126, 0, 125,
2177 179, 221, 255, 121, 0, 0, 0, 224, 122, 124,
2178 123, 0, 0, 223, 222, 0, 0, 0, 0, 13,
2179 0, 0, 0, 195, 260, 0, 0, 2, 114, 5,
2180 51, 12, 34, 63, 29, 30, 31, 32, 33, 36,
2181 35, 7, 28, 0, 115, 116, 9, 8, 11, 10,
2182 209, 212, 225, 213, 208, 37, 206, 210, 211, 0,
2183 68, 72, 114, 88, 104, 105, 110, 107, 0, 182,
2184 193, 178, 0, 254, 0, 182, 0, 185, 184, 112,
2185 0, 99, 0, 195, 202, 61, 279, 278, 257, 237,
2186 236, 0, 196, 197, 205, 0, 0, 261, 0, 1,
2187 6, 282, 0, 0, 64, 0, 0, 65, 175, 0,
2188 153, 0, 152, 0, 117, 0, 0, 0, 0, 0,
2189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2190 0, 0, 0, 0, 0, 0, 0, 277, 276, 0,
2191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2192 0, 0, 0, 0, 0, 0, 195, 69, 0, 0,
2193 78, 102, 203, 0, 76, 38, 114, 39, 50, 0,
2194 40, 41, 42, 44, 0, 43, 45, 46, 0, 114,
2195 108, 0, 195, 199, 165, 0, 0, 0, 25, 280,
2196 0, 0, 259, 0, 0, 264, 0, 256, 192, 55,
2197 56, 192, 54, 0, 0, 174, 173, 0, 127, 129,
2198 192, 207, 251, 252, 249, 250, 230, 231, 233, 232,
2199 228, 229, 271, 270, 266, 265, 272, 273, 268, 267,
2200 269, 234, 235, 243, 242, 241, 274, 0, 240, 239,
2201 238, 226, 227, 247, 246, 244, 248, 245, 0, 281,
2202 0, 0, 0, 79, 101, 204, 77, 48, 114, 27,
2203 206, 49, 0, 0, 0, 23, 0, 114, 16, 22,
2204 19, 18, 21, 20, 114, 106, 0, 155, 0, 0,
2205 166, 170, 114, 183, 113, 253, 0, 24, 201, 0,
2206 198, 262, 0, 0, 53, 0, 53, 0, 0, 0,
2207 0, 131, 0, 0, 53, 0, 258, 200, 114, 286,
2208 47, 26, 0, 283, 0, 111, 17, 0, 194, 0,
2209 0, 172, 167, 192, 0, 103, 0, 114, 0, 190,
2210 189, 0, 188, 191, 0, 58, 57, 0, 114, 165,
2211 128, 0, 0, 186, 130, 135, 154, 275, 73, 0,
2212 0, 80, 109, 161, 158, 159, 157, 160, 164, 163,
2213 162, 156, 155, 0, 0, 169, 0, 0, 94, 98,
2214 96, 100, 59, 263, 0, 52, 0, 71, 0, 132,
2215 133, 0, 114, 75, 284, 285, 0, 0, 0, 81,
2216 84, 82, 171, 180, 168, 92, 0, 95, 97, 114,
2217 62, 114, 192, 114, 187, 0, 149, 0, 0, 114,
2218 147, 0, 25, 89, 85, 83, 25, 25, 192, 60,
2219 70, 0, 141, 144, 0, 0, 114, 139, 142, 143,
2220 150, 175, 136, 148, 25, 87, 0, 0, 0, 176,
2221 134, 140, 0, 86, 181, 93, 90, 25, 0, 0,
2222 0, 165, 25, 177, 0, 0, 192, 91, 151
2225 /* YYDEFGOTO[NTERM-NUM]. */
2226 static const yytype_int16 yydefgoto[] =
2228 -1, 46, 47, 48, 49, 286, 287, 288, 306, 307,
2229 187, 279, 189, 289, 355, 190, 222, 220, 420, 52,
2230 211, 125, 126, 53, 54, 55, 56, 178, 57, 82,
2231 191, 192, 408, 409, 410, 411, 58, 198, 388, 469,
2232 389, 437, 390, 391, 59, 208, 193, 60, 87, 351,
2233 61, 294, 199, 62, 194, 64, 65, 321, 323, 362,
2234 290, 423, 291, 402, 445, 446, 447, 428, 429, 430,
2235 133, 292, 341, 381, 299, 300, 301, 227, 293, 467,
2236 92, 70, 436, 97, 98, 352, 364, 353, 314, 203,
2237 111, 112, 71, 72, 73, 195, 113, 74, 75, 76,
2238 77, 116, 117, 78, 196, 197
2241 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2243 #define YYPACT_NINF -306
2244 static const yytype_int16 yypact[] =
2246 349, -306, -306, -306, -306, -306, -306, -306, -306, -40,
2247 -85, -306, -37, 35, -306, -306, -306, -306, 30, -306,
2248 68, -306, 52, -306, -24, 18, -16, -306, -306, -306,
2249 -306, -22, -35, -306, -306, 1538, -14, 1538, 1538, -306,
2250 1538, 1538, 1538, 1538, 1538, 1538, 167, -306, 473, -306,
2251 -306, -306, -306, 211, -306, -306, -306, -306, -306, -306,
2252 -306, -306, -306, 217, 640, -306, -306, -306, -306, -306,
2253 -306, -306, -306, -306, 76, -306, 1971, -306, -306, 60,
2254 -306, -306, 1469, -306, -306, -306, -306, -306, -28, -306,
2255 67, -306, 71, 141, 1538, 69, 81, -306, -306, -306,
2256 1538, -306, 186, 1538, 141, -306, 141, 141, 163, 141,
2257 141, 87, 115, -306, 1971, 120, 96, 128, -86, -306,
2258 -306, 165, 227, 230, -306, 138, 169, -306, -5, 238,
2259 -306, 241, -306, 246, -306, 1538, 1538, 1538, 1538, 1538,
2260 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2261 1538, 1538, 1538, 1538, 1538, 1538, 1538, -306, -306, 1538,
2262 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2263 1538, 1538, 1538, 1538, 1538, 254, 1538, -306, 1538, 242,
2264 255, 1538, 1538, 227, 265, -306, 593, -306, 173, 257,
2265 -306, -306, -306, -306, 261, -306, -306, -306, 1538, 845,
2266 -306, 72, 1538, -306, 9, -82, 49, 1599, 1349, -306,
2267 143, 1538, -306, 1538, 1538, -306, 1538, -306, 171, 182,
2268 -306, 171, 182, 1538, 1538, -306, -306, 277, 228, 231,
2269 171, 1971, 962, 836, 836, 836, 2337, 2337, 2337, 2337,
2270 962, 962, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
2271 1971, 2032, 2093, 340, 340, 340, 1971, 1727, 2154, 2215,
2272 2276, 962, 962, 163, 163, 141, 141, 141, 1788, -306,
2273 156, -55, 287, -306, 76, 76, -306, -306, 719, -306,
2274 1849, -306, 170, 288, 1663, -306, 175, 971, -306, -306,
2275 -306, -306, -306, -306, 845, -306, 164, -69, 294, 172,
2276 207, -306, 1469, 69, -306, -306, 177, 1349, -306, 74,
2277 -306, -306, 203, 63, 209, 227, 112, 73, 84, 183,
2278 18, 296, 18, 188, 209, 1538, -306, -306, 1469, -306,
2279 -306, -306, 1538, 214, 192, -306, -306, 189, -306, 61,
2280 63, -306, -306, 171, 11, -306, 8, 1469, 1538, -306,
2281 -306, 193, -306, -306, 1538, -306, -306, 1538, 1469, 9,
2282 -306, 18, 196, -306, 222, -306, -306, 1971, -306, 88,
2283 179, 130, -306, -306, -306, -306, -306, -306, -306, -306,
2284 -306, -306, 221, 201, 294, -306, 202, 199, -306, -306,
2285 8, -306, 268, -306, 90, -306, 200, -306, 205, 222,
2286 -306, 18, 394, -306, -306, -306, 1538, 232, 210, 130,
2287 -306, -306, -306, -306, -306, -306, 336, -306, -306, 1469,
2288 -306, 1469, 171, 1097, -306, 337, -306, 316, 216, 529,
2289 -306, 1910, 1349, -306, -306, -306, 1349, 1349, 171, -306,
2290 -306, 224, -306, -306, 66, 219, 1223, -306, -306, -306,
2291 -306, -5, -306, -306, 1349, -306, 220, 223, 226, -306,
2292 -306, -306, 347, -306, -306, -306, -306, 1349, 239, 244,
2293 243, 9, 1349, -306, 247, 250, 171, -306, -306
2296 /* YYPGOTO[NTERM-NUM]. */
2297 static const yytype_int16 yypgoto[] =
2299 -306, -306, -306, -306, 327, 85, -306, 93, -227, 197,
2300 1, -76, -244, 16, 58, 332, 270, 75, -306, -306,
2301 -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
2302 -306, -306, -306, -306, -15, -11, -306, -306, 15, -306,
2303 17, -306, -306, -306, -306, -306, -306, -306, -193, 19,
2304 -306, -306, -306, -306, 0, -306, 335, -306, -306, -306,
2305 31, -306, 39, -306, -306, -306, -38, -306, -306, -23,
2306 -306, 2, 27, -306, -305, -306, -271, -41, 3, -306,
2307 -306, -306, -306, 398, -306, -20, 57, 80, -184, -306,
2308 -93, -306, -306, -306, -306, -306, -26, -17, -46, -18,
2309 -306, -306, -306, -306, -306, -306
2312 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2313 positive, shift that token. If negative, reduce the rule which
2314 number is the opposite. If zero, do what YYDEFACT says.
2315 If YYTABLE_NINF, syntax error. */
2316 #define YYTABLE_NINF -206
2317 static const yytype_int16 yytable[] =
2319 63, 50, 68, 69, 93, 99, 188, 127, 295, 79,
2320 210, 135, 297, 295, 297, 135, 51, 104, 115, 106,
2321 107, 95, 108, 109, 110, 114, 114, 342, 118, 225,
2322 339, 66, 88, 89, 340, 386, 85, 316, 84, 67,
2323 387, 81, 135, 217, 96, 226, 324, 302, 63, 50,
2324 68, 69, 303, 85, 398, 1, 2, 3, 345, 4,
2325 5, 6, 7, 8, 51, 373, 95, 85, 374, 375,
2326 376, 91, 377, 385, 328, 84, 18, 205, 20, 66,
2327 21, 85, 207, 270, 368, 114, 80, 67, 102, 83,
2328 85, 103, 128, 303, 200, 201, 27, 130, 349, 298,
2329 101, 384, 94, 392, 32, 378, 33, 34, 85, 296,
2330 100, 132, 105, 414, 397, 379, 380, 231, 232, 233,
2331 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
2332 244, 245, 246, 247, 248, 249, 250, 251, 252, 37,
2333 38, 253, 254, 255, 256, 257, 258, 259, 260, 261,
2334 262, 263, 264, 265, 266, 267, 268, 86, 114, 383,
2335 115, 271, 304, 406, 274, 275, 474, 119, 280, 357,
2336 135, 135, 43, 135, 44, 439, 350, 440, 45, -66,
2337 284, 135, 404, 405, 114, 135, 177, 310, 311, 209,
2338 312, 407, -104, 202, 309, 114, 114, 204, 114, 63,
2339 50, 295, 331, 347, 206, 455, 317, 318, 212, 456,
2340 457, 354, 213, 358, 121, 2, 3, 403, 4, 5,
2341 6, 7, 8, 214, 215, 216, 188, 463, 157, 158,
2342 218, 331, -67, 221, 223, 18, 224, 20, 441, 21,
2343 470, 228, 122, 128, 229, 475, 22, 129, 130, 230,
2344 157, 158, 188, 26, 458, 27, 123, 269, 273, 272,
2345 131, 174, 132, 32, 175, 33, 34, 176, 276, 281,
2346 282, 188, 308, 35, 313, 171, 172, 173, 283, 315,
2347 319, 320, 188, 174, 322, 327, 175, 63, 50, 176,
2348 329, 333, 478, 338, 63, 50, 332, 297, 37, 38,
2349 360, 343, 363, 335, 344, 346, 348, 367, 354, 359,
2350 365, 396, 361, 370, 371, 369, 394, 372, 400, 401,
2351 339, 40, 393, 413, 415, 416, 41, 42, 395, 421,
2352 114, 43, 419, 44, 422, 432, 114, 45, 433, 438,
2353 450, 363, 451, 188, 452, 188, 459, 460, 464, -3,
2354 468, 465, 1, 2, 3, 466, 4, 5, 6, 7,
2355 8, 9, 10, 11, 12, 471, 472, 13, 14, 15,
2356 16, 473, 17, 18, 19, 120, 476, 21, 477, 337,
2357 336, 424, 366, 278, 22, 124, 23, 24, 431, 25,
2358 356, 26, 219, 27, 434, 28, 29, 30, 435, 134,
2359 31, 32, 427, 33, 34, 417, 453, 418, 461, 412,
2360 462, 35, 36, 14, 15, 16, 90, 17, 399, 19,
2361 382, 0, 0, 444, 443, 448, 449, 157, 158, 427,
2362 0, 23, 0, 0, 0, 0, 37, 38, 0, 425,
2363 28, 29, 30, 0, 0, 39, 444, 443, 448, 449,
2364 169, 170, 171, 172, 173, 0, 0, 0, 0, 40,
2365 174, 0, 0, 175, 41, 42, 176, 0, 0, 43,
2366 0, 44, 0, -4, 0, 45, 1, 2, 3, 0,
2367 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2368 426, 13, 14, 15, 16, 0, 17, 18, 19, 0,
2369 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2370 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2371 29, 30, -145, 0, 31, 32, 0, 33, 34, 0,
2372 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2373 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
2374 16, 0, 17, 0, 19, 0, 0, 0, 0, 0,
2375 37, 38, 0, 0, 0, 0, 23, 0, 0, 39,
2376 0, 0, 0, 0, 425, 28, 29, 30, 0, 0,
2377 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2378 0, 0, 0, 43, 0, 44, 1, 2, 3, 45,
2379 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2380 0, 0, 14, 15, 16, 179, 17, 18, 19, 20,
2381 0, 21, 180, 0, 122, 426, 0, 0, 22, 181,
2382 23, 24, 0, 25, 182, 26, 0, 27, 183, 28,
2383 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2384 0, 0, 0, 0, 0, 35, 36, -146, 184, 14,
2385 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
2386 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
2387 37, 38, 0, 0, 0, 0, 28, 29, 30, 185,
2388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2389 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2390 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2391 0, 277, 1, 2, 3, 0, 4, 5, 6, 7,
2392 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2393 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2394 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2395 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2396 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2397 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2399 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2400 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2401 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2402 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2403 0, 44, 0, 0, 0, 45, 0, 330, 1, 2,
2404 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
2405 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
2406 19, 0, 0, 21, 0, 136, 0, 0, 0, 0,
2407 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
2408 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2409 34, 0, -206, -206, -206, 0, 0, 35, 36, 144,
2410 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2411 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2412 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2413 0, 285, 0, 167, 168, 0, 169, 170, 171, 172,
2414 173, 0, 0, 0, 0, 40, 174, 0, 0, 175,
2415 41, 42, 176, 0, 0, 43, 0, 44, 0, 0,
2416 0, 45, 0, -14, 1, 2, 3, 0, 4, 5,
2417 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
2418 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
2419 0, -206, 0, 0, 0, 0, 22, 0, 23, 24,
2420 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
2421 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
2422 0, 0, 0, 35, 36, -206, -206, 0, 0, 0,
2423 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
2424 158, 0, 0, 159, 160, 161, 0, 0, 37, 38,
2425 0, 0, 0, 0, 0, 0, 0, 285, 0, -206,
2426 -206, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2427 0, 40, 174, 0, 0, 175, 41, 42, 176, 0,
2428 0, 43, 0, 44, 0, 0, 0, 45, 0, -15,
2429 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
2430 10, 11, 12, 0, 0, 0, 14, 15, 16, 0,
2431 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
2432 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
2433 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
2434 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2435 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2437 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
2438 0, 0, 0, 442, 0, 0, 0, 0, 0, 0,
2439 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2440 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2441 0, 0, 0, 45, 0, -137, 1, 2, 3, 0,
2442 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2443 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
2444 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2445 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2446 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2447 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2450 37, 38, 0, 0, 0, 0, 0, 0, 0, 442,
2451 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2452 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2453 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2454 0, -138, 1, 2, 3, 0, 4, 5, 6, 7,
2455 8, 9, 10, 11, 12, 0, -114, 0, 14, 15,
2456 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2457 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2458 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2459 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2460 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2462 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2463 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2464 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2465 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2466 0, 44, 1, 2, 3, 45, 4, 5, 6, 7,
2467 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2468 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2469 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2470 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2471 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2472 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2473 0, 1, 2, 3, 0, 4, 5, 6, 7, 8,
2474 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2475 0, 0, 18, 0, 20, 185, 21, 0, 0, 0,
2476 0, 0, 0, 22, 0, 0, 0, 0, 0, 40,
2477 26, 0, 27, 0, 41, 42, 0, 0, 0, 43,
2478 32, 186, 33, 34, 0, 45, 0, 0, 0, 0,
2479 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2480 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2481 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2482 0, 0, 0, 0, 0, 0, 0, 0, 136, 0,
2483 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
2484 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
2485 44, 0, 0, 0, 45, 137, 138, 139, 140, 141,
2486 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2487 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2488 159, 160, 161, 0, 0, 0, 0, 0, 162, 0,
2489 0, 163, 136, 164, 165, 166, 167, 168, 0, 169,
2490 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2491 0, 0, 175, 0, 0, 176, 0, 0, 305, 137,
2492 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2493 148, 149, 150, 151, 152, 153, 154, 155, 156, 0,
2494 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2495 0, 0, 162, 0, 0, 163, 136, 164, 165, 166,
2496 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2497 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2498 0, 0, 334, 137, 138, 139, 140, 141, 142, 143,
2499 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2500 154, 155, 156, 0, 157, 158, 0, 0, 159, 160,
2501 161, 0, 0, 0, 0, 0, 162, 136, 0, 163,
2502 325, 164, 165, 166, 167, 168, 0, 169, 170, 171,
2503 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2504 175, 0, 0, 176, 137, 138, 139, 140, 141, 142,
2505 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
2506 153, 154, 155, 156, 0, 157, 158, 0, 0, 159,
2507 160, 161, 0, 0, 0, 0, 0, 162, 136, 0,
2508 163, 0, 164, 165, 166, 167, 168, 0, 169, 170,
2509 171, 172, 173, 0, 0, 0, 0, 0, 174, 326,
2510 0, 175, 0, 0, 176, 137, 138, 139, 140, 141,
2511 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2512 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2513 159, 160, 161, 0, 0, 0, 0, 0, 162, 136,
2514 0, 163, -205, 164, 165, 166, 167, 168, 0, 169,
2515 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2516 0, 0, 175, 0, 0, 176, 137, 138, 139, 140,
2517 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
2518 151, 152, 153, 154, 155, 156, 0, 157, 158, 0,
2519 0, 159, 160, 161, 0, 0, 0, 0, 0, 162,
2520 136, 0, 163, 454, 164, 165, 166, 167, 168, 0,
2521 169, 170, 171, 172, 173, 0, 0, 0, 0, 0,
2522 174, 0, 0, 175, 0, 0, 176, 137, 138, 139,
2523 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
2524 150, 151, 152, 153, 154, 155, 156, 0, 157, 158,
2525 0, 0, 159, 160, 161, 0, 0, 0, 0, 0,
2526 162, 136, 0, 163, 0, 164, 165, 166, 167, 168,
2527 0, 169, 170, 171, 172, 173, 0, 0, 0, 0,
2528 0, 174, 0, 0, 175, 0, 0, 176, 137, 138,
2529 139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
2530 0, 0, 0, 0, 0, 0, 0, 156, 0, 157,
2531 158, 0, 0, 159, 160, 161, 0, 0, 0, 0,
2532 0, 0, 136, 0, 0, 0, 164, 165, 166, 167,
2533 168, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2534 0, 0, 174, 0, 0, 175, 0, 0, 176, 137,
2535 138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
2536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2537 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2538 0, 0, 0, 136, 0, 0, 0, 164, 165, 166,
2539 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2540 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2541 137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
2542 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2543 0, 157, 158, 0, 0, 159, 160, 161, 0, 0,
2544 0, 0, 0, 0, 136, 0, 0, 0, 0, 165,
2545 166, 167, 168, 0, 169, 170, 171, 172, 173, 0,
2546 0, 0, 0, 0, 174, 0, 0, 175, 0, 0,
2547 176, 137, 138, 139, 140, 141, 142, 143, 144, 145,
2548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2549 0, 0, 157, 158, 0, 0, 159, 160, 161, 0,
2550 0, 0, 0, 0, 0, 136, 0, 0, 0, 0,
2551 0, 166, 167, 168, 0, 169, 170, 171, 172, 173,
2552 0, 0, 0, 0, 0, 174, 0, 0, 175, 0,
2553 0, 176, 137, 138, 139, 140, 141, 142, 143, 144,
2554 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2555 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2556 0, 0, 0, 0, 0, 0, 136, 0, 0, 0,
2557 0, 0, -206, 167, 168, 0, 169, 170, 171, 172,
2558 173, 0, 0, 0, 0, 0, 174, 0, 0, 175,
2559 0, 0, 176, 137, 138, 139, -206, -206, -206, -206,
2560 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
2561 0, 0, 0, 0, 157, 158, 0, 0, 159, 160,
2562 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2563 0, 0, 0, 0, 167, 168, 0, 169, 170, 171,
2564 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2568 static const yytype_int16 yycheck[] =
2570 0, 0, 0, 0, 22, 25, 82, 53, 201, 49,
2571 103, 97, 3, 206, 3, 97, 0, 35, 44, 37,
2572 38, 3, 40, 41, 42, 43, 44, 298, 45, 34,
2573 99, 0, 13, 3, 103, 27, 18, 221, 3, 0,
2574 32, 126, 97, 129, 25, 50, 230, 129, 48, 48,
2575 48, 48, 3, 18, 359, 3, 4, 5, 302, 7,
2576 8, 9, 10, 11, 48, 4, 3, 18, 7, 8,
2577 9, 3, 11, 344, 129, 3, 24, 94, 26, 48,
2578 28, 18, 100, 176, 328, 103, 126, 48, 123, 126,
2579 18, 126, 26, 3, 122, 123, 44, 31, 35, 90,
2580 122, 90, 126, 347, 52, 44, 54, 55, 18, 202,
2581 126, 45, 126, 384, 358, 54, 55, 135, 136, 137,
2582 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2583 148, 149, 150, 151, 152, 153, 154, 155, 156, 87,
2584 88, 159, 160, 161, 162, 163, 164, 165, 166, 167,
2585 168, 169, 170, 171, 172, 173, 174, 122, 176, 343,
2586 186, 178, 113, 33, 181, 182, 471, 0, 186, 96,
2587 97, 97, 120, 97, 122, 419, 113, 421, 126, 67,
2588 198, 97, 3, 4, 202, 97, 126, 213, 214, 3,
2589 216, 61, 123, 126, 211, 213, 214, 126, 216, 199,
2590 199, 394, 278, 129, 123, 432, 223, 224, 121, 436,
2591 437, 99, 97, 129, 3, 4, 5, 129, 7, 8,
2592 9, 10, 11, 103, 128, 97, 302, 454, 87, 88,
2593 3, 307, 67, 3, 96, 24, 67, 26, 422, 28,
2594 467, 3, 31, 26, 3, 472, 35, 30, 31, 3,
2595 87, 88, 328, 42, 438, 44, 45, 3, 3, 17,
2596 43, 120, 45, 52, 123, 54, 55, 126, 3, 96,
2597 13, 347, 129, 62, 103, 112, 113, 114, 17, 97,
2598 3, 53, 358, 120, 53, 129, 123, 287, 287, 126,
2599 3, 3, 476, 129, 294, 294, 126, 3, 87, 88,
2600 320, 129, 322, 128, 97, 128, 103, 325, 99, 126,
2601 122, 357, 16, 99, 122, 332, 123, 128, 122, 97,
2602 99, 110, 348, 122, 122, 126, 115, 116, 354, 129,
2603 348, 120, 64, 122, 129, 103, 354, 126, 128, 3,
2604 3, 361, 26, 419, 128, 421, 122, 128, 128, 0,
2605 3, 128, 3, 4, 5, 129, 7, 8, 9, 10,
2606 11, 12, 13, 14, 15, 126, 122, 18, 19, 20,
2607 21, 128, 23, 24, 25, 48, 129, 28, 128, 294,
2608 287, 401, 324, 186, 35, 53, 37, 38, 406, 40,
2609 315, 42, 122, 44, 409, 46, 47, 48, 409, 64,
2610 51, 52, 402, 54, 55, 390, 429, 390, 446, 382,
2611 451, 62, 63, 19, 20, 21, 18, 23, 361, 25,
2612 340, -1, -1, 423, 423, 423, 423, 87, 88, 429,
2613 -1, 37, -1, -1, -1, -1, 87, 88, -1, 45,
2614 46, 47, 48, -1, -1, 96, 446, 446, 446, 446,
2615 110, 111, 112, 113, 114, -1, -1, -1, -1, 110,
2616 120, -1, -1, 123, 115, 116, 126, -1, -1, 120,
2617 -1, 122, -1, 0, -1, 126, 3, 4, 5, -1,
2618 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2619 96, 18, 19, 20, 21, -1, 23, 24, 25, -1,
2620 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2621 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2622 47, 48, 128, -1, 51, 52, -1, 54, 55, -1,
2623 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2624 -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
2625 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
2626 87, 88, -1, -1, -1, -1, 37, -1, -1, 96,
2627 -1, -1, -1, -1, 45, 46, 47, 48, -1, -1,
2628 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2629 -1, -1, -1, 120, -1, 122, 3, 4, 5, 126,
2630 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2631 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
2632 -1, 28, 29, -1, 31, 96, -1, -1, 35, 36,
2633 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
2634 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2635 -1, -1, -1, -1, -1, 62, 63, 128, 65, 19,
2636 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
2637 -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
2638 87, 88, -1, -1, -1, -1, 46, 47, 48, 96,
2639 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2640 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2641 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2642 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2643 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2644 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2645 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2646 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2647 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2648 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2649 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2650 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2651 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2652 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2653 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2654 -1, 122, -1, -1, -1, 126, -1, 128, 3, 4,
2655 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
2656 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
2657 25, -1, -1, 28, -1, 39, -1, -1, -1, -1,
2658 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
2659 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2660 55, -1, 66, 67, 68, -1, -1, 62, 63, 73,
2661 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2662 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2663 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2664 -1, 96, -1, 107, 108, -1, 110, 111, 112, 113,
2665 114, -1, -1, -1, -1, 110, 120, -1, -1, 123,
2666 115, 116, 126, -1, -1, 120, -1, 122, -1, -1,
2667 -1, 126, -1, 128, 3, 4, 5, -1, 7, 8,
2668 9, 10, 11, 12, 13, 14, 15, -1, -1, -1,
2669 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
2670 -1, 39, -1, -1, -1, -1, 35, -1, 37, 38,
2671 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
2672 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
2673 -1, -1, -1, 62, 63, 73, 74, -1, -1, -1,
2674 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2675 88, -1, -1, 91, 92, 93, -1, -1, 87, 88,
2676 -1, -1, -1, -1, -1, -1, -1, 96, -1, 107,
2677 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2678 -1, 110, 120, -1, -1, 123, 115, 116, 126, -1,
2679 -1, 120, -1, 122, -1, -1, -1, 126, -1, 128,
2680 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
2681 13, 14, 15, -1, -1, -1, 19, 20, 21, -1,
2682 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
2683 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
2684 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
2685 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2686 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2687 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2688 -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
2689 -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
2690 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2691 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2692 -1, -1, -1, 126, -1, 128, 3, 4, 5, -1,
2693 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2694 -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
2695 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2696 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2697 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2698 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2699 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2700 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2701 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2703 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2704 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2705 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2706 11, 12, 13, 14, 15, -1, 17, -1, 19, 20,
2707 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2708 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2709 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2710 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2711 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2713 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2714 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2715 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2716 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2717 -1, 122, 3, 4, 5, 126, 7, 8, 9, 10,
2718 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2719 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2720 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2721 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2722 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2723 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2724 -1, 3, 4, 5, -1, 7, 8, 9, 10, 11,
2725 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2726 -1, -1, 24, -1, 26, 96, 28, -1, -1, -1,
2727 -1, -1, -1, 35, -1, -1, -1, -1, -1, 110,
2728 42, -1, 44, -1, 115, 116, -1, -1, -1, 120,
2729 52, 122, 54, 55, -1, 126, -1, -1, -1, -1,
2730 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2732 -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
2733 -1, -1, -1, -1, -1, -1, -1, -1, 39, -1,
2734 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
2735 -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
2736 122, -1, -1, -1, 126, 66, 67, 68, 69, 70,
2737 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2738 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2739 91, 92, 93, -1, -1, -1, -1, -1, 99, -1,
2740 -1, 102, 39, 104, 105, 106, 107, 108, -1, 110,
2741 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2742 -1, -1, 123, -1, -1, 126, -1, -1, 129, 66,
2743 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
2744 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
2745 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2746 -1, -1, 99, -1, -1, 102, 39, 104, 105, 106,
2747 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2748 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2749 -1, -1, 129, 66, 67, 68, 69, 70, 71, 72,
2750 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
2751 83, 84, 85, -1, 87, 88, -1, -1, 91, 92,
2752 93, -1, -1, -1, -1, -1, 99, 39, -1, 102,
2753 103, 104, 105, 106, 107, 108, -1, 110, 111, 112,
2754 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2755 123, -1, -1, 126, 66, 67, 68, 69, 70, 71,
2756 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
2757 82, 83, 84, 85, -1, 87, 88, -1, -1, 91,
2758 92, 93, -1, -1, -1, -1, -1, 99, 39, -1,
2759 102, -1, 104, 105, 106, 107, 108, -1, 110, 111,
2760 112, 113, 114, -1, -1, -1, -1, -1, 120, 121,
2761 -1, 123, -1, -1, 126, 66, 67, 68, 69, 70,
2762 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2763 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2764 91, 92, 93, -1, -1, -1, -1, -1, 99, 39,
2765 -1, 102, 103, 104, 105, 106, 107, 108, -1, 110,
2766 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2767 -1, -1, 123, -1, -1, 126, 66, 67, 68, 69,
2768 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2769 80, 81, 82, 83, 84, 85, -1, 87, 88, -1,
2770 -1, 91, 92, 93, -1, -1, -1, -1, -1, 99,
2771 39, -1, 102, 103, 104, 105, 106, 107, 108, -1,
2772 110, 111, 112, 113, 114, -1, -1, -1, -1, -1,
2773 120, -1, -1, 123, -1, -1, 126, 66, 67, 68,
2774 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2775 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2776 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2777 99, 39, -1, 102, -1, 104, 105, 106, 107, 108,
2778 -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2779 -1, 120, -1, -1, 123, -1, -1, 126, 66, 67,
2780 68, 69, 70, 71, 72, 73, 74, -1, -1, -1,
2781 -1, -1, -1, -1, -1, -1, -1, 85, -1, 87,
2782 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
2783 -1, -1, 39, -1, -1, -1, 104, 105, 106, 107,
2784 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2785 -1, -1, 120, -1, -1, 123, -1, -1, 126, 66,
2786 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
2787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2788 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2789 -1, -1, -1, 39, -1, -1, -1, 104, 105, 106,
2790 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2791 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2792 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
2793 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2794 -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
2795 -1, -1, -1, -1, 39, -1, -1, -1, -1, 105,
2796 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
2797 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
2798 126, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2800 -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2801 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2802 -1, 106, 107, 108, -1, 110, 111, 112, 113, 114,
2803 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
2804 -1, 126, 66, 67, 68, 69, 70, 71, 72, 73,
2805 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2806 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2807 -1, -1, -1, -1, -1, -1, 39, -1, -1, -1,
2808 -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
2809 114, -1, -1, -1, -1, -1, 120, -1, -1, 123,
2810 -1, -1, 126, 66, 67, 68, 69, 70, 71, 72,
2811 73, 74, -1, -1, -1, -1, -1, -1, -1, -1,
2812 -1, -1, -1, -1, 87, 88, -1, -1, 91, 92,
2813 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2814 -1, -1, -1, -1, 107, 108, -1, 110, 111, 112,
2815 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2819 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2820 symbol of state STATE-NUM. */
2821 static const yytype_uint8 yystos[] =
2823 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
2824 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
2825 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
2826 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
2827 110, 115, 116, 120, 122, 126, 131, 132, 133, 134,
2828 140, 143, 149, 153, 154, 155, 156, 158, 166, 174,
2829 177, 180, 183, 184, 185, 186, 190, 192, 201, 208,
2830 211, 222, 223, 224, 227, 228, 229, 230, 233, 49,
2831 126, 126, 159, 126, 3, 18, 122, 178, 179, 3,
2832 213, 3, 210, 229, 126, 3, 179, 213, 214, 215,
2833 126, 122, 123, 126, 229, 126, 229, 229, 229, 229,
2834 229, 220, 221, 226, 229, 226, 231, 232, 227, 0,
2835 134, 3, 31, 45, 145, 151, 152, 228, 26, 30,
2836 31, 43, 45, 200, 186, 97, 39, 66, 67, 68,
2837 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2838 79, 80, 81, 82, 83, 84, 85, 87, 88, 91,
2839 92, 93, 99, 102, 104, 105, 106, 107, 108, 110,
2840 111, 112, 113, 114, 120, 123, 126, 126, 157, 22,
2841 29, 36, 41, 45, 65, 96, 122, 140, 141, 142,
2842 145, 160, 161, 176, 184, 225, 234, 235, 167, 182,
2843 122, 123, 126, 219, 126, 227, 123, 229, 175, 3,
2844 220, 150, 121, 97, 103, 128, 97, 129, 3, 146,
2845 147, 3, 146, 96, 67, 34, 50, 207, 3, 3,
2846 3, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2847 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2848 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2849 229, 229, 229, 229, 229, 229, 229, 229, 229, 3,
2850 220, 227, 17, 3, 227, 227, 3, 128, 139, 141,
2851 229, 96, 13, 17, 229, 96, 135, 136, 137, 143,
2852 190, 192, 201, 208, 181, 178, 220, 3, 90, 204,
2853 205, 206, 129, 3, 113, 129, 138, 139, 129, 227,
2854 226, 226, 226, 103, 218, 97, 218, 227, 227, 3,
2855 53, 187, 53, 188, 218, 103, 121, 129, 129, 3,
2856 128, 141, 126, 3, 129, 128, 137, 135, 129, 99,
2857 103, 202, 206, 129, 97, 142, 128, 129, 103, 35,
2858 113, 179, 215, 217, 99, 144, 147, 96, 129, 126,
2859 215, 16, 189, 215, 216, 122, 144, 229, 142, 227,
2860 99, 122, 128, 4, 7, 8, 9, 11, 44, 54,
2861 55, 203, 217, 218, 90, 206, 27, 32, 168, 170,
2862 172, 173, 142, 226, 123, 226, 228, 142, 204, 216,
2863 122, 97, 193, 129, 3, 4, 33, 61, 162, 163,
2864 164, 165, 202, 122, 206, 122, 126, 168, 170, 64,
2865 148, 129, 129, 191, 215, 45, 96, 184, 197, 198,
2866 199, 229, 103, 128, 164, 165, 212, 171, 3, 142,
2867 142, 218, 96, 140, 184, 194, 195, 196, 201, 208,
2868 3, 26, 128, 199, 103, 138, 138, 138, 218, 122,
2869 128, 196, 207, 138, 128, 128, 129, 209, 3, 169,
2870 138, 126, 122, 128, 204, 138, 129, 128, 218
2873 #define yyerrok (yyerrstatus = 0)
2874 #define yyclearin (yychar = YYEMPTY)
2875 #define YYEMPTY (-2)
2878 #define YYACCEPT goto yyacceptlab
2879 #define YYABORT goto yyabortlab
2880 #define YYERROR goto yyerrorlab
2883 /* Like YYERROR except do call yyerror. This remains here temporarily
2884 to ease the transition to the new meaning of YYERROR, for GCC.
2885 Once GCC version 2 has supplanted version 1, this can go. */
2887 #define YYFAIL goto yyerrlab
2889 #define YYRECOVERING() (!!yyerrstatus)
2891 #define YYBACKUP(Token, Value) \
2893 if (yychar == YYEMPTY && yylen == 1) \
2897 yytoken = YYTRANSLATE (yychar); \
2903 yyerror (YY_("syntax error: cannot back up")); \
2910 #define YYERRCODE 256
2913 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2914 If N is 0, then set CURRENT to the empty location which ends
2915 the previous symbol: RHS[0] (always defined). */
2917 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2918 #ifndef YYLLOC_DEFAULT
2919 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2923 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2924 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2925 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2926 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2930 (Current).first_line = (Current).last_line = \
2931 YYRHSLOC (Rhs, 0).last_line; \
2932 (Current).first_column = (Current).last_column = \
2933 YYRHSLOC (Rhs, 0).last_column; \
2939 /* YY_LOCATION_PRINT -- Print the location on the stream.
2940 This macro was not mandated originally: define only if we know
2941 we won't break user code: when these are the locations we know. */
2943 #ifndef YY_LOCATION_PRINT
2944 # if YYLTYPE_IS_TRIVIAL
2945 # define YY_LOCATION_PRINT(File, Loc) \
2946 fprintf (File, "%d.%d-%d.%d", \
2947 (Loc).first_line, (Loc).first_column, \
2948 (Loc).last_line, (Loc).last_column)
2950 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2955 /* YYLEX -- calling `yylex' with the right arguments. */
2958 # define YYLEX yylex (YYLEX_PARAM)
2960 # define YYLEX yylex ()
2963 /* Enable debugging if requested. */
2967 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2968 # define YYFPRINTF fprintf
2971 # define YYDPRINTF(Args) \
2977 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2981 YYFPRINTF (stderr, "%s ", Title); \
2982 yy_symbol_print (stderr, \
2984 YYFPRINTF (stderr, "\n"); \
2989 /*--------------------------------.
2990 | Print this symbol on YYOUTPUT. |
2991 `--------------------------------*/
2994 #if (defined __STDC__ || defined __C99__FUNC__ \
2995 || defined __cplusplus || defined _MSC_VER)
2997 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3000 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3003 YYSTYPE const * const yyvaluep;
3009 if (yytype < YYNTOKENS)
3010 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3022 /*--------------------------------.
3023 | Print this symbol on YYOUTPUT. |
3024 `--------------------------------*/
3026 #if (defined __STDC__ || defined __C99__FUNC__ \
3027 || defined __cplusplus || defined _MSC_VER)
3029 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3032 yy_symbol_print (yyoutput, yytype, yyvaluep)
3035 YYSTYPE const * const yyvaluep;
3038 if (yytype < YYNTOKENS)
3039 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3041 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3043 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3044 YYFPRINTF (yyoutput, ")");
3047 /*------------------------------------------------------------------.
3048 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3050 `------------------------------------------------------------------*/
3052 #if (defined __STDC__ || defined __C99__FUNC__ \
3053 || defined __cplusplus || defined _MSC_VER)
3055 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3058 yy_stack_print (yybottom, yytop)
3059 yytype_int16 *yybottom;
3060 yytype_int16 *yytop;
3063 YYFPRINTF (stderr, "Stack now");
3064 for (; yybottom <= yytop; yybottom++)
3066 int yybot = *yybottom;
3067 YYFPRINTF (stderr, " %d", yybot);
3069 YYFPRINTF (stderr, "\n");
3072 # define YY_STACK_PRINT(Bottom, Top) \
3075 yy_stack_print ((Bottom), (Top)); \
3079 /*------------------------------------------------.
3080 | Report that the YYRULE is going to be reduced. |
3081 `------------------------------------------------*/
3083 #if (defined __STDC__ || defined __C99__FUNC__ \
3084 || defined __cplusplus || defined _MSC_VER)
3086 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3089 yy_reduce_print (yyvsp, yyrule)
3094 int yynrhs = yyr2[yyrule];
3096 unsigned long int yylno = yyrline[yyrule];
3097 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3099 /* The symbols being reduced. */
3100 for (yyi = 0; yyi < yynrhs; yyi++)
3102 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3103 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3104 &(yyvsp[(yyi + 1) - (yynrhs)])
3106 YYFPRINTF (stderr, "\n");
3110 # define YY_REDUCE_PRINT(Rule) \
3113 yy_reduce_print (yyvsp, Rule); \
3116 /* Nonzero means print parse trace. It is left uninitialized so that
3117 multiple parsers can coexist. */
3119 #else /* !YYDEBUG */
3120 # define YYDPRINTF(Args)
3121 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3122 # define YY_STACK_PRINT(Bottom, Top)
3123 # define YY_REDUCE_PRINT(Rule)
3124 #endif /* !YYDEBUG */
3127 /* YYINITDEPTH -- initial size of the parser's stacks. */
3129 # define YYINITDEPTH 200
3132 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3133 if the built-in stack extension method is used).
3135 Do not make this value too large; the results are undefined if
3136 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3137 evaluated with infinite-precision integer arithmetic. */
3140 # define YYMAXDEPTH 10000
3148 # if defined __GLIBC__ && defined _STRING_H
3149 # define yystrlen strlen
3151 /* Return the length of YYSTR. */
3152 #if (defined __STDC__ || defined __C99__FUNC__ \
3153 || defined __cplusplus || defined _MSC_VER)
3155 yystrlen (const char *yystr)
3163 for (yylen = 0; yystr[yylen]; yylen++)
3171 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3172 # define yystpcpy stpcpy
3174 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3176 #if (defined __STDC__ || defined __C99__FUNC__ \
3177 || defined __cplusplus || defined _MSC_VER)
3179 yystpcpy (char *yydest, const char *yysrc)
3182 yystpcpy (yydest, yysrc)
3188 const char *yys = yysrc;
3190 while ((*yyd++ = *yys++) != '\0')
3199 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3200 quotes and backslashes, so that it's suitable for yyerror. The
3201 heuristic is that double-quoting is unnecessary unless the string
3202 contains an apostrophe, a comma, or backslash (other than
3203 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3204 null, do not copy; instead, return the length of what the result
3207 yytnamerr (char *yyres, const char *yystr)
3212 char const *yyp = yystr;
3219 goto do_not_strip_quotes;
3223 goto do_not_strip_quotes;
3236 do_not_strip_quotes: ;
3240 return yystrlen (yystr);
3242 return yystpcpy (yyres, yystr) - yyres;
3246 /* Copy into YYRESULT an error message about the unexpected token
3247 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3248 including the terminating null byte. If YYRESULT is null, do not
3249 copy anything; just return the number of bytes that would be
3250 copied. As a special case, return 0 if an ordinary "syntax error"
3251 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3252 size calculation. */
3254 yysyntax_error (char *yyresult, int yystate, int yychar)
3256 int yyn = yypact[yystate];
3258 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3262 int yytype = YYTRANSLATE (yychar);
3263 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3264 YYSIZE_T yysize = yysize0;
3266 int yysize_overflow = 0;
3267 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3268 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3272 /* This is so xgettext sees the translatable formats that are
3273 constructed on the fly. */
3274 YY_("syntax error, unexpected %s");
3275 YY_("syntax error, unexpected %s, expecting %s");
3276 YY_("syntax error, unexpected %s, expecting %s or %s");
3277 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3278 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3282 static char const yyunexpected[] = "syntax error, unexpected %s";
3283 static char const yyexpecting[] = ", expecting %s";
3284 static char const yyor[] = " or %s";
3285 char yyformat[sizeof yyunexpected
3286 + sizeof yyexpecting - 1
3287 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3288 * (sizeof yyor - 1))];
3289 char const *yyprefix = yyexpecting;
3291 /* Start YYX at -YYN if negative to avoid negative indexes in
3293 int yyxbegin = yyn < 0 ? -yyn : 0;
3295 /* Stay within bounds of both yycheck and yytname. */
3296 int yychecklim = YYLAST - yyn + 1;
3297 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3300 yyarg[0] = yytname[yytype];
3301 yyfmt = yystpcpy (yyformat, yyunexpected);
3303 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3304 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3306 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3310 yyformat[sizeof yyunexpected - 1] = '\0';
3313 yyarg[yycount++] = yytname[yyx];
3314 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3315 yysize_overflow |= (yysize1 < yysize);
3317 yyfmt = yystpcpy (yyfmt, yyprefix);
3321 yyf = YY_(yyformat);
3322 yysize1 = yysize + yystrlen (yyf);
3323 yysize_overflow |= (yysize1 < yysize);
3326 if (yysize_overflow)
3327 return YYSIZE_MAXIMUM;
3331 /* Avoid sprintf, as that infringes on the user's name space.
3332 Don't have undefined behavior even if the translation
3333 produced a string with the wrong number of "%s"s. */
3334 char *yyp = yyresult;
3336 while ((*yyp = *yyf) != '\0')
3338 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3340 yyp += yytnamerr (yyp, yyarg[yyi++]);
3353 #endif /* YYERROR_VERBOSE */
3356 /*-----------------------------------------------.
3357 | Release the memory associated to this symbol. |
3358 `-----------------------------------------------*/
3361 #if (defined __STDC__ || defined __C99__FUNC__ \
3362 || defined __cplusplus || defined _MSC_VER)
3364 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3367 yydestruct (yymsg, yytype, yyvaluep)
3377 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3387 /* Prevent warnings from -Wmissing-prototypes. */
3388 #ifdef YYPARSE_PARAM
3389 #if defined __STDC__ || defined __cplusplus
3390 int yyparse (void *YYPARSE_PARAM);
3394 #else /* ! YYPARSE_PARAM */
3395 #if defined __STDC__ || defined __cplusplus
3400 #endif /* ! YYPARSE_PARAM */
3403 /* The lookahead symbol. */
3406 /* The semantic value of the lookahead symbol. */
3409 /* Number of syntax errors so far. */
3414 /*-------------------------.
3415 | yyparse or yypush_parse. |
3416 `-------------------------*/
3418 #ifdef YYPARSE_PARAM
3419 #if (defined __STDC__ || defined __C99__FUNC__ \
3420 || defined __cplusplus || defined _MSC_VER)
3422 yyparse (void *YYPARSE_PARAM)
3425 yyparse (YYPARSE_PARAM)
3426 void *YYPARSE_PARAM;
3428 #else /* ! YYPARSE_PARAM */
3429 #if (defined __STDC__ || defined __C99__FUNC__ \
3430 || defined __cplusplus || defined _MSC_VER)
3443 /* Number of tokens to shift before error messages enabled. */
3446 /* The stacks and their tools:
3447 `yyss': related to states.
3448 `yyvs': related to semantic values.
3450 Refer to the stacks thru separate pointers, to allow yyoverflow
3451 to reallocate them elsewhere. */
3453 /* The state stack. */
3454 yytype_int16 yyssa[YYINITDEPTH];
3456 yytype_int16 *yyssp;
3458 /* The semantic value stack. */
3459 YYSTYPE yyvsa[YYINITDEPTH];
3463 YYSIZE_T yystacksize;
3467 /* Lookahead token as an internal (translated) token number. */
3469 /* The variables used to return semantic value and location from the
3474 /* Buffer for error messages, and its allocated size. */
3476 char *yymsg = yymsgbuf;
3477 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3480 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3482 /* The number of symbols on the RHS of the reduced rule.
3483 Keep to zero when no symbol should be popped. */
3489 yystacksize = YYINITDEPTH;
3491 YYDPRINTF ((stderr, "Starting parse\n"));
3496 yychar = YYEMPTY; /* Cause a token to be read. */
3498 /* Initialize stack pointers.
3499 Waste one element of value and location stack
3500 so that they stay on the same level as the state stack.
3501 The wasted elements are never initialized. */
3507 /*------------------------------------------------------------.
3508 | yynewstate -- Push a new state, which is found in yystate. |
3509 `------------------------------------------------------------*/
3511 /* In all cases, when you get here, the value and location stacks
3512 have just been pushed. So pushing a state here evens the stacks. */
3518 if (yyss + yystacksize - 1 <= yyssp)
3520 /* Get the current used size of the three stacks, in elements. */
3521 YYSIZE_T yysize = yyssp - yyss + 1;
3525 /* Give user a chance to reallocate the stack. Use copies of
3526 these so that the &'s don't force the real ones into
3528 YYSTYPE *yyvs1 = yyvs;
3529 yytype_int16 *yyss1 = yyss;
3531 /* Each stack pointer address is followed by the size of the
3532 data in use in that stack, in bytes. This used to be a
3533 conditional around just the two extra args, but that might
3534 be undefined if yyoverflow is a macro. */
3535 yyoverflow (YY_("memory exhausted"),
3536 &yyss1, yysize * sizeof (*yyssp),
3537 &yyvs1, yysize * sizeof (*yyvsp),
3543 #else /* no yyoverflow */
3544 # ifndef YYSTACK_RELOCATE
3545 goto yyexhaustedlab;
3547 /* Extend the stack our own way. */
3548 if (YYMAXDEPTH <= yystacksize)
3549 goto yyexhaustedlab;
3551 if (YYMAXDEPTH < yystacksize)
3552 yystacksize = YYMAXDEPTH;
3555 yytype_int16 *yyss1 = yyss;
3556 union yyalloc *yyptr =
3557 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3559 goto yyexhaustedlab;
3560 YYSTACK_RELOCATE (yyss_alloc, yyss);
3561 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3562 # undef YYSTACK_RELOCATE
3564 YYSTACK_FREE (yyss1);
3567 #endif /* no yyoverflow */
3569 yyssp = yyss + yysize - 1;
3570 yyvsp = yyvs + yysize - 1;
3572 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3573 (unsigned long int) yystacksize));
3575 if (yyss + yystacksize - 1 <= yyssp)
3579 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3581 if (yystate == YYFINAL)
3591 /* Do appropriate processing given the current state. Read a
3592 lookahead token if we need one and don't already have one. */
3594 /* First try to decide what to do without reference to lookahead token. */
3595 yyn = yypact[yystate];
3596 if (yyn == YYPACT_NINF)
3599 /* Not known => get a lookahead token if don't already have one. */
3601 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3602 if (yychar == YYEMPTY)
3604 YYDPRINTF ((stderr, "Reading a token: "));
3608 if (yychar <= YYEOF)
3610 yychar = yytoken = YYEOF;
3611 YYDPRINTF ((stderr, "Now at end of input.\n"));
3615 yytoken = YYTRANSLATE (yychar);
3616 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3619 /* If the proper action on seeing token YYTOKEN is to reduce or to
3620 detect an error, take that action. */
3622 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3627 if (yyn == 0 || yyn == YYTABLE_NINF)
3633 /* Count tokens shifted since error; after three, turn off error
3638 /* Shift the lookahead token. */
3639 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3641 /* Discard the shifted token. */
3650 /*-----------------------------------------------------------.
3651 | yydefault -- do the default action for the current state. |
3652 `-----------------------------------------------------------*/
3654 yyn = yydefact[yystate];
3660 /*-----------------------------.
3661 | yyreduce -- Do a reduction. |
3662 `-----------------------------*/
3664 /* yyn is the number of a rule to reduce with. */
3667 /* If YYLEN is nonzero, implement the default value of the action:
3670 Otherwise, the following line sets YYVAL to garbage.
3671 This behavior is undocumented and Bison
3672 users should not rely upon it. Assigning to YYVAL
3673 unconditionally makes the parser a bit smaller, and it avoids a
3674 GCC warning that YYVAL may be used uninitialized. */
3675 yyval = yyvsp[1-yylen];
3678 YY_REDUCE_PRINT (yyn);
3685 /* Line 1464 of skeleton.m4 */
3686 #line 1591 "parser.y"
3687 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3696 /* Line 1464 of skeleton.m4 */
3697 #line 1592 "parser.y"
3698 {(yyval.code)=code_new();}
3707 /* Line 1464 of skeleton.m4 */
3708 #line 1594 "parser.y"
3709 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
3718 /* Line 1464 of skeleton.m4 */
3719 #line 1595 "parser.y"
3720 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3729 /* Line 1464 of skeleton.m4 */
3730 #line 1610 "parser.y"
3740 /* Line 1464 of skeleton.m4 */
3741 #line 1618 "parser.y"
3742 {/*TODO*/(yyval.code)=0;}
3751 /* Line 1464 of skeleton.m4 */
3752 #line 1619 "parser.y"
3753 {/*TODO*/(yyval.code)=0;}
3762 /* Line 1464 of skeleton.m4 */
3763 #line 1621 "parser.y"
3764 {(yyval.code)=(yyvsp[(2) - (3)].code);}
3773 /* Line 1464 of skeleton.m4 */
3774 #line 1622 "parser.y"
3784 /* Line 1464 of skeleton.m4 */
3785 #line 1623 "parser.y"
3786 {(yyval.code)=(yyvsp[(1) - (2)].code);}
3795 /* Line 1464 of skeleton.m4 */
3796 #line 1624 "parser.y"
3797 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3806 /* Line 1464 of skeleton.m4 */
3807 #line 1628 "parser.y"
3809 code_t**cc = &global->init->method->body->code;
3810 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
3820 /* Line 1464 of skeleton.m4 */
3821 #line 1635 "parser.y"
3822 {(yyval.value)=(yyvsp[(2) - (2)].value);}
3831 /* Line 1464 of skeleton.m4 */
3832 #line 1636 "parser.y"
3833 {(yyval.value).c=abc_pushundefined(0);
3834 (yyval.value).t=TYPE_ANY;
3844 /* Line 1464 of skeleton.m4 */
3845 #line 1640 "parser.y"
3846 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3855 /* Line 1464 of skeleton.m4 */
3856 #line 1641 "parser.y"
3857 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3866 /* Line 1464 of skeleton.m4 */
3867 #line 1643 "parser.y"
3868 {(yyval.code) = (yyvsp[(1) - (1)].code);}
3877 /* Line 1464 of skeleton.m4 */
3878 #line 1644 "parser.y"
3879 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
3888 /* Line 1464 of skeleton.m4 */
3889 #line 1647 "parser.y"
3891 if(variable_exists((yyvsp[(1) - (3)].id)))
3892 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3894 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3895 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
3896 (yyvsp[(2) - (3)].classinfo)->name);
3899 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3901 if((yyvsp[(2) - (3)].classinfo)) {
3902 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3903 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3904 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3905 (yyval.code) = abc_setlocal((yyval.code), index);
3907 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3908 (yyval.code) = abc_setlocal((yyval.code), index);
3911 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3912 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3913 (yyval.code) = abc_coerce_a((yyval.code));
3914 (yyval.code) = abc_setlocal((yyval.code), index);
3916 (yyval.code) = code_new();
3920 /* that's the default for a local register, anyway
3922 state->method->initcode = abc_pushundefined(state->method->initcode);
3923 state->method->initcode = abc_setlocal(state->method->initcode, index);
3925 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3935 /* Line 1464 of skeleton.m4 */
3936 #line 1687 "parser.y"
3937 {(yyval.code) = code_new();}
3946 /* Line 1464 of skeleton.m4 */
3947 #line 1688 "parser.y"
3948 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3957 /* Line 1464 of skeleton.m4 */
3958 #line 1691 "parser.y"
3968 /* Line 1464 of skeleton.m4 */
3969 #line 1691 "parser.y"
3972 (yyval.code) = code_new();
3973 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3974 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3976 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3977 if((yyvsp[(7) - (7)].code)) {
3978 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3980 myif->branch = (yyval.code) = abc_nop((yyval.code));
3981 if((yyvsp[(7) - (7)].code)) {
3982 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3983 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3985 (yyval.code) = var_block((yyval.code));
3996 /* Line 1464 of skeleton.m4 */
3997 #line 1710 "parser.y"
3998 {(yyval.code)=code_new();}
4007 /* Line 1464 of skeleton.m4 */
4008 #line 1715 "parser.y"
4010 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
4020 /* Line 1464 of skeleton.m4 */
4021 #line 1718 "parser.y"
4023 (yyval.id)=(yyvsp[(1) - (1)].id);
4033 /* Line 1464 of skeleton.m4 */
4034 #line 1722 "parser.y"
4035 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4044 /* Line 1464 of skeleton.m4 */
4045 #line 1723 "parser.y"
4046 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4055 /* Line 1464 of skeleton.m4 */
4056 #line 1725 "parser.y"
4058 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4059 (yyval.code) = code_new();
4060 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4061 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4062 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4063 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4064 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4065 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4066 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4067 (yyval.code) = abc_jump((yyval.code), loopstart);
4068 code_t*out = (yyval.code) = abc_nop((yyval.code));
4069 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4070 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4073 (yyval.code) = var_block((yyval.code));
4084 /* Line 1464 of skeleton.m4 */
4085 #line 1745 "parser.y"
4087 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4088 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4089 int it = new_variable(tmp1name, TYPE_INT, 0);
4090 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4091 int array = new_variable(tmp1name, 0, 0);
4093 (yyval.code) = code_new();
4094 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4095 (yyval.code) = abc_coerce_a((yyval.code));
4096 (yyval.code) = abc_setlocal((yyval.code), array);
4097 (yyval.code) = abc_pushbyte((yyval.code), 0);
4098 (yyval.code) = abc_setlocal((yyval.code), it);
4100 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4102 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4103 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4104 (yyval.code) = abc_getlocal((yyval.code), array);
4105 (yyval.code) = abc_getlocal((yyval.code), it);
4106 if(!(yyvsp[(1) - (6)].for_start).each)
4107 (yyval.code) = abc_nextname((yyval.code));
4109 (yyval.code) = abc_nextvalue((yyval.code));
4110 (yyval.code) = converttype((yyval.code), 0, var->type);
4111 (yyval.code) = abc_setlocal((yyval.code), var->index);
4113 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4114 (yyval.code) = abc_jump((yyval.code), loopstart);
4116 code_t*out = (yyval.code) = abc_nop((yyval.code));
4117 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4118 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4122 (yyval.code) = var_block((yyval.code));
4136 /* Line 1464 of skeleton.m4 */
4137 #line 1788 "parser.y"
4147 /* Line 1464 of skeleton.m4 */
4148 #line 1788 "parser.y"
4151 (yyval.code) = code_new();
4153 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4154 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4155 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4156 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4157 myjmp->branch = cont;
4158 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4159 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4160 code_t*out = (yyval.code) = abc_nop((yyval.code));
4161 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4162 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4164 (yyval.code) = var_block((yyval.code));
4175 /* Line 1464 of skeleton.m4 */
4176 #line 1807 "parser.y"
4186 /* Line 1464 of skeleton.m4 */
4187 #line 1807 "parser.y"
4189 (yyval.code) = code_new();
4190 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4191 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4192 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4193 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4194 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4195 code_t*out = (yyval.code) = abc_nop((yyval.code));
4196 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4197 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4199 (yyval.code) = var_block((yyval.code));
4210 /* Line 1464 of skeleton.m4 */
4211 #line 1822 "parser.y"
4213 (yyval.code) = abc___break__(0, "");
4223 /* Line 1464 of skeleton.m4 */
4224 #line 1825 "parser.y"
4226 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4236 /* Line 1464 of skeleton.m4 */
4237 #line 1828 "parser.y"
4239 (yyval.code) = abc___continue__(0, "");
4249 /* Line 1464 of skeleton.m4 */
4250 #line 1831 "parser.y"
4252 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4262 /* Line 1464 of skeleton.m4 */
4263 #line 1835 "parser.y"
4273 /* Line 1464 of skeleton.m4 */
4274 #line 1836 "parser.y"
4275 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4284 /* Line 1464 of skeleton.m4 */
4285 #line 1837 "parser.y"
4286 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4295 /* Line 1464 of skeleton.m4 */
4296 #line 1838 "parser.y"
4297 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4306 /* Line 1464 of skeleton.m4 */
4307 #line 1839 "parser.y"
4308 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4317 /* Line 1464 of skeleton.m4 */
4318 #line 1840 "parser.y"
4319 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4328 /* Line 1464 of skeleton.m4 */
4329 #line 1842 "parser.y"
4331 (yyval.code) = abc_dup(0);
4332 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4333 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4334 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4335 if((yyval.code)->opcode != OPCODE___BREAK__) {
4336 (yyval.code) = abc___fallthrough__((yyval.code), "");
4338 code_t*e = (yyval.code) = abc_nop((yyval.code));
4349 /* Line 1464 of skeleton.m4 */
4350 #line 1853 "parser.y"
4352 (yyval.code) = (yyvsp[(3) - (3)].code);
4362 /* Line 1464 of skeleton.m4 */
4363 #line 1856 "parser.y"
4373 /* Line 1464 of skeleton.m4 */
4374 #line 1856 "parser.y"
4376 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4377 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4378 code_t*out = (yyval.code) = abc_pop((yyval.code));
4379 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4381 code_t*c = (yyval.code),*lastblock=0;
4383 if(c->opcode == OPCODE_IFNE) {
4384 if(!c->next) syntaxerror("internal error in fallthrough handling");
4386 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4388 c->opcode = OPCODE_JUMP;
4389 c->branch = lastblock;
4391 /* fall through end of switch */
4392 c->opcode = OPCODE_NOP;
4398 (yyval.code) = var_block((yyval.code));
4409 /* Line 1464 of skeleton.m4 */
4410 #line 1885 "parser.y"
4411 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4420 /* Line 1464 of skeleton.m4 */
4421 #line 1886 "parser.y"
4423 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4424 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4426 NEW(abc_exception_t, e)
4427 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4428 e->var_name = multiname_clone(&name);
4429 (yyval.exception) = e;
4432 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4433 e->target = c = abc_nop(0);
4434 c = abc_setlocal(c, i);
4435 c = code_append(c, (yyvsp[(8) - (9)].code));
4449 /* Line 1464 of skeleton.m4 */
4450 #line 1905 "parser.y"
4451 {new_state();state->exception_name=0;}
4460 /* Line 1464 of skeleton.m4 */
4461 #line 1905 "parser.y"
4463 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4464 if(!(yyvsp[(4) - (5)].code)) {
4465 (yyval.exception)=0;
4468 NEW(abc_exception_t, e)
4469 e->exc_type = 0; //all exceptions
4470 e->var_name = 0; //no name
4473 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4475 (yyval.exception) = e;
4486 /* Line 1464 of skeleton.m4 */
4487 #line 1922 "parser.y"
4488 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4497 /* Line 1464 of skeleton.m4 */
4498 #line 1923 "parser.y"
4499 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4508 /* Line 1464 of skeleton.m4 */
4509 #line 1924 "parser.y"
4510 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4519 /* Line 1464 of skeleton.m4 */
4520 #line 1925 "parser.y"
4522 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4523 (yyval.catch_list).finally = 0;
4524 if((yyvsp[(2) - (2)].exception)) {
4525 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4526 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4537 /* Line 1464 of skeleton.m4 */
4538 #line 1933 "parser.y"
4540 (yyval.catch_list).l=list_new();
4541 (yyval.catch_list).finally = 0;
4542 if((yyvsp[(1) - (1)].exception)) {
4543 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4544 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4555 /* Line 1464 of skeleton.m4 */
4556 #line 1942 "parser.y"
4566 /* Line 1464 of skeleton.m4 */
4567 #line 1942 "parser.y"
4569 code_t*out = abc_nop(0);
4571 code_t*start = abc_nop(0);
4572 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4573 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4574 (yyval.code) = abc_jump((yyval.code), out);
4576 code_t*end = (yyval.code) = abc_nop((yyval.code));
4579 if((yyvsp[(6) - (6)].catch_list).finally)
4580 tmp = new_variable("__finally__", 0, 0);
4582 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4585 abc_exception_t*e = l->abc_exception;
4587 (yyval.code) = code_append((yyval.code), e->target);
4588 (yyval.code) = abc_jump((yyval.code), out);
4590 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4592 e->target = (yyval.code) = abc_nop((yyval.code));
4593 (yyval.code) = abc___rethrow__((yyval.code));
4601 (yyval.code) = code_append((yyval.code), out);
4603 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4605 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4607 (yyval.code) = var_block((yyval.code));
4618 /* Line 1464 of skeleton.m4 */
4619 #line 1987 "parser.y"
4621 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4622 (yyval.code)=abc_throw((yyval.code));
4632 /* Line 1464 of skeleton.m4 */
4633 #line 1991 "parser.y"
4635 if(!state->exception_name)
4636 syntaxerror("re-throw only possible within a catch block");
4637 variable_t*v = find_variable(state->exception_name);
4638 (yyval.code)=code_new();
4639 (yyval.code)=abc_getlocal((yyval.code), v->index);
4640 (yyval.code)=abc_throw((yyval.code));
4650 /* Line 1464 of skeleton.m4 */
4651 #line 2002 "parser.y"
4653 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4654 (yyval.code) = abc_pushscope((yyval.code));
4655 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4656 (yyval.code) = abc_popscope((yyval.code));
4666 /* Line 1464 of skeleton.m4 */
4667 #line 2012 "parser.y"
4668 {PASS12 (yyval.id)="package";}
4677 /* Line 1464 of skeleton.m4 */
4678 #line 2014 "parser.y"
4679 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
4688 /* Line 1464 of skeleton.m4 */
4689 #line 2015 "parser.y"
4690 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
4699 /* Line 1464 of skeleton.m4 */
4700 #line 2017 "parser.y"
4701 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
4710 /* Line 1464 of skeleton.m4 */
4711 #line 2018 "parser.y"
4712 {PASS12 endpackage();(yyval.code)=0;}
4721 /* Line 1464 of skeleton.m4 */
4722 #line 2019 "parser.y"
4723 {PASS12 startpackage("");}
4732 /* Line 1464 of skeleton.m4 */
4733 #line 2020 "parser.y"
4734 {PASS12 endpackage();(yyval.code)=0;}
4743 /* Line 1464 of skeleton.m4 */
4744 #line 2022 "parser.y"
4746 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4748 syntaxerror("Couldn't import class\n");
4749 state_has_imports();
4750 dict_put(state->imports, c->name, c);
4761 /* Line 1464 of skeleton.m4 */
4762 #line 2030 "parser.y"
4765 i->package = (yyvsp[(2) - (4)].id);
4766 state_has_imports();
4767 list_append(state->wildcard_imports, i);
4778 /* Line 1464 of skeleton.m4 */
4779 #line 2040 "parser.y"
4780 {PASS12 (yyval.flags)=0;}
4789 /* Line 1464 of skeleton.m4 */
4790 #line 2041 "parser.y"
4791 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
4800 /* Line 1464 of skeleton.m4 */
4801 #line 2042 "parser.y"
4802 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
4811 /* Line 1464 of skeleton.m4 */
4812 #line 2043 "parser.y"
4813 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
4822 /* Line 1464 of skeleton.m4 */
4823 #line 2045 "parser.y"
4824 {PASS12 (yyval.token)=FLAG_PUBLIC;}
4833 /* Line 1464 of skeleton.m4 */
4834 #line 2046 "parser.y"
4835 {PASS12 (yyval.token)=FLAG_PRIVATE;}
4844 /* Line 1464 of skeleton.m4 */
4845 #line 2047 "parser.y"
4846 {PASS12 (yyval.token)=FLAG_PROTECTED;}
4855 /* Line 1464 of skeleton.m4 */
4856 #line 2048 "parser.y"
4857 {PASS12 (yyval.token)=FLAG_STATIC;}
4866 /* Line 1464 of skeleton.m4 */
4867 #line 2049 "parser.y"
4868 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
4877 /* Line 1464 of skeleton.m4 */
4878 #line 2050 "parser.y"
4879 {PASS12 (yyval.token)=FLAG_FINAL;}
4888 /* Line 1464 of skeleton.m4 */
4889 #line 2051 "parser.y"
4890 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
4899 /* Line 1464 of skeleton.m4 */
4900 #line 2052 "parser.y"
4901 {PASS12 (yyval.token)=FLAG_NATIVE;}
4910 /* Line 1464 of skeleton.m4 */
4911 #line 2053 "parser.y"
4912 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
4921 /* Line 1464 of skeleton.m4 */
4922 #line 2055 "parser.y"
4923 {(yyval.classinfo)=registry_getobjectclass();}
4932 /* Line 1464 of skeleton.m4 */
4933 #line 2056 "parser.y"
4934 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
4943 /* Line 1464 of skeleton.m4 */
4944 #line 2058 "parser.y"
4945 {PASS12 (yyval.classinfo_list)=list_new();}
4954 /* Line 1464 of skeleton.m4 */
4955 #line 2059 "parser.y"
4956 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4965 /* Line 1464 of skeleton.m4 */
4966 #line 2061 "parser.y"
4967 {PASS12 (yyval.classinfo_list)=list_new();}
4976 /* Line 1464 of skeleton.m4 */
4977 #line 2062 "parser.y"
4978 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4987 /* Line 1464 of skeleton.m4 */
4988 #line 2066 "parser.y"
4989 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
4998 /* Line 1464 of skeleton.m4 */
4999 #line 2068 "parser.y"
5000 {PASS12 endclass();(yyval.code)=0;}
5009 /* Line 1464 of skeleton.m4 */
5010 #line 2072 "parser.y"
5011 {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
5020 /* Line 1464 of skeleton.m4 */
5021 #line 2074 "parser.y"
5022 {PASS12 endclass();(yyval.code)=0;}
5031 /* Line 1464 of skeleton.m4 */
5032 #line 2086 "parser.y"
5034 code_t*c = state->cls->static_init;
5035 c = code_append(c, (yyvsp[(1) - (1)].code));
5036 state->cls->static_init = c;
5046 /* Line 1464 of skeleton.m4 */
5047 #line 2097 "parser.y"
5049 syntaxerror("variable declarations not allowed in interfaces");
5059 /* Line 1464 of skeleton.m4 */
5060 #line 2100 "parser.y"
5063 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5064 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5065 syntaxerror("invalid method modifiers: interface methods always need to be public");
5067 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5068 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5078 /* Line 1464 of skeleton.m4 */
5079 #line 2114 "parser.y"
5081 int flags = (yyvsp[(1) - (5)].flags);
5082 memberinfo_t* info = state->cls?
5083 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
5084 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
5086 info->type = (yyvsp[(4) - (5)].classinfo);
5087 info->flags = flags;
5090 namespace_t mname_ns = {flags2access(flags), ""};
5091 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5093 trait_list_t**traits;
5097 mname_ns.name = state->package;
5098 traits = &global->init->traits;
5099 code = &global->init->method->body->code;
5100 } else if(flags&FLAG_STATIC) {
5102 traits = &state->cls->abc->static_traits;
5103 code = &state->cls->static_init;
5105 // instance variable
5106 traits = &state->cls->abc->traits;
5107 code = &state->cls->init;
5111 if((yyvsp[(4) - (5)].classinfo)) {
5112 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5113 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5115 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5117 info->slot = t->slot_id;
5119 /* initalization code (if needed) */
5121 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5122 c = abc_getlocal_0(c);
5123 c = code_append(c, (yyvsp[(5) - (5)].value).c);
5124 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5125 c = abc_setslot(c, t->slot_id);
5128 *code = code_append(*code, c);
5130 if((yyvsp[(2) - (5)].token)==KW_CONST) {
5131 t->kind= TRAIT_CONST;
5144 /* Line 1464 of skeleton.m4 */
5145 #line 2173 "parser.y"
5146 {(yyval.constant)=0;}
5155 /* Line 1464 of skeleton.m4 */
5156 #line 2174 "parser.y"
5157 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5166 /* Line 1464 of skeleton.m4 */
5167 #line 2176 "parser.y"
5168 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5177 /* Line 1464 of skeleton.m4 */
5178 #line 2177 "parser.y"
5179 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5188 /* Line 1464 of skeleton.m4 */
5189 #line 2178 "parser.y"
5190 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5199 /* Line 1464 of skeleton.m4 */
5200 #line 2179 "parser.y"
5201 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5210 /* Line 1464 of skeleton.m4 */
5211 #line 2180 "parser.y"
5212 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);}
5221 /* Line 1464 of skeleton.m4 */
5222 #line 2182 "parser.y"
5223 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5232 /* Line 1464 of skeleton.m4 */
5233 #line 2183 "parser.y"
5234 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5243 /* Line 1464 of skeleton.m4 */
5244 #line 2184 "parser.y"
5245 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5254 /* Line 1464 of skeleton.m4 */
5255 #line 2189 "parser.y"
5257 memset(&(yyval.params),0,sizeof((yyval.params)));
5267 /* Line 1464 of skeleton.m4 */
5268 #line 2192 "parser.y"
5270 (yyval.params)=(yyvsp[(1) - (1)].params);
5280 /* Line 1464 of skeleton.m4 */
5281 #line 2197 "parser.y"
5283 memset(&(yyval.params),0,sizeof((yyval.params)));
5284 (yyval.params).varargs=1;
5285 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5295 /* Line 1464 of skeleton.m4 */
5296 #line 2202 "parser.y"
5298 (yyval.params) =(yyvsp[(1) - (4)].params);
5299 (yyval.params).varargs=1;
5300 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5310 /* Line 1464 of skeleton.m4 */
5311 #line 2209 "parser.y"
5313 (yyval.params) = (yyvsp[(1) - (3)].params);
5314 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5324 /* Line 1464 of skeleton.m4 */
5325 #line 2213 "parser.y"
5327 memset(&(yyval.params),0,sizeof((yyval.params)));
5328 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5338 /* Line 1464 of skeleton.m4 */
5339 #line 2218 "parser.y"
5341 (yyval.param) = malloc(sizeof(param_t));
5342 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5343 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5344 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5354 /* Line 1464 of skeleton.m4 */
5355 #line 2224 "parser.y"
5357 (yyval.param) = malloc(sizeof(param_t));
5358 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5359 (yyval.param)->type = TYPE_ANY;
5360 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5370 /* Line 1464 of skeleton.m4 */
5371 #line 2230 "parser.y"
5372 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5381 /* Line 1464 of skeleton.m4 */
5382 #line 2231 "parser.y"
5383 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5392 /* Line 1464 of skeleton.m4 */
5393 #line 2232 "parser.y"
5403 /* Line 1464 of skeleton.m4 */
5404 #line 2235 "parser.y"
5405 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5414 /* Line 1464 of skeleton.m4 */
5415 #line 2236 "parser.y"
5419 if(!state->method->info) syntaxerror("internal error");
5421 if(state->method->late_binding) {
5422 c = abc_getlocal_0(c);
5423 c = abc_pushscope(c);
5425 if(state->method->is_constructor && !state->method->has_super) {
5426 // call default constructor
5427 c = abc_getlocal_0(c);
5428 c = abc_constructsuper(c, 0);
5431 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5433 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5444 /* Line 1464 of skeleton.m4 */
5445 #line 2258 "parser.y"
5446 {PASS12 (yyval.id)=0;}
5455 /* Line 1464 of skeleton.m4 */
5456 #line 2260 "parser.y"
5457 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5466 /* Line 1464 of skeleton.m4 */
5467 #line 2261 "parser.y"
5471 memberinfo_t*f = state->method->info;
5472 if(!f) syntaxerror("internal error");
5475 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5477 abc_method_t*abc = endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5479 (yyval.value).c = abc_newfunction(0, abc);
5480 (yyval.value).t = TYPE_FUNCTION(f);
5490 /* Line 1464 of skeleton.m4 */
5491 #line 2279 "parser.y"
5493 PASS1 (yyval.classinfo)=0;
5495 /* try current package */
5496 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
5497 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
5507 /* Line 1464 of skeleton.m4 */
5508 #line 2287 "parser.y"
5510 PASS1 (yyval.classinfo)=0;
5512 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5513 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5514 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5524 /* Line 1464 of skeleton.m4 */
5525 #line 2298 "parser.y"
5526 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5535 /* Line 1464 of skeleton.m4 */
5536 #line 2299 "parser.y"
5537 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5546 /* Line 1464 of skeleton.m4 */
5547 #line 2301 "parser.y"
5548 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5557 /* Line 1464 of skeleton.m4 */
5558 #line 2302 "parser.y"
5559 {(yyval.classinfo)=registry_getanytype();}
5568 /* Line 1464 of skeleton.m4 */
5569 #line 2303 "parser.y"
5570 {(yyval.classinfo)=registry_getanytype();}
5579 /* Line 1464 of skeleton.m4 */
5580 #line 2312 "parser.y"
5581 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5590 /* Line 1464 of skeleton.m4 */
5591 #line 2313 "parser.y"
5592 {(yyval.classinfo)=0;}
5601 /* Line 1464 of skeleton.m4 */
5602 #line 2317 "parser.y"
5603 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5612 /* Line 1464 of skeleton.m4 */
5613 #line 2318 "parser.y"
5614 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5623 /* Line 1464 of skeleton.m4 */
5624 #line 2320 "parser.y"
5625 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5634 /* Line 1464 of skeleton.m4 */
5635 #line 2322 "parser.y"
5636 {(yyval.value_list).len=1;
5637 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
5647 /* Line 1464 of skeleton.m4 */
5648 #line 2325 "parser.y"
5650 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
5651 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
5661 /* Line 1464 of skeleton.m4 */
5662 #line 2330 "parser.y"
5664 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5665 (yyval.value).c = code_new();
5667 if((yyvsp[(2) - (3)].classinfo)->slot) {
5668 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5669 (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5671 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5674 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5676 if((yyvsp[(2) - (3)].classinfo)->slot)
5677 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5679 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5680 (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5690 /* Line 1464 of skeleton.m4 */
5691 #line 2354 "parser.y"
5694 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5695 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5696 (yyval.value).c = code_cutlast((yyval.value).c);
5698 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5700 (yyval.value).t = TYPE_ANY;
5701 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5702 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5703 (yyval.value).c = code_cutlast((yyval.value).c);
5704 (yyval.value).c = code_append((yyval.value).c, paramcode);
5705 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5706 multiname_destroy(name);
5707 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5708 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5709 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5710 if(t->kind!=TRAIT_METHOD) {
5711 //ok: flash allows to assign closures to members.
5713 multiname_t*name = t->name;
5714 (yyval.value).c = code_cutlast((yyval.value).c);
5715 (yyval.value).c = code_append((yyval.value).c, paramcode);
5716 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5717 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5718 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5719 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5720 (yyval.value).c = code_cutlast((yyval.value).c);
5721 (yyval.value).c = code_append((yyval.value).c, paramcode);
5722 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5723 multiname_destroy(name);
5725 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5726 (yyval.value).c = code_append((yyval.value).c, paramcode);
5727 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5732 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5733 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5735 (yyval.value).c = abc_coerce_a((yyval.value).c);
5736 (yyval.value).t = TYPE_ANY;
5748 /* Line 1464 of skeleton.m4 */
5749 #line 2402 "parser.y"
5751 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5752 if(!state->method) syntaxerror("super() not allowed outside of a function");
5753 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5755 (yyval.value).c = code_new();
5756 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5758 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5760 this is dependent on the control path, check this somewhere else
5761 if(state->method->has_super)
5762 syntaxerror("constructor may call super() only once");
5764 state->method->has_super = 1;
5765 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5766 (yyval.value).c = abc_pushundefined((yyval.value).c);
5767 (yyval.value).t = TYPE_ANY;
5777 /* Line 1464 of skeleton.m4 */
5778 #line 2422 "parser.y"
5780 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5781 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5782 (yyval.value).c = code_cutlast((yyval.value).c);
5784 multiname_t*name = 0;
5785 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5786 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5787 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5788 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5789 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5790 (yyval.value).c = code_cutlast((yyval.value).c);
5791 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5793 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5794 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5795 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5797 (yyval.value).t = TYPE_BOOLEAN;
5807 /* Line 1464 of skeleton.m4 */
5808 #line 2443 "parser.y"
5810 (yyval.code) = abc_returnvoid(0);
5820 /* Line 1464 of skeleton.m4 */
5821 #line 2446 "parser.y"
5823 (yyval.code) = (yyvsp[(2) - (2)].value).c;
5824 (yyval.code) = abc_returnvalue((yyval.code));
5834 /* Line 1464 of skeleton.m4 */
5835 #line 2453 "parser.y"
5836 {(yyval.value)=(yyvsp[(1) - (1)].value);}
5845 /* Line 1464 of skeleton.m4 */
5846 #line 2454 "parser.y"
5847 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5856 /* Line 1464 of skeleton.m4 */
5857 #line 2455 "parser.y"
5859 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5860 (yyval.value).c = cut_last_push((yyval.value).c);
5861 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5862 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5872 /* Line 1464 of skeleton.m4 */
5873 #line 2461 "parser.y"
5875 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5885 /* Line 1464 of skeleton.m4 */
5886 #line 2467 "parser.y"
5887 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5896 /* Line 1464 of skeleton.m4 */
5897 #line 2471 "parser.y"
5898 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5907 /* Line 1464 of skeleton.m4 */
5908 #line 2473 "parser.y"
5909 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5918 /* Line 1464 of skeleton.m4 */
5919 #line 2475 "parser.y"
5920 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5929 /* Line 1464 of skeleton.m4 */
5930 #line 2477 "parser.y"
5932 (yyval.value).c = 0;
5933 namespace_t ns = {ACCESS_PACKAGE, ""};
5934 multiname_t m = {QNAME, &ns, 0, "RegExp"};
5935 if(!(yyvsp[(1) - (1)].regexp).options) {
5936 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5937 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5938 (yyval.value).c = abc_construct((yyval.value).c, 1);
5940 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5941 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5942 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5943 (yyval.value).c = abc_construct((yyval.value).c, 2);
5945 (yyval.value).t = TYPE_REGEXP;
5955 /* Line 1464 of skeleton.m4 */
5956 #line 2494 "parser.y"
5957 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5958 //MULTINAME(m, registry_getintclass());
5959 //$$.c = abc_coerce2($$.c, &m); // FIXME
5960 (yyval.value).t = TYPE_INT;
5970 /* Line 1464 of skeleton.m4 */
5971 #line 2499 "parser.y"
5972 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5973 (yyval.value).t = TYPE_INT;
5983 /* Line 1464 of skeleton.m4 */
5984 #line 2502 "parser.y"
5985 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5986 (yyval.value).t = TYPE_INT;
5996 /* Line 1464 of skeleton.m4 */
5997 #line 2505 "parser.y"
5998 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5999 (yyval.value).t = TYPE_UINT;
6009 /* Line 1464 of skeleton.m4 */
6010 #line 2508 "parser.y"
6011 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6012 (yyval.value).t = TYPE_FLOAT;
6022 /* Line 1464 of skeleton.m4 */
6023 #line 2511 "parser.y"
6024 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
6025 (yyval.value).t = TYPE_STRING;
6035 /* Line 1464 of skeleton.m4 */
6036 #line 2514 "parser.y"
6037 {(yyval.value).c = abc_pushundefined(0);
6038 (yyval.value).t = TYPE_ANY;
6048 /* Line 1464 of skeleton.m4 */
6049 #line 2517 "parser.y"
6050 {(yyval.value).c = abc_pushtrue(0);
6051 (yyval.value).t = TYPE_BOOLEAN;
6061 /* Line 1464 of skeleton.m4 */
6062 #line 2520 "parser.y"
6063 {(yyval.value).c = abc_pushfalse(0);
6064 (yyval.value).t = TYPE_BOOLEAN;
6074 /* Line 1464 of skeleton.m4 */
6075 #line 2523 "parser.y"
6076 {(yyval.value).c = abc_pushnull(0);
6077 (yyval.value).t = TYPE_NULL;
6087 /* Line 1464 of skeleton.m4 */
6088 #line 2528 "parser.y"
6089 {(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);
6090 (yyval.value).t = TYPE_BOOLEAN;
6100 /* Line 1464 of skeleton.m4 */
6101 #line 2531 "parser.y"
6102 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6103 (yyval.value).t = TYPE_BOOLEAN;
6113 /* Line 1464 of skeleton.m4 */
6114 #line 2534 "parser.y"
6115 {(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);
6116 (yyval.value).t = TYPE_BOOLEAN;
6126 /* Line 1464 of skeleton.m4 */
6127 #line 2537 "parser.y"
6128 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6129 (yyval.value).t = TYPE_BOOLEAN;
6139 /* Line 1464 of skeleton.m4 */
6140 #line 2540 "parser.y"
6141 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6142 (yyval.value).t = TYPE_BOOLEAN;
6152 /* Line 1464 of skeleton.m4 */
6153 #line 2543 "parser.y"
6154 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6155 (yyval.value).t = TYPE_BOOLEAN;
6165 /* Line 1464 of skeleton.m4 */
6166 #line 2546 "parser.y"
6167 {(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);
6168 (yyval.value).t = TYPE_BOOLEAN;
6178 /* Line 1464 of skeleton.m4 */
6179 #line 2549 "parser.y"
6180 {(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);
6181 (yyval.value).t = TYPE_BOOLEAN;
6191 /* Line 1464 of skeleton.m4 */
6192 #line 2553 "parser.y"
6193 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6194 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6195 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6196 (yyval.value).c = abc_dup((yyval.value).c);
6197 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6198 (yyval.value).c = cut_last_push((yyval.value).c);
6199 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6200 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6201 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6202 jmp->branch = label;
6212 /* Line 1464 of skeleton.m4 */
6213 #line 2564 "parser.y"
6215 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6216 /*printf("%08x:\n",$1.t);
6217 code_dump($1.c, 0, 0, "", stdout);
6218 printf("%08x:\n",$3.t);
6219 code_dump($3.c, 0, 0, "", stdout);
6220 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6221 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6222 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6223 (yyval.value).c = abc_dup((yyval.value).c);
6224 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6225 (yyval.value).c = cut_last_push((yyval.value).c);
6226 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6227 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6228 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6229 jmp->branch = label;
6239 /* Line 1464 of skeleton.m4 */
6240 #line 2582 "parser.y"
6241 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6242 (yyval.value).c = abc_not((yyval.value).c);
6243 (yyval.value).t = TYPE_BOOLEAN;
6253 /* Line 1464 of skeleton.m4 */
6254 #line 2587 "parser.y"
6255 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6256 (yyval.value).c = abc_bitnot((yyval.value).c);
6257 (yyval.value).t = TYPE_INT;
6267 /* Line 1464 of skeleton.m4 */
6268 #line 2592 "parser.y"
6269 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6270 (yyval.value).c = abc_bitand((yyval.value).c);
6271 (yyval.value).t = TYPE_INT;
6281 /* Line 1464 of skeleton.m4 */
6282 #line 2597 "parser.y"
6283 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6284 (yyval.value).c = abc_bitxor((yyval.value).c);
6285 (yyval.value).t = TYPE_INT;
6295 /* Line 1464 of skeleton.m4 */
6296 #line 2602 "parser.y"
6297 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6298 (yyval.value).c = abc_bitor((yyval.value).c);
6299 (yyval.value).t = TYPE_INT;
6309 /* Line 1464 of skeleton.m4 */
6310 #line 2607 "parser.y"
6311 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6312 (yyval.value).c = abc_rshift((yyval.value).c);
6313 (yyval.value).t = TYPE_INT;
6323 /* Line 1464 of skeleton.m4 */
6324 #line 2611 "parser.y"
6325 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6326 (yyval.value).c = abc_urshift((yyval.value).c);
6327 (yyval.value).t = TYPE_INT;
6337 /* Line 1464 of skeleton.m4 */
6338 #line 2615 "parser.y"
6339 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6340 (yyval.value).c = abc_lshift((yyval.value).c);
6341 (yyval.value).t = TYPE_INT;
6351 /* Line 1464 of skeleton.m4 */
6352 #line 2620 "parser.y"
6353 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6354 (yyval.value).c = abc_divide((yyval.value).c);
6355 (yyval.value).t = TYPE_NUMBER;
6365 /* Line 1464 of skeleton.m4 */
6366 #line 2624 "parser.y"
6367 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6368 (yyval.value).c = abc_modulo((yyval.value).c);
6369 (yyval.value).t = TYPE_NUMBER;
6379 /* Line 1464 of skeleton.m4 */
6380 #line 2628 "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_add_i((yyval.value).c);
6384 (yyval.value).t = TYPE_INT;
6386 (yyval.value).c = abc_add((yyval.value).c);
6387 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6398 /* Line 1464 of skeleton.m4 */
6399 #line 2637 "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_subtract_i((yyval.value).c);
6403 (yyval.value).t = TYPE_INT;
6405 (yyval.value).c = abc_subtract((yyval.value).c);
6406 (yyval.value).t = TYPE_NUMBER;
6417 /* Line 1464 of skeleton.m4 */
6418 #line 2646 "parser.y"
6419 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6420 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6421 (yyval.value).c = abc_multiply_i((yyval.value).c);
6422 (yyval.value).t = TYPE_INT;
6424 (yyval.value).c = abc_multiply((yyval.value).c);
6425 (yyval.value).t = TYPE_NUMBER;
6436 /* Line 1464 of skeleton.m4 */
6437 #line 2656 "parser.y"
6438 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6439 (yyval.value).c = abc_in((yyval.value).c);
6440 (yyval.value).t = TYPE_BOOLEAN;
6450 /* Line 1464 of skeleton.m4 */
6451 #line 2661 "parser.y"
6452 {char use_astype=0; // flash player's astype works differently than astypelate
6453 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
6454 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
6455 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6456 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
6458 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6459 (yyval.value).c = abc_astypelate((yyval.value).c);
6460 (yyval.value).t = TYPE_ANY;
6471 /* Line 1464 of skeleton.m4 */
6472 #line 2674 "parser.y"
6473 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6474 (yyval.value).c = abc_instanceof((yyval.value).c);
6475 (yyval.value).t = TYPE_BOOLEAN;
6485 /* Line 1464 of skeleton.m4 */
6486 #line 2679 "parser.y"
6487 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6488 (yyval.value).c = abc_istypelate((yyval.value).c);
6489 (yyval.value).t = TYPE_BOOLEAN;
6499 /* Line 1464 of skeleton.m4 */
6500 #line 2684 "parser.y"
6502 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6503 (yyval.value).c = abc_typeof((yyval.value).c);
6504 (yyval.value).t = TYPE_STRING;
6514 /* Line 1464 of skeleton.m4 */
6515 #line 2690 "parser.y"
6517 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6518 (yyval.value).c = abc_pushundefined((yyval.value).c);
6519 (yyval.value).t = TYPE_ANY;
6529 /* Line 1464 of skeleton.m4 */
6530 #line 2696 "parser.y"
6531 { (yyval.value).c = abc_pushundefined(0);
6532 (yyval.value).t = TYPE_ANY;
6542 /* Line 1464 of skeleton.m4 */
6543 #line 2700 "parser.y"
6544 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6553 /* Line 1464 of skeleton.m4 */
6554 #line 2702 "parser.y"
6556 (yyval.value)=(yyvsp[(2) - (2)].value);
6557 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6558 (yyval.value).c=abc_negate_i((yyval.value).c);
6559 (yyval.value).t = TYPE_INT;
6561 (yyval.value).c=abc_negate((yyval.value).c);
6562 (yyval.value).t = TYPE_NUMBER;
6573 /* Line 1464 of skeleton.m4 */
6574 #line 2713 "parser.y"
6576 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6577 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6579 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6580 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6581 (yyval.value).t = 0; // array elements have unknown type
6591 /* Line 1464 of skeleton.m4 */
6592 #line 2722 "parser.y"
6594 (yyval.value).c = code_new();
6595 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6596 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6597 (yyval.value).t = registry_getarrayclass();
6607 /* Line 1464 of skeleton.m4 */
6608 #line 2729 "parser.y"
6609 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6618 /* Line 1464 of skeleton.m4 */
6619 #line 2730 "parser.y"
6620 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6629 /* Line 1464 of skeleton.m4 */
6630 #line 2732 "parser.y"
6632 (yyval.value_list).cc = 0;
6633 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6634 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6635 (yyval.value_list).len = 2;
6645 /* Line 1464 of skeleton.m4 */
6646 #line 2738 "parser.y"
6648 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6649 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
6650 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6651 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6661 /* Line 1464 of skeleton.m4 */
6662 #line 2747 "parser.y"
6664 (yyval.value).c = code_new();
6665 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6666 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
6667 (yyval.value).t = registry_getobjectclass();
6677 /* Line 1464 of skeleton.m4 */
6678 #line 2754 "parser.y"
6680 code_t*c = (yyvsp[(3) - (3)].value).c;
6681 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6682 c=abc_multiply_i(c);
6686 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
6687 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6688 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6698 /* Line 1464 of skeleton.m4 */
6699 #line 2766 "parser.y"
6701 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
6702 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
6703 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6704 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6714 /* Line 1464 of skeleton.m4 */
6715 #line 2772 "parser.y"
6717 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
6718 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
6719 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6720 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6730 /* Line 1464 of skeleton.m4 */
6731 #line 2778 "parser.y"
6733 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
6734 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
6735 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6736 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6746 /* Line 1464 of skeleton.m4 */
6747 #line 2784 "parser.y"
6749 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
6750 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
6751 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6752 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6762 /* Line 1464 of skeleton.m4 */
6763 #line 2790 "parser.y"
6765 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
6766 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
6767 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6768 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6778 /* Line 1464 of skeleton.m4 */
6779 #line 2796 "parser.y"
6781 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
6782 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
6783 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6784 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6794 /* Line 1464 of skeleton.m4 */
6795 #line 2802 "parser.y"
6797 code_t*c = (yyvsp[(3) - (3)].value).c;
6799 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6803 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
6806 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6807 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6817 /* Line 1464 of skeleton.m4 */
6818 #line 2815 "parser.y"
6819 { code_t*c = (yyvsp[(3) - (3)].value).c;
6820 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6821 c=abc_subtract_i(c);
6824 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
6827 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6828 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6838 /* Line 1464 of skeleton.m4 */
6839 #line 2826 "parser.y"
6841 c = code_append(c, (yyvsp[(3) - (3)].value).c);
6842 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
6843 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
6844 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6854 /* Line 1464 of skeleton.m4 */
6855 #line 2833 "parser.y"
6857 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
6858 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
6859 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6860 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
6861 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6862 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
6863 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
6864 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
6865 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6866 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
6876 /* Line 1464 of skeleton.m4 */
6877 #line 2846 "parser.y"
6879 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6880 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6881 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
6882 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
6883 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
6884 (yyval.value).c = abc_getlocal(0, nr);
6885 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
6886 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6887 (yyval.value).c = abc_getlocal(0, nr);
6888 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
6889 } else syntaxerror("internal error");
6891 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6892 c=abc_increment_i(c);
6898 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6899 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6900 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6911 /* Line 1464 of skeleton.m4 */
6912 #line 2873 "parser.y"
6914 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6915 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6916 c=abc_decrement_i(c);
6922 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6923 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6924 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6934 /* Line 1464 of skeleton.m4 */
6935 #line 2887 "parser.y"
6937 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6938 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6939 c=abc_increment_i(c);
6945 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6946 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6947 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6957 /* Line 1464 of skeleton.m4 */
6958 #line 2901 "parser.y"
6960 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6961 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6962 c=abc_decrement_i(c);
6968 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6969 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6970 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6980 /* Line 1464 of skeleton.m4 */
6981 #line 2916 "parser.y"
6982 { if(!state->cls->info)
6983 syntaxerror("super keyword not allowed outside a class");
6984 classinfo_t*t = state->cls->info->superclass;
6985 if(!t) t = TYPE_OBJECT;
6987 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6988 namespace_t ns = flags2namespace(f->flags, "");
6989 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6990 (yyval.value).c = 0;
6991 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6992 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6993 (yyval.value).t = memberinfo_gettype(f);
7003 /* Line 1464 of skeleton.m4 */
7004 #line 2931 "parser.y"
7005 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7006 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7008 if(TYPE_IS_CLASS(t) && t->cls) {
7013 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7015 if(f && !is_static != !(f->flags&FLAG_STATIC))
7017 if(f && f->slot && !noslot) {
7018 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7020 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7021 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7023 /* determine type */
7024 (yyval.value).t = memberinfo_gettype(f);
7025 if(!(yyval.value).t)
7026 (yyval.value).c = abc_coerce_a((yyval.value).c);
7028 /* when resolving a property on an unknown type, we do know the
7029 name of the property (and don't seem to need the package), but
7030 we need to make avm2 try out all access modes */
7031 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7032 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7033 (yyval.value).c = abc_coerce_a((yyval.value).c);
7034 (yyval.value).t = registry_getanytype();
7045 /* Line 1464 of skeleton.m4 */
7046 #line 2964 "parser.y"
7048 (yyval.value).t = 0;
7049 (yyval.value).c = 0;
7054 /* look at variables */
7055 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
7056 // $1 is a local variable
7057 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7058 (yyval.value).t = v->type;
7062 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7064 /* look at current class' members */
7065 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7066 (f->flags&FLAG_STATIC) >= i_am_static) {
7067 // $1 is a function in this class
7068 int var_is_static = (f->flags&FLAG_STATIC);
7070 if(f->kind == MEMBER_METHOD) {
7071 (yyval.value).t = TYPE_FUNCTION(f);
7073 (yyval.value).t = f->type;
7075 if(var_is_static && !i_am_static) {
7076 /* access to a static member from a non-static location.
7077 do this via findpropstrict:
7078 there doesn't seem to be any non-lookup way to access
7079 static properties of a class */
7080 state->method->late_binding = 1;
7081 (yyval.value).t = f->type;
7082 namespace_t ns = {flags2access(f->flags), ""};
7083 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7084 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7085 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7087 } else if(f->slot>0) {
7088 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7089 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7092 namespace_t ns = {flags2access(f->flags), ""};
7093 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7094 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7095 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7100 /* look at actual classes, in the current package and imported */
7101 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7102 if(a->flags & FLAG_METHOD) {
7104 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7105 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7106 if(a->function->kind == MEMBER_METHOD) {
7107 (yyval.value).t = TYPE_FUNCTION(a->function);
7109 (yyval.value).t = a->function->type;
7113 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7114 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
7117 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7119 (yyval.value).t = TYPE_CLASS(a);
7124 /* unknown object, let the avm2 resolve it */
7126 if(strcmp((yyvsp[(1) - (1)].id),"trace"))
7127 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7128 state->method->late_binding = 1;
7130 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7132 (yyval.value).t = 0;
7133 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7134 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7145 /* Line 1464 of skeleton.m4 */
7146 #line 3062 "parser.y"
7156 /* Line 1464 of skeleton.m4 */
7157 #line 3063 "parser.y"
7167 /* Line 1464 of skeleton.m4 */
7168 #line 3064 "parser.y"
7178 /* Line 1464 of skeleton.m4 */
7179 #line 3066 "parser.y"
7187 /* Line 1464 of skeleton.m4 */
7188 #line 7189 "parser.tab.c"
7191 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7195 YY_STACK_PRINT (yyss, yyssp);
7199 /* Now `shift' the result of the reduction. Determine what state
7200 that goes to, based on the state we popped back to and the rule
7201 number reduced by. */
7205 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7206 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7207 yystate = yytable[yystate];
7209 yystate = yydefgoto[yyn - YYNTOKENS];
7214 /*------------------------------------.
7215 | yyerrlab -- here on detecting error |
7216 `------------------------------------*/
7218 /* If not already recovering from an error, report this error. */
7222 #if ! YYERROR_VERBOSE
7223 yyerror (YY_("syntax error"));
7226 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7227 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7229 YYSIZE_T yyalloc = 2 * yysize;
7230 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7231 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7232 if (yymsg != yymsgbuf)
7233 YYSTACK_FREE (yymsg);
7234 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7236 yymsg_alloc = yyalloc;
7240 yymsg_alloc = sizeof yymsgbuf;
7244 if (0 < yysize && yysize <= yymsg_alloc)
7246 (void) yysyntax_error (yymsg, yystate, yychar);
7251 yyerror (YY_("syntax error"));
7253 goto yyexhaustedlab;
7261 if (yyerrstatus == 3)
7263 /* If just tried and failed to reuse lookahead token after an
7264 error, discard it. */
7266 if (yychar <= YYEOF)
7268 /* Return failure if at end of input. */
7269 if (yychar == YYEOF)
7274 yydestruct ("Error: discarding",
7280 /* Else will try to reuse lookahead token after shifting the error
7285 /*---------------------------------------------------.
7286 | yyerrorlab -- error raised explicitly by YYERROR. |
7287 `---------------------------------------------------*/
7290 /* Pacify compilers like GCC when the user code never invokes
7291 YYERROR and the label yyerrorlab therefore never appears in user
7293 if (/*CONSTCOND*/ 0)
7296 /* Do not reclaim the symbols of the rule which action triggered
7300 YY_STACK_PRINT (yyss, yyssp);
7305 /*-------------------------------------------------------------.
7306 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7307 `-------------------------------------------------------------*/
7309 yyerrstatus = 3; /* Each real token shifted decrements this. */
7313 yyn = yypact[yystate];
7314 if (yyn != YYPACT_NINF)
7317 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7325 /* Pop the current state because it cannot handle the error token. */
7330 yydestruct ("Error: popping",
7331 yystos[yystate], yyvsp);
7334 YY_STACK_PRINT (yyss, yyssp);
7340 /* Shift the error token. */
7341 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7347 /*-------------------------------------.
7348 | yyacceptlab -- YYACCEPT comes here. |
7349 `-------------------------------------*/
7354 /*-----------------------------------.
7355 | yyabortlab -- YYABORT comes here. |
7356 `-----------------------------------*/
7361 #if !defined(yyoverflow) || YYERROR_VERBOSE
7362 /*-------------------------------------------------.
7363 | yyexhaustedlab -- memory exhaustion comes here. |
7364 `-------------------------------------------------*/
7366 yyerror (YY_("memory exhausted"));
7372 if (yychar != YYEMPTY)
7373 yydestruct ("Cleanup: discarding lookahead",
7375 /* Do not reclaim the symbols of the rule which action triggered
7376 this YYABORT or YYACCEPT. */
7378 YY_STACK_PRINT (yyss, yyssp);
7379 while (yyssp != yyss)
7381 yydestruct ("Cleanup: popping",
7382 yystos[*yyssp], yyvsp);
7387 YYSTACK_FREE (yyss);
7390 if (yymsg != yymsgbuf)
7391 YYSTACK_FREE (yymsg);
7393 /* Make sure YYID is used. */
7394 return YYID (yyresult);