2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse a3_parse
69 #define yyerror a3_error
70 #define yylval a3_lval
71 #define yychar a3_char
72 #define yydebug a3_debug
73 #define yynerrs a3_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
97 /* Line 198 of skeleton.m4 */
98 #line 99 "parser.tab.c"
100 /* Enabling traces. */
105 /* Enabling verbose error messages. */
106 #ifdef YYERROR_VERBOSE
107 # undef YYERROR_VERBOSE
108 # define YYERROR_VERBOSE 1
110 # define YYERROR_VERBOSE 1
113 /* Enabling the token table. */
114 #ifndef YYTOKEN_TABLE
115 # define YYTOKEN_TABLE 0
122 /* Put the tokens into the symbol table, so that GDB and other debuggers
217 below_semicolon = 350,
218 below_assignment = 351,
220 minusminus_prefix = 355,
221 plusplus_prefix = 356,
224 above_identifier = 359,
232 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
234 /* Line 223 of skeleton.m4 */
239 /* Line 223 of skeleton.m4 */
242 enum yytokentype token;
245 classinfo_t*classinfo;
246 classinfo_list_t*classinfo_list;
249 unsigned int number_uint;
253 //typedcode_list_t*value_list;
254 codeandnumber_t value_list;
260 for_start_t for_start;
261 abc_exception_t *exception;
264 abc_exception_list_t *l;
270 /* Line 223 of skeleton.m4 */
271 #line 272 "parser.tab.c"
273 # define YYSTYPE_IS_TRIVIAL 1
274 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
275 # define YYSTYPE_IS_DECLARED 1
279 /* Copy the second part of user declarations. */
281 /* Line 273 of skeleton.m4 */
285 static int a3_error(char*s)
287 syntaxerror("%s", s);
288 return 0; //make gcc happy
292 static char* concat2(const char* t1, const char* t2)
296 char*text = malloc(l1+l2+1);
297 memcpy(text , t1, l1);
298 memcpy(text+l1, t2, l2);
302 static char* concat3(const char* t1, const char* t2, const char* t3)
307 char*text = malloc(l1+l2+l3+1);
308 memcpy(text , t1, l1);
309 memcpy(text+l1, t2, l2);
310 memcpy(text+l1+l2, t3, l3);
315 typedef struct _import {
319 DECLARE_LIST(import);
321 typedef struct _classstate {
327 char has_constructor;
330 DECLARE_LIST(methodstate);
332 typedef struct _methodstate {
343 int var_index; // for inner methods
345 abc_exception_list_t*exceptions;
347 methodstate_list_t*innerfunctions;
350 typedef struct _state {
355 import_list_t*wildcard_imports;
357 char has_own_imports;
358 char new_vars; // e.g. transition between two functions
361 methodstate_t*method;
368 typedef struct _global {
374 static global_t*global = 0;
375 static state_t* state = 0;
379 #define MULTINAME(m,x) \
382 registry_fill_multiname(&m, &m##_ns, x);
384 #define MEMBER_MULTINAME(m,f,n) \
388 m##_ns = flags2namespace(f->flags, ""); \
391 m.namespace_set = 0; \
394 m.type = MULTINAME; \
396 m.namespace_set = &nopackage_namespace_set; \
400 /* warning: list length of namespace set is undefined */
401 #define MULTINAME_LATE(m, access, package) \
402 namespace_t m##_ns = {access, package}; \
403 namespace_set_t m##_nsset; \
404 namespace_list_t m##_l;m##_l.next = 0; \
405 m##_nsset.namespaces = &m##_l; \
406 m##_nsset = m##_nsset; \
407 m##_l.namespace = &m##_ns; \
408 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
410 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
411 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
412 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
413 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
414 static namespace_list_t nl4 = {&ns4,0};
415 static namespace_list_t nl3 = {&ns3,&nl4};
416 static namespace_list_t nl2 = {&ns2,&nl3};
417 static namespace_list_t nl1 = {&ns1,&nl2};
418 static namespace_set_t nopackage_namespace_set = {&nl1};
420 static void new_state()
423 state_t*oldstate = state;
425 memcpy(s, state, sizeof(state_t)); //shallow copy
427 s->imports = dict_new();
431 state->has_own_imports = 0;
432 state->vars = dict_new();
433 state->old = oldstate;
435 static void state_has_imports()
437 state->wildcard_imports = list_clone(state->wildcard_imports);
438 state->imports = dict_clone(state->imports);
439 state->has_own_imports = 1;
442 static void state_destroy(state_t*state)
444 if(state->has_own_imports) {
445 list_free(state->wildcard_imports);
446 dict_destroy(state->imports);state->imports=0;
448 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
449 dict_destroy(state->imports);state->imports=0;
453 for(t=0;t<state->vars->hashsize;t++) {
454 dictentry_t*e =state->vars->slots[t];
456 free(e->data);e->data=0;
460 dict_destroy(state->vars);state->vars=0;
466 static void old_state()
468 if(!state || !state->old)
469 syntaxerror("invalid nesting");
470 state_t*leaving = state;
474 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
475 free(leaving->method);
478 if(leaving->cls && leaving->cls != state->cls) {
483 state_destroy(leaving);
486 void initialize_file(char*filename)
489 syntaxerror("invalid call to initialize_file during parsing of another file");
492 state->package = strdup(filename);
494 state->method = rfx_calloc(sizeof(methodstate_t));
495 state->method->variable_count = 1;
500 if(!state || state->level!=1) {
501 syntaxerror("unexpected end of file in pass %d", as3_pass);
503 free(state->method);state->method=0;
505 //free(state->package);state->package=0; // used in registry
507 state_destroy(state);state=0;
510 void initialize_parser()
512 global = rfx_calloc(sizeof(global_t));
513 global->file = abc_file_new();
514 global->file->flags &= ~ABCFILE_LAZY;
515 global->token2info = dict_new2(&ptr_type);
517 global->init = abc_initscript(global->file);
518 code_t*c = global->init->method->body->code;
519 c = abc_getlocal_0(c);
520 c = abc_pushscope(c);
521 global->init->method->body->code = c;
524 void* finish_parser()
526 code_t*c = global->init->method->body->code;
527 /*c = abc_findpropstrict(c, "[package]::trace");
528 c = abc_pushstring(c, "[leaving global init function]");
529 c = abc_callpropvoid(c, "[package]::trace", 1);*/
530 c = abc_returnvoid(c);
531 global->init->method->body->code = c;
532 dict_destroy(global->token2info);global->token2info=0;
537 static void xx_scopetest()
539 /* findpropstrict doesn't just return a scope object- it
540 also makes it "active" somehow. Push local_0 on the
541 scope stack and read it back with findpropstrict, it'll
542 contain properties like "trace". Trying to find the same
543 property on a "vanilla" local_0 yields only a "undefined" */
544 //c = abc_findpropstrict(c, "[package]::trace");
546 /*c = abc_getlocal_0(c);
547 c = abc_findpropstrict(c, "[package]::trace");
549 c = abc_setlocal_1(c);
551 c = abc_pushbyte(c, 0);
552 c = abc_setlocal_2(c);
554 code_t*xx = c = abc_label(c);
555 c = abc_findpropstrict(c, "[package]::trace");
556 c = abc_pushstring(c, "prop:");
557 c = abc_hasnext2(c, 1, 2);
559 c = abc_setlocal_3(c);
560 c = abc_callpropvoid(c, "[package]::trace", 2);
561 c = abc_getlocal_3(c);
563 c = abc_iftrue(c,xx);*/
567 typedef struct _variable {
573 static variable_t* find_variable(char*name)
579 v = dict_lookup(s->vars, name);
589 static variable_t* find_variable_safe(char*name)
591 variable_t* v = find_variable(name);
593 syntaxerror("undefined variable: %s", name);
596 static char variable_exists(char*name)
598 return dict_lookup(state->vars, name)!=0;
600 code_t*defaultvalue(code_t*c, classinfo_t*type);
601 static int new_variable(const char*name, classinfo_t*type, char init)
604 v->index = state->method->variable_count;
608 dict_put(state->vars, name, v);
610 return state->method->variable_count++;
612 #define TEMPVARNAME "__as3_temp__"
613 static int gettempvar()
615 variable_t*v = find_variable(TEMPVARNAME);
618 return new_variable(TEMPVARNAME, 0, 0);
621 code_t* var_block(code_t*body)
627 for(t=0;t<state->vars->hashsize;t++) {
628 dictentry_t*e = state->vars->slots[t];
630 variable_t*v = (variable_t*)e->data;
631 if(v->type && v->init) {
632 c = defaultvalue(c, v->type);
633 c = abc_setlocal(c, v->index);
634 k = abc_kill(k, v->index);
644 if(x->opcode== OPCODE___BREAK__ ||
645 x->opcode== OPCODE___CONTINUE__) {
646 /* link kill code before break/continue */
647 code_t*e = code_dup(k);
648 code_t*s = code_start(e);
660 c = code_append(c, body);
661 c = code_append(c, k);
665 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
667 static void parsererror(const char*file, int line, const char*f)
669 syntaxerror("internal error in %s, %s:%d", f, file, line);
673 code_t* method_header()
676 if(state->method->late_binding && !state->method->inner) {
677 c = abc_getlocal_0(c);
678 c = abc_pushscope(c);
680 /*if(state->method->innerfunctions) {
681 c = abc_newactivation(c);
682 c = abc_pushscope(c);
684 if(state->method->is_constructor && !state->method->has_super) {
685 // call default constructor
686 c = abc_getlocal_0(c);
687 c = abc_constructsuper(c, 0);
689 methodstate_list_t*l = state->method->innerfunctions;
691 parserassert(l->methodstate->abc);
692 c = abc_newfunction(c, l->methodstate->abc);
693 c = abc_setlocal(c, l->methodstate->var_index);
694 free(l->methodstate);l->methodstate=0;
697 list_free(state->method->innerfunctions);
698 state->method->innerfunctions = 0;
703 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
705 c = code_append(c, header);
706 c = code_append(c, var_block(body));
707 /* append return if necessary */
708 if(!c || (c->opcode != OPCODE_RETURNVOID &&
709 c->opcode != OPCODE_RETURNVALUE)) {
710 c = abc_returnvoid(c);
716 static void startpackage(char*name)
719 /*printf("entering package \"%s\"\n", name);*/
720 state->package = strdup(name);
722 static void endpackage()
724 /*printf("leaving package \"%s\"\n", state->package);*/
726 //used e.g. in classinfo_register:
727 //free(state->package);state->package=0;
733 char*as3_globalclass=0;
734 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
737 syntaxerror("inner classes now allowed");
740 state->cls = rfx_calloc(sizeof(classstate_t));
743 classinfo_list_t*mlist=0;
745 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
746 syntaxerror("invalid modifier(s)");
748 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
749 syntaxerror("public and internal not supported at the same time.");
751 /* create the class name, together with the proper attributes */
755 if(!(flags&FLAG_PUBLIC) && !state->package) {
756 access = ACCESS_PRIVATE; package = strdup(current_filename_short);
757 } else if(!(flags&FLAG_PUBLIC) && state->package) {
758 access = ACCESS_PACKAGEINTERNAL; package = state->package;
759 } else if(state->package) {
760 access = ACCESS_PACKAGE; package = state->package;
762 syntaxerror("public classes only allowed inside a package");
766 state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
767 state->method->variable_count = 1;
768 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
770 if(registry_findclass(package, classname)) {
771 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
773 /* build info struct */
774 int num_interfaces = (list_length(implements));
775 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
779 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
781 state->cls->info = registry_findclass(package, classname);
782 parserassert((int)state->cls->info);
784 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
785 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
787 classinfo_list_t*l = implements;
788 for(l=implements;l;l=l->next) {
789 state->cls->info->interfaces[pos++] = l->classinfo;
792 /* generate the abc code for this class */
793 MULTINAME(classname2,state->cls->info);
794 multiname_t*extends2 = sig2mname(extends);
796 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
797 if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
798 if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
800 state->cls->info->flags |= CLASS_INTERFACE;
801 abc_class_interface(state->cls->abc);
804 abc_class_protectedNS(state->cls->abc, classname);
806 for(mlist=implements;mlist;mlist=mlist->next) {
807 MULTINAME(m, mlist->classinfo);
808 abc_class_add_interface(state->cls->abc, &m);
811 /* write the construction code for this class to the global init
813 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
815 abc_method_body_t*m = global->init->method->body;
816 __ getglobalscope(m);
817 classinfo_t*s = extends;
822 //TODO: take a look at the current scope stack, maybe
823 // we can re-use something
828 multiname_t*s2 = sig2mname(s);
830 multiname_destroy(s2);
832 __ pushscope(m); count++;
833 m->code = m->code->prev->prev; // invert
835 /* continue appending after last op end */
836 while(m->code && m->code->next) m->code = m->code->next;
838 /* TODO: if this is one of *our* classes, we can also
839 do a getglobalscope/getslot <nr> (which references
840 the init function's slots) */
842 __ getlex2(m, extends2);
844 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
845 stack is not the superclass */
846 __ pushscope(m);count++;
849 /* notice: we get a verify error #1107 if the top element on the scope
850 stack is not the global object */
852 __ pushscope(m);count++;
854 __ newclass(m,state->cls->abc);
858 __ setslot(m, slotindex);
859 multiname_destroy(extends2);
861 /* flash.display.MovieClip handling */
863 if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
864 if(state->package && state->package[0]) {
865 as3_globalclass = concat3(state->package, ".", classname);
867 as3_globalclass = strdup(classname);
873 static void endclass()
876 if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
878 c = abc_getlocal_0(c);
879 c = abc_constructsuper(c, 0);
880 state->cls->init = code_append(state->cls->init, c);
882 if(!state->method->late_binding) {
883 // class initialization code uses late binding
885 c = abc_getlocal_0(c);
886 c = abc_pushscope(c);
887 state->cls->static_init = code_append(c, state->cls->static_init);
890 if(state->cls->init) {
891 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
892 m->body->code = wrap_function(0, state->cls->init, m->body->code);
894 if(state->cls->static_init) {
895 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
896 m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
903 void check_code_for_break(code_t*c)
906 if(c->opcode == OPCODE___BREAK__) {
907 char*name = string_cstr(c->data[0]);
908 syntaxerror("Unresolved \"break %s\"", name);
910 if(c->opcode == OPCODE___CONTINUE__) {
911 char*name = string_cstr(c->data[0]);
912 syntaxerror("Unresolved \"continue %s\"", name);
919 static void check_constant_against_type(classinfo_t*t, constant_t*c)
921 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
922 if(TYPE_IS_NUMBER(t)) {
923 xassert(c->type == CONSTANT_FLOAT
924 || c->type == CONSTANT_INT
925 || c->type == CONSTANT_UINT);
926 } else if(TYPE_IS_UINT(t)) {
927 xassert(c->type == CONSTANT_UINT ||
928 (c->type == CONSTANT_INT && c->i>0));
929 } else if(TYPE_IS_INT(t)) {
930 xassert(c->type == CONSTANT_INT);
931 } else if(TYPE_IS_BOOLEAN(t)) {
932 xassert(c->type == CONSTANT_TRUE
933 || c->type == CONSTANT_FALSE);
938 static int flags2access(int flags)
941 if(flags&FLAG_PUBLIC) {
942 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
943 syntaxerror("invalid combination of access levels");
944 access = ACCESS_PACKAGE;
945 } else if(flags&FLAG_PRIVATE) {
946 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
947 syntaxerror("invalid combination of access levels");
948 access = ACCESS_PRIVATE;
949 } else if(flags&FLAG_PROTECTED) {
950 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
951 syntaxerror("invalid combination of access levels");
952 access = ACCESS_PROTECTED;
954 access = ACCESS_PACKAGEINTERNAL;
960 static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
962 memberinfo_t*minfo = 0;
965 minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
966 minfo->return_type = return_type;
967 } else if(getset != KW_GET && getset != KW_SET) {
969 if((minfo = registry_findmember(state->cls->info, name, 0))) {
970 if(minfo->parent == state->cls->info) {
971 syntaxerror("class already contains a member/method called '%s'", name);
972 } else if(!minfo->parent) {
973 syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
975 if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
976 syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
979 minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
980 minfo->return_type = return_type;
981 // getslot on a member slot only returns "undefined", so no need
982 // to actually store these
983 //state->minfo->slot = state->method->abc->method->trait->slot_id;
985 //class getter/setter
986 int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
990 else if(params->list && params->list->param)
991 type = params->list->param->type;
992 // not sure wether to look into superclasses here, too
993 if((minfo=registry_findmember(state->cls->info, name, 0))) {
994 if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
995 syntaxerror("class already contains a member or method called '%s'", name);
997 syntaxerror("getter/setter for '%s' already defined", name);
998 /* make a setter or getter into a getset */
1003 if(type && minfo->type != type)
1004 syntaxerror("different type in getter and setter");
1006 minfo = memberinfo_register(state->cls->info, name, gs);
1009 /* can't assign a slot as getter and setter might have different slots */
1010 //minfo->slot = slot;
1012 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1013 if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
1014 if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
1015 if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
1016 if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
1017 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1021 static void function_initvars(params_t*params, int flags)
1023 if(state->method->inner)
1024 new_variable("this", 0, 0);
1025 else if(!state->method->is_global)
1026 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
1028 new_variable("globalscope", 0, 0);
1031 for(p=params->list;p;p=p->next) {
1032 new_variable(p->param->name, p->param->type, 0);
1035 methodstate_list_t*l = state->method->innerfunctions;
1037 methodstate_t*m = l->methodstate;
1038 m->var_index = new_variable(m->info->name, TYPE_FUNCTION(m->info), 0);
1043 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1045 parserassert(state->method && state->method->info);
1047 methodstate_t*parent_method = state->method;
1056 state->new_vars = 1;
1059 state->method = rfx_calloc(sizeof(methodstate_t));
1060 state->method->inner = 1;
1061 state->method->variable_count = 0;
1062 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1064 NEW(memberinfo_t,minfo);
1066 state->method->info = minfo;
1068 list_append(parent_method->innerfunctions, state->method);
1070 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1074 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1075 parserassert(state->method);
1077 state->method->info->return_type = return_type;
1078 function_initvars(params, 0);
1082 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1083 params_t*params, classinfo_t*return_type)
1085 if(state->method && state->method->info) {
1086 syntaxerror("not able to start another method scope");
1091 state->method = rfx_calloc(sizeof(methodstate_t));
1092 state->method->has_super = 0;
1093 state->method->variable_count = 0;
1096 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1098 state->method->is_global = 1;
1099 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1101 if(state->method->is_constructor)
1102 name = "__as3_constructor__";
1105 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1107 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1111 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1112 parserassert(state->method);
1115 state->cls->has_constructor |= state->method->is_constructor;
1118 state->method->info->return_type = return_type;
1119 function_initvars(params, flags);
1123 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1124 params_t*params, classinfo_t*return_type, code_t*body)
1133 multiname_t*type2 = sig2mname(return_type);
1135 if(state->method->inner) {
1136 f = state->method->abc;
1137 abc_method_init(f, global->file, type2, 1);
1138 } else if(state->method->is_constructor) {
1139 f = abc_class_getconstructor(state->cls->abc, type2);
1140 } else if(!state->method->is_global) {
1141 namespace_t mname_ns = flags2namespace(flags, "");
1142 multiname_t mname = {QNAME, &mname_ns, 0, name};
1144 if(flags&FLAG_STATIC)
1145 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1147 f = abc_class_method(state->cls->abc, type2, &mname);
1148 slot = f->trait->slot_id;
1150 namespace_t mname_ns = flags2namespace(flags, state->package);
1151 multiname_t mname = {QNAME, &mname_ns, 0, name};
1153 f = abc_method_new(global->file, type2, 1);
1154 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1155 //abc_code_t*c = global->init->method->body->code;
1157 //flash doesn't seem to allow us to access function slots
1158 //state->method->info->slot = slot;
1160 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1161 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1162 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1163 if(params->varargs) f->flags |= METHOD_NEED_REST;
1167 for(p=params->list;p;p=p->next) {
1168 if(params->varargs && !p->next) {
1169 break; //varargs: omit last parameter in function signature
1171 multiname_t*m = sig2mname(p->param->type);
1172 list_append(f->parameters, m);
1173 if(p->param->value) {
1174 check_constant_against_type(p->param->type, p->param->value);
1175 opt=1;list_append(f->optional_parameters, p->param->value);
1177 syntaxerror("non-optional parameter not allowed after optional parameters");
1180 check_code_for_break(body);
1183 f->body->code = body;
1184 f->body->exceptions = state->method->exceptions;
1185 } else { //interface
1187 syntaxerror("interface methods can't have a method body");
1194 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1199 void breakjumpsto(code_t*c, char*name, code_t*jump)
1202 if(c->opcode == OPCODE___BREAK__) {
1203 string_t*name2 = c->data[0];
1204 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1205 c->opcode = OPCODE_JUMP;
1212 void continuejumpsto(code_t*c, char*name, code_t*jump)
1215 if(c->opcode == OPCODE___CONTINUE__) {
1216 string_t*name2 = c->data[0];
1217 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1218 c->opcode = OPCODE_JUMP;
1226 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1227 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1228 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1230 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1232 if(!type1 || !type2)
1233 return registry_getanytype();
1234 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1235 return registry_getanytype();
1238 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1247 return registry_getanytype();
1249 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1254 return abc_coerce_a(c);
1258 // cast an "any" type to a specific type. subject to
1259 // runtime exceptions
1260 return abc_coerce2(c, &m);
1263 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1264 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1265 // allow conversion between number types
1266 return abc_coerce2(c, &m);
1268 //printf("%s.%s\n", from.package, from.name);
1269 //printf("%s.%s\n", to.package, to.name);
1271 classinfo_t*supertype = from;
1273 if(supertype == to) {
1274 // target type is one of from's superclasses
1275 return abc_coerce2(c, &m);
1278 while(supertype->interfaces[t]) {
1279 if(supertype->interfaces[t]==to) {
1280 // target type is one of from's interfaces
1281 return abc_coerce2(c, &m);
1285 supertype = supertype->superclass;
1287 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1289 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1291 syntaxerror("can't convert type %s to %s", from->name, to->name);
1292 return 0; // make gcc happy
1295 code_t*defaultvalue(code_t*c, classinfo_t*type)
1297 if(TYPE_IS_INT(type)) {
1298 c = abc_pushbyte(c, 0);
1299 } else if(TYPE_IS_UINT(type)) {
1300 c = abc_pushuint(c, 0);
1301 } else if(TYPE_IS_FLOAT(type)) {
1303 } else if(TYPE_IS_BOOLEAN(type)) {
1304 c = abc_pushfalse(c);
1306 //c = abc_pushundefined(c);
1308 c = abc_pushnull(c);
1310 c = abc_coerce2(c, &m);
1315 char is_pushundefined(code_t*c)
1317 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1320 static classinfo_t* find_class(char*name)
1324 c = registry_findclass(state->package, name);
1327 /* try explicit imports */
1328 dictentry_t* e = dict_get_slot(state->imports, name);
1331 if(!strcmp(e->key, name)) {
1332 c = (classinfo_t*)e->data;
1338 /* try package.* imports */
1339 import_list_t*l = state->wildcard_imports;
1341 //printf("does package %s contain a class %s?\n", l->import->package, name);
1342 c = registry_findclass(l->import->package, name);
1347 /* try global package */
1348 c = registry_findclass("", name);
1351 /* try local "filename" package */
1352 c = registry_findclass(current_filename_short, name);
1358 static char is_getlocal(code_t*c)
1360 if(!c || c->prev || c->next)
1362 return(c->opcode == OPCODE_GETLOCAL
1363 || c->opcode == OPCODE_GETLOCAL_0
1364 || c->opcode == OPCODE_GETLOCAL_1
1365 || c->opcode == OPCODE_GETLOCAL_2
1366 || c->opcode == OPCODE_GETLOCAL_3);
1368 static int getlocalnr(code_t*c)
1370 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1371 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1372 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1373 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1374 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1375 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1379 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1383 [prefix code] [read instruction]
1387 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1389 if(in && in->opcode == OPCODE_COERCE_A) {
1390 in = code_cutlast(in);
1393 syntaxerror("internal error");
1395 /* chop off read instruction */
1399 prefix = r->prev;r->prev = 0;
1405 char use_temp_var = readbefore;
1407 /* generate the write instruction, and maybe append a dup to the prefix code */
1408 code_t* write = abc_nop(0);
1409 if(r->opcode == OPCODE_GETPROPERTY) {
1410 write->opcode = OPCODE_SETPROPERTY;
1411 multiname_t*m = (multiname_t*)r->data[0];
1412 write->data[0] = multiname_clone(m);
1413 if(m->type == QNAME || m->type == MULTINAME) {
1415 prefix = abc_dup(prefix); // we need the object, too
1418 } else if(m->type == MULTINAMEL) {
1420 /* dupping two values on the stack requires 5 operations and one register-
1421 couldn't adobe just have given us a dup2? */
1422 int temp = gettempvar();
1423 prefix = abc_setlocal(prefix, temp);
1424 prefix = abc_dup(prefix);
1425 prefix = abc_getlocal(prefix, temp);
1426 prefix = abc_swap(prefix);
1427 prefix = abc_getlocal(prefix, temp);
1429 prefix = abc_kill(prefix, temp);
1433 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1435 } else if(r->opcode == OPCODE_GETSLOT) {
1436 write->opcode = OPCODE_SETSLOT;
1437 write->data[0] = r->data[0];
1439 prefix = abc_dup(prefix); // we need the object, too
1442 } else if(r->opcode == OPCODE_GETLOCAL) {
1443 write->opcode = OPCODE_SETLOCAL;
1444 write->data[0] = r->data[0];
1445 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1446 write->opcode = OPCODE_SETLOCAL_0;
1447 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1448 write->opcode = OPCODE_SETLOCAL_1;
1449 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1450 write->opcode = OPCODE_SETLOCAL_2;
1451 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1452 write->opcode = OPCODE_SETLOCAL_3;
1455 syntaxerror("illegal lvalue: can't assign a value to this expression");
1462 /* with getproperty/getslot, we have to be extra careful not
1463 to execute the read code twice, as it might have side-effects
1464 (e.g. if the property is in fact a setter/getter combination)
1466 So read the value, modify it, and write it again,
1467 using prefix only once and making sure (by using a temporary
1468 register) that the return value is what we just wrote */
1469 temp = gettempvar();
1470 c = code_append(c, prefix);
1471 c = code_append(c, r);
1474 c = abc_setlocal(c, temp);
1476 c = code_append(c, middlepart);
1479 c = abc_setlocal(c, temp);
1481 c = code_append(c, write);
1482 c = abc_getlocal(c, temp);
1483 c = abc_kill(c, temp);
1485 /* if we're allowed to execute the read code twice *and*
1486 the middlepart doesn't modify the code, things are easier.
1488 code_t* r2 = code_dup(r);
1489 //c = code_append(c, prefix);
1490 parserassert(!prefix);
1491 c = code_append(c, r);
1492 c = code_append(c, middlepart);
1493 c = code_append(c, write);
1494 c = code_append(c, r2);
1497 /* even smaller version: overwrite the value without reading
1501 c = code_append(c, prefix);
1504 c = code_append(c, middlepart);
1505 c = code_append(c, write);
1506 c = code_append(c, r);
1509 temp = gettempvar();
1511 c = code_append(c, prefix);
1513 c = code_append(c, middlepart);
1515 c = abc_setlocal(c, temp);
1516 c = code_append(c, write);
1517 c = abc_getlocal(c, temp);
1518 c = abc_kill(c, temp);
1524 char is_break_or_jump(code_t*c)
1528 if(c->opcode == OPCODE_JUMP ||
1529 c->opcode == OPCODE___BREAK__ ||
1530 c->opcode == OPCODE___CONTINUE__ ||
1531 c->opcode == OPCODE_THROW ||
1532 c->opcode == OPCODE_RETURNVOID ||
1533 c->opcode == OPCODE_RETURNVALUE) {
1540 #define IS_FINALLY_TARGET(op) \
1541 ((op) == OPCODE___CONTINUE__ || \
1542 (op) == OPCODE___BREAK__ || \
1543 (op) == OPCODE_RETURNVOID || \
1544 (op) == OPCODE_RETURNVALUE || \
1545 (op) == OPCODE___RETHROW__)
1547 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1549 #define NEED_EXTRA_STACK_ARG
1550 code_t*finally_label = abc_nop(0);
1551 NEW(lookupswitch_t, l);
1557 code_t*prev = i->prev;
1558 if(IS_FINALLY_TARGET(i->opcode)) {
1561 if(i->opcode == OPCODE___RETHROW__ ||
1562 i->opcode == OPCODE_RETURNVALUE) {
1563 if(i->opcode == OPCODE___RETHROW__)
1564 i->opcode = OPCODE_THROW;
1566 p = abc_coerce_a(p);
1567 p = abc_setlocal(p, tempvar);
1569 p = abc_pushbyte(p, count++);
1570 p = abc_jump(p, finally_label);
1571 code_t*target = p = abc_label(p);
1572 #ifdef NEED_EXTRA_STACK_ARG
1576 p = abc_getlocal(p, tempvar);
1579 p->next = i;i->prev = p;
1580 list_append(l->targets, target);
1586 c = abc_pushbyte(c, -1);
1587 c = code_append(c, finally_label);
1588 c = code_append(c, finally);
1590 #ifdef NEED_EXTRA_STACK_ARG
1593 c = abc_lookupswitch(c, l);
1594 c = l->def = abc_label(c);
1595 #ifdef NEED_EXTRA_STACK_ARG
1602 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1606 code_t*prev = i->prev;
1607 if(IS_FINALLY_TARGET(i->opcode)) {
1608 if(i->opcode == OPCODE___RETHROW__)
1609 i->opcode = OPCODE_THROW;
1610 code_t*end = code_dup(finally);
1611 code_t*start = code_start(end);
1612 if(prev) prev->next = start;
1619 return code_append(c, finally);
1622 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1628 int num_insertion_points=0;
1630 if(IS_FINALLY_TARGET(i->opcode))
1631 num_insertion_points++;
1638 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1643 int simple_version_cost = (1+num_insertion_points)*code_size;
1644 int lookup_version_cost = 4*num_insertion_points + 5;
1646 if(cantdup || simple_version_cost > lookup_version_cost) {
1647 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1648 return insert_finally_lookup(c, finally, tempvar);
1650 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1651 return insert_finally_simple(c, finally, tempvar);
1655 #define PASS1 }} if(as3_pass == 1) {{
1656 #define PASS1END }} if(as3_pass == 2) {{
1657 #define PASS2 }} if(as3_pass == 2) {{
1658 #define PASS12 }} {{
1659 #define PASS12END }} if(as3_pass == 2) {{
1663 /* Line 273 of skeleton.m4 */
1664 #line 1665 "parser.tab.c"
1671 typedef YYTYPE_UINT8 yytype_uint8;
1673 typedef unsigned char yytype_uint8;
1677 typedef YYTYPE_INT8 yytype_int8;
1678 #elif (defined __STDC__ || defined __C99__FUNC__ \
1679 || defined __cplusplus || defined _MSC_VER)
1680 typedef signed char yytype_int8;
1682 typedef short int yytype_int8;
1685 #ifdef YYTYPE_UINT16
1686 typedef YYTYPE_UINT16 yytype_uint16;
1688 typedef unsigned short int yytype_uint16;
1692 typedef YYTYPE_INT16 yytype_int16;
1694 typedef short int yytype_int16;
1698 # ifdef __SIZE_TYPE__
1699 # define YYSIZE_T __SIZE_TYPE__
1700 # elif defined size_t
1701 # define YYSIZE_T size_t
1702 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1703 || defined __cplusplus || defined _MSC_VER)
1704 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1705 # define YYSIZE_T size_t
1707 # define YYSIZE_T unsigned int
1711 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1716 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1717 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1721 # define YY_(msgid) msgid
1725 /* Suppress unused-variable warnings by "using" E. */
1726 #if ! defined lint || defined __GNUC__
1727 # define YYUSE(e) ((void) (e))
1729 # define YYUSE(e) /* empty */
1732 /* Identity function, used to suppress warnings about constant conditions. */
1734 # define YYID(n) (n)
1736 #if (defined __STDC__ || defined __C99__FUNC__ \
1737 || defined __cplusplus || defined _MSC_VER)
1750 #if ! defined yyoverflow || YYERROR_VERBOSE
1752 /* The parser invokes alloca or malloc; define the necessary symbols. */
1754 # ifdef YYSTACK_USE_ALLOCA
1755 # if YYSTACK_USE_ALLOCA
1757 # define YYSTACK_ALLOC __builtin_alloca
1758 # elif defined __BUILTIN_VA_ARG_INCR
1759 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1761 # define YYSTACK_ALLOC __alloca
1762 # elif defined _MSC_VER
1763 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1764 # define alloca _alloca
1766 # define YYSTACK_ALLOC alloca
1767 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1768 || defined __cplusplus || defined _MSC_VER)
1769 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1771 # define _STDLIB_H 1
1778 # ifdef YYSTACK_ALLOC
1779 /* Pacify GCC's `empty if-body' warning. */
1780 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1781 # ifndef YYSTACK_ALLOC_MAXIMUM
1782 /* The OS might guarantee only one guard page at the bottom of the stack,
1783 and a page size can be as small as 4096 bytes. So we cannot safely
1784 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1785 to allow for a few compiler-allocated temporary stack slots. */
1786 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1789 # define YYSTACK_ALLOC YYMALLOC
1790 # define YYSTACK_FREE YYFREE
1791 # ifndef YYSTACK_ALLOC_MAXIMUM
1792 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1794 # if (defined __cplusplus && ! defined _STDLIB_H \
1795 && ! ((defined YYMALLOC || defined malloc) \
1796 && (defined YYFREE || defined free)))
1797 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1799 # define _STDLIB_H 1
1803 # define YYMALLOC malloc
1804 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1805 || defined __cplusplus || defined _MSC_VER)
1806 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1810 # define YYFREE free
1811 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1812 || defined __cplusplus || defined _MSC_VER)
1813 void free (void *); /* INFRINGES ON USER NAME SPACE */
1817 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1820 #if (! defined yyoverflow \
1821 && (! defined __cplusplus \
1822 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1824 /* A type that is properly aligned for any stack member. */
1827 yytype_int16 yyss_alloc;
1831 /* The size of the maximum gap between one aligned stack and the next. */
1832 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1834 /* The size of an array large to enough to hold all stacks, each with
1836 # define YYSTACK_BYTES(N) \
1837 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1838 + YYSTACK_GAP_MAXIMUM)
1840 /* Copy COUNT objects from FROM to TO. The source and destination do
1843 # if defined __GNUC__ && 1 < __GNUC__
1844 # define YYCOPY(To, From, Count) \
1845 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1847 # define YYCOPY(To, From, Count) \
1851 for (yyi = 0; yyi < (Count); yyi++) \
1852 (To)[yyi] = (From)[yyi]; \
1858 /* Relocate STACK from its old location to the new one. The
1859 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1860 elements in the stack, and YYPTR gives the new location of the
1861 stack. Advance YYPTR to a properly aligned location for the next
1863 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1866 YYSIZE_T yynewbytes; \
1867 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1868 Stack = &yyptr->Stack_alloc; \
1869 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1870 yyptr += yynewbytes / sizeof (*yyptr); \
1876 /* YYFINAL -- State number of the termination state. */
1878 /* YYLAST -- Last index in YYTABLE. */
1881 /* YYNTOKENS -- Number of terminals. */
1882 #define YYNTOKENS 131
1883 /* YYNNTS -- Number of nonterminals. */
1885 /* YYNRULES -- Number of rules. */
1886 #define YYNRULES 289
1887 /* YYNRULES -- Number of states. */
1888 #define YYNSTATES 491
1890 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1891 #define YYUNDEFTOK 2
1892 #define YYMAXUTOK 361
1894 #define YYTRANSLATE(YYX) \
1895 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1897 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1898 static const yytype_uint8 yytranslate[] =
1900 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1901 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1902 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1903 2, 2, 2, 116, 2, 2, 2, 114, 106, 2,
1904 120, 130, 113, 111, 97, 110, 125, 112, 2, 2,
1905 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
1906 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
1907 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1908 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1909 2, 122, 2, 123, 105, 2, 2, 2, 2, 2,
1910 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1911 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1912 2, 2, 2, 124, 104, 129, 115, 2, 2, 2,
1913 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1914 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1915 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1916 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1917 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1918 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1919 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1920 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1921 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1922 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1923 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1924 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1925 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1926 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1927 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1928 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1929 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1930 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1931 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1932 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1933 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1934 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1935 95, 98, 100, 101, 109, 117, 118, 119, 121, 126,
1940 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1942 static const yytype_uint16 yyprhs[] =
1944 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
1945 19, 21, 23, 25, 32, 34, 35, 37, 39, 42,
1946 44, 46, 48, 50, 52, 59, 61, 63, 64, 67,
1947 69, 71, 73, 75, 77, 79, 81, 83, 85, 87,
1948 89, 91, 93, 95, 97, 99, 101, 103, 105, 107,
1949 111, 114, 117, 119, 121, 124, 125, 128, 131, 133,
1950 137, 141, 142, 145, 146, 154, 155, 157, 159, 163,
1951 165, 168, 172, 181, 188, 189, 196, 197, 205, 207,
1952 210, 212, 215, 216, 218, 220, 223, 225, 228, 233,
1953 237, 238, 247, 248, 258, 259, 265, 267, 270, 272,
1954 275, 277, 278, 285, 288, 290, 296, 298, 300, 304,
1955 306, 307, 314, 315, 321, 324, 329, 330, 332, 334,
1956 337, 339, 341, 343, 345, 347, 349, 351, 353, 355,
1957 356, 359, 360, 363, 364, 367, 368, 378, 379, 388,
1958 389, 391, 393, 396, 398, 400, 402, 404, 405, 407,
1959 409, 412, 414, 417, 426, 428, 430, 436, 437, 440,
1960 442, 444, 446, 448, 450, 452, 454, 456, 457, 459,
1961 462, 467, 471, 473, 478, 481, 483, 485, 486, 487,
1962 500, 502, 503, 504, 515, 517, 521, 523, 525, 527,
1963 531, 533, 535, 537, 540, 541, 542, 546, 547, 549,
1964 551, 555, 556, 561, 566, 571, 574, 576, 579, 581,
1965 583, 587, 589, 591, 593, 595, 597, 599, 601, 603,
1966 605, 607, 609, 611, 613, 615, 617, 619, 621, 623,
1967 627, 631, 635, 639, 643, 647, 651, 655, 659, 663,
1968 666, 669, 673, 677, 681, 685, 689, 693, 697, 701,
1969 705, 709, 713, 717, 721, 725, 729, 734, 737, 739,
1970 743, 746, 751, 755, 756, 758, 762, 768, 772, 776,
1971 780, 784, 788, 792, 796, 800, 804, 808, 812, 818,
1972 821, 824, 827, 830, 834, 838, 840, 844, 850, 856
1975 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1976 static const yytype_int16 yyrhs[] =
1978 132, 0, -1, 133, -1, -1, 134, -1, 135, -1,
1979 134, 135, -1, 181, -1, 193, -1, 191, -1, 209,
1980 -1, 202, -1, 144, -1, 3, 86, 3, 124, 134,
1981 129, -1, 96, -1, -1, 137, -1, 138, -1, 137,
1982 138, -1, 193, -1, 191, -1, 209, -1, 202, -1,
1983 144, -1, 3, 86, 3, 124, 137, 129, -1, 96,
1984 -1, 140, -1, -1, 140, 142, -1, 142, -1, 184,
1985 -1, 155, -1, 156, -1, 157, -1, 159, -1, 167,
1986 -1, 150, -1, 178, -1, 175, -1, 230, -1, 96,
1987 -1, 141, -1, 146, -1, 161, -1, 162, -1, 227,
1988 -1, 177, -1, 236, -1, 237, -1, 124, 140, 129,
1989 -1, 124, 129, -1, 142, 96, -1, 142, -1, 141,
1990 -1, 99, 228, -1, -1, 45, 147, -1, 31, 147,
1991 -1, 148, -1, 147, 97, 148, -1, 3, 219, 145,
1992 -1, -1, 64, 143, -1, -1, 63, 120, 151, 229,
1993 130, 143, 149, -1, -1, 146, -1, 230, -1, 45,
1994 3, 219, -1, 3, -1, 12, 120, -1, 12, 49,
1995 120, -1, 154, 152, 96, 229, 96, 230, 130, 143,
1996 -1, 154, 153, 67, 229, 130, 143, -1, -1, 13,
1997 120, 158, 229, 130, 143, -1, -1, 14, 160, 143,
1998 13, 120, 229, 130, -1, 65, -1, 65, 3, -1,
1999 29, -1, 29, 3, -1, -1, 164, -1, 166, -1,
2000 164, 166, -1, 165, -1, 164, 165, -1, 33, 231,
2001 103, 139, -1, 61, 103, 139, -1, -1, 15, 120,
2002 168, 231, 130, 124, 163, 129, -1, -1, 32, 120,
2003 3, 219, 130, 170, 124, 139, 129, -1, -1, 27,
2004 124, 172, 139, 129, -1, 169, -1, 173, 169, -1,
2005 173, -1, 173, 171, -1, 171, -1, -1, 51, 124,
2006 176, 139, 129, 174, -1, 36, 229, -1, 36, -1,
2007 38, 120, 229, 130, 143, -1, 3, -1, 18, -1,
2008 180, 125, 179, -1, 179, -1, -1, 18, 180, 124,
2009 182, 136, 129, -1, -1, 18, 124, 183, 136, 129,
2010 -1, 40, 215, -1, 40, 180, 125, 113, -1, -1,
2011 186, -1, 187, -1, 186, 187, -1, 20, -1, 21,
2012 -1, 19, -1, 37, -1, 46, -1, 48, -1, 47,
2013 -1, 25, -1, 23, -1, -1, 53, 216, -1, -1,
2014 53, 217, -1, -1, 16, 217, -1, -1, 185, 30,
2015 3, 188, 190, 124, 192, 195, 129, -1, -1, 185,
2016 43, 3, 189, 124, 194, 198, 129, -1, -1, 196,
2017 -1, 197, -1, 196, 197, -1, 96, -1, 202, -1,
2018 209, -1, 141, -1, -1, 199, -1, 200, -1, 199,
2019 200, -1, 96, -1, 45, 3, -1, 185, 26, 208,
2020 3, 120, 205, 130, 219, -1, 45, -1, 31, -1,
2021 185, 201, 3, 219, 145, -1, -1, 99, 204, -1,
2022 9, -1, 7, -1, 8, -1, 11, -1, 4, -1,
2023 55, -1, 54, -1, 44, -1, -1, 206, -1, 90,
2024 207, -1, 206, 97, 90, 207, -1, 206, 97, 207,
2025 -1, 207, -1, 3, 103, 218, 203, -1, 3, 203,
2026 -1, 50, -1, 34, -1, -1, -1, 185, 26, 208,
2027 3, 120, 205, 130, 219, 124, 210, 139, 129, -1,
2028 3, -1, -1, -1, 26, 211, 120, 205, 130, 219,
2029 124, 213, 139, 129, -1, 3, -1, 180, 125, 3,
2030 -1, 215, -1, 214, -1, 216, -1, 217, 97, 216,
2031 -1, 216, -1, 113, -1, 35, -1, 103, 218, -1,
2032 -1, -1, 120, 221, 130, -1, -1, 222, -1, 228,
2033 -1, 222, 97, 228, -1, -1, 24, 231, 223, 220,
2034 -1, 231, 120, 221, 130, -1, 52, 120, 221, 130,
2035 -1, 62, 231, -1, 41, -1, 41, 229, -1, 231,
2036 -1, 231, -1, 229, 97, 231, -1, 229, -1, 212,
2037 -1, 232, -1, 235, -1, 224, -1, 226, -1, 225,
2038 -1, 5, -1, 9, -1, 10, -1, 7, -1, 8,
2039 -1, 11, -1, 4, -1, 28, -1, 55, -1, 54,
2040 -1, 44, -1, 231, 107, 231, -1, 231, 108, 231,
2041 -1, 231, 73, 231, -1, 231, 74, 231, -1, 231,
2042 69, 231, -1, 231, 70, 231, -1, 231, 72, 231,
2043 -1, 231, 71, 231, -1, 231, 84, 231, -1, 231,
2044 85, 231, -1, 116, 231, -1, 115, 231, -1, 231,
2045 106, 231, -1, 231, 105, 231, -1, 231, 104, 231,
2046 -1, 231, 93, 231, -1, 231, 92, 231, -1, 231,
2047 91, 231, -1, 231, 112, 231, -1, 231, 114, 231,
2048 -1, 231, 111, 231, -1, 231, 110, 231, -1, 231,
2049 113, 231, -1, 231, 67, 231, -1, 231, 68, 231,
2050 -1, 231, 39, 231, -1, 231, 66, 231, -1, 42,
2051 120, 231, 130, -1, 35, 231, -1, 35, -1, 120,
2052 229, 130, -1, 110, 231, -1, 231, 122, 231, 123,
2053 -1, 122, 221, 123, -1, -1, 234, -1, 228, 103,
2054 228, -1, 234, 97, 228, 103, 228, -1, 124, 233,
2055 129, -1, 231, 78, 231, -1, 231, 77, 231, -1,
2056 231, 82, 231, -1, 231, 81, 231, -1, 231, 83,
2057 231, -1, 231, 76, 231, -1, 231, 75, 231, -1,
2058 231, 79, 231, -1, 231, 80, 231, -1, 231, 99,
2059 231, -1, 231, 102, 231, 103, 231, -1, 231, 88,
2060 -1, 231, 87, -1, 88, 231, -1, 87, 231, -1,
2061 52, 125, 3, -1, 231, 125, 3, -1, 3, -1,
2062 185, 17, 3, -1, 185, 17, 3, 99, 3, -1,
2063 185, 17, 3, 99, 4, -1, 22, 17, 3, -1
2066 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2067 static const yytype_uint16 yyrline[] =
2069 0, 1641, 1641, 1643, 1643, 1644, 1645, 1647, 1648, 1649,
2070 1650, 1651, 1652, 1653, 1654, 1656, 1656, 1657, 1658, 1660,
2071 1661, 1662, 1663, 1664, 1665, 1666, 1668, 1669, 1671, 1672,
2072 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684,
2073 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1695, 1696, 1698,
2074 1699, 1700, 1701, 1705, 1712, 1713, 1717, 1718, 1720, 1721,
2075 1723, 1766, 1767, 1770, 1770, 1789, 1790, 1791, 1794, 1797,
2076 1801, 1802, 1804, 1824, 1867, 1867, 1886, 1886, 1901, 1904,
2077 1907, 1910, 1914, 1915, 1916, 1917, 1918, 1919, 1921, 1932,
2078 1935, 1935, 1964, 1964, 1984, 1984, 2001, 2002, 2003, 2004,
2079 2012, 2021, 2021, 2066, 2070, 2081, 2090, 2091, 2093, 2094,
2080 2096, 2096, 2098, 2098, 2101, 2115, 2131, 2132, 2133, 2134,
2081 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2146,
2082 2147, 2149, 2150, 2152, 2153, 2157, 2155, 2163, 2161, 2169,
2083 2170, 2171, 2172, 2173, 2174, 2175, 2177, 2183, 2184, 2185,
2084 2186, 2187, 2188, 2191, 2204, 2204, 2206, 2265, 2266, 2268,
2085 2269, 2270, 2271, 2272, 2274, 2275, 2276, 2281, 2285, 2291,
2086 2297, 2305, 2310, 2316, 2324, 2332, 2333, 2334, 2337, 2336,
2087 2351, 2352, 2354, 2353, 2375, 2383, 2395, 2396, 2398, 2399,
2088 2401, 2402, 2403, 2412, 2413, 2417, 2418, 2420, 2421, 2422,
2089 2425, 2430, 2431, 2467, 2513, 2534, 2555, 2558, 2565, 2566,
2090 2567, 2573, 2579, 2581, 2583, 2585, 2587, 2589, 2591, 2608,
2091 2613, 2616, 2619, 2622, 2625, 2628, 2631, 2634, 2637, 2641,
2092 2644, 2647, 2650, 2653, 2656, 2659, 2662, 2666, 2677, 2695,
2093 2700, 2705, 2710, 2715, 2720, 2724, 2728, 2733, 2737, 2741,
2094 2750, 2759, 2769, 2774, 2786, 2792, 2797, 2803, 2809, 2813,
2095 2815, 2826, 2835, 2842, 2843, 2845, 2851, 2860, 2867, 2879,
2096 2885, 2891, 2897, 2903, 2909, 2915, 2928, 2939, 2946, 2959,
2097 2986, 3000, 3014, 3028, 3043, 3077, 3174, 3175, 3176, 3178
2101 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2102 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2103 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2104 static const char *const yytname[] =
2106 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
2107 "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
2108 "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
2109 "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
2110 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
2111 "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
2112 "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2113 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2114 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2115 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2116 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2117 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2118 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2119 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
2120 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
2121 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2122 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2123 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2124 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2125 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2126 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2127 "'.'", "above_identifier", "below_else", "above_function", "'}'", "')'",
2128 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2129 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2130 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2131 "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
2132 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2133 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2134 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2135 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2136 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2137 "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
2138 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2139 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2140 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2141 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2142 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2143 "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
2144 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2145 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2146 "$@13", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2147 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2148 "EXPRESSION_LIST", "XX", "NEW", "FUNCTIONCALL", "DELETE", "RETURN",
2149 "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E", "CONSTANT",
2150 "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2151 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2156 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2158 static const yytype_uint16 yytoknum[] =
2160 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2161 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2162 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2163 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2164 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2165 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2166 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2167 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2168 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2169 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
2170 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
2171 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
2172 40, 358, 91, 93, 123, 46, 359, 360, 361, 125,
2177 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2178 static const yytype_uint8 yyr1[] =
2180 0, 131, 132, 133, 133, 134, 134, 135, 135, 135,
2181 135, 135, 135, 135, 135, 136, 136, 137, 137, 138,
2182 138, 138, 138, 138, 138, 138, 139, 139, 140, 140,
2183 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
2184 142, 142, 142, 142, 142, 142, 142, 142, 142, 143,
2185 143, 143, 143, 144, 145, 145, 146, 146, 147, 147,
2186 148, 149, 149, 151, 150, 152, 152, 152, 153, 153,
2187 154, 154, 155, 156, 158, 157, 160, 159, 161, 161,
2188 162, 162, 163, 163, 163, 163, 164, 164, 165, 166,
2189 168, 167, 170, 169, 172, 171, 173, 173, 174, 174,
2190 174, 176, 175, 177, 177, 178, 179, 179, 180, 180,
2191 182, 181, 183, 181, 184, 184, 185, 185, 186, 186,
2192 187, 187, 187, 187, 187, 187, 187, 187, 187, 188,
2193 188, 189, 189, 190, 190, 192, 191, 194, 193, 195,
2194 195, 196, 196, 197, 197, 197, 197, 198, 198, 199,
2195 199, 200, 200, 200, 201, 201, 202, 203, 203, 204,
2196 204, 204, 204, 204, 204, 204, 204, 205, 205, 205,
2197 205, 206, 206, 207, 207, 208, 208, 208, 210, 209,
2198 211, 211, 213, 212, 214, 215, 216, 216, 217, 217,
2199 218, 218, 218, 219, 219, 220, 220, 221, 221, 222,
2200 222, 223, 224, 225, 225, 226, 227, 227, 228, 229,
2201 229, 230, 231, 231, 231, 231, 231, 231, 231, 232,
2202 232, 232, 232, 232, 232, 232, 232, 232, 232, 231,
2203 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
2204 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
2205 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
2206 231, 231, 231, 233, 233, 234, 234, 231, 231, 231,
2207 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
2208 231, 231, 231, 231, 231, 235, 236, 236, 236, 237
2211 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2212 static const yytype_uint8 yyr2[] =
2214 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2215 1, 1, 1, 6, 1, 0, 1, 1, 2, 1,
2216 1, 1, 1, 1, 6, 1, 1, 0, 2, 1,
2217 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2218 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2219 2, 2, 1, 1, 2, 0, 2, 2, 1, 3,
2220 3, 0, 2, 0, 7, 0, 1, 1, 3, 1,
2221 2, 3, 8, 6, 0, 6, 0, 7, 1, 2,
2222 1, 2, 0, 1, 1, 2, 1, 2, 4, 3,
2223 0, 8, 0, 9, 0, 5, 1, 2, 1, 2,
2224 1, 0, 6, 2, 1, 5, 1, 1, 3, 1,
2225 0, 6, 0, 5, 2, 4, 0, 1, 1, 2,
2226 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2227 2, 0, 2, 0, 2, 0, 9, 0, 8, 0,
2228 1, 1, 2, 1, 1, 1, 1, 0, 1, 1,
2229 2, 1, 2, 8, 1, 1, 5, 0, 2, 1,
2230 1, 1, 1, 1, 1, 1, 1, 0, 1, 2,
2231 4, 3, 1, 4, 2, 1, 1, 0, 0, 12,
2232 1, 0, 0, 10, 1, 3, 1, 1, 1, 3,
2233 1, 1, 1, 2, 0, 0, 3, 0, 1, 1,
2234 3, 0, 4, 4, 4, 2, 1, 2, 1, 1,
2235 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2236 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2237 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
2238 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2239 3, 3, 3, 3, 3, 3, 4, 2, 1, 3,
2240 2, 4, 3, 0, 1, 3, 5, 3, 3, 3,
2241 3, 3, 3, 3, 3, 3, 3, 3, 5, 2,
2242 2, 2, 2, 3, 3, 1, 3, 5, 5, 3
2245 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2246 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2247 means the default is an error. */
2248 static const yytype_uint16 yydefact[] =
2250 116, 285, 224, 218, 221, 222, 219, 220, 223, 0,
2251 0, 76, 0, 0, 122, 120, 121, 128, 0, 127,
2252 181, 225, 258, 123, 0, 0, 0, 228, 124, 126,
2253 125, 0, 0, 227, 226, 0, 0, 0, 0, 14,
2254 0, 0, 0, 0, 197, 263, 0, 2, 116, 5,
2255 53, 12, 36, 65, 31, 32, 33, 34, 35, 38,
2256 37, 7, 30, 0, 117, 118, 9, 8, 11, 10,
2257 212, 215, 217, 216, 211, 39, 209, 213, 214, 0,
2258 0, 70, 74, 116, 90, 106, 107, 112, 109, 0,
2259 285, 201, 180, 0, 257, 0, 0, 114, 0, 101,
2260 197, 0, 205, 63, 282, 281, 260, 240, 239, 0,
2261 0, 198, 199, 208, 0, 0, 264, 1, 6, 285,
2262 0, 0, 66, 0, 0, 67, 177, 0, 155, 0,
2263 154, 0, 119, 0, 0, 0, 0, 0, 0, 0,
2264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2265 0, 0, 0, 0, 0, 280, 279, 0, 0, 0,
2266 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2267 0, 0, 197, 0, 0, 0, 71, 0, 0, 80,
2268 104, 206, 0, 78, 40, 116, 41, 52, 0, 42,
2269 43, 44, 46, 0, 45, 47, 48, 0, 116, 110,
2270 0, 195, 167, 0, 0, 0, 27, 0, 283, 0,
2271 259, 262, 0, 0, 267, 0, 194, 57, 58, 194,
2272 56, 0, 0, 176, 175, 0, 129, 131, 194, 210,
2273 254, 255, 252, 253, 233, 234, 236, 235, 231, 232,
2274 274, 273, 269, 268, 275, 276, 271, 270, 272, 237,
2275 238, 246, 245, 244, 277, 0, 243, 242, 241, 229,
2276 230, 250, 249, 247, 251, 248, 0, 0, 284, 116,
2277 0, 0, 81, 103, 207, 79, 50, 116, 29, 209,
2278 51, 0, 0, 0, 285, 25, 0, 116, 17, 23,
2279 20, 19, 22, 21, 116, 108, 197, 202, 157, 0,
2280 0, 168, 172, 116, 185, 115, 256, 0, 26, 204,
2281 0, 200, 265, 0, 0, 55, 0, 55, 0, 0,
2282 0, 0, 133, 0, 0, 55, 0, 203, 261, 116,
2283 116, 289, 49, 28, 0, 286, 0, 0, 113, 18,
2284 0, 0, 0, 0, 174, 169, 194, 0, 105, 0,
2285 116, 0, 184, 192, 191, 0, 187, 186, 190, 193,
2286 0, 60, 59, 0, 116, 167, 130, 0, 0, 188,
2287 132, 137, 156, 278, 13, 75, 0, 0, 82, 0,
2288 111, 196, 163, 160, 161, 159, 162, 166, 165, 164,
2289 158, 157, 0, 0, 171, 0, 0, 96, 100, 98,
2290 102, 61, 266, 0, 54, 0, 73, 0, 134, 135,
2291 0, 116, 77, 287, 288, 0, 0, 0, 83, 86,
2292 84, 116, 173, 182, 170, 94, 0, 97, 99, 116,
2293 64, 116, 194, 116, 189, 0, 151, 0, 0, 116,
2294 149, 0, 27, 91, 87, 85, 116, 27, 27, 194,
2295 62, 72, 0, 143, 146, 0, 0, 116, 141, 144,
2296 145, 152, 177, 138, 150, 27, 89, 24, 0, 0,
2297 0, 178, 136, 142, 0, 88, 183, 95, 92, 27,
2298 0, 0, 0, 167, 27, 179, 0, 0, 194, 93,
2302 /* YYDEFGOTO[NTERM-NUM]. */
2303 static const yytype_int16 yydefgoto[] =
2305 -1, 46, 47, 48, 49, 286, 287, 288, 307, 308,
2306 186, 278, 188, 289, 361, 189, 220, 218, 430, 52,
2307 209, 123, 124, 53, 54, 55, 56, 177, 57, 83,
2308 190, 191, 417, 418, 419, 420, 58, 197, 397, 481,
2309 398, 448, 399, 400, 59, 206, 192, 60, 88, 355,
2310 61, 294, 198, 62, 193, 64, 65, 322, 324, 368,
2311 290, 433, 291, 411, 456, 457, 458, 438, 439, 440,
2312 131, 292, 344, 390, 300, 301, 302, 225, 293, 479,
2313 93, 70, 447, 356, 357, 358, 370, 359, 315, 297,
2314 110, 111, 201, 71, 72, 73, 194, 112, 74, 75,
2315 76, 77, 115, 116, 78, 195, 196
2318 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2320 #define YYPACT_NINF -370
2321 static const yytype_int16 yypact[] =
2323 1338, -3, -370, -370, -370, -370, -370, -370, -370, -28,
2324 -29, -370, -1, 40, -370, -370, -370, -370, 2137, -370,
2325 94, -370, 2210, -370, 51, 24, 60, -370, -370, -370,
2326 -370, 58, -86, -370, -370, 2137, 64, 2137, 2137, -370,
2327 2137, 2137, 2137, 2137, 2137, 2137, 188, -370, 1461, -370,
2328 -370, -370, -370, 2044, -370, -370, -370, -370, -370, -370,
2329 -370, -370, -370, 50, 158, -370, -370, -370, -370, -370,
2330 -370, -370, -370, -370, 97, -370, 2585, -370, -370, 204,
2331 71, -370, -370, 1705, -370, -370, -370, -370, -370, -7,
2332 -370, 47, -370, 88, -22, 2137, 85, -370, 2137, -370,
2333 2137, 211, -22, -370, -22, -22, 99, -22, -22, -66,
2334 100, 129, -370, 2585, 124, 101, 134, -370, -370, 165,
2335 232, 233, -370, 143, 173, -370, 70, 238, -370, 243,
2336 -370, 244, -370, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
2337 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
2338 2137, 2137, 2137, 2137, 2137, -370, -370, 2137, 2137, 2137,
2339 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
2340 2137, 2137, 2137, 2137, 245, 126, -370, 2137, 234, 249,
2341 2137, 2137, 232, 250, -370, 354, -370, 169, 241, -370,
2342 -370, -370, -370, 251, -370, -370, -370, 2137, 723, -370,
2343 24, 147, 15, -62, 57, 2201, 1583, 149, -370, 2137,
2344 -370, -370, 2137, 2137, -370, 2137, 177, 189, -370, 177,
2345 189, 2137, 2137, -370, -370, 282, 237, 246, 177, 2585,
2346 592, 715, 715, 715, 2886, 2886, 2886, 2886, 592, 592,
2347 2585, 2585, 2585, 2585, 2585, 2585, 2585, 2585, 2585, 2646,
2348 2706, 341, 341, 341, 2585, 2341, 2766, 190, 2826, 592,
2349 592, 99, 99, -22, -22, -22, 161, 2402, -370, 1827,
2350 -60, 303, -370, 97, 97, -370, -370, 477, -370, 2463,
2351 -370, 187, 305, 2271, 223, -370, 182, 846, -370, -370,
2352 -370, -370, -370, -370, 723, -370, 2137, -370, 13, 310,
2353 186, 220, -370, 1705, 193, -370, -370, 192, 1583, -370,
2354 -59, -370, -370, 219, 54, 236, 232, -43, 79, -56,
2355 218, 43, 324, 43, 217, 236, 2137, -370, -370, 600,
2356 1705, -370, -370, -370, 2137, 247, 221, 339, -370, -370,
2357 214, 222, 316, 54, -370, -370, 177, 17, -370, 82,
2358 1705, 2137, 193, -370, -370, 224, -370, -370, -370, -370,
2359 2137, -370, -370, 2137, 1705, 15, -370, 43, 227, -370,
2360 256, -370, -370, 2585, -370, -370, -53, 140, 21, 231,
2361 -370, -370, -370, -370, -370, -370, -370, -370, -370, -370,
2362 -370, 248, 257, 310, -370, 260, 252, -370, -370, 82,
2363 -370, 280, -370, 66, -370, 258, -370, 263, 256, -370,
2364 43, 197, -370, -370, -370, 2137, 283, 268, 21, -370,
2365 -370, 1949, -370, -370, -370, -370, 384, -370, -370, 1705,
2366 -370, 1705, 177, 969, -370, 401, -370, 381, 281, 530,
2367 -370, 2524, 1583, -370, -370, -370, 1092, 1583, 1583, 177,
2368 -370, -370, 288, -370, -370, 68, 284, 1215, -370, -370,
2369 -370, -370, 70, -370, -370, 1583, -370, -370, 285, 286,
2370 290, -370, -370, -370, 415, -370, -370, -370, -370, 1583,
2371 304, 299, 296, 15, 1583, -370, 297, 301, 177, -370,
2375 /* YYPGOTO[NTERM-NUM]. */
2376 static const yytype_int16 yypgoto[] =
2378 -370, -370, -370, 157, -37, 137, 11, -272, -369, 253,
2379 1, -75, -263, 4, 112, 387, 323, 128, -370, -370,
2380 -370, -370, -370, -370, -370, -370, -370, -370, -370, -370,
2381 -370, -370, -370, -370, 27, 30, -370, -370, 63, -370,
2382 69, -370, -370, -370, -370, -370, -370, -370, -188, 77,
2383 -370, -370, -370, -370, 0, -370, 385, -370, -370, -370,
2384 5, -370, 7, -370, -370, -370, 8, -370, -370, 28,
2385 -370, 2, 65, -370, -318, -370, -285, 9, 3, -370,
2386 -370, -370, -370, -370, 447, -304, 106, 132, -183, -370,
2387 -87, -370, -370, -370, -370, -370, -370, -23, 16, -44,
2388 -12, -370, -370, -370, -370, -370, -370
2391 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2392 positive, shift that token. If negative, reduce the rule which
2393 number is the opposite. If zero, do what YYDEFACT says.
2394 If YYTABLE_NINF, syntax error. */
2395 #define YYTABLE_NINF -209
2396 static const yytype_int16 yytable[] =
2398 63, 50, 68, 69, 51, 66, 91, 67, 187, 125,
2399 94, 118, 295, 207, 345, 339, 295, 366, 298, 369,
2400 298, 80, 114, 102, -68, 104, 105, 85, 106, 107,
2401 108, 133, 113, 113, 100, 133, 317, 133, 133, 101,
2402 348, 133, 86, 85, 133, 325, 352, 407, 63, 50,
2403 68, 69, 51, 66, 415, 67, 360, 352, 86, 109,
2404 304, 86, 394, 369, 210, 155, 156, 375, 303, 304,
2405 330, 350, 86, 466, 364, 86, 126, 412, 468, 469,
2406 127, 128, 416, 79, 86, 266, 205, 401, 113, 353,
2407 89, 82, 81, 129, 126, 130, 475, 92, 172, 128,
2408 173, 406, 96, 174, 223, 299, 434, 393, 424, 395,
2409 482, 203, 342, 130, 396, 487, 343, 199, 200, 84,
2410 224, 229, 230, 231, 232, 233, 234, 235, 236, 237,
2411 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
2412 248, 249, 250, 413, 414, 251, 252, 253, 254, 255,
2413 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
2414 113, 267, 114, 392, 87, 486, 450, 354, 451, 173,
2415 305, 95, 174, 279, 339, 363, 133, 14, 15, 16,
2416 98, 17, 99, 19, 103, 283, 155, 156, 117, 311,
2417 312, 176, 313, 270, 133, 23, 273, 274, 63, 50,
2418 113, 113, 333, 113, 28, 29, 30, 175, 202, 341,
2419 204, 169, 170, 171, 208, 295, 14, 15, 16, 172,
2420 17, 173, 19, 211, 174, 310, 212, 213, 187, 134,
2421 214, 215, -69, 333, 23, 216, 219, 318, 319, 221,
2422 222, 226, 435, 28, 29, 30, 227, 228, 268, 452,
2423 269, 271, 272, 275, 281, 187, 135, 136, 137, 138,
2424 139, 140, 141, 142, 143, 280, 470, 296, 282, 63,
2425 50, 68, 69, 51, 66, 187, 67, 155, 156, 309,
2426 314, 157, 158, 159, 113, 320, 316, 63, 50, 187,
2427 321, 327, 118, 436, 63, 50, 164, 165, 166, 323,
2428 167, 168, 169, 170, 171, 490, 331, 334, 335, 337,
2429 172, 338, 173, 298, 373, 174, 346, 347, -106, 405,
2430 382, 349, 351, 383, 384, 385, -147, 386, 402, 63,
2431 50, 68, 69, 51, 66, 360, 67, 404, 365, 113,
2432 367, 371, 379, 380, 429, 378, 377, 342, 113, 403,
2433 376, 409, 381, 410, 187, 421, 187, 90, 2, 3,
2434 387, 4, 5, 6, 7, 8, 9, 10, 11, 12,
2435 388, 389, 426, 14, 15, 16, 178, 17, 18, 19,
2436 20, 423, 21, 179, 425, 120, 442, 449, 431, 22,
2437 180, 23, 24, 432, 25, 181, 26, 443, 27, 182,
2438 28, 29, 30, 441, 461, 31, 32, 462, 33, 34,
2439 463, 437, 471, 472, 476, 477, 35, 36, 480, 183,
2440 478, 63, 50, 484, 483, 485, 329, 488, 155, 156,
2441 489, 340, 446, 455, 454, 459, 460, 372, 277, 437,
2442 122, 37, 38, 217, 362, 444, 63, 50, 445, 132,
2443 184, 167, 168, 169, 170, 171, 422, 455, 454, 459,
2444 460, 172, 427, 173, 40, 473, 174, 464, 428, 41,
2445 42, 474, 97, 408, 43, 391, 44, 0, 45, 0,
2446 90, 2, 3, 276, 4, 5, 6, 7, 8, 9,
2447 10, 11, 12, 0, 0, 0, 14, 15, 16, 178,
2448 17, 18, 19, 20, 0, 21, 179, 0, 120, 0,
2449 0, 0, 22, 180, 23, 24, 0, 25, 181, 26,
2450 0, 27, 182, 28, 29, 30, 0, 0, 31, 32,
2451 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2452 36, 0, 183, 0, 0, 0, 0, 0, 0, 14,
2453 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
2454 0, 0, 0, 0, 37, 38, 0, 23, 0, 0,
2455 0, 0, 0, 184, 0, 435, 28, 29, 30, 0,
2456 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2457 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2458 0, 45, 0, 1, 2, 3, 332, 4, 5, 6,
2459 7, 8, 9, 10, 11, 12, 0, 0, 13, 14,
2460 15, 16, 0, 17, 18, 19, 436, 0, 21, 0,
2461 0, -209, 0, 0, 0, 22, 0, 23, 24, 0,
2462 25, 0, 26, 0, 27, 0, 28, 29, 30, 0,
2463 0, 31, 32, 0, 33, 34, 0, 0, 0, -148,
2464 0, 0, 35, 36, 0, -209, -209, 0, 0, 0,
2465 0, 0, 0, 0, 0, 0, 0, 0, 0, 155,
2466 156, 0, 0, 157, 158, 159, 0, 37, 38, 0,
2467 0, 0, 0, 0, 0, 0, 39, 0, 0, -209,
2468 -209, 0, 167, 168, 169, 170, 171, 0, 0, 0,
2469 40, 0, 172, 0, 173, 41, 42, 174, 0, 0,
2470 43, 0, 44, 0, 45, 0, 284, 2, 3, 374,
2471 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2472 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
2473 0, 21, 0, 0, 134, 0, 0, 0, 22, 0,
2474 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2475 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2476 0, -209, -209, -209, 0, 35, 36, 0, 142, 143,
2477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2478 0, 0, 155, 156, 0, 0, 157, 158, 159, 0,
2479 37, 38, 0, 0, 0, 0, 0, 0, 0, 285,
2480 0, 0, 165, 166, 0, 167, 168, 169, 170, 171,
2481 0, 0, 0, 40, 0, 172, 0, 173, 41, 42,
2482 174, 0, 0, 43, 0, 44, 0, 45, 0, 284,
2483 2, 3, -15, 4, 5, 6, 7, 8, 9, 10,
2484 11, 12, 0, 0, 0, 14, 15, 16, 0, 17,
2485 18, 19, 0, 0, 21, 0, 0, 0, 0, 0,
2486 0, 22, 0, 23, 24, 0, 25, 0, 26, 0,
2487 27, 0, 28, 29, 30, 0, 0, 31, 32, 0,
2488 33, 34, 0, 0, 0, 0, 0, 0, 35, 36,
2489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2491 0, 0, 0, 37, 38, 0, 0, 0, 0, 0,
2492 0, 0, 285, 0, 0, 0, 0, 0, 0, 0,
2493 0, 0, 0, 0, 0, 0, 40, 0, 0, 0,
2494 0, 41, 42, 0, 0, 0, 43, 0, 44, 0,
2495 45, 0, 90, 2, 3, -16, 4, 5, 6, 7,
2496 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2497 16, 0, 17, 18, 19, 0, 0, 21, 0, 0,
2498 0, 0, 0, 0, 22, 0, 23, 24, 0, 25,
2499 0, 26, 0, 27, 0, 28, 29, 30, 0, 0,
2500 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2501 0, 35, 36, 0, 0, 0, 0, 0, 0, 0,
2502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2503 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2504 0, 0, 0, 0, 0, 453, 0, 0, 0, 0,
2505 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2506 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2507 0, 44, 0, 45, 0, 284, 2, 3, -139, 4,
2508 5, 6, 7, 8, 9, 10, 11, 12, 0, 0,
2509 0, 14, 15, 16, 0, 17, 18, 19, 0, 0,
2510 21, 0, 0, 0, 0, 0, 0, 22, 0, 23,
2511 24, 0, 25, 0, 26, 0, 27, 0, 28, 29,
2512 30, 0, 0, 31, 32, 0, 33, 34, 0, 0,
2513 0, 0, 0, 0, 35, 36, 0, 0, 0, 0,
2514 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2515 0, 0, 0, 0, 0, 0, 0, 0, 0, 37,
2516 38, 0, 0, 0, 0, 0, 0, 0, 285, 0,
2517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2518 0, 0, 40, 0, 0, 0, 0, 41, 42, 0,
2519 0, 0, 43, 0, 44, 0, 45, 0, 90, 2,
2520 3, 467, 4, 5, 6, 7, 8, 9, 10, 11,
2521 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
2522 19, 0, 0, 21, 0, 0, 0, 0, 0, 0,
2523 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
2524 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2525 34, 0, 0, 0, 0, 0, 0, 35, 36, 0,
2526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2528 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2529 0, 453, 0, 0, 0, 0, 0, 0, 0, 0,
2530 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
2531 41, 42, 0, 0, 0, 43, 0, 44, -3, 45,
2532 0, 1, 2, 3, -140, 4, 5, 6, 7, 8,
2533 9, 10, 11, 12, 0, 0, 13, 14, 15, 16,
2534 0, 17, 18, 19, 0, 0, 21, 0, 0, 0,
2535 0, 0, 0, 22, 0, 23, 24, 0, 25, 0,
2536 26, 0, 27, 0, 28, 29, 30, 0, 0, 31,
2537 32, 0, 33, 34, 0, 0, 0, 0, 0, 0,
2538 35, 36, 0, 0, 0, 0, 0, 0, 0, 0,
2539 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2540 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2541 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2542 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
2543 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
2544 44, -4, 45, 0, 1, 2, 3, 0, 4, 5,
2545 6, 7, 8, 9, 10, 11, 12, 0, 0, 13,
2546 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
2547 0, 0, 0, 0, 0, 0, 22, 0, 23, 24,
2548 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
2549 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
2550 0, 0, 0, 35, 36, 0, 0, 0, 0, 0,
2551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2552 0, 0, 0, 0, 0, 0, 0, 0, 37, 38,
2553 0, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2554 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2555 0, 40, 0, 0, 0, 0, 41, 42, 0, 0,
2556 0, 43, 0, 44, 0, 45, 90, 2, 3, 0,
2557 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2558 -116, 0, 14, 15, 16, 178, 17, 18, 19, 20,
2559 0, 21, 179, 0, 120, 0, 0, 0, 22, 180,
2560 23, 24, 0, 25, 181, 26, 0, 27, 182, 28,
2561 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2562 0, 0, 0, 0, 0, 35, 36, 0, 183, 0,
2563 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2565 37, 38, 0, 0, 0, 0, 0, 0, 0, 184,
2566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2567 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2568 0, 0, 0, 43, 0, 44, 0, 45, 90, 2,
2569 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
2570 12, 0, 0, 0, 14, 15, 16, 178, 17, 18,
2571 19, 20, 0, 21, 179, 0, 120, 0, 0, 0,
2572 22, 180, 23, 24, 0, 25, 181, 26, 0, 27,
2573 182, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2574 34, 0, 0, 0, 0, 0, 0, 35, 36, 0,
2575 183, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2577 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2578 0, 184, 0, 0, 0, 0, 0, 0, 0, 0,
2579 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
2580 41, 42, 0, 0, 0, 43, 0, 44, 0, 185,
2581 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
2582 10, 11, 12, 0, 0, 13, 14, 15, 16, 0,
2583 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
2584 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
2585 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
2586 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2587 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2589 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
2590 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2591 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2592 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2593 0, 45, 284, 2, 3, 0, 4, 5, 6, 7,
2594 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2595 16, 0, 17, 18, 19, 0, 0, 21, 0, 0,
2596 0, 0, 0, 0, 22, 0, 23, 24, 0, 25,
2597 0, 26, 0, 27, 0, 28, 29, 30, 0, 0,
2598 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2599 0, 35, 36, 0, 0, 0, 0, 0, 0, 0,
2600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2601 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2602 0, 0, 0, 0, 0, 285, 0, 119, 2, 3,
2603 0, 4, 5, 6, 7, 8, 0, 0, 0, 40,
2604 0, 0, 0, 0, 41, 42, 0, 0, 18, 43,
2605 20, 44, 21, 45, 0, 120, 0, 0, 0, 22,
2606 0, 0, 0, 0, 0, 0, 26, 0, 27, 121,
2607 0, 0, 0, 0, 0, 0, 32, 0, 33, 34,
2608 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
2609 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2611 0, 37, 38, 0, 0, 0, 0, 0, 0, 0,
2612 90, 2, 3, 0, 4, 5, 6, 7, 8, 0,
2613 0, 0, 0, 0, 40, 0, 0, 0, 0, 41,
2614 42, 18, 0, 20, 43, 21, 44, 0, 45, 0,
2615 0, 0, 22, 0, 0, 0, 0, 0, 0, 26,
2616 0, 27, 0, 0, 0, 0, 0, 0, 0, 32,
2617 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2618 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2619 0, 0, 0, 90, 2, 3, 0, 4, 5, 6,
2620 7, 8, 0, 0, 37, 38, 0, 0, 0, 0,
2621 0, 0, 0, 0, 18, 0, 20, 0, 21, 0,
2622 134, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2623 0, 0, 41, 42, 27, 0, 0, 43, 0, 44,
2624 0, 45, 32, 0, 33, 34, 0, 135, 136, 137,
2625 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2626 148, 149, 150, 151, 152, 153, 154, 0, 155, 156,
2627 0, 0, 157, 158, 159, 0, 0, 37, 38, 0,
2628 160, 0, 0, 161, 0, 162, 163, 164, 165, 166,
2629 134, 167, 168, 169, 170, 171, 0, 0, 0, 0,
2630 0, 172, 0, 173, 0, 0, 174, 0, 0, 0,
2631 43, 306, 44, 0, 45, 0, 0, 135, 136, 137,
2632 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2633 148, 149, 150, 151, 152, 153, 154, 0, 155, 156,
2634 0, 0, 157, 158, 159, 0, 0, 0, 0, 0,
2635 160, 0, 0, 161, 0, 162, 163, 164, 165, 166,
2636 134, 167, 168, 169, 170, 171, 0, 0, 0, 0,
2637 0, 172, 0, 173, 0, 0, 174, 0, 0, 0,
2638 0, 336, 0, 0, 0, 0, 0, 135, 136, 137,
2639 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2640 148, 149, 150, 151, 152, 153, 154, 0, 155, 156,
2641 0, 0, 157, 158, 159, 0, 0, 0, 0, 0,
2642 160, 134, 0, 161, 326, 162, 163, 164, 165, 166,
2643 0, 167, 168, 169, 170, 171, 0, 0, 0, 0,
2644 0, 172, 0, 173, 0, 0, 174, 0, 135, 136,
2645 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
2646 147, 148, 149, 150, 151, 152, 153, 154, 0, 155,
2647 156, 0, 0, 157, 158, 159, 0, 0, 0, 0,
2648 0, 160, 134, 0, 161, 0, 162, 163, 164, 165,
2649 166, 0, 167, 168, 169, 170, 171, 0, 0, 0,
2650 0, 0, 172, 0, 173, 328, 0, 174, 0, 135,
2651 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
2652 146, 147, 148, 149, 150, 151, 152, 153, 154, 0,
2653 155, 156, 0, 0, 157, 158, 159, 0, 0, 0,
2654 0, 0, 160, 134, 0, 161, -208, 162, 163, 164,
2655 165, 166, 0, 167, 168, 169, 170, 171, 0, 0,
2656 0, 0, 0, 172, 0, 173, 0, 0, 174, 0,
2657 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
2658 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
2659 0, 155, 156, 0, 0, 157, 158, 159, 0, 0,
2660 0, 0, 0, 160, 134, 0, 161, 465, 162, 163,
2661 164, 165, 166, 0, 167, 168, 169, 170, 171, 0,
2662 0, 0, 0, 0, 172, 0, 173, 0, 0, 174,
2663 0, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2664 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2665 154, 0, 155, 156, 0, 0, 157, 158, 159, 0,
2666 0, 0, 0, 0, 160, 134, 0, 161, 0, 162,
2667 163, 164, 165, 166, 0, 167, 168, 169, 170, 171,
2668 0, 0, 0, 0, 0, 172, 0, 173, 0, 0,
2669 174, 0, 135, 136, 137, 138, 139, 140, 141, 142,
2670 143, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2671 0, 154, 0, 155, 156, 0, 0, 157, 158, 159,
2672 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2673 162, 163, 164, 165, 166, 0, 167, 168, 169, 170,
2674 171, 0, 0, 0, 0, 0, 172, 0, 173, 0,
2675 0, 174, 135, 136, 137, 138, 139, 140, 141, 142,
2676 143, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2677 0, 0, 0, 155, 156, 0, 0, 157, 158, 159,
2678 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2679 162, 163, 164, 165, 166, 0, 167, 168, 169, 170,
2680 171, 0, 0, 0, 0, 0, 172, 0, 173, 0,
2681 0, 174, 135, 136, 137, 138, 139, 140, 141, 142,
2682 143, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2683 0, 0, 0, 155, 156, 0, 0, 157, 158, 159,
2684 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2685 0, 163, 164, 165, 166, 0, 167, 168, 169, 170,
2686 171, 0, 0, 0, 0, 0, 172, 0, 173, 0,
2687 0, 174, 135, 136, 137, 138, 139, 140, 141, 142,
2688 143, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2689 0, 0, 0, 155, 156, 0, 0, 157, 158, 159,
2690 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2691 0, 0, -209, 165, 166, 0, 167, 168, 169, 170,
2692 171, 0, 0, 0, 0, 0, 172, 0, 173, 0,
2693 0, 174, 135, 136, 137, -209, -209, -209, -209, 142,
2694 143, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2695 0, 0, 0, 155, 156, 0, 0, 157, 158, 159,
2696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2697 0, 0, 0, 165, 166, 0, 167, 168, 169, 170,
2698 171, 0, 0, 0, 0, 0, 172, 0, 173, 0,
2702 static const yytype_int16 yycheck[] =
2704 0, 0, 0, 0, 0, 0, 18, 0, 83, 53,
2705 22, 48, 200, 100, 299, 287, 204, 321, 3, 323,
2706 3, 49, 45, 35, 67, 37, 38, 3, 40, 41,
2707 42, 97, 44, 45, 120, 97, 219, 97, 97, 125,
2708 303, 97, 18, 3, 97, 228, 3, 365, 48, 48,
2709 48, 48, 48, 48, 33, 48, 99, 3, 18, 43,
2710 3, 18, 347, 367, 130, 87, 88, 330, 130, 3,
2711 130, 130, 18, 442, 130, 18, 26, 130, 447, 448,
2712 30, 31, 61, 86, 18, 172, 98, 350, 100, 35,
2713 13, 120, 120, 43, 26, 45, 465, 3, 120, 31,
2714 122, 364, 25, 125, 34, 90, 410, 90, 393, 27,
2715 479, 95, 99, 45, 32, 484, 103, 124, 125, 120,
2716 50, 133, 134, 135, 136, 137, 138, 139, 140, 141,
2717 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2718 152, 153, 154, 3, 4, 157, 158, 159, 160, 161,
2719 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
2720 172, 173, 185, 346, 124, 483, 429, 113, 431, 122,
2721 113, 120, 125, 185, 446, 96, 97, 19, 20, 21,
2722 120, 23, 124, 25, 120, 197, 87, 88, 0, 212,
2723 213, 120, 215, 177, 97, 37, 180, 181, 198, 198,
2724 212, 213, 277, 215, 46, 47, 48, 3, 120, 296,
2725 125, 112, 113, 114, 3, 403, 19, 20, 21, 120,
2726 23, 122, 25, 123, 125, 209, 97, 103, 303, 39,
2727 129, 97, 67, 308, 37, 3, 3, 221, 222, 96,
2728 67, 3, 45, 46, 47, 48, 3, 3, 3, 432,
2729 124, 17, 3, 3, 13, 330, 66, 67, 68, 69,
2730 70, 71, 72, 73, 74, 96, 449, 120, 17, 269,
2731 269, 269, 269, 269, 269, 350, 269, 87, 88, 130,
2732 103, 91, 92, 93, 296, 3, 97, 287, 287, 364,
2733 53, 130, 329, 96, 294, 294, 106, 107, 108, 53,
2734 110, 111, 112, 113, 114, 488, 3, 120, 3, 86,
2735 120, 129, 122, 3, 326, 125, 130, 97, 125, 363,
2736 4, 129, 103, 7, 8, 9, 129, 11, 351, 329,
2737 329, 329, 329, 329, 329, 99, 329, 360, 120, 351,
2738 16, 124, 3, 129, 64, 124, 99, 99, 360, 125,
2739 334, 124, 130, 97, 429, 124, 431, 3, 4, 5,
2740 44, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2741 54, 55, 120, 19, 20, 21, 22, 23, 24, 25,
2742 26, 124, 28, 29, 124, 31, 103, 3, 130, 35,
2743 36, 37, 38, 130, 40, 41, 42, 129, 44, 45,
2744 46, 47, 48, 415, 3, 51, 52, 26, 54, 55,
2745 129, 411, 124, 129, 129, 129, 62, 63, 3, 65,
2746 130, 421, 421, 124, 120, 129, 269, 130, 87, 88,
2747 129, 294, 421, 433, 433, 433, 433, 325, 185, 439,
2748 53, 87, 88, 120, 316, 418, 446, 446, 418, 64,
2749 96, 110, 111, 112, 113, 114, 391, 457, 457, 457,
2750 457, 120, 399, 122, 110, 457, 125, 439, 399, 115,
2751 116, 462, 25, 367, 120, 343, 122, -1, 124, -1,
2752 3, 4, 5, 129, 7, 8, 9, 10, 11, 12,
2753 13, 14, 15, -1, -1, -1, 19, 20, 21, 22,
2754 23, 24, 25, 26, -1, 28, 29, -1, 31, -1,
2755 -1, -1, 35, 36, 37, 38, -1, 40, 41, 42,
2756 -1, 44, 45, 46, 47, 48, -1, -1, 51, 52,
2757 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2758 63, -1, 65, -1, -1, -1, -1, -1, -1, 19,
2759 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
2760 -1, -1, -1, -1, 87, 88, -1, 37, -1, -1,
2761 -1, -1, -1, 96, -1, 45, 46, 47, 48, -1,
2762 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2763 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2764 -1, 124, -1, 3, 4, 5, 129, 7, 8, 9,
2765 10, 11, 12, 13, 14, 15, -1, -1, 18, 19,
2766 20, 21, -1, 23, 24, 25, 96, -1, 28, -1,
2767 -1, 39, -1, -1, -1, 35, -1, 37, 38, -1,
2768 40, -1, 42, -1, 44, -1, 46, 47, 48, -1,
2769 -1, 51, 52, -1, 54, 55, -1, -1, -1, 129,
2770 -1, -1, 62, 63, -1, 73, 74, -1, -1, -1,
2771 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2772 88, -1, -1, 91, 92, 93, -1, 87, 88, -1,
2773 -1, -1, -1, -1, -1, -1, 96, -1, -1, 107,
2774 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2775 110, -1, 120, -1, 122, 115, 116, 125, -1, -1,
2776 120, -1, 122, -1, 124, -1, 3, 4, 5, 129,
2777 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2778 -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
2779 -1, 28, -1, -1, 39, -1, -1, -1, 35, -1,
2780 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2781 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2782 -1, 66, 67, 68, -1, 62, 63, -1, 73, 74,
2783 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2784 -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2785 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2786 -1, -1, 107, 108, -1, 110, 111, 112, 113, 114,
2787 -1, -1, -1, 110, -1, 120, -1, 122, 115, 116,
2788 125, -1, -1, 120, -1, 122, -1, 124, -1, 3,
2789 4, 5, 129, 7, 8, 9, 10, 11, 12, 13,
2790 14, 15, -1, -1, -1, 19, 20, 21, -1, 23,
2791 24, 25, -1, -1, 28, -1, -1, -1, -1, -1,
2792 -1, 35, -1, 37, 38, -1, 40, -1, 42, -1,
2793 44, -1, 46, 47, 48, -1, -1, 51, 52, -1,
2794 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
2795 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2796 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2797 -1, -1, -1, 87, 88, -1, -1, -1, -1, -1,
2798 -1, -1, 96, -1, -1, -1, -1, -1, -1, -1,
2799 -1, -1, -1, -1, -1, -1, 110, -1, -1, -1,
2800 -1, 115, 116, -1, -1, -1, 120, -1, 122, -1,
2801 124, -1, 3, 4, 5, 129, 7, 8, 9, 10,
2802 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2803 21, -1, 23, 24, 25, -1, -1, 28, -1, -1,
2804 -1, -1, -1, -1, 35, -1, 37, 38, -1, 40,
2805 -1, 42, -1, 44, -1, 46, 47, 48, -1, -1,
2806 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2807 -1, 62, 63, -1, -1, -1, -1, -1, -1, -1,
2808 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2809 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2810 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2811 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2812 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2813 -1, 122, -1, 124, -1, 3, 4, 5, 129, 7,
2814 8, 9, 10, 11, 12, 13, 14, 15, -1, -1,
2815 -1, 19, 20, 21, -1, 23, 24, 25, -1, -1,
2816 28, -1, -1, -1, -1, -1, -1, 35, -1, 37,
2817 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
2818 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
2819 -1, -1, -1, -1, 62, 63, -1, -1, -1, -1,
2820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2821 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2822 88, -1, -1, -1, -1, -1, -1, -1, 96, -1,
2823 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2824 -1, -1, 110, -1, -1, -1, -1, 115, 116, -1,
2825 -1, -1, 120, -1, 122, -1, 124, -1, 3, 4,
2826 5, 129, 7, 8, 9, 10, 11, 12, 13, 14,
2827 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
2828 25, -1, -1, 28, -1, -1, -1, -1, -1, -1,
2829 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
2830 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2831 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
2832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2834 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2835 -1, 96, -1, -1, -1, -1, -1, -1, -1, -1,
2836 -1, -1, -1, -1, -1, 110, -1, -1, -1, -1,
2837 115, 116, -1, -1, -1, 120, -1, 122, 0, 124,
2838 -1, 3, 4, 5, 129, 7, 8, 9, 10, 11,
2839 12, 13, 14, 15, -1, -1, 18, 19, 20, 21,
2840 -1, 23, 24, 25, -1, -1, 28, -1, -1, -1,
2841 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
2842 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
2843 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
2844 62, 63, -1, -1, -1, -1, -1, -1, -1, -1,
2845 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2846 -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
2847 -1, -1, -1, -1, 96, -1, -1, -1, -1, -1,
2848 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
2849 -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
2850 122, 0, 124, -1, 3, 4, 5, -1, 7, 8,
2851 9, 10, 11, 12, 13, 14, 15, -1, -1, 18,
2852 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
2853 -1, -1, -1, -1, -1, -1, 35, -1, 37, 38,
2854 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
2855 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
2856 -1, -1, -1, 62, 63, -1, -1, -1, -1, -1,
2857 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2858 -1, -1, -1, -1, -1, -1, -1, -1, 87, 88,
2859 -1, -1, -1, -1, -1, -1, -1, 96, -1, -1,
2860 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2861 -1, 110, -1, -1, -1, -1, 115, 116, -1, -1,
2862 -1, 120, -1, 122, -1, 124, 3, 4, 5, -1,
2863 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2864 17, -1, 19, 20, 21, 22, 23, 24, 25, 26,
2865 -1, 28, 29, -1, 31, -1, -1, -1, 35, 36,
2866 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
2867 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2868 -1, -1, -1, -1, -1, 62, 63, -1, 65, -1,
2869 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2870 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2871 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2872 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2873 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2874 -1, -1, -1, 120, -1, 122, -1, 124, 3, 4,
2875 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
2876 15, -1, -1, -1, 19, 20, 21, 22, 23, 24,
2877 25, 26, -1, 28, 29, -1, 31, -1, -1, -1,
2878 35, 36, 37, 38, -1, 40, 41, 42, -1, 44,
2879 45, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2880 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
2881 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2882 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2883 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2884 -1, 96, -1, -1, -1, -1, -1, -1, -1, -1,
2885 -1, -1, -1, -1, -1, 110, -1, -1, -1, -1,
2886 115, 116, -1, -1, -1, 120, -1, 122, -1, 124,
2887 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
2888 13, 14, 15, -1, -1, 18, 19, 20, 21, -1,
2889 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
2890 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
2891 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
2892 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2893 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2895 -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
2896 -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
2897 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2898 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2899 -1, 124, 3, 4, 5, -1, 7, 8, 9, 10,
2900 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2901 21, -1, 23, 24, 25, -1, -1, 28, -1, -1,
2902 -1, -1, -1, -1, 35, -1, 37, 38, -1, 40,
2903 -1, 42, -1, 44, -1, 46, 47, 48, -1, -1,
2904 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2905 -1, 62, 63, -1, -1, -1, -1, -1, -1, -1,
2906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2907 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2908 -1, -1, -1, -1, -1, 96, -1, 3, 4, 5,
2909 -1, 7, 8, 9, 10, 11, -1, -1, -1, 110,
2910 -1, -1, -1, -1, 115, 116, -1, -1, 24, 120,
2911 26, 122, 28, 124, -1, 31, -1, -1, -1, 35,
2912 -1, -1, -1, -1, -1, -1, 42, -1, 44, 45,
2913 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55,
2914 -1, -1, -1, -1, -1, -1, 62, -1, -1, -1,
2915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2916 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2917 -1, 87, 88, -1, -1, -1, -1, -1, -1, -1,
2918 3, 4, 5, -1, 7, 8, 9, 10, 11, -1,
2919 -1, -1, -1, -1, 110, -1, -1, -1, -1, 115,
2920 116, 24, -1, 26, 120, 28, 122, -1, 124, -1,
2921 -1, -1, 35, -1, -1, -1, -1, -1, -1, 42,
2922 -1, 44, -1, -1, -1, -1, -1, -1, -1, 52,
2923 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2925 -1, -1, -1, 3, 4, 5, -1, 7, 8, 9,
2926 10, 11, -1, -1, 87, 88, -1, -1, -1, -1,
2927 -1, -1, -1, -1, 24, -1, 26, -1, 28, -1,
2928 39, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2929 -1, -1, 115, 116, 44, -1, -1, 120, -1, 122,
2930 -1, 124, 52, -1, 54, 55, -1, 66, 67, 68,
2931 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2932 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2933 -1, -1, 91, 92, 93, -1, -1, 87, 88, -1,
2934 99, -1, -1, 102, -1, 104, 105, 106, 107, 108,
2935 39, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2936 -1, 120, -1, 122, -1, -1, 125, -1, -1, -1,
2937 120, 130, 122, -1, 124, -1, -1, 66, 67, 68,
2938 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2939 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2940 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2941 99, -1, -1, 102, -1, 104, 105, 106, 107, 108,
2942 39, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2943 -1, 120, -1, 122, -1, -1, 125, -1, -1, -1,
2944 -1, 130, -1, -1, -1, -1, -1, 66, 67, 68,
2945 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2946 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2947 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2948 99, 39, -1, 102, 103, 104, 105, 106, 107, 108,
2949 -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2950 -1, 120, -1, 122, -1, -1, 125, -1, 66, 67,
2951 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
2952 78, 79, 80, 81, 82, 83, 84, 85, -1, 87,
2953 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
2954 -1, 99, 39, -1, 102, -1, 104, 105, 106, 107,
2955 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2956 -1, -1, 120, -1, 122, 123, -1, 125, -1, 66,
2957 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
2958 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
2959 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2960 -1, -1, 99, 39, -1, 102, 103, 104, 105, 106,
2961 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2962 -1, -1, -1, 120, -1, 122, -1, -1, 125, -1,
2963 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
2964 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
2965 -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
2966 -1, -1, -1, 99, 39, -1, 102, 103, 104, 105,
2967 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
2968 -1, -1, -1, -1, 120, -1, 122, -1, -1, 125,
2969 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2970 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2971 85, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2972 -1, -1, -1, -1, 99, 39, -1, 102, -1, 104,
2973 105, 106, 107, 108, -1, 110, 111, 112, 113, 114,
2974 -1, -1, -1, -1, -1, 120, -1, 122, -1, -1,
2975 125, -1, 66, 67, 68, 69, 70, 71, 72, 73,
2976 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2977 -1, 85, -1, 87, 88, -1, -1, 91, 92, 93,
2978 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2979 104, 105, 106, 107, 108, -1, 110, 111, 112, 113,
2980 114, -1, -1, -1, -1, -1, 120, -1, 122, -1,
2981 -1, 125, 66, 67, 68, 69, 70, 71, 72, 73,
2982 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2983 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2984 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2985 104, 105, 106, 107, 108, -1, 110, 111, 112, 113,
2986 114, -1, -1, -1, -1, -1, 120, -1, 122, -1,
2987 -1, 125, 66, 67, 68, 69, 70, 71, 72, 73,
2988 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2989 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2990 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2991 -1, 105, 106, 107, 108, -1, 110, 111, 112, 113,
2992 114, -1, -1, -1, -1, -1, 120, -1, 122, -1,
2993 -1, 125, 66, 67, 68, 69, 70, 71, 72, 73,
2994 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2995 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2996 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2997 -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
2998 114, -1, -1, -1, -1, -1, 120, -1, 122, -1,
2999 -1, 125, 66, 67, 68, 69, 70, 71, 72, 73,
3000 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3001 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
3002 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3003 -1, -1, -1, 107, 108, -1, 110, 111, 112, 113,
3004 114, -1, -1, -1, -1, -1, 120, -1, 122, -1,
3008 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3009 symbol of state STATE-NUM. */
3010 static const yytype_uint8 yystos[] =
3012 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
3013 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
3014 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
3015 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
3016 110, 115, 116, 120, 122, 124, 132, 133, 134, 135,
3017 141, 144, 150, 154, 155, 156, 157, 159, 167, 175,
3018 178, 181, 184, 185, 186, 187, 191, 193, 202, 209,
3019 212, 224, 225, 226, 229, 230, 231, 232, 235, 86,
3020 49, 120, 120, 160, 120, 3, 18, 124, 179, 180,
3021 3, 231, 3, 211, 231, 120, 180, 215, 120, 124,
3022 120, 125, 231, 120, 231, 231, 231, 231, 231, 229,
3023 221, 222, 228, 231, 228, 233, 234, 0, 135, 3,
3024 31, 45, 146, 152, 153, 230, 26, 30, 31, 43,
3025 45, 201, 187, 97, 39, 66, 67, 68, 69, 70,
3026 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3027 81, 82, 83, 84, 85, 87, 88, 91, 92, 93,
3028 99, 102, 104, 105, 106, 107, 108, 110, 111, 112,
3029 113, 114, 120, 122, 125, 3, 120, 158, 22, 29,
3030 36, 41, 45, 65, 96, 124, 141, 142, 143, 146,
3031 161, 162, 177, 185, 227, 236, 237, 168, 183, 124,
3032 125, 223, 120, 229, 125, 231, 176, 221, 3, 151,
3033 130, 123, 97, 103, 129, 97, 3, 147, 148, 3,
3034 147, 96, 67, 34, 50, 208, 3, 3, 3, 231,
3035 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
3036 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
3037 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
3038 231, 231, 231, 231, 231, 231, 221, 231, 3, 124,
3039 229, 17, 3, 229, 229, 3, 129, 140, 142, 231,
3040 96, 13, 17, 231, 3, 96, 136, 137, 138, 144,
3041 191, 193, 202, 209, 182, 179, 120, 220, 3, 90,
3042 205, 206, 207, 130, 3, 113, 130, 139, 140, 130,
3043 229, 228, 228, 228, 103, 219, 97, 219, 229, 229,
3044 3, 53, 188, 53, 189, 219, 103, 130, 123, 134,
3045 130, 3, 129, 142, 120, 3, 130, 86, 129, 138,
3046 136, 221, 99, 103, 203, 207, 130, 97, 143, 129,
3047 130, 103, 3, 35, 113, 180, 214, 215, 216, 218,
3048 99, 145, 148, 96, 130, 120, 216, 16, 190, 216,
3049 217, 124, 145, 231, 129, 143, 229, 99, 124, 3,
3050 129, 130, 4, 7, 8, 9, 11, 44, 54, 55,
3051 204, 218, 219, 90, 207, 27, 32, 169, 171, 173,
3052 174, 143, 228, 125, 228, 230, 143, 205, 217, 124,
3053 97, 194, 130, 3, 4, 33, 61, 163, 164, 165,
3054 166, 124, 203, 124, 207, 124, 120, 169, 171, 64,
3055 149, 130, 130, 192, 216, 45, 96, 185, 198, 199,
3056 200, 231, 103, 129, 165, 166, 137, 213, 172, 3,
3057 143, 143, 219, 96, 141, 185, 195, 196, 197, 202,
3058 209, 3, 26, 129, 200, 103, 139, 129, 139, 139,
3059 219, 124, 129, 197, 208, 139, 129, 129, 130, 210,
3060 3, 170, 139, 120, 124, 129, 205, 139, 130, 129,
3064 #define yyerrok (yyerrstatus = 0)
3065 #define yyclearin (yychar = YYEMPTY)
3066 #define YYEMPTY (-2)
3069 #define YYACCEPT goto yyacceptlab
3070 #define YYABORT goto yyabortlab
3071 #define YYERROR goto yyerrorlab
3074 /* Like YYERROR except do call yyerror. This remains here temporarily
3075 to ease the transition to the new meaning of YYERROR, for GCC.
3076 Once GCC version 2 has supplanted version 1, this can go. */
3078 #define YYFAIL goto yyerrlab
3080 #define YYRECOVERING() (!!yyerrstatus)
3082 #define YYBACKUP(Token, Value) \
3084 if (yychar == YYEMPTY && yylen == 1) \
3088 yytoken = YYTRANSLATE (yychar); \
3094 yyerror (YY_("syntax error: cannot back up")); \
3101 #define YYERRCODE 256
3104 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3105 If N is 0, then set CURRENT to the empty location which ends
3106 the previous symbol: RHS[0] (always defined). */
3108 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3109 #ifndef YYLLOC_DEFAULT
3110 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3114 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3115 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3116 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3117 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3121 (Current).first_line = (Current).last_line = \
3122 YYRHSLOC (Rhs, 0).last_line; \
3123 (Current).first_column = (Current).last_column = \
3124 YYRHSLOC (Rhs, 0).last_column; \
3130 /* YY_LOCATION_PRINT -- Print the location on the stream.
3131 This macro was not mandated originally: define only if we know
3132 we won't break user code: when these are the locations we know. */
3134 #ifndef YY_LOCATION_PRINT
3135 # if YYLTYPE_IS_TRIVIAL
3136 # define YY_LOCATION_PRINT(File, Loc) \
3137 fprintf (File, "%d.%d-%d.%d", \
3138 (Loc).first_line, (Loc).first_column, \
3139 (Loc).last_line, (Loc).last_column)
3141 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3146 /* YYLEX -- calling `yylex' with the right arguments. */
3149 # define YYLEX yylex (YYLEX_PARAM)
3151 # define YYLEX yylex ()
3154 /* Enable debugging if requested. */
3158 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3159 # define YYFPRINTF fprintf
3162 # define YYDPRINTF(Args) \
3168 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3172 YYFPRINTF (stderr, "%s ", Title); \
3173 yy_symbol_print (stderr, \
3175 YYFPRINTF (stderr, "\n"); \
3180 /*--------------------------------.
3181 | Print this symbol on YYOUTPUT. |
3182 `--------------------------------*/
3185 #if (defined __STDC__ || defined __C99__FUNC__ \
3186 || defined __cplusplus || defined _MSC_VER)
3188 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3191 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3194 YYSTYPE const * const yyvaluep;
3200 if (yytype < YYNTOKENS)
3201 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3213 /*--------------------------------.
3214 | Print this symbol on YYOUTPUT. |
3215 `--------------------------------*/
3217 #if (defined __STDC__ || defined __C99__FUNC__ \
3218 || defined __cplusplus || defined _MSC_VER)
3220 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3223 yy_symbol_print (yyoutput, yytype, yyvaluep)
3226 YYSTYPE const * const yyvaluep;
3229 if (yytype < YYNTOKENS)
3230 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3232 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3234 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3235 YYFPRINTF (yyoutput, ")");
3238 /*------------------------------------------------------------------.
3239 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3241 `------------------------------------------------------------------*/
3243 #if (defined __STDC__ || defined __C99__FUNC__ \
3244 || defined __cplusplus || defined _MSC_VER)
3246 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3249 yy_stack_print (yybottom, yytop)
3250 yytype_int16 *yybottom;
3251 yytype_int16 *yytop;
3254 YYFPRINTF (stderr, "Stack now");
3255 for (; yybottom <= yytop; yybottom++)
3257 int yybot = *yybottom;
3258 YYFPRINTF (stderr, " %d", yybot);
3260 YYFPRINTF (stderr, "\n");
3263 # define YY_STACK_PRINT(Bottom, Top) \
3266 yy_stack_print ((Bottom), (Top)); \
3270 /*------------------------------------------------.
3271 | Report that the YYRULE is going to be reduced. |
3272 `------------------------------------------------*/
3274 #if (defined __STDC__ || defined __C99__FUNC__ \
3275 || defined __cplusplus || defined _MSC_VER)
3277 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3280 yy_reduce_print (yyvsp, yyrule)
3285 int yynrhs = yyr2[yyrule];
3287 unsigned long int yylno = yyrline[yyrule];
3288 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3290 /* The symbols being reduced. */
3291 for (yyi = 0; yyi < yynrhs; yyi++)
3293 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3294 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3295 &(yyvsp[(yyi + 1) - (yynrhs)])
3297 YYFPRINTF (stderr, "\n");
3301 # define YY_REDUCE_PRINT(Rule) \
3304 yy_reduce_print (yyvsp, Rule); \
3307 /* Nonzero means print parse trace. It is left uninitialized so that
3308 multiple parsers can coexist. */
3310 #else /* !YYDEBUG */
3311 # define YYDPRINTF(Args)
3312 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3313 # define YY_STACK_PRINT(Bottom, Top)
3314 # define YY_REDUCE_PRINT(Rule)
3315 #endif /* !YYDEBUG */
3318 /* YYINITDEPTH -- initial size of the parser's stacks. */
3320 # define YYINITDEPTH 200
3323 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3324 if the built-in stack extension method is used).
3326 Do not make this value too large; the results are undefined if
3327 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3328 evaluated with infinite-precision integer arithmetic. */
3331 # define YYMAXDEPTH 10000
3339 # if defined __GLIBC__ && defined _STRING_H
3340 # define yystrlen strlen
3342 /* Return the length of YYSTR. */
3343 #if (defined __STDC__ || defined __C99__FUNC__ \
3344 || defined __cplusplus || defined _MSC_VER)
3346 yystrlen (const char *yystr)
3354 for (yylen = 0; yystr[yylen]; yylen++)
3362 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3363 # define yystpcpy stpcpy
3365 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3367 #if (defined __STDC__ || defined __C99__FUNC__ \
3368 || defined __cplusplus || defined _MSC_VER)
3370 yystpcpy (char *yydest, const char *yysrc)
3373 yystpcpy (yydest, yysrc)
3379 const char *yys = yysrc;
3381 while ((*yyd++ = *yys++) != '\0')
3390 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3391 quotes and backslashes, so that it's suitable for yyerror. The
3392 heuristic is that double-quoting is unnecessary unless the string
3393 contains an apostrophe, a comma, or backslash (other than
3394 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3395 null, do not copy; instead, return the length of what the result
3398 yytnamerr (char *yyres, const char *yystr)
3403 char const *yyp = yystr;
3410 goto do_not_strip_quotes;
3414 goto do_not_strip_quotes;
3427 do_not_strip_quotes: ;
3431 return yystrlen (yystr);
3433 return yystpcpy (yyres, yystr) - yyres;
3437 /* Copy into YYRESULT an error message about the unexpected token
3438 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3439 including the terminating null byte. If YYRESULT is null, do not
3440 copy anything; just return the number of bytes that would be
3441 copied. As a special case, return 0 if an ordinary "syntax error"
3442 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3443 size calculation. */
3445 yysyntax_error (char *yyresult, int yystate, int yychar)
3447 int yyn = yypact[yystate];
3449 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3453 int yytype = YYTRANSLATE (yychar);
3454 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3455 YYSIZE_T yysize = yysize0;
3457 int yysize_overflow = 0;
3458 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3459 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3463 /* This is so xgettext sees the translatable formats that are
3464 constructed on the fly. */
3465 YY_("syntax error, unexpected %s");
3466 YY_("syntax error, unexpected %s, expecting %s");
3467 YY_("syntax error, unexpected %s, expecting %s or %s");
3468 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3469 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3473 static char const yyunexpected[] = "syntax error, unexpected %s";
3474 static char const yyexpecting[] = ", expecting %s";
3475 static char const yyor[] = " or %s";
3476 char yyformat[sizeof yyunexpected
3477 + sizeof yyexpecting - 1
3478 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3479 * (sizeof yyor - 1))];
3480 char const *yyprefix = yyexpecting;
3482 /* Start YYX at -YYN if negative to avoid negative indexes in
3484 int yyxbegin = yyn < 0 ? -yyn : 0;
3486 /* Stay within bounds of both yycheck and yytname. */
3487 int yychecklim = YYLAST - yyn + 1;
3488 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3491 yyarg[0] = yytname[yytype];
3492 yyfmt = yystpcpy (yyformat, yyunexpected);
3494 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3495 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3497 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3501 yyformat[sizeof yyunexpected - 1] = '\0';
3504 yyarg[yycount++] = yytname[yyx];
3505 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3506 yysize_overflow |= (yysize1 < yysize);
3508 yyfmt = yystpcpy (yyfmt, yyprefix);
3512 yyf = YY_(yyformat);
3513 yysize1 = yysize + yystrlen (yyf);
3514 yysize_overflow |= (yysize1 < yysize);
3517 if (yysize_overflow)
3518 return YYSIZE_MAXIMUM;
3522 /* Avoid sprintf, as that infringes on the user's name space.
3523 Don't have undefined behavior even if the translation
3524 produced a string with the wrong number of "%s"s. */
3525 char *yyp = yyresult;
3527 while ((*yyp = *yyf) != '\0')
3529 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3531 yyp += yytnamerr (yyp, yyarg[yyi++]);
3544 #endif /* YYERROR_VERBOSE */
3547 /*-----------------------------------------------.
3548 | Release the memory associated to this symbol. |
3549 `-----------------------------------------------*/
3552 #if (defined __STDC__ || defined __C99__FUNC__ \
3553 || defined __cplusplus || defined _MSC_VER)
3555 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3558 yydestruct (yymsg, yytype, yyvaluep)
3568 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3578 /* Prevent warnings from -Wmissing-prototypes. */
3579 #ifdef YYPARSE_PARAM
3580 #if defined __STDC__ || defined __cplusplus
3581 int yyparse (void *YYPARSE_PARAM);
3585 #else /* ! YYPARSE_PARAM */
3586 #if defined __STDC__ || defined __cplusplus
3591 #endif /* ! YYPARSE_PARAM */
3594 /* The lookahead symbol. */
3597 /* The semantic value of the lookahead symbol. */
3600 /* Number of syntax errors so far. */
3605 /*-------------------------.
3606 | yyparse or yypush_parse. |
3607 `-------------------------*/
3609 #ifdef YYPARSE_PARAM
3610 #if (defined __STDC__ || defined __C99__FUNC__ \
3611 || defined __cplusplus || defined _MSC_VER)
3613 yyparse (void *YYPARSE_PARAM)
3616 yyparse (YYPARSE_PARAM)
3617 void *YYPARSE_PARAM;
3619 #else /* ! YYPARSE_PARAM */
3620 #if (defined __STDC__ || defined __C99__FUNC__ \
3621 || defined __cplusplus || defined _MSC_VER)
3634 /* Number of tokens to shift before error messages enabled. */
3637 /* The stacks and their tools:
3638 `yyss': related to states.
3639 `yyvs': related to semantic values.
3641 Refer to the stacks thru separate pointers, to allow yyoverflow
3642 to reallocate them elsewhere. */
3644 /* The state stack. */
3645 yytype_int16 yyssa[YYINITDEPTH];
3647 yytype_int16 *yyssp;
3649 /* The semantic value stack. */
3650 YYSTYPE yyvsa[YYINITDEPTH];
3654 YYSIZE_T yystacksize;
3658 /* Lookahead token as an internal (translated) token number. */
3660 /* The variables used to return semantic value and location from the
3665 /* Buffer for error messages, and its allocated size. */
3667 char *yymsg = yymsgbuf;
3668 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3671 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3673 /* The number of symbols on the RHS of the reduced rule.
3674 Keep to zero when no symbol should be popped. */
3680 yystacksize = YYINITDEPTH;
3682 YYDPRINTF ((stderr, "Starting parse\n"));
3687 yychar = YYEMPTY; /* Cause a token to be read. */
3689 /* Initialize stack pointers.
3690 Waste one element of value and location stack
3691 so that they stay on the same level as the state stack.
3692 The wasted elements are never initialized. */
3698 /*------------------------------------------------------------.
3699 | yynewstate -- Push a new state, which is found in yystate. |
3700 `------------------------------------------------------------*/
3702 /* In all cases, when you get here, the value and location stacks
3703 have just been pushed. So pushing a state here evens the stacks. */
3709 if (yyss + yystacksize - 1 <= yyssp)
3711 /* Get the current used size of the three stacks, in elements. */
3712 YYSIZE_T yysize = yyssp - yyss + 1;
3716 /* Give user a chance to reallocate the stack. Use copies of
3717 these so that the &'s don't force the real ones into
3719 YYSTYPE *yyvs1 = yyvs;
3720 yytype_int16 *yyss1 = yyss;
3722 /* Each stack pointer address is followed by the size of the
3723 data in use in that stack, in bytes. This used to be a
3724 conditional around just the two extra args, but that might
3725 be undefined if yyoverflow is a macro. */
3726 yyoverflow (YY_("memory exhausted"),
3727 &yyss1, yysize * sizeof (*yyssp),
3728 &yyvs1, yysize * sizeof (*yyvsp),
3734 #else /* no yyoverflow */
3735 # ifndef YYSTACK_RELOCATE
3736 goto yyexhaustedlab;
3738 /* Extend the stack our own way. */
3739 if (YYMAXDEPTH <= yystacksize)
3740 goto yyexhaustedlab;
3742 if (YYMAXDEPTH < yystacksize)
3743 yystacksize = YYMAXDEPTH;
3746 yytype_int16 *yyss1 = yyss;
3747 union yyalloc *yyptr =
3748 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3750 goto yyexhaustedlab;
3751 YYSTACK_RELOCATE (yyss_alloc, yyss);
3752 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3753 # undef YYSTACK_RELOCATE
3755 YYSTACK_FREE (yyss1);
3758 #endif /* no yyoverflow */
3760 yyssp = yyss + yysize - 1;
3761 yyvsp = yyvs + yysize - 1;
3763 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3764 (unsigned long int) yystacksize));
3766 if (yyss + yystacksize - 1 <= yyssp)
3770 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3772 if (yystate == YYFINAL)
3782 /* Do appropriate processing given the current state. Read a
3783 lookahead token if we need one and don't already have one. */
3785 /* First try to decide what to do without reference to lookahead token. */
3786 yyn = yypact[yystate];
3787 if (yyn == YYPACT_NINF)
3790 /* Not known => get a lookahead token if don't already have one. */
3792 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3793 if (yychar == YYEMPTY)
3795 YYDPRINTF ((stderr, "Reading a token: "));
3799 if (yychar <= YYEOF)
3801 yychar = yytoken = YYEOF;
3802 YYDPRINTF ((stderr, "Now at end of input.\n"));
3806 yytoken = YYTRANSLATE (yychar);
3807 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3810 /* If the proper action on seeing token YYTOKEN is to reduce or to
3811 detect an error, take that action. */
3813 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3818 if (yyn == 0 || yyn == YYTABLE_NINF)
3824 /* Count tokens shifted since error; after three, turn off error
3829 /* Shift the lookahead token. */
3830 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3832 /* Discard the shifted token. */
3841 /*-----------------------------------------------------------.
3842 | yydefault -- do the default action for the current state. |
3843 `-----------------------------------------------------------*/
3845 yyn = yydefact[yystate];
3851 /*-----------------------------.
3852 | yyreduce -- Do a reduction. |
3853 `-----------------------------*/
3855 /* yyn is the number of a rule to reduce with. */
3858 /* If YYLEN is nonzero, implement the default value of the action:
3861 Otherwise, the following line sets YYVAL to garbage.
3862 This behavior is undocumented and Bison
3863 users should not rely upon it. Assigning to YYVAL
3864 unconditionally makes the parser a bit smaller, and it avoids a
3865 GCC warning that YYVAL may be used uninitialized. */
3866 yyval = yyvsp[1-yylen];
3869 YY_REDUCE_PRINT (yyn);
3876 /* Line 1464 of skeleton.m4 */
3877 #line 1668 "parser.y"
3878 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3887 /* Line 1464 of skeleton.m4 */
3888 #line 1669 "parser.y"
3889 {(yyval.code)=code_new();}
3898 /* Line 1464 of skeleton.m4 */
3899 #line 1671 "parser.y"
3900 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
3909 /* Line 1464 of skeleton.m4 */
3910 #line 1672 "parser.y"
3911 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3920 /* Line 1464 of skeleton.m4 */
3921 #line 1687 "parser.y"
3931 /* Line 1464 of skeleton.m4 */
3932 #line 1695 "parser.y"
3933 {/*TODO*/(yyval.code)=0;}
3942 /* Line 1464 of skeleton.m4 */
3943 #line 1696 "parser.y"
3944 {/*TODO*/(yyval.code)=0;}
3953 /* Line 1464 of skeleton.m4 */
3954 #line 1698 "parser.y"
3955 {(yyval.code)=(yyvsp[(2) - (3)].code);}
3964 /* Line 1464 of skeleton.m4 */
3965 #line 1699 "parser.y"
3975 /* Line 1464 of skeleton.m4 */
3976 #line 1700 "parser.y"
3977 {(yyval.code)=(yyvsp[(1) - (2)].code);}
3986 /* Line 1464 of skeleton.m4 */
3987 #line 1701 "parser.y"
3988 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3997 /* Line 1464 of skeleton.m4 */
3998 #line 1705 "parser.y"
4000 code_t**cc = &global->init->method->body->code;
4001 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4011 /* Line 1464 of skeleton.m4 */
4012 #line 1712 "parser.y"
4013 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4022 /* Line 1464 of skeleton.m4 */
4023 #line 1713 "parser.y"
4024 {(yyval.value).c=abc_pushundefined(0);
4025 (yyval.value).t=TYPE_ANY;
4035 /* Line 1464 of skeleton.m4 */
4036 #line 1717 "parser.y"
4037 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4046 /* Line 1464 of skeleton.m4 */
4047 #line 1718 "parser.y"
4048 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4057 /* Line 1464 of skeleton.m4 */
4058 #line 1720 "parser.y"
4059 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4068 /* Line 1464 of skeleton.m4 */
4069 #line 1721 "parser.y"
4070 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4079 /* Line 1464 of skeleton.m4 */
4080 #line 1724 "parser.y"
4082 if(variable_exists((yyvsp[(1) - (3)].id)))
4083 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4085 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4086 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4087 (yyvsp[(2) - (3)].classinfo)->name);
4090 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
4092 if((yyvsp[(2) - (3)].classinfo)) {
4093 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4094 (yyval.code) = (yyvsp[(3) - (3)].value).c;
4095 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4096 (yyval.code) = abc_setlocal((yyval.code), index);
4098 code_free((yyvsp[(3) - (3)].value).c);
4099 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
4100 (yyval.code) = abc_setlocal((yyval.code), index);
4103 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4104 (yyval.code) = (yyvsp[(3) - (3)].value).c;
4105 (yyval.code) = abc_coerce_a((yyval.code));
4106 (yyval.code) = abc_setlocal((yyval.code), index);
4108 code_free((yyvsp[(3) - (3)].value).c);
4109 (yyval.code) = code_new();
4113 /* that's the default for a local register, anyway
4115 state->method->initcode = abc_pushundefined(state->method->initcode);
4116 state->method->initcode = abc_setlocal(state->method->initcode, index);
4118 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
4128 /* Line 1464 of skeleton.m4 */
4129 #line 1766 "parser.y"
4130 {(yyval.code) = code_new();}
4139 /* Line 1464 of skeleton.m4 */
4140 #line 1767 "parser.y"
4141 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4150 /* Line 1464 of skeleton.m4 */
4151 #line 1770 "parser.y"
4161 /* Line 1464 of skeleton.m4 */
4162 #line 1770 "parser.y"
4165 (yyval.code) = code_new();
4166 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4167 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4169 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4170 if((yyvsp[(7) - (7)].code)) {
4171 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4173 myif->branch = (yyval.code) = abc_nop((yyval.code));
4174 if((yyvsp[(7) - (7)].code)) {
4175 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4176 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4178 (yyval.code) = var_block((yyval.code));
4189 /* Line 1464 of skeleton.m4 */
4190 #line 1789 "parser.y"
4191 {(yyval.code)=code_new();}
4200 /* Line 1464 of skeleton.m4 */
4201 #line 1794 "parser.y"
4203 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
4213 /* Line 1464 of skeleton.m4 */
4214 #line 1797 "parser.y"
4216 (yyval.id)=(yyvsp[(1) - (1)].id);
4226 /* Line 1464 of skeleton.m4 */
4227 #line 1801 "parser.y"
4228 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4237 /* Line 1464 of skeleton.m4 */
4238 #line 1802 "parser.y"
4239 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4248 /* Line 1464 of skeleton.m4 */
4249 #line 1804 "parser.y"
4251 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4252 (yyval.code) = code_new();
4253 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4254 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4255 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4256 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4257 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4258 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4259 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4260 (yyval.code) = abc_jump((yyval.code), loopstart);
4261 code_t*out = (yyval.code) = abc_nop((yyval.code));
4262 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4263 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4266 (yyval.code) = var_block((yyval.code));
4277 /* Line 1464 of skeleton.m4 */
4278 #line 1824 "parser.y"
4280 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4281 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4282 int it = new_variable(tmp1name, TYPE_INT, 0);
4283 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4284 int array = new_variable(tmp1name, 0, 0);
4286 (yyval.code) = code_new();
4287 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4288 (yyval.code) = abc_coerce_a((yyval.code));
4289 (yyval.code) = abc_setlocal((yyval.code), array);
4290 (yyval.code) = abc_pushbyte((yyval.code), 0);
4291 (yyval.code) = abc_setlocal((yyval.code), it);
4293 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4295 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4296 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4297 (yyval.code) = abc_getlocal((yyval.code), array);
4298 (yyval.code) = abc_getlocal((yyval.code), it);
4299 if(!(yyvsp[(1) - (6)].for_start).each)
4300 (yyval.code) = abc_nextname((yyval.code));
4302 (yyval.code) = abc_nextvalue((yyval.code));
4303 (yyval.code) = converttype((yyval.code), 0, var->type);
4304 (yyval.code) = abc_setlocal((yyval.code), var->index);
4306 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4307 (yyval.code) = abc_jump((yyval.code), loopstart);
4309 code_t*out = (yyval.code) = abc_nop((yyval.code));
4310 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4311 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4315 (yyval.code) = var_block((yyval.code));
4329 /* Line 1464 of skeleton.m4 */
4330 #line 1867 "parser.y"
4340 /* Line 1464 of skeleton.m4 */
4341 #line 1867 "parser.y"
4344 (yyval.code) = code_new();
4346 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4347 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4348 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4349 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4350 myjmp->branch = cont;
4351 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4352 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4353 code_t*out = (yyval.code) = abc_nop((yyval.code));
4354 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4355 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4357 (yyval.code) = var_block((yyval.code));
4368 /* Line 1464 of skeleton.m4 */
4369 #line 1886 "parser.y"
4379 /* Line 1464 of skeleton.m4 */
4380 #line 1886 "parser.y"
4382 (yyval.code) = code_new();
4383 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4384 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4385 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4386 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4387 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4388 code_t*out = (yyval.code) = abc_nop((yyval.code));
4389 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4390 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4392 (yyval.code) = var_block((yyval.code));
4403 /* Line 1464 of skeleton.m4 */
4404 #line 1901 "parser.y"
4406 (yyval.code) = abc___break__(0, "");
4416 /* Line 1464 of skeleton.m4 */
4417 #line 1904 "parser.y"
4419 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4429 /* Line 1464 of skeleton.m4 */
4430 #line 1907 "parser.y"
4432 (yyval.code) = abc___continue__(0, "");
4442 /* Line 1464 of skeleton.m4 */
4443 #line 1910 "parser.y"
4445 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4455 /* Line 1464 of skeleton.m4 */
4456 #line 1914 "parser.y"
4466 /* Line 1464 of skeleton.m4 */
4467 #line 1915 "parser.y"
4468 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4477 /* Line 1464 of skeleton.m4 */
4478 #line 1916 "parser.y"
4479 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4488 /* Line 1464 of skeleton.m4 */
4489 #line 1917 "parser.y"
4490 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4499 /* Line 1464 of skeleton.m4 */
4500 #line 1918 "parser.y"
4501 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4510 /* Line 1464 of skeleton.m4 */
4511 #line 1919 "parser.y"
4512 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4521 /* Line 1464 of skeleton.m4 */
4522 #line 1921 "parser.y"
4524 (yyval.code) = abc_dup(0);
4525 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4526 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4527 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4528 if((yyval.code)->opcode != OPCODE___BREAK__) {
4529 (yyval.code) = abc___fallthrough__((yyval.code), "");
4531 code_t*e = (yyval.code) = abc_nop((yyval.code));
4542 /* Line 1464 of skeleton.m4 */
4543 #line 1932 "parser.y"
4545 (yyval.code) = (yyvsp[(3) - (3)].code);
4555 /* Line 1464 of skeleton.m4 */
4556 #line 1935 "parser.y"
4566 /* Line 1464 of skeleton.m4 */
4567 #line 1935 "parser.y"
4569 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4570 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4571 code_t*out = (yyval.code) = abc_pop((yyval.code));
4572 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4574 code_t*c = (yyval.code),*lastblock=0;
4576 if(c->opcode == OPCODE_IFNE) {
4577 if(!c->next) syntaxerror("internal error in fallthrough handling");
4579 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4581 c->opcode = OPCODE_JUMP;
4582 c->branch = lastblock;
4584 /* fall through end of switch */
4585 c->opcode = OPCODE_NOP;
4591 (yyval.code) = var_block((yyval.code));
4602 /* Line 1464 of skeleton.m4 */
4603 #line 1964 "parser.y"
4604 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4613 /* Line 1464 of skeleton.m4 */
4614 #line 1965 "parser.y"
4616 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4617 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4619 NEW(abc_exception_t, e)
4620 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4621 e->var_name = multiname_clone(&name);
4622 (yyval.exception) = e;
4625 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4626 e->target = c = abc_nop(0);
4627 c = abc_setlocal(c, i);
4628 c = code_append(c, (yyvsp[(8) - (9)].code));
4642 /* Line 1464 of skeleton.m4 */
4643 #line 1984 "parser.y"
4644 {new_state();state->exception_name=0;}
4653 /* Line 1464 of skeleton.m4 */
4654 #line 1984 "parser.y"
4656 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4657 if(!(yyvsp[(4) - (5)].code)) {
4658 (yyval.exception)=0;
4661 NEW(abc_exception_t, e)
4662 e->exc_type = 0; //all exceptions
4663 e->var_name = 0; //no name
4666 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4668 (yyval.exception) = e;
4679 /* Line 1464 of skeleton.m4 */
4680 #line 2001 "parser.y"
4681 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4690 /* Line 1464 of skeleton.m4 */
4691 #line 2002 "parser.y"
4692 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4701 /* Line 1464 of skeleton.m4 */
4702 #line 2003 "parser.y"
4703 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4712 /* Line 1464 of skeleton.m4 */
4713 #line 2004 "parser.y"
4715 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4716 (yyval.catch_list).finally = 0;
4717 if((yyvsp[(2) - (2)].exception)) {
4718 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4719 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4730 /* Line 1464 of skeleton.m4 */
4731 #line 2012 "parser.y"
4733 (yyval.catch_list).l=list_new();
4734 (yyval.catch_list).finally = 0;
4735 if((yyvsp[(1) - (1)].exception)) {
4736 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4737 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4748 /* Line 1464 of skeleton.m4 */
4749 #line 2021 "parser.y"
4759 /* Line 1464 of skeleton.m4 */
4760 #line 2021 "parser.y"
4762 code_t*out = abc_nop(0);
4764 code_t*start = abc_nop(0);
4765 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4766 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4767 (yyval.code) = abc_jump((yyval.code), out);
4769 code_t*end = (yyval.code) = abc_nop((yyval.code));
4772 if((yyvsp[(6) - (6)].catch_list).finally)
4773 tmp = new_variable("__finally__", 0, 0);
4775 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4778 abc_exception_t*e = l->abc_exception;
4780 (yyval.code) = code_append((yyval.code), e->target);
4781 (yyval.code) = abc_jump((yyval.code), out);
4783 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4785 e->target = (yyval.code) = abc_nop((yyval.code));
4786 (yyval.code) = abc___rethrow__((yyval.code));
4794 (yyval.code) = code_append((yyval.code), out);
4796 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4798 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4800 (yyval.code) = var_block((yyval.code));
4811 /* Line 1464 of skeleton.m4 */
4812 #line 2066 "parser.y"
4814 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4815 (yyval.code)=abc_throw((yyval.code));
4825 /* Line 1464 of skeleton.m4 */
4826 #line 2070 "parser.y"
4828 if(!state->exception_name)
4829 syntaxerror("re-throw only possible within a catch block");
4830 variable_t*v = find_variable(state->exception_name);
4831 (yyval.code)=code_new();
4832 (yyval.code)=abc_getlocal((yyval.code), v->index);
4833 (yyval.code)=abc_throw((yyval.code));
4843 /* Line 1464 of skeleton.m4 */
4844 #line 2081 "parser.y"
4846 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4847 (yyval.code) = abc_pushscope((yyval.code));
4848 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4849 (yyval.code) = abc_popscope((yyval.code));
4859 /* Line 1464 of skeleton.m4 */
4860 #line 2091 "parser.y"
4861 {PASS12 (yyval.id)="package";}
4870 /* Line 1464 of skeleton.m4 */
4871 #line 2093 "parser.y"
4872 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
4881 /* Line 1464 of skeleton.m4 */
4882 #line 2094 "parser.y"
4883 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
4892 /* Line 1464 of skeleton.m4 */
4893 #line 2096 "parser.y"
4894 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
4903 /* Line 1464 of skeleton.m4 */
4904 #line 2097 "parser.y"
4905 {PASS12 endpackage();(yyval.code)=0;}
4914 /* Line 1464 of skeleton.m4 */
4915 #line 2098 "parser.y"
4916 {PASS12 startpackage("");}
4925 /* Line 1464 of skeleton.m4 */
4926 #line 2099 "parser.y"
4927 {PASS12 endpackage();(yyval.code)=0;}
4936 /* Line 1464 of skeleton.m4 */
4937 #line 2101 "parser.y"
4940 if(!registry_findclass((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name)) {
4941 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
4945 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4947 syntaxerror("Couldn't import class\n");
4948 state_has_imports();
4949 dict_put(state->imports, c->name, c);
4960 /* Line 1464 of skeleton.m4 */
4961 #line 2115 "parser.y"
4964 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
4965 as3_schedule_package((yyvsp[(2) - (4)].id));
4970 i->package = (yyvsp[(2) - (4)].id);
4971 state_has_imports();
4972 list_append(state->wildcard_imports, i);
4983 /* Line 1464 of skeleton.m4 */
4984 #line 2131 "parser.y"
4985 {PASS12 (yyval.flags)=0;}
4994 /* Line 1464 of skeleton.m4 */
4995 #line 2132 "parser.y"
4996 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5005 /* Line 1464 of skeleton.m4 */
5006 #line 2133 "parser.y"
5007 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
5016 /* Line 1464 of skeleton.m4 */
5017 #line 2134 "parser.y"
5018 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
5027 /* Line 1464 of skeleton.m4 */
5028 #line 2136 "parser.y"
5029 {PASS12 (yyval.token)=FLAG_PUBLIC;}
5038 /* Line 1464 of skeleton.m4 */
5039 #line 2137 "parser.y"
5040 {PASS12 (yyval.token)=FLAG_PRIVATE;}
5049 /* Line 1464 of skeleton.m4 */
5050 #line 2138 "parser.y"
5051 {PASS12 (yyval.token)=FLAG_PROTECTED;}
5060 /* Line 1464 of skeleton.m4 */
5061 #line 2139 "parser.y"
5062 {PASS12 (yyval.token)=FLAG_STATIC;}
5071 /* Line 1464 of skeleton.m4 */
5072 #line 2140 "parser.y"
5073 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
5082 /* Line 1464 of skeleton.m4 */
5083 #line 2141 "parser.y"
5084 {PASS12 (yyval.token)=FLAG_FINAL;}
5093 /* Line 1464 of skeleton.m4 */
5094 #line 2142 "parser.y"
5095 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
5104 /* Line 1464 of skeleton.m4 */
5105 #line 2143 "parser.y"
5106 {PASS12 (yyval.token)=FLAG_NATIVE;}
5115 /* Line 1464 of skeleton.m4 */
5116 #line 2144 "parser.y"
5117 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
5126 /* Line 1464 of skeleton.m4 */
5127 #line 2146 "parser.y"
5128 {(yyval.classinfo)=registry_getobjectclass();}
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2147 "parser.y"
5139 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5148 /* Line 1464 of skeleton.m4 */
5149 #line 2149 "parser.y"
5150 {PASS12 (yyval.classinfo_list)=list_new();}
5159 /* Line 1464 of skeleton.m4 */
5160 #line 2150 "parser.y"
5161 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5170 /* Line 1464 of skeleton.m4 */
5171 #line 2152 "parser.y"
5172 {PASS12 (yyval.classinfo_list)=list_new();}
5181 /* Line 1464 of skeleton.m4 */
5182 #line 2153 "parser.y"
5183 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5192 /* Line 1464 of skeleton.m4 */
5193 #line 2157 "parser.y"
5194 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
5203 /* Line 1464 of skeleton.m4 */
5204 #line 2159 "parser.y"
5205 {PASS12 endclass();(yyval.code)=0;}
5214 /* Line 1464 of skeleton.m4 */
5215 #line 2163 "parser.y"
5216 {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
5225 /* Line 1464 of skeleton.m4 */
5226 #line 2165 "parser.y"
5227 {PASS12 endclass();(yyval.code)=0;}
5236 /* Line 1464 of skeleton.m4 */
5237 #line 2177 "parser.y"
5239 code_t*c = state->cls->static_init;
5240 c = code_append(c, (yyvsp[(1) - (1)].code));
5241 state->cls->static_init = c;
5251 /* Line 1464 of skeleton.m4 */
5252 #line 2188 "parser.y"
5254 syntaxerror("variable declarations not allowed in interfaces");
5264 /* Line 1464 of skeleton.m4 */
5265 #line 2191 "parser.y"
5268 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5269 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5270 syntaxerror("invalid method modifiers: interface methods always need to be public");
5272 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5273 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5274 list_deep_free((yyvsp[(6) - (8)].params).list);
5284 /* Line 1464 of skeleton.m4 */
5285 #line 2206 "parser.y"
5287 int flags = (yyvsp[(1) - (5)].flags);
5288 memberinfo_t* info = state->cls?
5289 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
5290 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
5292 info->type = (yyvsp[(4) - (5)].classinfo);
5293 info->flags = flags;
5296 namespace_t mname_ns = {flags2access(flags), ""};
5297 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5299 trait_list_t**traits;
5303 mname_ns.name = state->package;
5304 traits = &global->init->traits;
5305 code = &global->init->method->body->code;
5306 } else if(flags&FLAG_STATIC) {
5308 traits = &state->cls->abc->static_traits;
5309 code = &state->cls->static_init;
5311 // instance variable
5312 traits = &state->cls->abc->traits;
5313 code = &state->cls->init;
5317 if((yyvsp[(4) - (5)].classinfo)) {
5318 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5319 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5321 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5323 info->slot = t->slot_id;
5325 /* initalization code (if needed) */
5327 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5328 c = abc_getlocal_0(c);
5329 c = code_append(c, (yyvsp[(5) - (5)].value).c);
5330 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5331 c = abc_setslot(c, t->slot_id);
5334 *code = code_append(*code, c);
5336 if((yyvsp[(2) - (5)].token)==KW_CONST) {
5337 t->kind= TRAIT_CONST;
5350 /* Line 1464 of skeleton.m4 */
5351 #line 2265 "parser.y"
5352 {(yyval.constant)=0;}
5361 /* Line 1464 of skeleton.m4 */
5362 #line 2266 "parser.y"
5363 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5372 /* Line 1464 of skeleton.m4 */
5373 #line 2268 "parser.y"
5374 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5383 /* Line 1464 of skeleton.m4 */
5384 #line 2269 "parser.y"
5385 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5394 /* Line 1464 of skeleton.m4 */
5395 #line 2270 "parser.y"
5396 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5405 /* Line 1464 of skeleton.m4 */
5406 #line 2271 "parser.y"
5407 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5416 /* Line 1464 of skeleton.m4 */
5417 #line 2272 "parser.y"
5418 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5427 /* Line 1464 of skeleton.m4 */
5428 #line 2274 "parser.y"
5429 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5438 /* Line 1464 of skeleton.m4 */
5439 #line 2275 "parser.y"
5440 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5449 /* Line 1464 of skeleton.m4 */
5450 #line 2276 "parser.y"
5451 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5460 /* Line 1464 of skeleton.m4 */
5461 #line 2281 "parser.y"
5464 memset(&(yyval.params),0,sizeof((yyval.params)));
5474 /* Line 1464 of skeleton.m4 */
5475 #line 2285 "parser.y"
5478 (yyval.params)=(yyvsp[(1) - (1)].params);
5488 /* Line 1464 of skeleton.m4 */
5489 #line 2291 "parser.y"
5492 memset(&(yyval.params),0,sizeof((yyval.params)));
5493 (yyval.params).varargs=1;
5494 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5504 /* Line 1464 of skeleton.m4 */
5505 #line 2297 "parser.y"
5508 (yyval.params) =(yyvsp[(1) - (4)].params);
5509 (yyval.params).varargs=1;
5510 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5520 /* Line 1464 of skeleton.m4 */
5521 #line 2305 "parser.y"
5524 (yyval.params) = (yyvsp[(1) - (3)].params);
5525 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5535 /* Line 1464 of skeleton.m4 */
5536 #line 2310 "parser.y"
5539 memset(&(yyval.params),0,sizeof((yyval.params)));
5540 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5550 /* Line 1464 of skeleton.m4 */
5551 #line 2316 "parser.y"
5553 PASS1 (yyval.param)=0;
5555 (yyval.param) = malloc(sizeof(param_t));
5556 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5557 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5558 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5568 /* Line 1464 of skeleton.m4 */
5569 #line 2324 "parser.y"
5571 PASS1 (yyval.param)=0;
5573 (yyval.param) = malloc(sizeof(param_t));
5574 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5575 (yyval.param)->type = TYPE_ANY;
5576 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5586 /* Line 1464 of skeleton.m4 */
5587 #line 2332 "parser.y"
5588 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5597 /* Line 1464 of skeleton.m4 */
5598 #line 2333 "parser.y"
5599 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5608 /* Line 1464 of skeleton.m4 */
5609 #line 2334 "parser.y"
5619 /* Line 1464 of skeleton.m4 */
5620 #line 2337 "parser.y"
5621 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5630 /* Line 1464 of skeleton.m4 */
5631 #line 2338 "parser.y"
5633 PASS1 old_state();list_deep_free((yyvsp[(6) - (12)].params).list);
5635 if(!state->method->info) syntaxerror("internal error");
5637 code_t*c = method_header();
5638 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5640 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5641 list_deep_free((yyvsp[(6) - (12)].params).list);
5652 /* Line 1464 of skeleton.m4 */
5653 #line 2352 "parser.y"
5654 {PASS12 (yyval.id)=0;}
5663 /* Line 1464 of skeleton.m4 */
5664 #line 2354 "parser.y"
5665 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5674 /* Line 1464 of skeleton.m4 */
5675 #line 2355 "parser.y"
5677 PASS1 old_state();list_deep_free((yyvsp[(4) - (10)].params).list);
5679 memberinfo_t*f = state->method->info;
5680 if(!f) syntaxerror("internal error");
5682 code_t*c = method_header();
5683 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5685 int index = state->method->var_index;
5686 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5687 list_deep_free((yyvsp[(4) - (10)].params).list);
5689 (yyval.value).c = abc_getlocal(0, index);
5690 (yyval.value).t = TYPE_FUNCTION(f);
5700 /* Line 1464 of skeleton.m4 */
5701 #line 2375 "parser.y"
5703 PASS1 (yyval.classinfo)=0;
5705 /* try current package */
5706 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
5707 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
5717 /* Line 1464 of skeleton.m4 */
5718 #line 2383 "parser.y"
5720 PASS1 static classinfo_t c;
5721 memset(&c, 0, sizeof(c));
5722 c.package = (yyvsp[(1) - (3)].id);
5723 c.name = (yyvsp[(3) - (3)].id);
5724 (yyval.classinfo)=&c;
5726 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5727 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5728 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5738 /* Line 1464 of skeleton.m4 */
5739 #line 2398 "parser.y"
5740 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5749 /* Line 1464 of skeleton.m4 */
5750 #line 2399 "parser.y"
5751 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5760 /* Line 1464 of skeleton.m4 */
5761 #line 2401 "parser.y"
5762 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5771 /* Line 1464 of skeleton.m4 */
5772 #line 2402 "parser.y"
5773 {(yyval.classinfo)=registry_getanytype();}
5782 /* Line 1464 of skeleton.m4 */
5783 #line 2403 "parser.y"
5784 {(yyval.classinfo)=registry_getanytype();}
5793 /* Line 1464 of skeleton.m4 */
5794 #line 2412 "parser.y"
5795 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5804 /* Line 1464 of skeleton.m4 */
5805 #line 2413 "parser.y"
5806 {(yyval.classinfo)=0;}
5815 /* Line 1464 of skeleton.m4 */
5816 #line 2417 "parser.y"
5817 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5826 /* Line 1464 of skeleton.m4 */
5827 #line 2418 "parser.y"
5828 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5837 /* Line 1464 of skeleton.m4 */
5838 #line 2420 "parser.y"
5839 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5848 /* Line 1464 of skeleton.m4 */
5849 #line 2422 "parser.y"
5850 {(yyval.value_list).len=1;
5851 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
5861 /* Line 1464 of skeleton.m4 */
5862 #line 2425 "parser.y"
5864 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
5865 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
5875 /* Line 1464 of skeleton.m4 */
5876 #line 2431 "parser.y"
5878 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
5879 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
5881 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
5882 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5883 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5884 (yyval.value).c = code_cutlast((yyval.value).c);
5885 (yyval.value).c = code_append((yyval.value).c, paramcode);
5886 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
5887 multiname_destroy(name);
5888 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5889 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5890 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5891 multiname_t*name = t->name;
5892 (yyval.value).c = code_cutlast((yyval.value).c);
5893 (yyval.value).c = code_append((yyval.value).c, paramcode);
5894 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
5896 (yyval.value).c = code_append((yyval.value).c, paramcode);
5897 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
5900 (yyval.value).t = TYPE_ANY;
5901 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->cls) {
5902 (yyval.value).t = (yyvsp[(2) - (4)].value).t->cls;
5904 (yyval.value).c = abc_coerce_a((yyval.value).c);
5905 (yyval.value).t = TYPE_ANY;
5916 /* Line 1464 of skeleton.m4 */
5917 #line 2467 "parser.y"
5920 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5921 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5922 (yyval.value).c = code_cutlast((yyval.value).c);
5924 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5926 (yyval.value).t = TYPE_ANY;
5927 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5928 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5929 (yyval.value).c = code_cutlast((yyval.value).c);
5930 (yyval.value).c = code_append((yyval.value).c, paramcode);
5931 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5932 multiname_destroy(name);
5933 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5934 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5935 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5936 if(t->kind!=TRAIT_METHOD) {
5937 //ok: flash allows to assign closures to members.
5939 multiname_t*name = t->name;
5940 (yyval.value).c = code_cutlast((yyval.value).c);
5941 (yyval.value).c = code_append((yyval.value).c, paramcode);
5942 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5943 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5944 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5945 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5946 (yyval.value).c = code_cutlast((yyval.value).c);
5947 (yyval.value).c = code_append((yyval.value).c, paramcode);
5948 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5949 multiname_destroy(name);
5951 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5952 (yyval.value).c = code_append((yyval.value).c, paramcode);
5953 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5956 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5957 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5959 (yyval.value).c = abc_coerce_a((yyval.value).c);
5960 (yyval.value).t = TYPE_ANY;
5971 /* Line 1464 of skeleton.m4 */
5972 #line 2513 "parser.y"
5974 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5975 if(!state->method) syntaxerror("super() not allowed outside of a function");
5976 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5978 (yyval.value).c = code_new();
5979 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5981 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5983 this is dependent on the control path, check this somewhere else
5984 if(state->method->has_super)
5985 syntaxerror("constructor may call super() only once");
5987 state->method->has_super = 1;
5989 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5990 (yyval.value).c = abc_pushundefined((yyval.value).c);
5991 (yyval.value).t = TYPE_ANY;
6001 /* Line 1464 of skeleton.m4 */
6002 #line 2534 "parser.y"
6004 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6005 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6006 (yyval.value).c = code_cutlast((yyval.value).c);
6008 multiname_t*name = 0;
6009 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6010 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6011 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6012 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6013 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
6014 (yyval.value).c = code_cutlast((yyval.value).c);
6015 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6017 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6018 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6019 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6021 (yyval.value).t = TYPE_BOOLEAN;
6031 /* Line 1464 of skeleton.m4 */
6032 #line 2555 "parser.y"
6034 (yyval.code) = abc_returnvoid(0);
6044 /* Line 1464 of skeleton.m4 */
6045 #line 2558 "parser.y"
6047 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6048 (yyval.code) = abc_returnvalue((yyval.code));
6058 /* Line 1464 of skeleton.m4 */
6059 #line 2565 "parser.y"
6060 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6069 /* Line 1464 of skeleton.m4 */
6070 #line 2566 "parser.y"
6071 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6080 /* Line 1464 of skeleton.m4 */
6081 #line 2567 "parser.y"
6083 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6084 (yyval.value).c = cut_last_push((yyval.value).c);
6085 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6086 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6096 /* Line 1464 of skeleton.m4 */
6097 #line 2573 "parser.y"
6099 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6109 /* Line 1464 of skeleton.m4 */
6110 #line 2579 "parser.y"
6111 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6120 /* Line 1464 of skeleton.m4 */
6121 #line 2583 "parser.y"
6122 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6131 /* Line 1464 of skeleton.m4 */
6132 #line 2585 "parser.y"
6133 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6142 /* Line 1464 of skeleton.m4 */
6143 #line 2587 "parser.y"
6144 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6153 /* Line 1464 of skeleton.m4 */
6154 #line 2591 "parser.y"
6156 (yyval.value).c = 0;
6157 namespace_t ns = {ACCESS_PACKAGE, ""};
6158 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6159 if(!(yyvsp[(1) - (1)].regexp).options) {
6160 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6161 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6162 (yyval.value).c = abc_construct((yyval.value).c, 1);
6164 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6165 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6166 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6167 (yyval.value).c = abc_construct((yyval.value).c, 2);
6169 (yyval.value).t = TYPE_REGEXP;
6179 /* Line 1464 of skeleton.m4 */
6180 #line 2608 "parser.y"
6181 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6182 //MULTINAME(m, registry_getintclass());
6183 //$$.c = abc_coerce2($$.c, &m); // FIXME
6184 (yyval.value).t = TYPE_INT;
6194 /* Line 1464 of skeleton.m4 */
6195 #line 2613 "parser.y"
6196 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6197 (yyval.value).t = TYPE_INT;
6207 /* Line 1464 of skeleton.m4 */
6208 #line 2616 "parser.y"
6209 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6210 (yyval.value).t = TYPE_INT;
6220 /* Line 1464 of skeleton.m4 */
6221 #line 2619 "parser.y"
6222 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6223 (yyval.value).t = TYPE_UINT;
6233 /* Line 1464 of skeleton.m4 */
6234 #line 2622 "parser.y"
6235 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6236 (yyval.value).t = TYPE_FLOAT;
6246 /* Line 1464 of skeleton.m4 */
6247 #line 2625 "parser.y"
6248 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6249 (yyval.value).t = TYPE_STRING;
6259 /* Line 1464 of skeleton.m4 */
6260 #line 2628 "parser.y"
6261 {(yyval.value).c = abc_pushundefined(0);
6262 (yyval.value).t = TYPE_ANY;
6272 /* Line 1464 of skeleton.m4 */
6273 #line 2631 "parser.y"
6274 {(yyval.value).c = abc_pushtrue(0);
6275 (yyval.value).t = TYPE_BOOLEAN;
6285 /* Line 1464 of skeleton.m4 */
6286 #line 2634 "parser.y"
6287 {(yyval.value).c = abc_pushfalse(0);
6288 (yyval.value).t = TYPE_BOOLEAN;
6298 /* Line 1464 of skeleton.m4 */
6299 #line 2637 "parser.y"
6300 {(yyval.value).c = abc_pushnull(0);
6301 (yyval.value).t = TYPE_NULL;
6311 /* Line 1464 of skeleton.m4 */
6312 #line 2641 "parser.y"
6313 {(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);
6314 (yyval.value).t = TYPE_BOOLEAN;
6324 /* Line 1464 of skeleton.m4 */
6325 #line 2644 "parser.y"
6326 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6327 (yyval.value).t = TYPE_BOOLEAN;
6337 /* Line 1464 of skeleton.m4 */
6338 #line 2647 "parser.y"
6339 {(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);
6340 (yyval.value).t = TYPE_BOOLEAN;
6350 /* Line 1464 of skeleton.m4 */
6351 #line 2650 "parser.y"
6352 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6353 (yyval.value).t = TYPE_BOOLEAN;
6363 /* Line 1464 of skeleton.m4 */
6364 #line 2653 "parser.y"
6365 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6366 (yyval.value).t = TYPE_BOOLEAN;
6376 /* Line 1464 of skeleton.m4 */
6377 #line 2656 "parser.y"
6378 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6379 (yyval.value).t = TYPE_BOOLEAN;
6389 /* Line 1464 of skeleton.m4 */
6390 #line 2659 "parser.y"
6391 {(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);
6392 (yyval.value).t = TYPE_BOOLEAN;
6402 /* Line 1464 of skeleton.m4 */
6403 #line 2662 "parser.y"
6404 {(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);
6405 (yyval.value).t = TYPE_BOOLEAN;
6415 /* Line 1464 of skeleton.m4 */
6416 #line 2666 "parser.y"
6417 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6418 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6419 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6420 (yyval.value).c = abc_dup((yyval.value).c);
6421 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6422 (yyval.value).c = cut_last_push((yyval.value).c);
6423 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6424 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6425 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6426 jmp->branch = label;
6436 /* Line 1464 of skeleton.m4 */
6437 #line 2677 "parser.y"
6439 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6440 /*printf("%08x:\n",$1.t);
6441 code_dump($1.c, 0, 0, "", stdout);
6442 printf("%08x:\n",$3.t);
6443 code_dump($3.c, 0, 0, "", stdout);
6444 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6445 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6446 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6447 (yyval.value).c = abc_dup((yyval.value).c);
6448 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6449 (yyval.value).c = cut_last_push((yyval.value).c);
6450 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6451 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6452 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6453 jmp->branch = label;
6463 /* Line 1464 of skeleton.m4 */
6464 #line 2695 "parser.y"
6465 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6466 (yyval.value).c = abc_not((yyval.value).c);
6467 (yyval.value).t = TYPE_BOOLEAN;
6477 /* Line 1464 of skeleton.m4 */
6478 #line 2700 "parser.y"
6479 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6480 (yyval.value).c = abc_bitnot((yyval.value).c);
6481 (yyval.value).t = TYPE_INT;
6491 /* Line 1464 of skeleton.m4 */
6492 #line 2705 "parser.y"
6493 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6494 (yyval.value).c = abc_bitand((yyval.value).c);
6495 (yyval.value).t = TYPE_INT;
6505 /* Line 1464 of skeleton.m4 */
6506 #line 2710 "parser.y"
6507 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6508 (yyval.value).c = abc_bitxor((yyval.value).c);
6509 (yyval.value).t = TYPE_INT;
6519 /* Line 1464 of skeleton.m4 */
6520 #line 2715 "parser.y"
6521 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6522 (yyval.value).c = abc_bitor((yyval.value).c);
6523 (yyval.value).t = TYPE_INT;
6533 /* Line 1464 of skeleton.m4 */
6534 #line 2720 "parser.y"
6535 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6536 (yyval.value).c = abc_rshift((yyval.value).c);
6537 (yyval.value).t = TYPE_INT;
6547 /* Line 1464 of skeleton.m4 */
6548 #line 2724 "parser.y"
6549 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6550 (yyval.value).c = abc_urshift((yyval.value).c);
6551 (yyval.value).t = TYPE_INT;
6561 /* Line 1464 of skeleton.m4 */
6562 #line 2728 "parser.y"
6563 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6564 (yyval.value).c = abc_lshift((yyval.value).c);
6565 (yyval.value).t = TYPE_INT;
6575 /* Line 1464 of skeleton.m4 */
6576 #line 2733 "parser.y"
6577 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6578 (yyval.value).c = abc_divide((yyval.value).c);
6579 (yyval.value).t = TYPE_NUMBER;
6589 /* Line 1464 of skeleton.m4 */
6590 #line 2737 "parser.y"
6591 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6592 (yyval.value).c = abc_modulo((yyval.value).c);
6593 (yyval.value).t = TYPE_NUMBER;
6603 /* Line 1464 of skeleton.m4 */
6604 #line 2741 "parser.y"
6605 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6606 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6607 (yyval.value).c = abc_add_i((yyval.value).c);
6608 (yyval.value).t = TYPE_INT;
6610 (yyval.value).c = abc_add((yyval.value).c);
6611 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6622 /* Line 1464 of skeleton.m4 */
6623 #line 2750 "parser.y"
6624 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6625 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6626 (yyval.value).c = abc_subtract_i((yyval.value).c);
6627 (yyval.value).t = TYPE_INT;
6629 (yyval.value).c = abc_subtract((yyval.value).c);
6630 (yyval.value).t = TYPE_NUMBER;
6641 /* Line 1464 of skeleton.m4 */
6642 #line 2759 "parser.y"
6643 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6644 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6645 (yyval.value).c = abc_multiply_i((yyval.value).c);
6646 (yyval.value).t = TYPE_INT;
6648 (yyval.value).c = abc_multiply((yyval.value).c);
6649 (yyval.value).t = TYPE_NUMBER;
6660 /* Line 1464 of skeleton.m4 */
6661 #line 2769 "parser.y"
6662 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6663 (yyval.value).c = abc_in((yyval.value).c);
6664 (yyval.value).t = TYPE_BOOLEAN;
6674 /* Line 1464 of skeleton.m4 */
6675 #line 2774 "parser.y"
6676 {char use_astype=0; // flash player's astype works differently than astypelate
6677 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
6678 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
6679 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6680 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
6682 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6683 (yyval.value).c = abc_astypelate((yyval.value).c);
6684 (yyval.value).t = TYPE_ANY;
6695 /* Line 1464 of skeleton.m4 */
6696 #line 2787 "parser.y"
6697 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6698 (yyval.value).c = abc_instanceof((yyval.value).c);
6699 (yyval.value).t = TYPE_BOOLEAN;
6709 /* Line 1464 of skeleton.m4 */
6710 #line 2792 "parser.y"
6711 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6712 (yyval.value).c = abc_istypelate((yyval.value).c);
6713 (yyval.value).t = TYPE_BOOLEAN;
6723 /* Line 1464 of skeleton.m4 */
6724 #line 2797 "parser.y"
6726 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6727 (yyval.value).c = abc_typeof((yyval.value).c);
6728 (yyval.value).t = TYPE_STRING;
6738 /* Line 1464 of skeleton.m4 */
6739 #line 2803 "parser.y"
6741 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6742 (yyval.value).c = abc_pushundefined((yyval.value).c);
6743 (yyval.value).t = TYPE_ANY;
6753 /* Line 1464 of skeleton.m4 */
6754 #line 2809 "parser.y"
6755 { (yyval.value).c = abc_pushundefined(0);
6756 (yyval.value).t = TYPE_ANY;
6766 /* Line 1464 of skeleton.m4 */
6767 #line 2813 "parser.y"
6768 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6777 /* Line 1464 of skeleton.m4 */
6778 #line 2815 "parser.y"
6780 (yyval.value)=(yyvsp[(2) - (2)].value);
6781 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6782 (yyval.value).c=abc_negate_i((yyval.value).c);
6783 (yyval.value).t = TYPE_INT;
6785 (yyval.value).c=abc_negate((yyval.value).c);
6786 (yyval.value).t = TYPE_NUMBER;
6797 /* Line 1464 of skeleton.m4 */
6798 #line 2826 "parser.y"
6800 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6801 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6803 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6804 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6805 (yyval.value).t = 0; // array elements have unknown type
6815 /* Line 1464 of skeleton.m4 */
6816 #line 2835 "parser.y"
6818 (yyval.value).c = code_new();
6819 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6820 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6821 (yyval.value).t = registry_getarrayclass();
6831 /* Line 1464 of skeleton.m4 */
6832 #line 2842 "parser.y"
6833 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6842 /* Line 1464 of skeleton.m4 */
6843 #line 2843 "parser.y"
6844 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6853 /* Line 1464 of skeleton.m4 */
6854 #line 2845 "parser.y"
6856 (yyval.value_list).cc = 0;
6857 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6858 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6859 (yyval.value_list).len = 2;
6869 /* Line 1464 of skeleton.m4 */
6870 #line 2851 "parser.y"
6872 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6873 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
6874 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6875 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6885 /* Line 1464 of skeleton.m4 */
6886 #line 2860 "parser.y"
6888 (yyval.value).c = code_new();
6889 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6890 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
6891 (yyval.value).t = registry_getobjectclass();
6901 /* Line 1464 of skeleton.m4 */
6902 #line 2867 "parser.y"
6904 code_t*c = (yyvsp[(3) - (3)].value).c;
6905 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6906 c=abc_multiply_i(c);
6910 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
6911 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6912 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6922 /* Line 1464 of skeleton.m4 */
6923 #line 2879 "parser.y"
6925 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
6926 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
6927 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6928 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6938 /* Line 1464 of skeleton.m4 */
6939 #line 2885 "parser.y"
6941 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
6942 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
6943 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6944 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6954 /* Line 1464 of skeleton.m4 */
6955 #line 2891 "parser.y"
6957 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
6958 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
6959 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6960 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6970 /* Line 1464 of skeleton.m4 */
6971 #line 2897 "parser.y"
6973 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
6974 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
6975 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6976 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6986 /* Line 1464 of skeleton.m4 */
6987 #line 2903 "parser.y"
6989 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
6990 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
6991 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6992 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7002 /* Line 1464 of skeleton.m4 */
7003 #line 2909 "parser.y"
7005 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7006 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7007 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7008 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7018 /* Line 1464 of skeleton.m4 */
7019 #line 2915 "parser.y"
7021 code_t*c = (yyvsp[(3) - (3)].value).c;
7023 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7027 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7030 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7031 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7041 /* Line 1464 of skeleton.m4 */
7042 #line 2928 "parser.y"
7043 { code_t*c = (yyvsp[(3) - (3)].value).c;
7044 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7045 c=abc_subtract_i(c);
7048 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7051 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7052 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7062 /* Line 1464 of skeleton.m4 */
7063 #line 2939 "parser.y"
7065 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7066 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7067 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7068 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7078 /* Line 1464 of skeleton.m4 */
7079 #line 2946 "parser.y"
7081 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7082 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7083 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7084 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7085 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7086 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7087 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7088 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7089 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7090 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7100 /* Line 1464 of skeleton.m4 */
7101 #line 2959 "parser.y"
7103 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7104 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7105 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7106 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7107 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7108 (yyval.value).c = abc_getlocal(0, nr);
7109 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7110 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7111 (yyval.value).c = abc_getlocal(0, nr);
7112 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7113 } else syntaxerror("internal error");
7115 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7116 c=abc_increment_i(c);
7122 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7123 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7124 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7135 /* Line 1464 of skeleton.m4 */
7136 #line 2986 "parser.y"
7138 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7139 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7140 c=abc_decrement_i(c);
7146 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7147 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7148 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7158 /* Line 1464 of skeleton.m4 */
7159 #line 3000 "parser.y"
7161 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7162 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7163 c=abc_increment_i(c);
7169 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7170 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7171 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7181 /* Line 1464 of skeleton.m4 */
7182 #line 3014 "parser.y"
7184 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7185 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7186 c=abc_decrement_i(c);
7192 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7193 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7194 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7204 /* Line 1464 of skeleton.m4 */
7205 #line 3029 "parser.y"
7206 { if(!state->cls->info)
7207 syntaxerror("super keyword not allowed outside a class");
7208 classinfo_t*t = state->cls->info->superclass;
7209 if(!t) t = TYPE_OBJECT;
7211 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7212 namespace_t ns = flags2namespace(f->flags, "");
7213 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7214 (yyval.value).c = 0;
7215 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7216 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7217 (yyval.value).t = memberinfo_gettype(f);
7227 /* Line 1464 of skeleton.m4 */
7228 #line 3044 "parser.y"
7229 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7230 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7232 if(TYPE_IS_CLASS(t) && t->cls) {
7237 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7239 if(f && !is_static != !(f->flags&FLAG_STATIC))
7241 if(f && f->slot && !noslot) {
7242 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7244 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7245 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7247 /* determine type */
7248 (yyval.value).t = memberinfo_gettype(f);
7249 if(!(yyval.value).t)
7250 (yyval.value).c = abc_coerce_a((yyval.value).c);
7252 /* when resolving a property on an unknown type, we do know the
7253 name of the property (and don't seem to need the package), but
7254 we need to make avm2 try out all access modes */
7255 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7256 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7257 (yyval.value).c = abc_coerce_a((yyval.value).c);
7258 (yyval.value).t = registry_getanytype();
7269 /* Line 1464 of skeleton.m4 */
7270 #line 3077 "parser.y"
7272 (yyval.value).t = 0;
7273 (yyval.value).c = 0;
7278 /* look at variables */
7279 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
7280 // $1 is a local variable
7281 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7282 (yyval.value).t = v->type;
7286 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7288 /* look at current class' members */
7289 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7290 (f->flags&FLAG_STATIC) >= i_am_static) {
7291 // $1 is a function in this class
7292 int var_is_static = (f->flags&FLAG_STATIC);
7294 if(f->kind == MEMBER_METHOD) {
7295 (yyval.value).t = TYPE_FUNCTION(f);
7297 (yyval.value).t = f->type;
7299 if(var_is_static && !i_am_static) {
7300 /* access to a static member from a non-static location.
7301 do this via findpropstrict:
7302 there doesn't seem to be any non-lookup way to access
7303 static properties of a class */
7304 state->method->late_binding = 1;
7305 (yyval.value).t = f->type;
7306 namespace_t ns = {flags2access(f->flags), ""};
7307 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7308 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7309 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7311 } else if(f->slot>0) {
7312 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7313 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7316 namespace_t ns = {flags2access(f->flags), ""};
7317 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7318 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7319 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7324 /* look at actual classes, in the current package and imported */
7325 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7326 if(a->flags & FLAG_METHOD) {
7328 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7329 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7330 if(a->function->kind == MEMBER_METHOD) {
7331 (yyval.value).t = TYPE_FUNCTION(a->function);
7333 (yyval.value).t = a->function->type;
7337 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7338 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
7341 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7343 (yyval.value).t = TYPE_CLASS(a);
7348 /* unknown object, let the avm2 resolve it */
7350 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7351 state->method->late_binding = 1;
7353 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7355 (yyval.value).t = 0;
7356 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7357 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7368 /* Line 1464 of skeleton.m4 */
7369 #line 3174 "parser.y"
7379 /* Line 1464 of skeleton.m4 */
7380 #line 3175 "parser.y"
7390 /* Line 1464 of skeleton.m4 */
7391 #line 3176 "parser.y"
7401 /* Line 1464 of skeleton.m4 */
7402 #line 3178 "parser.y"
7410 /* Line 1464 of skeleton.m4 */
7411 #line 7412 "parser.tab.c"
7414 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7418 YY_STACK_PRINT (yyss, yyssp);
7422 /* Now `shift' the result of the reduction. Determine what state
7423 that goes to, based on the state we popped back to and the rule
7424 number reduced by. */
7428 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7429 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7430 yystate = yytable[yystate];
7432 yystate = yydefgoto[yyn - YYNTOKENS];
7437 /*------------------------------------.
7438 | yyerrlab -- here on detecting error |
7439 `------------------------------------*/
7441 /* If not already recovering from an error, report this error. */
7445 #if ! YYERROR_VERBOSE
7446 yyerror (YY_("syntax error"));
7449 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7450 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7452 YYSIZE_T yyalloc = 2 * yysize;
7453 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7454 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7455 if (yymsg != yymsgbuf)
7456 YYSTACK_FREE (yymsg);
7457 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7459 yymsg_alloc = yyalloc;
7463 yymsg_alloc = sizeof yymsgbuf;
7467 if (0 < yysize && yysize <= yymsg_alloc)
7469 (void) yysyntax_error (yymsg, yystate, yychar);
7474 yyerror (YY_("syntax error"));
7476 goto yyexhaustedlab;
7484 if (yyerrstatus == 3)
7486 /* If just tried and failed to reuse lookahead token after an
7487 error, discard it. */
7489 if (yychar <= YYEOF)
7491 /* Return failure if at end of input. */
7492 if (yychar == YYEOF)
7497 yydestruct ("Error: discarding",
7503 /* Else will try to reuse lookahead token after shifting the error
7508 /*---------------------------------------------------.
7509 | yyerrorlab -- error raised explicitly by YYERROR. |
7510 `---------------------------------------------------*/
7513 /* Pacify compilers like GCC when the user code never invokes
7514 YYERROR and the label yyerrorlab therefore never appears in user
7516 if (/*CONSTCOND*/ 0)
7519 /* Do not reclaim the symbols of the rule which action triggered
7523 YY_STACK_PRINT (yyss, yyssp);
7528 /*-------------------------------------------------------------.
7529 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7530 `-------------------------------------------------------------*/
7532 yyerrstatus = 3; /* Each real token shifted decrements this. */
7536 yyn = yypact[yystate];
7537 if (yyn != YYPACT_NINF)
7540 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7548 /* Pop the current state because it cannot handle the error token. */
7553 yydestruct ("Error: popping",
7554 yystos[yystate], yyvsp);
7557 YY_STACK_PRINT (yyss, yyssp);
7563 /* Shift the error token. */
7564 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7570 /*-------------------------------------.
7571 | yyacceptlab -- YYACCEPT comes here. |
7572 `-------------------------------------*/
7577 /*-----------------------------------.
7578 | yyabortlab -- YYABORT comes here. |
7579 `-----------------------------------*/
7584 #if !defined(yyoverflow) || YYERROR_VERBOSE
7585 /*-------------------------------------------------.
7586 | yyexhaustedlab -- memory exhaustion comes here. |
7587 `-------------------------------------------------*/
7589 yyerror (YY_("memory exhausted"));
7595 if (yychar != YYEMPTY)
7596 yydestruct ("Cleanup: discarding lookahead",
7598 /* Do not reclaim the symbols of the rule which action triggered
7599 this YYABORT or YYACCEPT. */
7601 YY_STACK_PRINT (yyss, yyssp);
7602 while (yyssp != yyss)
7604 yydestruct ("Cleanup: popping",
7605 yystos[*yyssp], yyvsp);
7610 YYSTACK_FREE (yyss);
7613 if (yymsg != yymsgbuf)
7614 YYSTACK_FREE (yymsg);
7616 /* Make sure YYID is used. */
7617 return YYID (yyresult);