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
218 below_semicolon = 351,
219 below_assignment = 352,
221 minusminus_prefix = 356,
222 plusplus_prefix = 357,
225 above_identifier = 360,
233 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
235 /* Line 223 of skeleton.m4 */
240 /* Line 223 of skeleton.m4 */
243 enum yytokentype token;
246 classinfo_t*classinfo;
247 classinfo_list_t*classinfo_list;
250 unsigned int number_uint;
254 //typedcode_list_t*value_list;
255 codeandnumber_t value_list;
261 for_start_t for_start;
262 abc_exception_t *exception;
265 abc_exception_list_t *l;
271 /* Line 223 of skeleton.m4 */
272 #line 273 "parser.tab.c"
274 # define YYSTYPE_IS_TRIVIAL 1
275 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
276 # define YYSTYPE_IS_DECLARED 1
280 /* Copy the second part of user declarations. */
282 /* Line 273 of skeleton.m4 */
286 static int a3_error(char*s)
288 syntaxerror("%s", s);
289 return 0; //make gcc happy
293 static char* concat2(const char* t1, const char* t2)
297 char*text = malloc(l1+l2+1);
298 memcpy(text , t1, l1);
299 memcpy(text+l1, t2, l2);
303 static char* concat3(const char* t1, const char* t2, const char* t3)
308 char*text = malloc(l1+l2+l3+1);
309 memcpy(text , t1, l1);
310 memcpy(text+l1, t2, l2);
311 memcpy(text+l1+l2, t3, l3);
316 typedef struct _import {
320 DECLARE_LIST(import);
322 typedef struct _classstate {
328 char has_constructor;
331 DECLARE_LIST(methodstate);
333 typedef struct _methodstate {
344 int var_index; // for inner methods
346 abc_exception_list_t*exceptions;
348 methodstate_list_t*innerfunctions;
351 typedef struct _state {
356 import_list_t*wildcard_imports;
358 char has_own_imports;
359 char new_vars; // e.g. transition between two functions
362 methodstate_t*method;
369 typedef struct _global {
373 dict_t*file2token2info;
376 static global_t*global = 0;
377 static state_t* state = 0;
381 #define MULTINAME(m,x) \
385 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
387 #define MEMBER_MULTINAME(m,f,n) \
391 m##_ns.access = (f)->access; \
395 m.namespace_set = 0; \
398 m.type = MULTINAME; \
400 m.namespace_set = &nopackage_namespace_set; \
404 /* warning: list length of namespace set is undefined */
405 #define MULTINAME_LATE(m, access, package) \
406 namespace_t m##_ns = {access, package}; \
407 namespace_set_t m##_nsset; \
408 namespace_list_t m##_l;m##_l.next = 0; \
409 m##_nsset.namespaces = &m##_l; \
410 m##_nsset = m##_nsset; \
411 m##_l.namespace = &m##_ns; \
412 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
414 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
415 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
416 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
417 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
418 static namespace_list_t nl4 = {&ns4,0};
419 static namespace_list_t nl3 = {&ns3,&nl4};
420 static namespace_list_t nl2 = {&ns2,&nl3};
421 static namespace_list_t nl1 = {&ns1,&nl2};
422 static namespace_set_t nopackage_namespace_set = {&nl1};
424 static void new_state()
427 state_t*oldstate = state;
429 memcpy(s, state, sizeof(state_t)); //shallow copy
431 s->imports = dict_new();
435 state->has_own_imports = 0;
436 state->vars = dict_new();
437 state->old = oldstate;
439 static void state_has_imports()
441 state->wildcard_imports = list_clone(state->wildcard_imports);
442 state->imports = dict_clone(state->imports);
443 state->has_own_imports = 1;
446 static void state_destroy(state_t*state)
448 if(state->has_own_imports) {
449 list_free(state->wildcard_imports);
450 dict_destroy(state->imports);state->imports=0;
452 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
453 dict_destroy(state->imports);state->imports=0;
457 for(t=0;t<state->vars->hashsize;t++) {
458 dictentry_t*e =state->vars->slots[t];
460 free(e->data);e->data=0;
464 dict_destroy(state->vars);state->vars=0;
470 static void old_state()
472 if(!state || !state->old)
473 syntaxerror("invalid nesting");
474 state_t*leaving = state;
478 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
479 free(leaving->method);
482 if(leaving->cls && leaving->cls != state->cls) {
487 state_destroy(leaving);
490 static char* internal_filename_package = 0;
491 void initialize_file(char*filename)
494 syntaxerror("invalid call to initialize_file during parsing of another file");
497 state->package = internal_filename_package = strdup(filename);
499 state->method = rfx_calloc(sizeof(methodstate_t));
500 state->method->variable_count = 1;
502 global->token2info = dict_lookup(global->file2token2info,
503 current_filename // use long version
505 if(!global->token2info) {
506 global->token2info = dict_new2(&ptr_type);
507 dict_put(global->file2token2info, current_filename, global->token2info);
513 if(!state || state->level!=1) {
514 syntaxerror("unexpected end of file in pass %d", as3_pass);
516 free(state->method);state->method=0;
518 //free(state->package);state->package=0; // used in registry
520 state_destroy(state);state=0;
523 void initialize_parser()
525 global = rfx_calloc(sizeof(global_t));
526 global->file = abc_file_new();
527 global->file->flags &= ~ABCFILE_LAZY;
528 global->file2token2info = dict_new();
529 global->token2info = 0;
531 global->init = abc_initscript(global->file);
532 code_t*c = global->init->method->body->code;
533 c = abc_getlocal_0(c);
534 c = abc_pushscope(c);
535 global->init->method->body->code = c;
538 void* finish_parser()
540 code_t*c = global->init->method->body->code;
541 /*c = abc_findpropstrict(c, "[package]::trace");
542 c = abc_pushstring(c, "[leaving global init function]");
543 c = abc_callpropvoid(c, "[package]::trace", 1);*/
544 c = abc_returnvoid(c);
545 global->init->method->body->code = c;
547 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
549 global->token2info=0;
555 static void xx_scopetest()
557 /* findpropstrict doesn't just return a scope object- it
558 also makes it "active" somehow. Push local_0 on the
559 scope stack and read it back with findpropstrict, it'll
560 contain properties like "trace". Trying to find the same
561 property on a "vanilla" local_0 yields only a "undefined" */
562 //c = abc_findpropstrict(c, "[package]::trace");
564 /*c = abc_getlocal_0(c);
565 c = abc_findpropstrict(c, "[package]::trace");
567 c = abc_setlocal_1(c);
569 c = abc_pushbyte(c, 0);
570 c = abc_setlocal_2(c);
572 code_t*xx = c = abc_label(c);
573 c = abc_findpropstrict(c, "[package]::trace");
574 c = abc_pushstring(c, "prop:");
575 c = abc_hasnext2(c, 1, 2);
577 c = abc_setlocal_3(c);
578 c = abc_callpropvoid(c, "[package]::trace", 2);
579 c = abc_getlocal_3(c);
581 c = abc_iftrue(c,xx);*/
585 typedef struct _variable {
591 static variable_t* find_variable(char*name)
597 v = dict_lookup(s->vars, name);
607 static variable_t* find_variable_safe(char*name)
609 variable_t* v = find_variable(name);
611 syntaxerror("undefined variable: %s", name);
614 static char variable_exists(char*name)
616 return dict_lookup(state->vars, name)!=0;
618 code_t*defaultvalue(code_t*c, classinfo_t*type);
619 static int new_variable(const char*name, classinfo_t*type, char init)
622 v->index = state->method->variable_count;
626 dict_put(state->vars, name, v);
628 return state->method->variable_count++;
630 #define TEMPVARNAME "__as3_temp__"
631 static int gettempvar()
633 variable_t*v = find_variable(TEMPVARNAME);
636 return new_variable(TEMPVARNAME, 0, 0);
639 code_t* var_block(code_t*body)
645 for(t=0;t<state->vars->hashsize;t++) {
646 dictentry_t*e = state->vars->slots[t];
648 variable_t*v = (variable_t*)e->data;
649 if(v->type && v->init) {
650 c = defaultvalue(c, v->type);
651 c = abc_setlocal(c, v->index);
652 k = abc_kill(k, v->index);
662 if(x->opcode== OPCODE___BREAK__ ||
663 x->opcode== OPCODE___CONTINUE__) {
664 /* link kill code before break/continue */
665 code_t*e = code_dup(k);
666 code_t*s = code_start(e);
678 c = code_append(c, body);
679 c = code_append(c, k);
683 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
685 static void parsererror(const char*file, int line, const char*f)
687 syntaxerror("internal error in %s, %s:%d", f, file, line);
691 code_t* method_header()
694 if(state->method->late_binding && !state->method->inner) {
695 c = abc_getlocal_0(c);
696 c = abc_pushscope(c);
698 /*if(state->method->innerfunctions) {
699 c = abc_newactivation(c);
700 c = abc_pushscope(c);
702 if(state->method->is_constructor && !state->method->has_super) {
703 // call default constructor
704 c = abc_getlocal_0(c);
705 c = abc_constructsuper(c, 0);
707 methodstate_list_t*l = state->method->innerfunctions;
709 parserassert(l->methodstate->abc);
710 c = abc_newfunction(c, l->methodstate->abc);
711 c = abc_setlocal(c, l->methodstate->var_index);
712 free(l->methodstate);l->methodstate=0;
715 list_free(state->method->innerfunctions);
716 state->method->innerfunctions = 0;
721 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
723 c = code_append(c, header);
724 c = code_append(c, var_block(body));
725 /* append return if necessary */
726 if(!c || (c->opcode != OPCODE_RETURNVOID &&
727 c->opcode != OPCODE_RETURNVALUE)) {
728 c = abc_returnvoid(c);
734 static void startpackage(char*name)
737 /*printf("entering package \"%s\"\n", name);*/
738 state->package = strdup(name);
740 static void endpackage()
742 /*printf("leaving package \"%s\"\n", state->package);*/
744 //used e.g. in classinfo_register:
745 //free(state->package);state->package=0;
750 #define FLAG_PUBLIC 256
751 #define FLAG_PROTECTED 512
752 #define FLAG_PRIVATE 1024
753 #define FLAG_PACKAGEINTERNAL 2048
754 #define FLAG_NAMESPACE 4096
756 static int flags2access(int flags)
759 if(flags&FLAG_PUBLIC) {
760 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
761 syntaxerror("invalid combination of access levels");
762 access = ACCESS_PACKAGE;
763 } else if(flags&FLAG_PRIVATE) {
764 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
765 syntaxerror("invalid combination of access levels");
766 access = ACCESS_PRIVATE;
767 } else if(flags&FLAG_PROTECTED) {
768 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
769 syntaxerror("invalid combination of access levels");
770 access = ACCESS_PROTECTED;
772 access = ACCESS_PACKAGEINTERNAL;
777 char*as3_globalclass=0;
778 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements)
781 syntaxerror("inner classes now allowed");
784 state->cls = rfx_calloc(sizeof(classstate_t));
787 classinfo_list_t*mlist=0;
789 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
790 syntaxerror("invalid modifier(s)");
792 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
793 syntaxerror("public and internal not supported at the same time.");
795 /* create the class name, together with the proper attributes */
799 if(!(flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
800 access = ACCESS_PRIVATE; package = internal_filename_package;
801 } else if(!(flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
802 access = ACCESS_PACKAGEINTERNAL; package = state->package;
803 } else if(state->package!=internal_filename_package) {
804 access = ACCESS_PACKAGE; package = state->package;
806 syntaxerror("public classes only allowed inside a package");
810 state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
811 state->method->variable_count = 1;
812 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
814 if(registry_find(package, classname)) {
815 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
817 /* build info struct */
818 int num_interfaces = (list_length(implements));
819 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
820 state->cls->info->flags |= flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
824 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
826 state->cls->info = (classinfo_t*)registry_find(package, classname);
827 parserassert((int)state->cls->info);
829 if(extends && (extends->flags & FLAG_FINAL))
830 syntaxerror("Can't extend final class '%s'", extends->name);
832 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
833 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
835 classinfo_list_t*l = implements;
836 for(l=implements;l;l=l->next) {
837 if(!(l->classinfo->flags & FLAG_INTERFACE))
838 syntaxerror("'%s' is not an interface", l->classinfo->name);
839 state->cls->info->interfaces[pos++] = l->classinfo;
842 /* generate the abc code for this class */
843 MULTINAME(classname2,state->cls->info);
844 multiname_t*extends2 = sig2mname(extends);
846 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
847 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
848 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
849 if(state->cls->info->flags&FLAG_INTERFACE) {
850 abc_class_interface(state->cls->abc);
853 abc_class_protectedNS(state->cls->abc, classname);
855 for(mlist=implements;mlist;mlist=mlist->next) {
856 MULTINAME(m, mlist->classinfo);
857 abc_class_add_interface(state->cls->abc, &m);
860 /* write the construction code for this class to the global init
862 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
864 abc_method_body_t*m = global->init->method->body;
865 __ getglobalscope(m);
866 classinfo_t*s = extends;
871 //TODO: take a look at the current scope stack, maybe
872 // we can re-use something
877 multiname_t*s2 = sig2mname(s);
879 multiname_destroy(s2);
881 __ pushscope(m); count++;
882 m->code = m->code->prev->prev; // invert
884 /* continue appending after last op end */
885 while(m->code && m->code->next) m->code = m->code->next;
887 /* TODO: if this is one of *our* classes, we can also
888 do a getglobalscope/getslot <nr> (which references
889 the init function's slots) */
891 __ getlex2(m, extends2);
893 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
894 stack is not the superclass */
895 __ pushscope(m);count++;
898 /* notice: we get a verify error #1107 if the top element on the scope
899 stack is not the global object */
901 __ pushscope(m);count++;
903 __ newclass(m,state->cls->abc);
907 __ setslot(m, slotindex);
908 multiname_destroy(extends2);
910 /* flash.display.MovieClip handling */
912 if(!as3_globalclass && (flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
913 if(state->package && state->package[0]) {
914 as3_globalclass = concat3(state->package, ".", classname);
916 as3_globalclass = strdup(classname);
922 static void endclass()
925 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
927 c = abc_getlocal_0(c);
928 c = abc_constructsuper(c, 0);
929 state->cls->init = code_append(state->cls->init, c);
931 if(!state->method->late_binding) {
932 // class initialization code uses late binding
934 c = abc_getlocal_0(c);
935 c = abc_pushscope(c);
936 state->cls->static_init = code_append(c, state->cls->static_init);
939 if(state->cls->init) {
940 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
941 m->body->code = wrap_function(0, state->cls->init, m->body->code);
943 if(state->cls->static_init) {
944 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
945 m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
952 void check_code_for_break(code_t*c)
955 if(c->opcode == OPCODE___BREAK__) {
956 char*name = string_cstr(c->data[0]);
957 syntaxerror("Unresolved \"break %s\"", name);
959 if(c->opcode == OPCODE___CONTINUE__) {
960 char*name = string_cstr(c->data[0]);
961 syntaxerror("Unresolved \"continue %s\"", name);
968 static void check_constant_against_type(classinfo_t*t, constant_t*c)
970 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
971 if(TYPE_IS_NUMBER(t)) {
972 xassert(c->type == CONSTANT_FLOAT
973 || c->type == CONSTANT_INT
974 || c->type == CONSTANT_UINT);
975 } else if(TYPE_IS_UINT(t)) {
976 xassert(c->type == CONSTANT_UINT ||
977 (c->type == CONSTANT_INT && c->i>0));
978 } else if(TYPE_IS_INT(t)) {
979 xassert(c->type == CONSTANT_INT);
980 } else if(TYPE_IS_BOOLEAN(t)) {
981 xassert(c->type == CONSTANT_TRUE
982 || c->type == CONSTANT_FALSE);
986 static void check_override(memberinfo_t*m, int flags)
990 if(m->parent == state->cls->info)
991 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
993 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
994 if(m->access==ACCESS_PRIVATE)
996 if(m->flags & FLAG_FINAL)
997 syntaxerror("can't override final member %s", m->name);
998 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
999 syntaxerror("can't override static member %s", m->name);
1000 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1001 syntaxerror("can't override non-static member %s with static declaration", m->name);
1003 if(!(flags&FLAG_OVERRIDE)) {
1004 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1005 if(m->kind == INFOTYPE_METHOD)
1006 syntaxerror("can't override without explicit 'override' declaration");
1008 syntaxerror("can't override '%s'", m->name);
1013 static methodinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
1015 methodinfo_t*minfo = 0;
1016 U8 access = flags2access(flags);
1019 minfo = methodinfo_register_global(access, state->package, name);
1020 minfo->return_type = return_type;
1021 } else if(getset != KW_GET && getset != KW_SET) {
1023 memberinfo_t* m = registry_findmember(state->cls->info, name, 0);
1025 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1027 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1028 minfo->return_type = return_type;
1029 // getslot on a member slot only returns "undefined", so no need
1030 // to actually store these
1031 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1033 //class getter/setter
1034 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1036 if(getset == KW_GET)
1038 else if(params->list && params->list->param)
1039 type = params->list->param->type;
1040 // not sure wether to look into superclasses here, too
1041 minfo = (methodinfo_t*)registry_findmember(state->cls->info, name, 1);
1043 if(minfo->kind!=INFOTYPE_SLOT)
1044 syntaxerror("class already contains a method called '%s'", name);
1045 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1046 syntaxerror("class already contains a field called '%s'", name);
1047 if(minfo->subtype & gs)
1048 syntaxerror("getter/setter for '%s' already defined", name);
1049 /* make a setter or getter into a getset */
1050 minfo->subtype |= gs;
1051 if(!minfo->return_type) {
1052 minfo->return_type = type;
1054 if(minfo && minfo->return_type != type)
1055 syntaxerror("different type in getter and setter");
1058 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1059 minfo->kind = INFOTYPE_SLOT; //hack
1060 minfo->subtype = gs;
1061 minfo->return_type = type;
1063 /* can't assign a slot as getter and setter might have different slots */
1064 //minfo->slot = slot;
1066 if(flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1067 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1068 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1072 static void function_initvars(params_t*params, int flags)
1074 if(state->method->inner)
1075 new_variable("this", 0, 0);
1076 else if(!state->method->is_global)
1077 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
1079 new_variable("globalscope", 0, 0);
1082 for(p=params->list;p;p=p->next) {
1083 new_variable(p->param->name, p->param->type, 0);
1086 methodstate_list_t*l = state->method->innerfunctions;
1088 methodstate_t*m = l->methodstate;
1089 m->var_index = new_variable(m->info->name, TYPE_FUNCTION(m->info), 0);
1094 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1096 parserassert(state->method && state->method->info);
1098 methodstate_t*parent_method = state->method;
1107 state->new_vars = 1;
1110 state->method = rfx_calloc(sizeof(methodstate_t));
1111 state->method->inner = 1;
1112 state->method->variable_count = 0;
1113 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1115 NEW(methodinfo_t,minfo);
1117 state->method->info = minfo;
1119 list_append(parent_method->innerfunctions, state->method);
1121 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1125 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1126 parserassert(state->method);
1128 state->method->info->return_type = return_type;
1129 function_initvars(params, 0);
1133 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1134 params_t*params, classinfo_t*return_type)
1136 if(state->method && state->method->info) {
1137 syntaxerror("not able to start another method scope");
1142 state->method = rfx_calloc(sizeof(methodstate_t));
1143 state->method->has_super = 0;
1144 state->method->variable_count = 0;
1147 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1149 state->method->is_global = 1;
1150 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1152 if(state->method->is_constructor)
1153 name = "__as3_constructor__";
1156 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1158 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1162 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1163 parserassert(state->method);
1166 memberinfo_t*m = registry_findmember(state->cls->info, name, 2);
1167 check_override(m, flags);
1171 state->cls->has_constructor |= state->method->is_constructor;
1174 state->method->info->return_type = return_type;
1175 function_initvars(params, flags);
1179 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1180 params_t*params, classinfo_t*return_type, code_t*body)
1189 multiname_t*type2 = sig2mname(return_type);
1191 if(state->method->inner) {
1192 f = state->method->abc;
1193 abc_method_init(f, global->file, type2, 1);
1194 } else if(state->method->is_constructor) {
1195 f = abc_class_getconstructor(state->cls->abc, type2);
1196 } else if(!state->method->is_global) {
1197 namespace_t mname_ns = {state->method->info->access, ""};
1198 multiname_t mname = {QNAME, &mname_ns, 0, name};
1200 if(flags&FLAG_STATIC)
1201 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1203 f = abc_class_method(state->cls->abc, type2, &mname);
1204 slot = f->trait->slot_id;
1206 namespace_t mname_ns = {state->method->info->access, state->package};
1207 multiname_t mname = {QNAME, &mname_ns, 0, name};
1209 f = abc_method_new(global->file, type2, 1);
1210 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1211 //abc_code_t*c = global->init->method->body->code;
1213 //flash doesn't seem to allow us to access function slots
1214 //state->method->info->slot = slot;
1216 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1217 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1218 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1219 if(params->varargs) f->flags |= METHOD_NEED_REST;
1223 for(p=params->list;p;p=p->next) {
1224 if(params->varargs && !p->next) {
1225 break; //varargs: omit last parameter in function signature
1227 multiname_t*m = sig2mname(p->param->type);
1228 list_append(f->parameters, m);
1229 if(p->param->value) {
1230 check_constant_against_type(p->param->type, p->param->value);
1231 opt=1;list_append(f->optional_parameters, p->param->value);
1233 syntaxerror("non-optional parameter not allowed after optional parameters");
1236 check_code_for_break(body);
1239 f->body->code = body;
1240 f->body->exceptions = state->method->exceptions;
1241 } else { //interface
1243 syntaxerror("interface methods can't have a method body");
1250 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1255 void breakjumpsto(code_t*c, char*name, code_t*jump)
1258 if(c->opcode == OPCODE___BREAK__) {
1259 string_t*name2 = c->data[0];
1260 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1261 c->opcode = OPCODE_JUMP;
1268 void continuejumpsto(code_t*c, char*name, code_t*jump)
1271 if(c->opcode == OPCODE___CONTINUE__) {
1272 string_t*name2 = c->data[0];
1273 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1274 c->opcode = OPCODE_JUMP;
1282 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1283 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1284 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1286 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1288 if(!type1 || !type2)
1289 return registry_getanytype();
1290 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1291 return registry_getanytype();
1294 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1303 return registry_getanytype();
1305 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1310 return abc_coerce_a(c);
1314 // cast an "any" type to a specific type. subject to
1315 // runtime exceptions
1316 return abc_coerce2(c, &m);
1319 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1320 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1321 // allow conversion between number types
1322 return abc_coerce2(c, &m);
1324 //printf("%s.%s\n", from.package, from.name);
1325 //printf("%s.%s\n", to.package, to.name);
1327 classinfo_t*supertype = from;
1329 if(supertype == to) {
1330 // target type is one of from's superclasses
1331 return abc_coerce2(c, &m);
1334 while(supertype->interfaces[t]) {
1335 if(supertype->interfaces[t]==to) {
1336 // target type is one of from's interfaces
1337 return abc_coerce2(c, &m);
1341 supertype = supertype->superclass;
1343 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1345 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1347 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1349 syntaxerror("can't convert type %s to %s", from->name, to->name);
1350 return 0; // make gcc happy
1353 code_t*defaultvalue(code_t*c, classinfo_t*type)
1355 if(TYPE_IS_INT(type)) {
1356 c = abc_pushbyte(c, 0);
1357 } else if(TYPE_IS_UINT(type)) {
1358 c = abc_pushuint(c, 0);
1359 } else if(TYPE_IS_FLOAT(type)) {
1361 } else if(TYPE_IS_BOOLEAN(type)) {
1362 c = abc_pushfalse(c);
1364 //c = abc_pushundefined(c);
1366 c = abc_pushnull(c);
1368 c = abc_coerce2(c, &m);
1373 char is_pushundefined(code_t*c)
1375 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1378 static slotinfo_t* find_class(char*name)
1382 c = registry_find(state->package, name);
1385 /* try explicit imports */
1386 dictentry_t* e = dict_get_slot(state->imports, name);
1389 if(!strcmp(e->key, name)) {
1390 c = (slotinfo_t*)e->data;
1396 /* try package.* imports */
1397 import_list_t*l = state->wildcard_imports;
1399 //printf("does package %s contain a class %s?\n", l->import->package, name);
1400 c = registry_find(l->import->package, name);
1405 /* try global package */
1406 c = registry_find("", name);
1409 /* try local "filename" package */
1410 c = registry_find(internal_filename_package, name);
1416 static char is_getlocal(code_t*c)
1418 if(!c || c->prev || c->next)
1420 return(c->opcode == OPCODE_GETLOCAL
1421 || c->opcode == OPCODE_GETLOCAL_0
1422 || c->opcode == OPCODE_GETLOCAL_1
1423 || c->opcode == OPCODE_GETLOCAL_2
1424 || c->opcode == OPCODE_GETLOCAL_3);
1426 static int getlocalnr(code_t*c)
1428 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1429 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1430 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1431 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1432 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1433 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1437 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1441 [prefix code] [read instruction]
1445 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1447 if(in && in->opcode == OPCODE_COERCE_A) {
1448 in = code_cutlast(in);
1451 syntaxerror("internal error");
1453 /* chop off read instruction */
1457 prefix = r->prev;r->prev = 0;
1463 char use_temp_var = readbefore;
1465 /* generate the write instruction, and maybe append a dup to the prefix code */
1466 code_t* write = abc_nop(0);
1467 if(r->opcode == OPCODE_GETPROPERTY) {
1468 write->opcode = OPCODE_SETPROPERTY;
1469 multiname_t*m = (multiname_t*)r->data[0];
1470 write->data[0] = multiname_clone(m);
1471 if(m->type == QNAME || m->type == MULTINAME) {
1473 prefix = abc_dup(prefix); // we need the object, too
1476 } else if(m->type == MULTINAMEL) {
1478 /* dupping two values on the stack requires 5 operations and one register-
1479 couldn't adobe just have given us a dup2? */
1480 int temp = gettempvar();
1481 prefix = abc_setlocal(prefix, temp);
1482 prefix = abc_dup(prefix);
1483 prefix = abc_getlocal(prefix, temp);
1484 prefix = abc_swap(prefix);
1485 prefix = abc_getlocal(prefix, temp);
1487 prefix = abc_kill(prefix, temp);
1491 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1493 } else if(r->opcode == OPCODE_GETSLOT) {
1494 write->opcode = OPCODE_SETSLOT;
1495 write->data[0] = r->data[0];
1497 prefix = abc_dup(prefix); // we need the object, too
1500 } else if(r->opcode == OPCODE_GETLOCAL) {
1501 write->opcode = OPCODE_SETLOCAL;
1502 write->data[0] = r->data[0];
1503 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1504 write->opcode = OPCODE_SETLOCAL_0;
1505 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1506 write->opcode = OPCODE_SETLOCAL_1;
1507 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1508 write->opcode = OPCODE_SETLOCAL_2;
1509 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1510 write->opcode = OPCODE_SETLOCAL_3;
1513 syntaxerror("illegal lvalue: can't assign a value to this expression");
1520 /* with getproperty/getslot, we have to be extra careful not
1521 to execute the read code twice, as it might have side-effects
1522 (e.g. if the property is in fact a setter/getter combination)
1524 So read the value, modify it, and write it again,
1525 using prefix only once and making sure (by using a temporary
1526 register) that the return value is what we just wrote */
1527 temp = gettempvar();
1528 c = code_append(c, prefix);
1529 c = code_append(c, r);
1532 c = abc_setlocal(c, temp);
1534 c = code_append(c, middlepart);
1537 c = abc_setlocal(c, temp);
1539 c = code_append(c, write);
1540 c = abc_getlocal(c, temp);
1541 c = abc_kill(c, temp);
1543 /* if we're allowed to execute the read code twice *and*
1544 the middlepart doesn't modify the code, things are easier.
1546 code_t* r2 = code_dup(r);
1547 //c = code_append(c, prefix);
1548 parserassert(!prefix);
1549 c = code_append(c, r);
1550 c = code_append(c, middlepart);
1551 c = code_append(c, write);
1552 c = code_append(c, r2);
1555 /* even smaller version: overwrite the value without reading
1559 c = code_append(c, prefix);
1562 c = code_append(c, middlepart);
1563 c = code_append(c, write);
1564 c = code_append(c, r);
1567 temp = gettempvar();
1569 c = code_append(c, prefix);
1571 c = code_append(c, middlepart);
1573 c = abc_setlocal(c, temp);
1574 c = code_append(c, write);
1575 c = abc_getlocal(c, temp);
1576 c = abc_kill(c, temp);
1582 char is_break_or_jump(code_t*c)
1586 if(c->opcode == OPCODE_JUMP ||
1587 c->opcode == OPCODE___BREAK__ ||
1588 c->opcode == OPCODE___CONTINUE__ ||
1589 c->opcode == OPCODE_THROW ||
1590 c->opcode == OPCODE_RETURNVOID ||
1591 c->opcode == OPCODE_RETURNVALUE) {
1598 #define IS_FINALLY_TARGET(op) \
1599 ((op) == OPCODE___CONTINUE__ || \
1600 (op) == OPCODE___BREAK__ || \
1601 (op) == OPCODE_RETURNVOID || \
1602 (op) == OPCODE_RETURNVALUE || \
1603 (op) == OPCODE___RETHROW__)
1605 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1607 #define NEED_EXTRA_STACK_ARG
1608 code_t*finally_label = abc_nop(0);
1609 NEW(lookupswitch_t, l);
1615 code_t*prev = i->prev;
1616 if(IS_FINALLY_TARGET(i->opcode)) {
1619 if(i->opcode == OPCODE___RETHROW__ ||
1620 i->opcode == OPCODE_RETURNVALUE) {
1621 if(i->opcode == OPCODE___RETHROW__)
1622 i->opcode = OPCODE_THROW;
1624 p = abc_coerce_a(p);
1625 p = abc_setlocal(p, tempvar);
1627 p = abc_pushbyte(p, count++);
1628 p = abc_jump(p, finally_label);
1629 code_t*target = p = abc_label(p);
1630 #ifdef NEED_EXTRA_STACK_ARG
1634 p = abc_getlocal(p, tempvar);
1637 p->next = i;i->prev = p;
1638 list_append(l->targets, target);
1644 c = abc_pushbyte(c, -1);
1645 c = code_append(c, finally_label);
1646 c = code_append(c, finally);
1648 #ifdef NEED_EXTRA_STACK_ARG
1651 c = abc_lookupswitch(c, l);
1652 c = l->def = abc_label(c);
1653 #ifdef NEED_EXTRA_STACK_ARG
1660 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1664 code_t*prev = i->prev;
1665 if(IS_FINALLY_TARGET(i->opcode)) {
1666 if(i->opcode == OPCODE___RETHROW__)
1667 i->opcode = OPCODE_THROW;
1668 code_t*end = code_dup(finally);
1669 code_t*start = code_start(end);
1670 if(prev) prev->next = start;
1677 return code_append(c, finally);
1680 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1686 int num_insertion_points=0;
1688 if(IS_FINALLY_TARGET(i->opcode))
1689 num_insertion_points++;
1696 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1701 int simple_version_cost = (1+num_insertion_points)*code_size;
1702 int lookup_version_cost = 4*num_insertion_points + 5;
1704 if(cantdup || simple_version_cost > lookup_version_cost) {
1705 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1706 return insert_finally_lookup(c, finally, tempvar);
1708 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1709 return insert_finally_simple(c, finally, tempvar);
1713 #define PASS1 }} if(as3_pass == 1) {{
1714 #define PASS1END }} if(as3_pass == 2) {{
1715 #define PASS2 }} if(as3_pass == 2) {{
1716 #define PASS12 }} {{
1717 #define PASS12END }} if(as3_pass == 2) {{
1721 /* Line 273 of skeleton.m4 */
1722 #line 1723 "parser.tab.c"
1729 typedef YYTYPE_UINT8 yytype_uint8;
1731 typedef unsigned char yytype_uint8;
1735 typedef YYTYPE_INT8 yytype_int8;
1736 #elif (defined __STDC__ || defined __C99__FUNC__ \
1737 || defined __cplusplus || defined _MSC_VER)
1738 typedef signed char yytype_int8;
1740 typedef short int yytype_int8;
1743 #ifdef YYTYPE_UINT16
1744 typedef YYTYPE_UINT16 yytype_uint16;
1746 typedef unsigned short int yytype_uint16;
1750 typedef YYTYPE_INT16 yytype_int16;
1752 typedef short int yytype_int16;
1756 # ifdef __SIZE_TYPE__
1757 # define YYSIZE_T __SIZE_TYPE__
1758 # elif defined size_t
1759 # define YYSIZE_T size_t
1760 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1761 || defined __cplusplus || defined _MSC_VER)
1762 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1763 # define YYSIZE_T size_t
1765 # define YYSIZE_T unsigned int
1769 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1774 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1775 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1779 # define YY_(msgid) msgid
1783 /* Suppress unused-variable warnings by "using" E. */
1784 #if ! defined lint || defined __GNUC__
1785 # define YYUSE(e) ((void) (e))
1787 # define YYUSE(e) /* empty */
1790 /* Identity function, used to suppress warnings about constant conditions. */
1792 # define YYID(n) (n)
1794 #if (defined __STDC__ || defined __C99__FUNC__ \
1795 || defined __cplusplus || defined _MSC_VER)
1808 #if ! defined yyoverflow || YYERROR_VERBOSE
1810 /* The parser invokes alloca or malloc; define the necessary symbols. */
1812 # ifdef YYSTACK_USE_ALLOCA
1813 # if YYSTACK_USE_ALLOCA
1815 # define YYSTACK_ALLOC __builtin_alloca
1816 # elif defined __BUILTIN_VA_ARG_INCR
1817 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1819 # define YYSTACK_ALLOC __alloca
1820 # elif defined _MSC_VER
1821 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1822 # define alloca _alloca
1824 # define YYSTACK_ALLOC alloca
1825 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1826 || defined __cplusplus || defined _MSC_VER)
1827 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1829 # define _STDLIB_H 1
1836 # ifdef YYSTACK_ALLOC
1837 /* Pacify GCC's `empty if-body' warning. */
1838 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1839 # ifndef YYSTACK_ALLOC_MAXIMUM
1840 /* The OS might guarantee only one guard page at the bottom of the stack,
1841 and a page size can be as small as 4096 bytes. So we cannot safely
1842 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1843 to allow for a few compiler-allocated temporary stack slots. */
1844 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1847 # define YYSTACK_ALLOC YYMALLOC
1848 # define YYSTACK_FREE YYFREE
1849 # ifndef YYSTACK_ALLOC_MAXIMUM
1850 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1852 # if (defined __cplusplus && ! defined _STDLIB_H \
1853 && ! ((defined YYMALLOC || defined malloc) \
1854 && (defined YYFREE || defined free)))
1855 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1857 # define _STDLIB_H 1
1861 # define YYMALLOC malloc
1862 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1863 || defined __cplusplus || defined _MSC_VER)
1864 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1868 # define YYFREE free
1869 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1870 || defined __cplusplus || defined _MSC_VER)
1871 void free (void *); /* INFRINGES ON USER NAME SPACE */
1875 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1878 #if (! defined yyoverflow \
1879 && (! defined __cplusplus \
1880 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1882 /* A type that is properly aligned for any stack member. */
1885 yytype_int16 yyss_alloc;
1889 /* The size of the maximum gap between one aligned stack and the next. */
1890 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1892 /* The size of an array large to enough to hold all stacks, each with
1894 # define YYSTACK_BYTES(N) \
1895 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1896 + YYSTACK_GAP_MAXIMUM)
1898 /* Copy COUNT objects from FROM to TO. The source and destination do
1901 # if defined __GNUC__ && 1 < __GNUC__
1902 # define YYCOPY(To, From, Count) \
1903 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1905 # define YYCOPY(To, From, Count) \
1909 for (yyi = 0; yyi < (Count); yyi++) \
1910 (To)[yyi] = (From)[yyi]; \
1916 /* Relocate STACK from its old location to the new one. The
1917 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1918 elements in the stack, and YYPTR gives the new location of the
1919 stack. Advance YYPTR to a properly aligned location for the next
1921 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1924 YYSIZE_T yynewbytes; \
1925 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1926 Stack = &yyptr->Stack_alloc; \
1927 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1928 yyptr += yynewbytes / sizeof (*yyptr); \
1934 /* YYFINAL -- State number of the termination state. */
1936 /* YYLAST -- Last index in YYTABLE. */
1939 /* YYNTOKENS -- Number of terminals. */
1940 #define YYNTOKENS 133
1941 /* YYNNTS -- Number of nonterminals. */
1943 /* YYNRULES -- Number of rules. */
1944 #define YYNRULES 301
1945 /* YYNRULES -- Number of states. */
1946 #define YYNSTATES 512
1948 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1949 #define YYUNDEFTOK 2
1950 #define YYMAXUTOK 362
1952 #define YYTRANSLATE(YYX) \
1953 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1955 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1956 static const yytype_uint8 yytranslate[] =
1958 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1959 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1960 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1961 2, 2, 2, 117, 2, 2, 2, 115, 107, 2,
1962 121, 132, 114, 112, 98, 111, 126, 113, 2, 2,
1963 2, 2, 2, 2, 2, 2, 2, 2, 104, 97,
1964 108, 100, 109, 103, 127, 2, 2, 2, 2, 2,
1965 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1966 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1967 2, 123, 2, 124, 106, 2, 2, 2, 2, 2,
1968 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1969 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1970 2, 2, 2, 125, 105, 131, 116, 2, 2, 2,
1971 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1972 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1973 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1974 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1975 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1976 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1977 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1978 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1979 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1980 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1981 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1982 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1983 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1984 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1985 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1986 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1987 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1988 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1989 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1990 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1991 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1992 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1993 95, 96, 99, 101, 102, 110, 118, 119, 120, 122,
1998 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2000 static const yytype_uint16 yyprhs[] =
2002 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2003 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2004 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2005 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2006 85, 87, 89, 91, 93, 95, 97, 99, 101, 106,
2007 108, 112, 115, 118, 120, 122, 126, 129, 130, 133,
2008 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2009 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2010 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2011 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2012 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2013 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2014 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2015 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2016 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2017 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2018 442, 448, 449, 452, 454, 456, 458, 460, 462, 464,
2019 466, 468, 470, 471, 473, 476, 481, 485, 487, 492,
2020 495, 497, 499, 500, 501, 514, 516, 517, 518, 529,
2021 531, 535, 537, 539, 541, 545, 547, 549, 551, 554,
2022 555, 556, 560, 561, 563, 565, 567, 570, 573, 574,
2023 579, 584, 589, 592, 594, 597, 599, 601, 605, 607,
2024 609, 611, 613, 615, 617, 619, 621, 623, 625, 627,
2025 629, 631, 633, 635, 637, 639, 641, 645, 649, 653,
2026 657, 661, 665, 669, 673, 677, 681, 684, 687, 691,
2027 695, 699, 703, 707, 711, 715, 719, 723, 727, 731,
2028 735, 739, 743, 747, 752, 755, 757, 761, 764, 769,
2029 773, 774, 776, 780, 786, 790, 794, 798, 802, 806,
2030 810, 814, 818, 822, 826, 830, 836, 839, 842, 845,
2031 848, 852, 855, 860, 866, 870, 876, 880, 882, 886,
2035 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2036 static const yytype_int16 yyrhs[] =
2038 134, 0, -1, 135, -1, -1, 136, -1, 137, -1,
2039 136, 137, -1, 184, -1, 196, -1, 194, -1, 212,
2040 -1, 205, -1, 146, -1, 147, 125, 135, 131, -1,
2041 97, -1, -1, 139, -1, 140, -1, 139, 140, -1,
2042 196, -1, 194, -1, 212, -1, 205, -1, 146, -1,
2043 147, 125, 138, 131, -1, 97, -1, 142, -1, -1,
2044 142, 144, -1, 144, -1, 187, -1, 158, -1, 159,
2045 -1, 160, -1, 162, -1, 170, -1, 153, -1, 181,
2046 -1, 178, -1, 234, -1, 241, -1, 97, -1, 143,
2047 -1, 149, -1, 164, -1, 165, -1, 231, -1, 180,
2048 -1, 147, 125, 142, 131, -1, 240, -1, 125, 142,
2049 131, -1, 125, 131, -1, 144, 97, -1, 144, -1,
2050 143, -1, 3, 87, 3, -1, 100, 232, -1, -1,
2051 46, 150, -1, 32, 150, -1, 151, -1, 150, 98,
2052 151, -1, 3, 222, 148, -1, -1, 65, 145, -1,
2053 -1, 64, 121, 154, 233, 132, 145, 152, -1, -1,
2054 149, -1, 234, -1, 46, 3, 222, -1, 3, -1,
2055 13, 121, -1, 13, 50, 121, -1, 157, 155, 97,
2056 233, 97, 234, 132, 145, -1, 157, 156, 68, 233,
2057 132, 145, -1, -1, 14, 121, 161, 233, 132, 145,
2058 -1, -1, 15, 163, 145, 14, 121, 233, 132, -1,
2059 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2060 -1, 167, -1, 169, -1, 167, 169, -1, 168, -1,
2061 167, 168, -1, 34, 235, 104, 141, -1, 62, 104,
2062 141, -1, -1, 16, 121, 171, 235, 132, 125, 166,
2063 131, -1, -1, 33, 121, 3, 222, 132, 173, 125,
2064 141, 131, -1, -1, 28, 125, 175, 141, 131, -1,
2065 172, -1, 176, 172, -1, 176, -1, 176, 174, -1,
2066 174, -1, -1, 52, 125, 179, 141, 131, 177, -1,
2067 37, 233, -1, 37, -1, 39, 121, 233, 132, 145,
2068 -1, 3, -1, 19, -1, 183, 126, 182, -1, 182,
2069 -1, -1, 19, 183, 125, 185, 138, 131, -1, -1,
2070 19, 125, 186, 138, 131, -1, 41, 218, -1, 41,
2071 183, 126, 114, -1, -1, 189, -1, 190, -1, 189,
2072 190, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2073 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2074 4, -1, -1, 54, 219, -1, -1, 54, 220, -1,
2075 -1, 17, 220, -1, -1, 188, 31, 3, 191, 193,
2076 125, 195, 198, 131, -1, -1, 188, 44, 3, 192,
2077 125, 197, 201, 131, -1, -1, 199, -1, 200, -1,
2078 199, 200, -1, 97, -1, 147, 125, 198, 131, -1,
2079 205, -1, 212, -1, 143, -1, -1, 202, -1, 203,
2080 -1, 202, 203, -1, 97, -1, 46, 3, -1, 188,
2081 27, 211, 3, 121, 208, 132, 222, -1, 46, -1,
2082 32, -1, 188, 204, 3, 222, 148, -1, -1, 100,
2083 207, -1, 10, -1, 8, -1, 9, -1, 12, -1,
2084 5, -1, 56, -1, 55, -1, 45, -1, 3, -1,
2085 -1, 209, -1, 91, 210, -1, 209, 98, 91, 210,
2086 -1, 209, 98, 210, -1, 210, -1, 3, 104, 221,
2087 206, -1, 3, 206, -1, 51, -1, 35, -1, -1,
2088 -1, 188, 27, 211, 3, 121, 208, 132, 222, 125,
2089 213, 141, 131, -1, 3, -1, -1, -1, 27, 214,
2090 121, 208, 132, 222, 125, 216, 141, 131, -1, 3,
2091 -1, 183, 126, 3, -1, 218, -1, 217, -1, 219,
2092 -1, 220, 98, 219, -1, 219, -1, 114, -1, 36,
2093 -1, 104, 221, -1, -1, -1, 121, 224, 132, -1,
2094 -1, 225, -1, 226, -1, 232, -1, 225, 98, -1,
2095 226, 232, -1, -1, 25, 235, 227, 223, -1, 235,
2096 121, 224, 132, -1, 53, 121, 224, 132, -1, 63,
2097 235, -1, 42, -1, 42, 233, -1, 235, -1, 235,
2098 -1, 233, 98, 235, -1, 233, -1, 215, -1, 236,
2099 -1, 239, -1, 228, -1, 230, -1, 229, -1, 6,
2100 -1, 10, -1, 11, -1, 8, -1, 9, -1, 12,
2101 -1, 5, -1, 29, -1, 56, -1, 55, -1, 45,
2102 -1, 235, 108, 235, -1, 235, 109, 235, -1, 235,
2103 74, 235, -1, 235, 75, 235, -1, 235, 70, 235,
2104 -1, 235, 71, 235, -1, 235, 73, 235, -1, 235,
2105 72, 235, -1, 235, 85, 235, -1, 235, 86, 235,
2106 -1, 117, 235, -1, 116, 235, -1, 235, 107, 235,
2107 -1, 235, 106, 235, -1, 235, 105, 235, -1, 235,
2108 94, 235, -1, 235, 93, 235, -1, 235, 92, 235,
2109 -1, 235, 113, 235, -1, 235, 115, 235, -1, 235,
2110 112, 235, -1, 235, 111, 235, -1, 235, 114, 235,
2111 -1, 235, 68, 235, -1, 235, 69, 235, -1, 235,
2112 40, 235, -1, 235, 67, 235, -1, 43, 121, 235,
2113 132, -1, 36, 235, -1, 36, -1, 121, 233, 132,
2114 -1, 111, 235, -1, 235, 123, 235, 124, -1, 123,
2115 224, 124, -1, -1, 238, -1, 232, 104, 232, -1,
2116 238, 98, 232, 104, 232, -1, 125, 237, 131, -1,
2117 235, 79, 235, -1, 235, 78, 235, -1, 235, 83,
2118 235, -1, 235, 82, 235, -1, 235, 84, 235, -1,
2119 235, 77, 235, -1, 235, 76, 235, -1, 235, 80,
2120 235, -1, 235, 81, 235, -1, 235, 100, 235, -1,
2121 235, 103, 235, 104, 235, -1, 235, 89, -1, 235,
2122 88, -1, 89, 235, -1, 88, 235, -1, 53, 126,
2123 3, -1, 127, 3, -1, 235, 126, 127, 3, -1,
2124 235, 126, 3, 87, 3, -1, 235, 90, 3, -1,
2125 235, 126, 121, 235, 132, -1, 235, 126, 3, -1,
2126 3, -1, 188, 18, 3, -1, 188, 18, 3, 100,
2127 3, -1, 188, 18, 3, 100, 5, -1, 23, 18,
2131 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2132 static const yytype_uint16 yyrline[] =
2134 0, 1698, 1698, 1700, 1700, 1701, 1702, 1704, 1705, 1706,
2135 1707, 1708, 1709, 1710, 1711, 1713, 1713, 1714, 1715, 1717,
2136 1718, 1719, 1720, 1721, 1722, 1723, 1725, 1726, 1728, 1729,
2137 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741,
2138 1742, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1754,
2139 1756, 1757, 1758, 1759, 1763, 1770, 1774, 1775, 1779, 1780,
2140 1782, 1783, 1785, 1828, 1829, 1832, 1832, 1851, 1852, 1853,
2141 1856, 1859, 1863, 1864, 1866, 1886, 1929, 1929, 1948, 1948,
2142 1963, 1966, 1969, 1972, 1976, 1977, 1978, 1979, 1980, 1981,
2143 1983, 1994, 1997, 1997, 2026, 2026, 2046, 2046, 2063, 2064,
2144 2065, 2066, 2074, 2083, 2083, 2128, 2132, 2143, 2152, 2153,
2145 2155, 2156, 2158, 2158, 2160, 2160, 2163, 2177, 2193, 2194,
2146 2195, 2196, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205,
2147 2206, 2207, 2209, 2210, 2212, 2213, 2215, 2216, 2220, 2218,
2148 2226, 2224, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239,
2149 2241, 2247, 2248, 2249, 2250, 2251, 2252, 2255, 2268, 2268,
2150 2270, 2343, 2344, 2346, 2347, 2348, 2349, 2350, 2352, 2353,
2151 2354, 2355, 2364, 2368, 2374, 2380, 2388, 2393, 2399, 2407,
2152 2415, 2416, 2417, 2420, 2419, 2434, 2435, 2437, 2436, 2458,
2153 2467, 2480, 2481, 2483, 2484, 2486, 2487, 2488, 2497, 2498,
2154 2502, 2503, 2505, 2506, 2507, 2509, 2513, 2514, 2519, 2520,
2155 2556, 2602, 2623, 2644, 2647, 2654, 2655, 2656, 2662, 2668,
2156 2670, 2672, 2674, 2676, 2678, 2680, 2697, 2702, 2705, 2708,
2157 2711, 2714, 2717, 2720, 2723, 2726, 2730, 2733, 2736, 2739,
2158 2742, 2745, 2748, 2751, 2755, 2766, 2784, 2789, 2794, 2799,
2159 2804, 2809, 2813, 2817, 2822, 2826, 2830, 2839, 2848, 2858,
2160 2863, 2875, 2881, 2886, 2892, 2898, 2902, 2904, 2915, 2924,
2161 2931, 2932, 2934, 2940, 2949, 2956, 2968, 2974, 2980, 2986,
2162 2992, 2998, 3004, 3017, 3028, 3035, 3048, 3075, 3089, 3103,
2163 3117, 3132, 3139, 3146, 3153, 3160, 3171, 3205, 3307, 3308,
2168 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2169 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2170 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2171 static const char *const yytname[] =
2173 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2174 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2175 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2176 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2177 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2178 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2179 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2180 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2181 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2182 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2183 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2184 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2185 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2186 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2187 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
2188 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
2189 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2190 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2191 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2192 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2193 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2194 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2195 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2196 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2197 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2198 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2199 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2200 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2201 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2202 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2203 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2204 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2205 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2206 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2207 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2208 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2209 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2210 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2211 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "MAYBESTATICCONSTANT",
2212 "STATICCONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2213 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2214 "$@13", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2215 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2216 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2217 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2218 "VOIDEXPRESSION", "E", "CONSTANT", "MAYBE_EXPRPAIR_LIST",
2219 "EXPRPAIR_LIST", "VAR_READ", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2224 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2226 static const yytype_uint16 yytoknum[] =
2228 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2229 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2230 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2231 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2232 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2233 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2234 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2235 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2236 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2237 345, 346, 347, 348, 349, 350, 351, 59, 44, 352,
2238 61, 353, 354, 63, 58, 124, 94, 38, 60, 62,
2239 355, 45, 43, 47, 42, 37, 126, 33, 356, 357,
2240 358, 40, 359, 91, 93, 123, 46, 64, 360, 361,
2245 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2246 static const yytype_uint8 yyr1[] =
2248 0, 133, 134, 135, 135, 136, 136, 137, 137, 137,
2249 137, 137, 137, 137, 137, 138, 138, 139, 139, 140,
2250 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
2251 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
2252 143, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2253 145, 145, 145, 145, 146, 147, 148, 148, 149, 149,
2254 150, 150, 151, 152, 152, 154, 153, 155, 155, 155,
2255 156, 156, 157, 157, 158, 159, 161, 160, 163, 162,
2256 164, 164, 165, 165, 166, 166, 166, 166, 167, 167,
2257 168, 169, 171, 170, 173, 172, 175, 174, 176, 176,
2258 177, 177, 177, 179, 178, 180, 180, 181, 182, 182,
2259 183, 183, 185, 184, 186, 184, 187, 187, 188, 188,
2260 189, 189, 190, 190, 190, 190, 190, 190, 190, 190,
2261 190, 190, 191, 191, 192, 192, 193, 193, 195, 194,
2262 197, 196, 198, 198, 199, 199, 200, 200, 200, 200,
2263 200, 201, 201, 202, 202, 203, 203, 203, 204, 204,
2264 205, 206, 206, 207, 207, 207, 207, 207, 207, 207,
2265 207, 207, 208, 208, 208, 208, 209, 209, 210, 210,
2266 211, 211, 211, 213, 212, 214, 214, 216, 215, 217,
2267 218, 219, 219, 220, 220, 221, 221, 221, 222, 222,
2268 223, 223, 224, 224, 224, 225, 226, 225, 227, 228,
2269 229, 229, 230, 231, 231, 232, 233, 233, 234, 235,
2270 235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
2271 236, 236, 236, 236, 236, 236, 235, 235, 235, 235,
2272 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
2273 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
2274 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
2275 237, 237, 238, 238, 235, 235, 235, 235, 235, 235,
2276 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
2277 235, 235, 235, 235, 235, 235, 235, 239, 240, 240,
2281 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2282 static const yytype_uint8 yyr2[] =
2284 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2285 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2286 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2287 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2288 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
2289 3, 2, 2, 1, 1, 3, 2, 0, 2, 2,
2290 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2291 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2292 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2293 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2294 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2295 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2296 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2297 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2298 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2299 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2300 5, 0, 2, 1, 1, 1, 1, 1, 1, 1,
2301 1, 1, 0, 1, 2, 4, 3, 1, 4, 2,
2302 1, 1, 0, 0, 12, 1, 0, 0, 10, 1,
2303 3, 1, 1, 1, 3, 1, 1, 1, 2, 0,
2304 0, 3, 0, 1, 1, 1, 2, 2, 0, 4,
2305 4, 4, 2, 1, 2, 1, 1, 3, 1, 1,
2306 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2307 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
2308 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
2309 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2310 3, 3, 3, 4, 2, 1, 3, 2, 4, 3,
2311 0, 1, 3, 5, 3, 3, 3, 3, 3, 3,
2312 3, 3, 3, 3, 3, 5, 2, 2, 2, 2,
2313 3, 2, 4, 5, 3, 5, 3, 1, 3, 5,
2317 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2318 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2319 means the default is an error. */
2320 static const yytype_uint16 yydefact[] =
2322 118, 297, 131, 231, 225, 228, 229, 226, 227, 230,
2323 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2324 0, 129, 186, 232, 265, 125, 0, 0, 0, 235,
2325 126, 128, 127, 0, 0, 234, 233, 0, 0, 0,
2326 0, 14, 0, 0, 0, 0, 202, 270, 0, 0,
2327 2, 118, 5, 54, 12, 0, 36, 67, 31, 32,
2328 33, 34, 35, 38, 37, 7, 30, 0, 119, 120,
2329 9, 8, 11, 10, 219, 222, 224, 223, 218, 39,
2330 216, 220, 221, 40, 0, 0, 72, 76, 118, 92,
2331 108, 109, 114, 111, 0, 0, 297, 208, 185, 0,
2332 264, 0, 0, 116, 0, 103, 202, 0, 212, 65,
2333 289, 288, 267, 247, 246, 0, 0, 203, 204, 205,
2334 215, 0, 0, 271, 291, 1, 6, 118, 297, 0,
2335 0, 68, 0, 0, 69, 182, 0, 159, 0, 158,
2336 0, 121, 0, 0, 0, 0, 0, 0, 0, 0,
2337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2338 0, 0, 0, 0, 287, 286, 0, 0, 0, 0,
2339 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2340 0, 0, 202, 0, 0, 55, 73, 0, 82, 106,
2341 213, 0, 80, 41, 118, 42, 53, 0, 0, 43,
2342 44, 45, 47, 0, 46, 49, 0, 118, 112, 0,
2343 301, 200, 172, 0, 0, 0, 27, 0, 290, 0,
2344 266, 269, 206, 207, 0, 274, 0, 0, 199, 59,
2345 60, 199, 58, 0, 0, 181, 180, 0, 132, 134,
2346 199, 217, 261, 262, 259, 260, 240, 241, 243, 242,
2347 238, 239, 281, 280, 276, 275, 282, 283, 278, 277,
2348 279, 244, 245, 294, 253, 252, 251, 284, 0, 250,
2349 249, 248, 236, 237, 257, 256, 254, 258, 255, 0,
2350 0, 296, 0, 0, 0, 83, 105, 214, 81, 51,
2351 118, 29, 216, 52, 0, 118, 0, 0, 25, 0,
2352 118, 17, 23, 0, 20, 19, 22, 21, 118, 110,
2353 202, 209, 161, 0, 0, 173, 177, 118, 190, 117,
2354 263, 0, 26, 211, 0, 272, 0, 13, 0, 57,
2355 0, 57, 0, 0, 0, 0, 136, 0, 0, 57,
2356 0, 210, 268, 0, 0, 292, 118, 50, 28, 0,
2357 118, 298, 0, 115, 18, 118, 0, 0, 0, 0,
2358 179, 174, 199, 0, 107, 0, 118, 0, 189, 197,
2359 196, 0, 192, 191, 195, 198, 0, 62, 61, 0,
2360 118, 172, 133, 0, 0, 193, 135, 140, 160, 285,
2361 293, 295, 77, 0, 48, 0, 84, 0, 113, 201,
2362 171, 167, 164, 165, 163, 166, 170, 169, 168, 162,
2363 161, 0, 0, 176, 0, 0, 98, 102, 100, 104,
2364 63, 273, 0, 56, 0, 75, 0, 137, 138, 0,
2365 118, 79, 299, 300, 0, 0, 0, 85, 88, 86,
2366 24, 178, 187, 175, 96, 0, 99, 101, 118, 66,
2367 118, 199, 118, 194, 0, 155, 0, 0, 118, 153,
2368 0, 27, 93, 89, 87, 27, 27, 199, 64, 74,
2369 0, 146, 150, 0, 0, 0, 118, 144, 148, 149,
2370 156, 182, 141, 154, 27, 91, 0, 0, 0, 183,
2371 118, 139, 145, 0, 90, 188, 97, 94, 27, 0,
2372 0, 0, 0, 147, 172, 27, 184, 0, 0, 199,
2376 /* YYDEFGOTO[NTERM-NUM]. */
2377 static const yytype_int16 yydefgoto[] =
2379 -1, 49, 50, 51, 52, 299, 300, 301, 321, 322,
2380 195, 291, 197, 302, 198, 377, 199, 232, 230, 449,
2381 56, 219, 132, 133, 57, 58, 59, 60, 187, 61,
2382 88, 200, 201, 436, 437, 438, 439, 62, 206, 416,
2383 501, 417, 466, 418, 419, 63, 216, 202, 64, 93,
2384 371, 65, 308, 207, 66, 203, 68, 69, 336, 338,
2385 384, 304, 452, 305, 430, 475, 476, 477, 457, 458,
2386 459, 140, 306, 360, 409, 314, 315, 316, 237, 307,
2387 498, 99, 74, 465, 372, 373, 374, 386, 375, 329,
2388 311, 116, 117, 118, 211, 75, 76, 77, 204, 119,
2389 78, 79, 80, 81, 122, 123, 82, 205, 83
2392 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2394 #define YYPACT_NINF -348
2395 static const yytype_int16 yypact[] =
2397 1656, -44, -348, -348, -348, -348, -348, -348, -348, -348,
2398 -31, -41, -348, -30, 7, -348, -348, -348, 82, -348,
2399 2221, -348, 100, -348, 336, -348, -1, 19, 13, -348,
2400 -348, -348, -348, -2, -77, -348, -348, 2221, 38, 2221,
2401 2221, -348, 2221, 2221, 2221, 2221, 2221, 2221, 179, 196,
2402 -348, 495, -348, -348, -348, 78, -348, 2128, -348, -348,
2403 -348, -348, -348, -348, -348, -348, -348, 166, 240, -348,
2404 -348, -348, -348, -348, -348, -348, -348, -348, 115, -348,
2405 2736, -348, -348, -348, 213, 102, -348, -348, 1906, -348,
2406 -348, -348, -348, -348, -102, 222, -348, -4, -348, 109,
2407 -25, 2221, 110, -348, 2221, -348, 2221, 237, -25, -348,
2408 -25, -25, 305, -25, -25, -56, 118, 145, 2221, -348,
2409 2736, 141, 116, 150, -348, -348, -348, 1011, 181, 247,
2410 248, -348, 155, 190, -348, -10, 253, -348, 260, -348,
2411 262, -348, 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
2412 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
2413 2221, 2221, 2221, 2221, -348, -348, 266, 2221, 2221, 2221,
2414 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
2415 2221, 2221, 2221, 2221, 64, -348, -348, 2221, 273, 2221,
2416 2221, 247, 281, -348, 624, -348, 189, 271, 167, -348,
2417 -348, -348, -348, 275, -348, -348, 2221, 1140, -348, 19,
2418 -348, 173, 24, -38, 66, 2282, 1781, 163, -348, 2221,
2419 -348, -348, -348, -348, 2221, -348, 2221, 165, 193, 200,
2420 -348, 193, 200, 2221, 2221, -348, -348, 296, 252, 259,
2421 193, 2736, 998, 487, 487, 487, 3097, 3097, 3097, 3097,
2422 998, 998, 2736, 2736, 2736, 2736, 2736, 2736, 2736, 2736,
2423 2736, 2797, 2857, -348, 287, 287, 287, 2736, 2492, 2917,
2424 2977, 3037, 998, 998, 305, 305, -25, -25, -25, 175,
2425 2553, 227, 2221, 312, -28, -348, 115, 115, -348, -348,
2426 753, -348, 2614, -348, 195, 2031, 314, 2352, -348, 187,
2427 1269, -348, -348, 194, -348, -348, -348, -348, 1140, -348,
2428 2221, -348, 131, 317, 191, 223, -348, 1906, 198, -348,
2429 -348, 197, 1781, -348, -27, -348, 218, -348, 12, 226,
2430 247, -39, 135, -14, 208, 89, 315, 89, 209, 226,
2431 2221, -348, -348, 332, 2422, -348, 1906, -348, -348, 2221,
2432 882, 236, 212, -348, -348, 1140, 207, 211, 69, 12,
2433 -348, -348, 193, 25, -348, 60, 1906, 2221, 198, -348,
2434 -348, 224, -348, -348, -348, -348, 2221, -348, -348, 2221,
2435 1906, 24, -348, 89, 228, -348, 251, -348, -348, 2736,
2436 -348, -348, -348, -11, -348, 178, 11, 220, -348, -348,
2437 -348, -348, -348, -348, -348, -348, -348, -348, -348, -348,
2438 258, 234, 317, -348, 241, 231, -348, -348, 60, -348,
2439 297, -348, 202, -348, 235, -348, 238, 251, -348, 89,
2440 180, -348, -348, -348, 2221, 264, 242, 11, -348, -348,
2441 -348, -348, -348, -348, -348, 368, -348, -348, 1906, -348,
2442 1906, 193, 1398, -348, 375, -348, 352, 249, 233, -348,
2443 2675, 1781, -348, -348, -348, 1781, 1781, 193, -348, -348,
2444 257, -348, -348, 261, 188, 254, 1527, -348, -348, -348,
2445 -348, -10, -348, -348, 1781, -348, 256, 265, 272, -348,
2446 1398, -348, -348, 380, -348, -348, -348, -348, 1781, 274,
2447 263, 278, 276, -348, 24, 1781, -348, 277, 280, 193,
2451 /* YYPGOTO[NTERM-NUM]. */
2452 static const yytype_int16 yypgoto[] =
2454 -348, -348, 270, -348, 337, -287, -348, 90, -193, -178,
2455 1, -76, -271, 6, 2, 67, 355, 285, 85, -348,
2456 -348, -348, -348, -348, -348, -348, -348, -348, -348, -348,
2457 -348, -348, -348, -348, -348, -21, -20, -348, -348, 14,
2458 -348, 15, -348, -348, -348, -348, -348, -348, -348, -200,
2459 75, -348, -348, -348, -348, 0, -348, 353, -348, -348,
2460 -348, 59, -348, 62, -348, -68, -348, -53, -348, -348,
2461 -29, -348, 3, 26, -348, -347, -348, -305, -47, 4,
2462 -348, -348, -348, -348, -348, 408, -317, 54, 79, -184,
2463 -348, -99, -348, -348, -348, -348, -348, -348, -348, -36,
2464 5, -52, -7, -348, -348, -348, -348, -348, -348
2467 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2468 positive, shift that token. If negative, reduce the rule which
2469 number is the opposite. If zero, do what YYDEFACT says.
2470 If YYTABLE_NINF, syntax error. */
2471 #define YYTABLE_NINF -216
2472 static const yytype_int16 yytable[] =
2474 67, 53, 55, 72, 73, 134, 54, 217, 361, 309,
2475 90, 121, 196, 97, 309, 368, 290, 100, 382, 85,
2476 385, 356, 90, 208, 209, 235, 91, 312, 312, -70,
2477 108, 91, 110, 111, 426, 112, 113, 114, 91, 120,
2478 120, 236, 142, 84, 106, 434, 364, 331, 369, 107,
2479 115, 67, 53, 55, 72, 73, 339, 54, 413, 70,
2480 142, 376, 71, 164, 165, 166, 385, 281, 397, 318,
2481 142, 142, 400, 435, 401, 392, 220, 402, 403, 404,
2482 87, 405, 223, 279, 142, 91, 166, 142, 414, 94,
2483 86, 89, 368, 415, 317, 420, 182, 215, 183, 120,
2484 95, 184, 102, 98, 346, 366, 213, 443, 91, 425,
2485 70, 120, 453, 71, 406, 313, 412, 350, 380, 183,
2486 101, 431, 184, 105, 407, 408, 370, 67, 53, 55,
2487 72, 73, 92, 54, 104, 241, 242, 243, 244, 245,
2488 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
2489 256, 257, 258, 259, 260, 261, 262, 507, 121, 109,
2490 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
2491 274, 275, 276, 277, 278, 120, 280, 468, 411, 469,
2492 319, 432, 124, 433, 2, 282, 70, 292, 325, 71,
2493 326, 283, 284, 135, 286, 287, 125, 136, 137, 297,
2494 15, 16, 17, 127, 19, 318, 21, 67, 53, 303,
2495 138, 357, 139, 142, 348, 135, 185, 120, 25, 120,
2496 137, 91, 309, 186, 324, 210, 454, 30, 31, 32,
2497 212, 358, 379, 142, 139, 359, 214, 2, 332, 333,
2498 218, 196, 221, 222, 2, 224, 348, 225, 226, -71,
2499 228, 231, 233, 15, 16, 17, 238, 19, 234, 21,
2500 15, 16, 17, 239, 19, 240, 21, 470, 485, 263,
2501 196, 25, 486, 487, 348, 344, 285, 455, 25, 454,
2502 30, 31, 32, 488, 288, 294, 293, 30, 31, 32,
2503 196, 494, 295, 296, 310, 323, 327, 328, 330, 334,
2504 67, 53, 303, 120, 196, 502, 335, 341, 67, 53,
2505 303, -151, 508, 337, 343, 345, 349, 351, 353, 355,
2506 312, 363, 367, 362, -108, 511, 376, 424, 365, 381,
2507 455, 421, 383, 389, 387, 390, 395, 396, 398, 96,
2508 423, 3, 4, 399, 5, 6, 7, 8, 9, 429,
2509 422, 440, 445, 428, 393, 67, 53, 303, 358, 442,
2510 120, 20, 448, 22, -152, 23, 444, 450, 461, 120,
2511 451, 467, 196, 462, 196, 164, 165, 166, 480, 481,
2512 482, 29, 489, 500, 504, 491, 490, 495, 126, 34,
2513 354, 35, 36, 164, 165, 166, 496, 227, 177, 178,
2514 179, 180, 181, 505, 497, 503, 388, 506, 182, 509,
2515 183, 510, 131, 184, 229, 378, 463, 464, 179, 180,
2516 181, 141, 499, 492, 39, 40, 182, 460, 183, 483,
2517 456, 184, 446, 447, 493, 103, 441, 427, 410, 0,
2518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2519 0, 0, 474, 472, 473, 478, 479, 45, 456, 46,
2520 0, 47, 0, 48, 0, 0, 0, 0, 0, 0,
2521 0, 0, 0, 0, 0, 0, 474, 472, 473, 478,
2522 479, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2523 474, 472, 473, 478, 479, -4, 0, 0, 1, 2,
2524 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
2525 12, 13, 0, 0, 14, 15, 16, 17, 18, 19,
2526 20, 21, 0, 0, 23, 0, 0, 143, 0, 0,
2527 0, 24, 0, 25, 26, 0, 27, 0, 28, 0,
2528 29, 0, 30, 31, 32, 0, 0, 33, 34, 0,
2529 35, 36, 0, 0, -216, -216, -216, 0, 37, 38,
2530 0, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2531 0, 0, 0, 0, 0, 164, 165, 166, 0, 167,
2532 168, 169, 0, 39, 40, 0, 0, 0, 0, 0,
2533 0, 0, 41, 0, 0, 175, 176, 0, 177, 178,
2534 179, 180, 181, 0, 0, 0, 42, 0, 182, 0,
2535 183, 43, 44, 184, 0, 0, 45, 0, 46, 0,
2536 47, 0, 48, 0, 0, 0, -4, 1, 2, 3,
2537 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2538 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2539 21, 22, 0, 23, 188, 0, 129, 0, 0, 0,
2540 24, 189, 25, 26, 0, 27, 190, 28, 0, 29,
2541 191, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2542 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2543 192, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2545 0, 0, 39, 40, 0, 0, 0, 0, 0, 0,
2546 0, 193, 0, 0, 0, 0, 0, 0, 0, 0,
2547 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
2548 43, 44, 0, 0, 0, 45, 0, 46, 0, 47,
2549 0, 48, 0, 0, 0, 289, 1, 2, 3, 4,
2550 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2551 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2552 22, 0, 23, 188, 0, 129, 0, 0, 0, 24,
2553 189, 25, 26, 0, 27, 190, 28, 0, 29, 191,
2554 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2555 0, 0, 0, 0, 0, 0, 37, 38, 0, 192,
2556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2557 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2558 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2559 193, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2560 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
2561 44, 0, 0, 0, 45, 0, 46, 0, 47, 0,
2562 48, 0, 0, 0, 347, 1, 2, 3, 4, 0,
2563 5, 6, 7, 8, 9, 10, 11, 12, 13, 0,
2564 0, 0, 15, 16, 17, 18, 19, 20, 21, 22,
2565 0, 23, 188, 0, 129, 0, 0, 0, 24, 189,
2566 25, 26, 0, 27, 190, 28, 0, 29, 191, 30,
2567 31, 32, 0, 0, 33, 34, 0, 35, 36, 0,
2568 0, 0, 0, 0, 0, 37, 38, 0, 192, 0,
2569 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2571 39, 40, 0, 0, 0, 0, 0, 0, 0, 193,
2572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2573 0, 0, 0, 42, 0, 0, 0, 0, 43, 44,
2574 0, 0, 0, 45, 0, 46, 0, 47, 0, 48,
2575 0, 0, 0, 394, 1, 2, 3, 4, 0, 5,
2576 6, 7, 8, 9, 10, 11, 12, 13, 0, 0,
2577 14, 15, 16, 17, 18, 19, 20, 21, -216, 0,
2578 23, 0, 0, 0, 0, 0, 0, 24, 0, 25,
2579 26, 0, 27, 0, 28, 0, 29, 0, 30, 31,
2580 32, 0, 0, 33, 34, 0, 35, 36, 0, 0,
2581 0, 0, -216, -216, 37, 38, 0, 0, 0, 0,
2582 0, 0, 0, 0, 0, 0, 164, 165, 166, 0,
2583 167, 168, 169, 0, 0, 0, 0, 0, 0, 39,
2584 40, 0, 0, 0, 0, 0, -216, -216, 41, 177,
2585 178, 179, 180, 181, 0, 0, 0, 0, 0, 182,
2586 0, 183, 42, 0, 184, 0, 0, 43, 44, 0,
2587 0, 0, 45, 0, 46, 0, 47, 0, 48, 0,
2588 0, 0, -3, 1, 2, 3, 4, 0, 5, 6,
2589 7, 8, 9, 10, 11, 12, 13, 0, 0, 0,
2590 15, 16, 17, 18, 19, 20, 21, 0, 0, 23,
2591 0, 0, 0, 0, 0, 0, 24, 0, 25, 26,
2592 0, 27, 0, 28, 0, 29, 0, 30, 31, 32,
2593 0, 0, 33, 34, 0, 35, 36, 0, 0, 0,
2594 0, 0, 0, 37, 38, 0, 0, 0, 0, 0,
2595 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2596 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2597 0, 0, 0, 0, 0, 0, 0, 298, 0, 0,
2598 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2599 0, 42, 0, 0, 0, 0, 43, 44, 0, 0,
2600 0, 45, 0, 46, 0, 47, 0, 48, 0, 0,
2601 0, -15, 1, 2, 3, 4, 0, 5, 6, 7,
2602 8, 9, 10, 11, 12, 13, 0, 0, 0, 15,
2603 16, 17, 18, 19, 20, 21, 0, 0, 23, 0,
2604 0, 0, 0, 0, 0, 24, 0, 25, 26, 0,
2605 27, 0, 28, 0, 29, 0, 30, 31, 32, 0,
2606 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
2607 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2608 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2609 0, 0, 0, 0, 0, 0, 0, 39, 40, 0,
2610 0, 0, 0, 0, 0, 0, 298, 0, 0, 0,
2611 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2612 42, 0, 0, 0, 0, 43, 44, 0, 0, 0,
2613 45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
2614 -16, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2615 9, 10, 11, 12, 13, 0, 0, 0, 15, 16,
2616 17, 18, 19, 20, 21, 0, 0, 23, 0, 0,
2617 0, 0, 0, 0, 24, 0, 25, 26, 0, 27,
2618 0, 28, 0, 29, 0, 30, 31, 32, 0, 0,
2619 33, 34, 0, 35, 36, 0, 0, 0, 0, 0,
2620 0, 37, 38, 0, 0, 0, 0, 0, 0, 0,
2621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2622 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2623 0, 0, 0, 0, 0, 471, 0, 0, 0, 0,
2624 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
2625 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
2626 0, 46, 0, 47, 0, 48, 0, 0, 0, -142,
2627 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2628 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2629 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2630 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2631 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2632 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2633 37, 38, 0, 0, 0, 0, 0, 0, 0, 0,
2634 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2635 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
2636 0, 0, 0, 0, 471, 0, 0, 0, 0, 0,
2637 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
2638 0, 0, 0, 43, 44, 0, 0, 0, 45, 0,
2639 46, 0, 47, 0, 48, 0, -3, 0, -143, 1,
2640 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2641 11, 12, 13, 0, 0, 14, 15, 16, 17, 18,
2642 19, 20, 21, 0, 0, 23, 0, 0, 0, 0,
2643 0, 0, 24, 0, 25, 26, 0, 27, 0, 28,
2644 0, 29, 0, 30, 31, 32, 0, 0, 33, 34,
2645 0, 35, 36, 0, 0, 0, 0, 0, 0, 37,
2646 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2647 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2648 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2649 0, 0, 0, 41, 0, 0, 0, 0, 0, 0,
2650 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2651 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2652 0, 47, 0, 48, 1, 2, 3, 4, 0, 5,
2653 6, 7, 8, 9, 10, 11, 12, 13, 0, -118,
2654 0, 15, 16, 17, 18, 19, 20, 21, 22, 0,
2655 23, 188, 0, 129, 0, 0, 0, 24, 189, 25,
2656 26, 0, 27, 190, 28, 0, 29, 191, 30, 31,
2657 32, 0, 0, 33, 34, 0, 35, 36, 0, 0,
2658 0, 0, 0, 0, 37, 38, 0, 192, 0, 0,
2659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2660 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2661 40, 0, 0, 0, 0, 0, 0, 0, 193, 0,
2662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2663 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2664 0, 0, 45, 0, 46, 0, 47, 0, 48, 1,
2665 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2666 11, 12, 13, 0, 0, 0, 15, 16, 17, 18,
2667 19, 20, 21, 22, 0, 23, 188, 0, 129, 0,
2668 0, 0, 24, 189, 25, 26, 0, 27, 190, 28,
2669 0, 29, 191, 30, 31, 32, 0, 0, 33, 34,
2670 0, 35, 36, 0, 0, 0, 0, 0, 0, 37,
2671 38, 0, 192, 0, 0, 0, 0, 0, 0, 0,
2672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2673 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2674 0, 0, 0, 193, 0, 0, 0, 0, 0, 0,
2675 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2676 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2677 0, 194, 0, 48, 1, 2, 3, 4, 0, 5,
2678 6, 7, 8, 9, 10, 11, 12, 13, 0, 0,
2679 0, 15, 16, 17, 18, 19, 20, 21, 22, 0,
2680 23, 188, 0, 129, 0, 0, 0, 24, 189, 25,
2681 26, 0, 27, 190, 28, 0, 29, 191, 30, 31,
2682 32, 0, 0, 33, 34, 0, 35, 36, 0, 0,
2683 0, 0, 0, 0, 37, 38, 0, 192, 0, 0,
2684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2685 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2686 40, 0, 0, 0, 0, 0, 0, 0, 193, 0,
2687 0, 128, 0, 3, 4, 0, 5, 6, 7, 8,
2688 9, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2689 0, 0, 45, 20, 46, 22, 47, 23, 48, 0,
2690 129, 0, 0, 0, 24, 0, 0, 0, 0, 0,
2691 0, 28, 0, 29, 130, 0, 0, 0, 0, 0,
2692 0, 34, 0, 35, 36, 0, 0, 0, 0, 0,
2693 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
2694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2695 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2696 0, 0, 0, 0, 96, 0, 3, 4, 0, 5,
2697 6, 7, 8, 9, 0, 0, 0, 0, 0, 42,
2698 0, 0, 0, 0, 43, 44, 20, 0, 22, 45,
2699 23, 46, 0, 47, 0, 48, 0, 24, 0, 0,
2700 0, 0, 0, 0, 28, 0, 29, 0, 0, 0,
2701 0, 0, 0, 0, 34, 0, 35, 36, 0, 0,
2702 0, 0, 0, 0, 37, 0, 0, 0, 0, 0,
2703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2704 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2705 40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2706 0, 0, 143, 0, 0, 0, 0, 0, 0, 0,
2707 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2708 0, 0, 45, 0, 46, 0, 47, 0, 48, 144,
2709 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
2710 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
2711 164, 165, 166, 0, 167, 168, 169, 0, 0, 0,
2712 0, 0, 170, 0, 0, 171, 0, 172, 173, 174,
2713 175, 176, 143, 177, 178, 179, 180, 181, 0, 0,
2714 0, 0, 0, 182, 0, 183, 0, 0, 184, 0,
2715 0, 0, 0, 0, 320, 0, 0, 0, 0, 144,
2716 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
2717 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
2718 164, 165, 166, 0, 167, 168, 169, 0, 0, 0,
2719 0, 0, 170, 0, 0, 171, 0, 172, 173, 174,
2720 175, 176, 143, 177, 178, 179, 180, 181, 0, 0,
2721 0, 0, 0, 182, 0, 183, 0, 0, 184, 0,
2722 0, 0, 0, 0, 352, 0, 0, 0, 0, 144,
2723 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
2724 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
2725 164, 165, 166, 0, 167, 168, 169, 0, 0, 0,
2726 0, 0, 170, 0, 0, 171, 0, 172, 173, 174,
2727 175, 176, 143, 177, 178, 179, 180, 181, 0, 0,
2728 0, 0, 0, 182, 0, 183, 0, 0, 184, 0,
2729 0, 0, 0, 0, 391, 0, 0, 0, 0, 144,
2730 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
2731 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
2732 164, 165, 166, 0, 167, 168, 169, 0, 0, 0,
2733 0, 0, 170, 143, 0, 171, 340, 172, 173, 174,
2734 175, 176, 0, 177, 178, 179, 180, 181, 0, 0,
2735 0, 0, 0, 182, 0, 183, 0, 0, 184, 0,
2736 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2737 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
2738 0, 164, 165, 166, 0, 167, 168, 169, 0, 0,
2739 0, 0, 0, 170, 143, 0, 171, 0, 172, 173,
2740 174, 175, 176, 0, 177, 178, 179, 180, 181, 0,
2741 0, 0, 0, 0, 182, 0, 183, 342, 0, 184,
2742 0, 144, 145, 146, 147, 148, 149, 150, 151, 152,
2743 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
2744 163, 0, 164, 165, 166, 0, 167, 168, 169, 0,
2745 0, 0, 0, 0, 170, 143, 0, 171, -215, 172,
2746 173, 174, 175, 176, 0, 177, 178, 179, 180, 181,
2747 0, 0, 0, 0, 0, 182, 0, 183, 0, 0,
2748 184, 0, 144, 145, 146, 147, 148, 149, 150, 151,
2749 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
2750 162, 163, 0, 164, 165, 166, 0, 167, 168, 169,
2751 0, 0, 0, 0, 0, 170, 143, 0, 171, 484,
2752 172, 173, 174, 175, 176, 0, 177, 178, 179, 180,
2753 181, 0, 0, 0, 0, 0, 182, 0, 183, 0,
2754 0, 184, 0, 144, 145, 146, 147, 148, 149, 150,
2755 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
2756 161, 162, 163, 0, 164, 165, 166, 0, 167, 168,
2757 169, 0, 0, 0, 0, 0, 170, 143, 0, 171,
2758 0, 172, 173, 174, 175, 176, 0, 177, 178, 179,
2759 180, 181, 0, 0, 0, 0, 0, 182, 0, 183,
2760 0, 0, 184, 0, 144, 145, 146, 147, 148, 149,
2761 150, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2762 0, 0, 0, 163, 0, 164, 165, 166, 0, 167,
2763 168, 169, 0, 0, 0, 0, 0, 143, 0, 0,
2764 0, 0, 172, 173, 174, 175, 176, 0, 177, 178,
2765 179, 180, 181, 0, 0, 0, 0, 0, 182, 0,
2766 183, 0, 0, 184, 144, 145, 146, 147, 148, 149,
2767 150, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2768 0, 0, 0, 0, 0, 164, 165, 166, 0, 167,
2769 168, 169, 0, 0, 0, 0, 0, 143, 0, 0,
2770 0, 0, 172, 173, 174, 175, 176, 0, 177, 178,
2771 179, 180, 181, 0, 0, 0, 0, 0, 182, 0,
2772 183, 0, 0, 184, 144, 145, 146, 147, 148, 149,
2773 150, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2774 0, 0, 0, 0, 0, 164, 165, 166, 0, 167,
2775 168, 169, 0, 0, 0, 0, 0, 143, 0, 0,
2776 0, 0, 0, 173, 174, 175, 176, 0, 177, 178,
2777 179, 180, 181, 0, 0, 0, 0, 0, 182, 0,
2778 183, 0, 0, 184, 144, 145, 146, 147, 148, 149,
2779 150, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2780 0, 0, 0, 0, 0, 164, 165, 166, 0, 167,
2781 168, 169, 0, 0, 0, 0, 0, 143, 0, 0,
2782 0, 0, 0, 0, 174, 175, 176, 0, 177, 178,
2783 179, 180, 181, 0, 0, 0, 0, 0, 182, 0,
2784 183, 0, 0, 184, 144, 145, 146, 147, 148, 149,
2785 150, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2786 0, 0, 0, 0, 0, 164, 165, 166, 0, 167,
2787 168, 169, 0, 0, 0, 0, 0, 143, 0, 0,
2788 0, 0, 0, 0, -216, 175, 176, 0, 177, 178,
2789 179, 180, 181, 0, 0, 0, 0, 0, 182, 0,
2790 183, 0, 0, 184, 144, 145, 146, -216, -216, -216,
2791 -216, 151, 152, 0, 0, 0, 0, 0, 0, 0,
2792 0, 0, 0, 0, 0, 164, 165, 166, 0, 167,
2793 168, 169, 0, 0, 0, 0, 0, 0, 0, 0,
2794 0, 0, 0, 0, 0, 175, 176, 0, 177, 178,
2795 179, 180, 181, 0, 0, 0, 0, 0, 182, 0,
2799 static const yytype_int16 yycheck[] =
2801 0, 0, 0, 0, 0, 57, 0, 106, 313, 209,
2802 3, 47, 88, 20, 214, 3, 194, 24, 335, 50,
2803 337, 308, 3, 125, 126, 35, 19, 3, 3, 68,
2804 37, 19, 39, 40, 381, 42, 43, 44, 19, 46,
2805 47, 51, 98, 87, 121, 34, 317, 231, 36, 126,
2806 45, 51, 51, 51, 51, 51, 240, 51, 363, 0,
2807 98, 100, 0, 88, 89, 90, 383, 3, 355, 3,
2808 98, 98, 3, 62, 5, 346, 132, 8, 9, 10,
2809 121, 12, 118, 182, 98, 19, 90, 98, 28, 14,
2810 121, 121, 3, 33, 132, 366, 121, 104, 123, 106,
2811 18, 126, 27, 3, 132, 132, 101, 412, 19, 380,
2812 51, 118, 429, 51, 45, 91, 91, 295, 132, 123,
2813 121, 132, 126, 125, 55, 56, 114, 127, 127, 127,
2814 127, 127, 125, 127, 121, 142, 143, 144, 145, 146,
2815 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
2816 157, 158, 159, 160, 161, 162, 163, 504, 194, 121,
2817 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2818 177, 178, 179, 180, 181, 182, 183, 448, 362, 450,
2819 114, 3, 3, 5, 4, 121, 127, 194, 224, 127,
2820 226, 127, 187, 27, 189, 190, 0, 31, 32, 206,
2821 20, 21, 22, 125, 24, 3, 26, 207, 207, 207,
2822 44, 310, 46, 98, 290, 27, 3, 224, 38, 226,
2823 32, 19, 422, 121, 219, 3, 46, 47, 48, 49,
2824 121, 100, 97, 98, 46, 104, 126, 4, 233, 234,
2825 3, 317, 124, 98, 4, 104, 322, 131, 98, 68,
2826 3, 3, 97, 20, 21, 22, 3, 24, 68, 26,
2827 20, 21, 22, 3, 24, 3, 26, 451, 461, 3,
2828 346, 38, 465, 466, 350, 282, 3, 97, 38, 46,
2829 47, 48, 49, 467, 3, 14, 97, 47, 48, 49,
2830 366, 484, 125, 18, 121, 132, 131, 104, 98, 3,
2831 300, 300, 300, 310, 380, 498, 54, 132, 308, 308,
2832 308, 131, 505, 54, 87, 3, 121, 3, 131, 125,
2833 3, 98, 104, 132, 126, 509, 100, 379, 131, 121,
2834 97, 367, 17, 340, 125, 3, 100, 125, 131, 3,
2835 376, 5, 6, 132, 8, 9, 10, 11, 12, 98,
2836 126, 131, 121, 125, 349, 355, 355, 355, 100, 125,
2837 367, 25, 65, 27, 131, 29, 125, 132, 104, 376,
2838 132, 3, 448, 131, 450, 88, 89, 90, 3, 27,
2839 131, 45, 125, 3, 121, 131, 125, 131, 51, 53,
2840 300, 55, 56, 88, 89, 90, 131, 127, 111, 112,
2841 113, 114, 115, 125, 132, 131, 339, 131, 121, 132,
2842 123, 131, 57, 126, 129, 330, 437, 437, 113, 114,
2843 115, 68, 490, 476, 88, 89, 121, 434, 123, 458,
2844 430, 126, 418, 418, 481, 27, 410, 383, 359, -1,
2845 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2846 -1, -1, 452, 452, 452, 452, 452, 121, 458, 123,
2847 -1, 125, -1, 127, -1, -1, -1, -1, -1, -1,
2848 -1, -1, -1, -1, -1, -1, 476, 476, 476, 476,
2849 476, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2850 490, 490, 490, 490, 490, 0, -1, -1, 3, 4,
2851 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
2852 15, 16, -1, -1, 19, 20, 21, 22, 23, 24,
2853 25, 26, -1, -1, 29, -1, -1, 40, -1, -1,
2854 -1, 36, -1, 38, 39, -1, 41, -1, 43, -1,
2855 45, -1, 47, 48, 49, -1, -1, 52, 53, -1,
2856 55, 56, -1, -1, 67, 68, 69, -1, 63, 64,
2857 -1, 74, 75, -1, -1, -1, -1, -1, -1, -1,
2858 -1, -1, -1, -1, -1, 88, 89, 90, -1, 92,
2859 93, 94, -1, 88, 89, -1, -1, -1, -1, -1,
2860 -1, -1, 97, -1, -1, 108, 109, -1, 111, 112,
2861 113, 114, 115, -1, -1, -1, 111, -1, 121, -1,
2862 123, 116, 117, 126, -1, -1, 121, -1, 123, -1,
2863 125, -1, 127, -1, -1, -1, 131, 3, 4, 5,
2864 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
2865 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
2866 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
2867 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
2868 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
2869 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
2870 66, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2871 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2872 -1, -1, 88, 89, -1, -1, -1, -1, -1, -1,
2873 -1, 97, -1, -1, -1, -1, -1, -1, -1, -1,
2874 -1, -1, -1, -1, -1, 111, -1, -1, -1, -1,
2875 116, 117, -1, -1, -1, 121, -1, 123, -1, 125,
2876 -1, 127, -1, -1, -1, 131, 3, 4, 5, 6,
2877 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
2878 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
2879 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
2880 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
2881 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
2882 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
2883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2885 -1, 88, 89, -1, -1, -1, -1, -1, -1, -1,
2886 97, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2887 -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
2888 117, -1, -1, -1, 121, -1, 123, -1, 125, -1,
2889 127, -1, -1, -1, 131, 3, 4, 5, 6, -1,
2890 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
2891 -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
2892 -1, 29, 30, -1, 32, -1, -1, -1, 36, 37,
2893 38, 39, -1, 41, 42, 43, -1, 45, 46, 47,
2894 48, 49, -1, -1, 52, 53, -1, 55, 56, -1,
2895 -1, -1, -1, -1, -1, 63, 64, -1, 66, -1,
2896 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2897 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2898 88, 89, -1, -1, -1, -1, -1, -1, -1, 97,
2899 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2900 -1, -1, -1, 111, -1, -1, -1, -1, 116, 117,
2901 -1, -1, -1, 121, -1, 123, -1, 125, -1, 127,
2902 -1, -1, -1, 131, 3, 4, 5, 6, -1, 8,
2903 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
2904 19, 20, 21, 22, 23, 24, 25, 26, 40, -1,
2905 29, -1, -1, -1, -1, -1, -1, 36, -1, 38,
2906 39, -1, 41, -1, 43, -1, 45, -1, 47, 48,
2907 49, -1, -1, 52, 53, -1, 55, 56, -1, -1,
2908 -1, -1, 74, 75, 63, 64, -1, -1, -1, -1,
2909 -1, -1, -1, -1, -1, -1, 88, 89, 90, -1,
2910 92, 93, 94, -1, -1, -1, -1, -1, -1, 88,
2911 89, -1, -1, -1, -1, -1, 108, 109, 97, 111,
2912 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
2913 -1, 123, 111, -1, 126, -1, -1, 116, 117, -1,
2914 -1, -1, 121, -1, 123, -1, 125, -1, 127, -1,
2915 -1, -1, 131, 3, 4, 5, 6, -1, 8, 9,
2916 10, 11, 12, 13, 14, 15, 16, -1, -1, -1,
2917 20, 21, 22, 23, 24, 25, 26, -1, -1, 29,
2918 -1, -1, -1, -1, -1, -1, 36, -1, 38, 39,
2919 -1, 41, -1, 43, -1, 45, -1, 47, 48, 49,
2920 -1, -1, 52, 53, -1, 55, 56, -1, -1, -1,
2921 -1, -1, -1, 63, 64, -1, -1, -1, -1, -1,
2922 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2923 -1, -1, -1, -1, -1, -1, -1, -1, 88, 89,
2924 -1, -1, -1, -1, -1, -1, -1, 97, -1, -1,
2925 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2926 -1, 111, -1, -1, -1, -1, 116, 117, -1, -1,
2927 -1, 121, -1, 123, -1, 125, -1, 127, -1, -1,
2928 -1, 131, 3, 4, 5, 6, -1, 8, 9, 10,
2929 11, 12, 13, 14, 15, 16, -1, -1, -1, 20,
2930 21, 22, 23, 24, 25, 26, -1, -1, 29, -1,
2931 -1, -1, -1, -1, -1, 36, -1, 38, 39, -1,
2932 41, -1, 43, -1, 45, -1, 47, 48, 49, -1,
2933 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
2934 -1, -1, 63, 64, -1, -1, -1, -1, -1, -1,
2935 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2936 -1, -1, -1, -1, -1, -1, -1, 88, 89, -1,
2937 -1, -1, -1, -1, -1, -1, 97, -1, -1, -1,
2938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2939 111, -1, -1, -1, -1, 116, 117, -1, -1, -1,
2940 121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
2941 131, 3, 4, 5, 6, -1, 8, 9, 10, 11,
2942 12, 13, 14, 15, 16, -1, -1, -1, 20, 21,
2943 22, 23, 24, 25, 26, -1, -1, 29, -1, -1,
2944 -1, -1, -1, -1, 36, -1, 38, 39, -1, 41,
2945 -1, 43, -1, 45, -1, 47, 48, 49, -1, -1,
2946 52, 53, -1, 55, 56, -1, -1, -1, -1, -1,
2947 -1, 63, 64, -1, -1, -1, -1, -1, -1, -1,
2948 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2949 -1, -1, -1, -1, -1, -1, 88, 89, -1, -1,
2950 -1, -1, -1, -1, -1, 97, -1, -1, -1, -1,
2951 -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
2952 -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
2953 -1, 123, -1, 125, -1, 127, -1, -1, -1, 131,
2954 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2955 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2956 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
2957 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2958 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2959 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2960 63, 64, -1, -1, -1, -1, -1, -1, -1, -1,
2961 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2962 -1, -1, -1, -1, -1, 88, 89, -1, -1, -1,
2963 -1, -1, -1, -1, 97, -1, -1, -1, -1, -1,
2964 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
2965 -1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
2966 123, -1, 125, -1, 127, -1, 0, -1, 131, 3,
2967 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
2968 14, 15, 16, -1, -1, 19, 20, 21, 22, 23,
2969 24, 25, 26, -1, -1, 29, -1, -1, -1, -1,
2970 -1, -1, 36, -1, 38, 39, -1, 41, -1, 43,
2971 -1, 45, -1, 47, 48, 49, -1, -1, 52, 53,
2972 -1, 55, 56, -1, -1, -1, -1, -1, -1, 63,
2973 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2974 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2975 -1, -1, -1, -1, 88, 89, -1, -1, -1, -1,
2976 -1, -1, -1, 97, -1, -1, -1, -1, -1, -1,
2977 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
2978 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
2979 -1, 125, -1, 127, 3, 4, 5, 6, -1, 8,
2980 9, 10, 11, 12, 13, 14, 15, 16, -1, 18,
2981 -1, 20, 21, 22, 23, 24, 25, 26, 27, -1,
2982 29, 30, -1, 32, -1, -1, -1, 36, 37, 38,
2983 39, -1, 41, 42, 43, -1, 45, 46, 47, 48,
2984 49, -1, -1, 52, 53, -1, 55, 56, -1, -1,
2985 -1, -1, -1, -1, 63, 64, -1, 66, -1, -1,
2986 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2987 -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
2988 89, -1, -1, -1, -1, -1, -1, -1, 97, -1,
2989 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2990 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
2991 -1, -1, 121, -1, 123, -1, 125, -1, 127, 3,
2992 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
2993 14, 15, 16, -1, -1, -1, 20, 21, 22, 23,
2994 24, 25, 26, 27, -1, 29, 30, -1, 32, -1,
2995 -1, -1, 36, 37, 38, 39, -1, 41, 42, 43,
2996 -1, 45, 46, 47, 48, 49, -1, -1, 52, 53,
2997 -1, 55, 56, -1, -1, -1, -1, -1, -1, 63,
2998 64, -1, 66, -1, -1, -1, -1, -1, -1, -1,
2999 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3000 -1, -1, -1, -1, 88, 89, -1, -1, -1, -1,
3001 -1, -1, -1, 97, -1, -1, -1, -1, -1, -1,
3002 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3003 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3004 -1, 125, -1, 127, 3, 4, 5, 6, -1, 8,
3005 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
3006 -1, 20, 21, 22, 23, 24, 25, 26, 27, -1,
3007 29, 30, -1, 32, -1, -1, -1, 36, 37, 38,
3008 39, -1, 41, 42, 43, -1, 45, 46, 47, 48,
3009 49, -1, -1, 52, 53, -1, 55, 56, -1, -1,
3010 -1, -1, -1, -1, 63, 64, -1, 66, -1, -1,
3011 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3012 -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
3013 89, -1, -1, -1, -1, -1, -1, -1, 97, -1,
3014 -1, 3, -1, 5, 6, -1, 8, 9, 10, 11,
3015 12, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3016 -1, -1, 121, 25, 123, 27, 125, 29, 127, -1,
3017 32, -1, -1, -1, 36, -1, -1, -1, -1, -1,
3018 -1, 43, -1, 45, 46, -1, -1, -1, -1, -1,
3019 -1, 53, -1, 55, 56, -1, -1, -1, -1, -1,
3020 -1, 63, -1, -1, -1, -1, -1, -1, -1, -1,
3021 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3022 -1, -1, -1, -1, -1, -1, 88, 89, -1, -1,
3023 -1, -1, -1, -1, 3, -1, 5, 6, -1, 8,
3024 9, 10, 11, 12, -1, -1, -1, -1, -1, 111,
3025 -1, -1, -1, -1, 116, 117, 25, -1, 27, 121,
3026 29, 123, -1, 125, -1, 127, -1, 36, -1, -1,
3027 -1, -1, -1, -1, 43, -1, 45, -1, -1, -1,
3028 -1, -1, -1, -1, 53, -1, 55, 56, -1, -1,
3029 -1, -1, -1, -1, 63, -1, -1, -1, -1, -1,
3030 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3031 -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
3032 89, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3033 -1, -1, 40, -1, -1, -1, -1, -1, -1, -1,
3034 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3035 -1, -1, 121, -1, 123, -1, 125, -1, 127, 67,
3036 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
3037 78, 79, 80, 81, 82, 83, 84, 85, 86, -1,
3038 88, 89, 90, -1, 92, 93, 94, -1, -1, -1,
3039 -1, -1, 100, -1, -1, 103, -1, 105, 106, 107,
3040 108, 109, 40, 111, 112, 113, 114, 115, -1, -1,
3041 -1, -1, -1, 121, -1, 123, -1, -1, 126, -1,
3042 -1, -1, -1, -1, 132, -1, -1, -1, -1, 67,
3043 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
3044 78, 79, 80, 81, 82, 83, 84, 85, 86, -1,
3045 88, 89, 90, -1, 92, 93, 94, -1, -1, -1,
3046 -1, -1, 100, -1, -1, 103, -1, 105, 106, 107,
3047 108, 109, 40, 111, 112, 113, 114, 115, -1, -1,
3048 -1, -1, -1, 121, -1, 123, -1, -1, 126, -1,
3049 -1, -1, -1, -1, 132, -1, -1, -1, -1, 67,
3050 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
3051 78, 79, 80, 81, 82, 83, 84, 85, 86, -1,
3052 88, 89, 90, -1, 92, 93, 94, -1, -1, -1,
3053 -1, -1, 100, -1, -1, 103, -1, 105, 106, 107,
3054 108, 109, 40, 111, 112, 113, 114, 115, -1, -1,
3055 -1, -1, -1, 121, -1, 123, -1, -1, 126, -1,
3056 -1, -1, -1, -1, 132, -1, -1, -1, -1, 67,
3057 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
3058 78, 79, 80, 81, 82, 83, 84, 85, 86, -1,
3059 88, 89, 90, -1, 92, 93, 94, -1, -1, -1,
3060 -1, -1, 100, 40, -1, 103, 104, 105, 106, 107,
3061 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3062 -1, -1, -1, 121, -1, 123, -1, -1, 126, -1,
3063 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
3064 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3065 -1, 88, 89, 90, -1, 92, 93, 94, -1, -1,
3066 -1, -1, -1, 100, 40, -1, 103, -1, 105, 106,
3067 107, 108, 109, -1, 111, 112, 113, 114, 115, -1,
3068 -1, -1, -1, -1, 121, -1, 123, 124, -1, 126,
3069 -1, 67, 68, 69, 70, 71, 72, 73, 74, 75,
3070 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3071 86, -1, 88, 89, 90, -1, 92, 93, 94, -1,
3072 -1, -1, -1, -1, 100, 40, -1, 103, 104, 105,
3073 106, 107, 108, 109, -1, 111, 112, 113, 114, 115,
3074 -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
3075 126, -1, 67, 68, 69, 70, 71, 72, 73, 74,
3076 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3077 85, 86, -1, 88, 89, 90, -1, 92, 93, 94,
3078 -1, -1, -1, -1, -1, 100, 40, -1, 103, 104,
3079 105, 106, 107, 108, 109, -1, 111, 112, 113, 114,
3080 115, -1, -1, -1, -1, -1, 121, -1, 123, -1,
3081 -1, 126, -1, 67, 68, 69, 70, 71, 72, 73,
3082 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3083 84, 85, 86, -1, 88, 89, 90, -1, 92, 93,
3084 94, -1, -1, -1, -1, -1, 100, 40, -1, 103,
3085 -1, 105, 106, 107, 108, 109, -1, 111, 112, 113,
3086 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3087 -1, -1, 126, -1, 67, 68, 69, 70, 71, 72,
3088 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3089 -1, -1, -1, 86, -1, 88, 89, 90, -1, 92,
3090 93, 94, -1, -1, -1, -1, -1, 40, -1, -1,
3091 -1, -1, 105, 106, 107, 108, 109, -1, 111, 112,
3092 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3093 123, -1, -1, 126, 67, 68, 69, 70, 71, 72,
3094 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3095 -1, -1, -1, -1, -1, 88, 89, 90, -1, 92,
3096 93, 94, -1, -1, -1, -1, -1, 40, -1, -1,
3097 -1, -1, 105, 106, 107, 108, 109, -1, 111, 112,
3098 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3099 123, -1, -1, 126, 67, 68, 69, 70, 71, 72,
3100 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3101 -1, -1, -1, -1, -1, 88, 89, 90, -1, 92,
3102 93, 94, -1, -1, -1, -1, -1, 40, -1, -1,
3103 -1, -1, -1, 106, 107, 108, 109, -1, 111, 112,
3104 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3105 123, -1, -1, 126, 67, 68, 69, 70, 71, 72,
3106 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3107 -1, -1, -1, -1, -1, 88, 89, 90, -1, 92,
3108 93, 94, -1, -1, -1, -1, -1, 40, -1, -1,
3109 -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
3110 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3111 123, -1, -1, 126, 67, 68, 69, 70, 71, 72,
3112 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3113 -1, -1, -1, -1, -1, 88, 89, 90, -1, 92,
3114 93, 94, -1, -1, -1, -1, -1, 40, -1, -1,
3115 -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
3116 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3117 123, -1, -1, 126, 67, 68, 69, 70, 71, 72,
3118 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3119 -1, -1, -1, -1, -1, 88, 89, 90, -1, 92,
3120 93, 94, -1, -1, -1, -1, -1, -1, -1, -1,
3121 -1, -1, -1, -1, -1, 108, 109, -1, 111, 112,
3122 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3126 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3127 symbol of state STATE-NUM. */
3128 static const yytype_uint8 yystos[] =
3130 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3131 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3132 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3133 47, 48, 49, 52, 53, 55, 56, 63, 64, 88,
3134 89, 97, 111, 116, 117, 121, 123, 125, 127, 134,
3135 135, 136, 137, 143, 146, 147, 153, 157, 158, 159,
3136 160, 162, 170, 178, 181, 184, 187, 188, 189, 190,
3137 194, 196, 205, 212, 215, 228, 229, 230, 233, 234,
3138 235, 236, 239, 241, 87, 50, 121, 121, 163, 121,
3139 3, 19, 125, 182, 183, 18, 3, 235, 3, 214,
3140 235, 121, 183, 218, 121, 125, 121, 126, 235, 121,
3141 235, 235, 235, 235, 235, 233, 224, 225, 226, 232,
3142 235, 232, 237, 238, 3, 0, 137, 125, 3, 32,
3143 46, 149, 155, 156, 234, 27, 31, 32, 44, 46,
3144 204, 190, 98, 40, 67, 68, 69, 70, 71, 72,
3145 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3146 83, 84, 85, 86, 88, 89, 90, 92, 93, 94,
3147 100, 103, 105, 106, 107, 108, 109, 111, 112, 113,
3148 114, 115, 121, 123, 126, 3, 121, 161, 30, 37,
3149 42, 46, 66, 97, 125, 143, 144, 145, 147, 149,
3150 164, 165, 180, 188, 231, 240, 171, 186, 125, 126,
3151 3, 227, 121, 233, 126, 235, 179, 224, 3, 154,
3152 132, 124, 98, 232, 104, 131, 98, 135, 3, 150,
3153 151, 3, 150, 97, 68, 35, 51, 211, 3, 3,
3154 3, 235, 235, 235, 235, 235, 235, 235, 235, 235,
3155 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
3156 235, 235, 235, 3, 235, 235, 235, 235, 235, 235,
3157 235, 235, 235, 235, 235, 235, 235, 235, 235, 224,
3158 235, 3, 121, 127, 233, 3, 233, 233, 3, 131,
3159 142, 144, 235, 97, 14, 125, 18, 235, 97, 138,
3160 139, 140, 146, 147, 194, 196, 205, 212, 185, 182,
3161 121, 223, 3, 91, 208, 209, 210, 132, 3, 114,
3162 132, 141, 142, 132, 233, 232, 232, 131, 104, 222,
3163 98, 222, 233, 233, 3, 54, 191, 54, 192, 222,
3164 104, 132, 124, 87, 235, 3, 132, 131, 144, 121,
3165 142, 3, 132, 131, 140, 125, 138, 224, 100, 104,
3166 206, 210, 132, 98, 145, 131, 132, 104, 3, 36,
3167 114, 183, 217, 218, 219, 221, 100, 148, 151, 97,
3168 132, 121, 219, 17, 193, 219, 220, 125, 148, 235,
3169 3, 132, 145, 233, 131, 100, 125, 138, 131, 132,
3170 3, 5, 8, 9, 10, 12, 45, 55, 56, 207,
3171 221, 222, 91, 210, 28, 33, 172, 174, 176, 177,
3172 145, 232, 126, 232, 234, 145, 208, 220, 125, 98,
3173 197, 132, 3, 5, 34, 62, 166, 167, 168, 169,
3174 131, 206, 125, 210, 125, 121, 172, 174, 65, 152,
3175 132, 132, 195, 219, 46, 97, 188, 201, 202, 203,
3176 235, 104, 131, 168, 169, 216, 175, 3, 145, 145,
3177 222, 97, 143, 147, 188, 198, 199, 200, 205, 212,
3178 3, 27, 131, 203, 104, 141, 141, 141, 222, 125,
3179 125, 131, 200, 211, 141, 131, 131, 132, 213, 198,
3180 3, 173, 141, 131, 121, 125, 131, 208, 141, 132,
3184 #define yyerrok (yyerrstatus = 0)
3185 #define yyclearin (yychar = YYEMPTY)
3186 #define YYEMPTY (-2)
3189 #define YYACCEPT goto yyacceptlab
3190 #define YYABORT goto yyabortlab
3191 #define YYERROR goto yyerrorlab
3194 /* Like YYERROR except do call yyerror. This remains here temporarily
3195 to ease the transition to the new meaning of YYERROR, for GCC.
3196 Once GCC version 2 has supplanted version 1, this can go. */
3198 #define YYFAIL goto yyerrlab
3200 #define YYRECOVERING() (!!yyerrstatus)
3202 #define YYBACKUP(Token, Value) \
3204 if (yychar == YYEMPTY && yylen == 1) \
3208 yytoken = YYTRANSLATE (yychar); \
3214 yyerror (YY_("syntax error: cannot back up")); \
3221 #define YYERRCODE 256
3224 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3225 If N is 0, then set CURRENT to the empty location which ends
3226 the previous symbol: RHS[0] (always defined). */
3228 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3229 #ifndef YYLLOC_DEFAULT
3230 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3234 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3235 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3236 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3237 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3241 (Current).first_line = (Current).last_line = \
3242 YYRHSLOC (Rhs, 0).last_line; \
3243 (Current).first_column = (Current).last_column = \
3244 YYRHSLOC (Rhs, 0).last_column; \
3250 /* YY_LOCATION_PRINT -- Print the location on the stream.
3251 This macro was not mandated originally: define only if we know
3252 we won't break user code: when these are the locations we know. */
3254 #ifndef YY_LOCATION_PRINT
3255 # if YYLTYPE_IS_TRIVIAL
3256 # define YY_LOCATION_PRINT(File, Loc) \
3257 fprintf (File, "%d.%d-%d.%d", \
3258 (Loc).first_line, (Loc).first_column, \
3259 (Loc).last_line, (Loc).last_column)
3261 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3266 /* YYLEX -- calling `yylex' with the right arguments. */
3269 # define YYLEX yylex (YYLEX_PARAM)
3271 # define YYLEX yylex ()
3274 /* Enable debugging if requested. */
3278 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3279 # define YYFPRINTF fprintf
3282 # define YYDPRINTF(Args) \
3288 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3292 YYFPRINTF (stderr, "%s ", Title); \
3293 yy_symbol_print (stderr, \
3295 YYFPRINTF (stderr, "\n"); \
3300 /*--------------------------------.
3301 | Print this symbol on YYOUTPUT. |
3302 `--------------------------------*/
3305 #if (defined __STDC__ || defined __C99__FUNC__ \
3306 || defined __cplusplus || defined _MSC_VER)
3308 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3311 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3314 YYSTYPE const * const yyvaluep;
3320 if (yytype < YYNTOKENS)
3321 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3333 /*--------------------------------.
3334 | Print this symbol on YYOUTPUT. |
3335 `--------------------------------*/
3337 #if (defined __STDC__ || defined __C99__FUNC__ \
3338 || defined __cplusplus || defined _MSC_VER)
3340 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3343 yy_symbol_print (yyoutput, yytype, yyvaluep)
3346 YYSTYPE const * const yyvaluep;
3349 if (yytype < YYNTOKENS)
3350 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3352 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3354 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3355 YYFPRINTF (yyoutput, ")");
3358 /*------------------------------------------------------------------.
3359 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3361 `------------------------------------------------------------------*/
3363 #if (defined __STDC__ || defined __C99__FUNC__ \
3364 || defined __cplusplus || defined _MSC_VER)
3366 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3369 yy_stack_print (yybottom, yytop)
3370 yytype_int16 *yybottom;
3371 yytype_int16 *yytop;
3374 YYFPRINTF (stderr, "Stack now");
3375 for (; yybottom <= yytop; yybottom++)
3377 int yybot = *yybottom;
3378 YYFPRINTF (stderr, " %d", yybot);
3380 YYFPRINTF (stderr, "\n");
3383 # define YY_STACK_PRINT(Bottom, Top) \
3386 yy_stack_print ((Bottom), (Top)); \
3390 /*------------------------------------------------.
3391 | Report that the YYRULE is going to be reduced. |
3392 `------------------------------------------------*/
3394 #if (defined __STDC__ || defined __C99__FUNC__ \
3395 || defined __cplusplus || defined _MSC_VER)
3397 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3400 yy_reduce_print (yyvsp, yyrule)
3405 int yynrhs = yyr2[yyrule];
3407 unsigned long int yylno = yyrline[yyrule];
3408 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3410 /* The symbols being reduced. */
3411 for (yyi = 0; yyi < yynrhs; yyi++)
3413 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3414 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3415 &(yyvsp[(yyi + 1) - (yynrhs)])
3417 YYFPRINTF (stderr, "\n");
3421 # define YY_REDUCE_PRINT(Rule) \
3424 yy_reduce_print (yyvsp, Rule); \
3427 /* Nonzero means print parse trace. It is left uninitialized so that
3428 multiple parsers can coexist. */
3430 #else /* !YYDEBUG */
3431 # define YYDPRINTF(Args)
3432 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3433 # define YY_STACK_PRINT(Bottom, Top)
3434 # define YY_REDUCE_PRINT(Rule)
3435 #endif /* !YYDEBUG */
3438 /* YYINITDEPTH -- initial size of the parser's stacks. */
3440 # define YYINITDEPTH 200
3443 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3444 if the built-in stack extension method is used).
3446 Do not make this value too large; the results are undefined if
3447 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3448 evaluated with infinite-precision integer arithmetic. */
3451 # define YYMAXDEPTH 10000
3459 # if defined __GLIBC__ && defined _STRING_H
3460 # define yystrlen strlen
3462 /* Return the length of YYSTR. */
3463 #if (defined __STDC__ || defined __C99__FUNC__ \
3464 || defined __cplusplus || defined _MSC_VER)
3466 yystrlen (const char *yystr)
3474 for (yylen = 0; yystr[yylen]; yylen++)
3482 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3483 # define yystpcpy stpcpy
3485 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3487 #if (defined __STDC__ || defined __C99__FUNC__ \
3488 || defined __cplusplus || defined _MSC_VER)
3490 yystpcpy (char *yydest, const char *yysrc)
3493 yystpcpy (yydest, yysrc)
3499 const char *yys = yysrc;
3501 while ((*yyd++ = *yys++) != '\0')
3510 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3511 quotes and backslashes, so that it's suitable for yyerror. The
3512 heuristic is that double-quoting is unnecessary unless the string
3513 contains an apostrophe, a comma, or backslash (other than
3514 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3515 null, do not copy; instead, return the length of what the result
3518 yytnamerr (char *yyres, const char *yystr)
3523 char const *yyp = yystr;
3530 goto do_not_strip_quotes;
3534 goto do_not_strip_quotes;
3547 do_not_strip_quotes: ;
3551 return yystrlen (yystr);
3553 return yystpcpy (yyres, yystr) - yyres;
3557 /* Copy into YYRESULT an error message about the unexpected token
3558 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3559 including the terminating null byte. If YYRESULT is null, do not
3560 copy anything; just return the number of bytes that would be
3561 copied. As a special case, return 0 if an ordinary "syntax error"
3562 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3563 size calculation. */
3565 yysyntax_error (char *yyresult, int yystate, int yychar)
3567 int yyn = yypact[yystate];
3569 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3573 int yytype = YYTRANSLATE (yychar);
3574 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3575 YYSIZE_T yysize = yysize0;
3577 int yysize_overflow = 0;
3578 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3579 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3583 /* This is so xgettext sees the translatable formats that are
3584 constructed on the fly. */
3585 YY_("syntax error, unexpected %s");
3586 YY_("syntax error, unexpected %s, expecting %s");
3587 YY_("syntax error, unexpected %s, expecting %s or %s");
3588 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3589 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3593 static char const yyunexpected[] = "syntax error, unexpected %s";
3594 static char const yyexpecting[] = ", expecting %s";
3595 static char const yyor[] = " or %s";
3596 char yyformat[sizeof yyunexpected
3597 + sizeof yyexpecting - 1
3598 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3599 * (sizeof yyor - 1))];
3600 char const *yyprefix = yyexpecting;
3602 /* Start YYX at -YYN if negative to avoid negative indexes in
3604 int yyxbegin = yyn < 0 ? -yyn : 0;
3606 /* Stay within bounds of both yycheck and yytname. */
3607 int yychecklim = YYLAST - yyn + 1;
3608 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3611 yyarg[0] = yytname[yytype];
3612 yyfmt = yystpcpy (yyformat, yyunexpected);
3614 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3615 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3617 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3621 yyformat[sizeof yyunexpected - 1] = '\0';
3624 yyarg[yycount++] = yytname[yyx];
3625 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3626 yysize_overflow |= (yysize1 < yysize);
3628 yyfmt = yystpcpy (yyfmt, yyprefix);
3632 yyf = YY_(yyformat);
3633 yysize1 = yysize + yystrlen (yyf);
3634 yysize_overflow |= (yysize1 < yysize);
3637 if (yysize_overflow)
3638 return YYSIZE_MAXIMUM;
3642 /* Avoid sprintf, as that infringes on the user's name space.
3643 Don't have undefined behavior even if the translation
3644 produced a string with the wrong number of "%s"s. */
3645 char *yyp = yyresult;
3647 while ((*yyp = *yyf) != '\0')
3649 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3651 yyp += yytnamerr (yyp, yyarg[yyi++]);
3664 #endif /* YYERROR_VERBOSE */
3667 /*-----------------------------------------------.
3668 | Release the memory associated to this symbol. |
3669 `-----------------------------------------------*/
3672 #if (defined __STDC__ || defined __C99__FUNC__ \
3673 || defined __cplusplus || defined _MSC_VER)
3675 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3678 yydestruct (yymsg, yytype, yyvaluep)
3688 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3698 /* Prevent warnings from -Wmissing-prototypes. */
3699 #ifdef YYPARSE_PARAM
3700 #if defined __STDC__ || defined __cplusplus
3701 int yyparse (void *YYPARSE_PARAM);
3705 #else /* ! YYPARSE_PARAM */
3706 #if defined __STDC__ || defined __cplusplus
3711 #endif /* ! YYPARSE_PARAM */
3714 /* The lookahead symbol. */
3717 /* The semantic value of the lookahead symbol. */
3720 /* Number of syntax errors so far. */
3725 /*-------------------------.
3726 | yyparse or yypush_parse. |
3727 `-------------------------*/
3729 #ifdef YYPARSE_PARAM
3730 #if (defined __STDC__ || defined __C99__FUNC__ \
3731 || defined __cplusplus || defined _MSC_VER)
3733 yyparse (void *YYPARSE_PARAM)
3736 yyparse (YYPARSE_PARAM)
3737 void *YYPARSE_PARAM;
3739 #else /* ! YYPARSE_PARAM */
3740 #if (defined __STDC__ || defined __C99__FUNC__ \
3741 || defined __cplusplus || defined _MSC_VER)
3754 /* Number of tokens to shift before error messages enabled. */
3757 /* The stacks and their tools:
3758 `yyss': related to states.
3759 `yyvs': related to semantic values.
3761 Refer to the stacks thru separate pointers, to allow yyoverflow
3762 to reallocate them elsewhere. */
3764 /* The state stack. */
3765 yytype_int16 yyssa[YYINITDEPTH];
3767 yytype_int16 *yyssp;
3769 /* The semantic value stack. */
3770 YYSTYPE yyvsa[YYINITDEPTH];
3774 YYSIZE_T yystacksize;
3778 /* Lookahead token as an internal (translated) token number. */
3780 /* The variables used to return semantic value and location from the
3785 /* Buffer for error messages, and its allocated size. */
3787 char *yymsg = yymsgbuf;
3788 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3791 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3793 /* The number of symbols on the RHS of the reduced rule.
3794 Keep to zero when no symbol should be popped. */
3800 yystacksize = YYINITDEPTH;
3802 YYDPRINTF ((stderr, "Starting parse\n"));
3807 yychar = YYEMPTY; /* Cause a token to be read. */
3809 /* Initialize stack pointers.
3810 Waste one element of value and location stack
3811 so that they stay on the same level as the state stack.
3812 The wasted elements are never initialized. */
3818 /*------------------------------------------------------------.
3819 | yynewstate -- Push a new state, which is found in yystate. |
3820 `------------------------------------------------------------*/
3822 /* In all cases, when you get here, the value and location stacks
3823 have just been pushed. So pushing a state here evens the stacks. */
3829 if (yyss + yystacksize - 1 <= yyssp)
3831 /* Get the current used size of the three stacks, in elements. */
3832 YYSIZE_T yysize = yyssp - yyss + 1;
3836 /* Give user a chance to reallocate the stack. Use copies of
3837 these so that the &'s don't force the real ones into
3839 YYSTYPE *yyvs1 = yyvs;
3840 yytype_int16 *yyss1 = yyss;
3842 /* Each stack pointer address is followed by the size of the
3843 data in use in that stack, in bytes. This used to be a
3844 conditional around just the two extra args, but that might
3845 be undefined if yyoverflow is a macro. */
3846 yyoverflow (YY_("memory exhausted"),
3847 &yyss1, yysize * sizeof (*yyssp),
3848 &yyvs1, yysize * sizeof (*yyvsp),
3854 #else /* no yyoverflow */
3855 # ifndef YYSTACK_RELOCATE
3856 goto yyexhaustedlab;
3858 /* Extend the stack our own way. */
3859 if (YYMAXDEPTH <= yystacksize)
3860 goto yyexhaustedlab;
3862 if (YYMAXDEPTH < yystacksize)
3863 yystacksize = YYMAXDEPTH;
3866 yytype_int16 *yyss1 = yyss;
3867 union yyalloc *yyptr =
3868 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3870 goto yyexhaustedlab;
3871 YYSTACK_RELOCATE (yyss_alloc, yyss);
3872 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3873 # undef YYSTACK_RELOCATE
3875 YYSTACK_FREE (yyss1);
3878 #endif /* no yyoverflow */
3880 yyssp = yyss + yysize - 1;
3881 yyvsp = yyvs + yysize - 1;
3883 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3884 (unsigned long int) yystacksize));
3886 if (yyss + yystacksize - 1 <= yyssp)
3890 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3892 if (yystate == YYFINAL)
3902 /* Do appropriate processing given the current state. Read a
3903 lookahead token if we need one and don't already have one. */
3905 /* First try to decide what to do without reference to lookahead token. */
3906 yyn = yypact[yystate];
3907 if (yyn == YYPACT_NINF)
3910 /* Not known => get a lookahead token if don't already have one. */
3912 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3913 if (yychar == YYEMPTY)
3915 YYDPRINTF ((stderr, "Reading a token: "));
3919 if (yychar <= YYEOF)
3921 yychar = yytoken = YYEOF;
3922 YYDPRINTF ((stderr, "Now at end of input.\n"));
3926 yytoken = YYTRANSLATE (yychar);
3927 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3930 /* If the proper action on seeing token YYTOKEN is to reduce or to
3931 detect an error, take that action. */
3933 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3938 if (yyn == 0 || yyn == YYTABLE_NINF)
3944 /* Count tokens shifted since error; after three, turn off error
3949 /* Shift the lookahead token. */
3950 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3952 /* Discard the shifted token. */
3961 /*-----------------------------------------------------------.
3962 | yydefault -- do the default action for the current state. |
3963 `-----------------------------------------------------------*/
3965 yyn = yydefact[yystate];
3971 /*-----------------------------.
3972 | yyreduce -- Do a reduction. |
3973 `-----------------------------*/
3975 /* yyn is the number of a rule to reduce with. */
3978 /* If YYLEN is nonzero, implement the default value of the action:
3981 Otherwise, the following line sets YYVAL to garbage.
3982 This behavior is undocumented and Bison
3983 users should not rely upon it. Assigning to YYVAL
3984 unconditionally makes the parser a bit smaller, and it avoids a
3985 GCC warning that YYVAL may be used uninitialized. */
3986 yyval = yyvsp[1-yylen];
3989 YY_REDUCE_PRINT (yyn);
3996 /* Line 1464 of skeleton.m4 */
3997 #line 1725 "parser.y"
3998 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4007 /* Line 1464 of skeleton.m4 */
4008 #line 1726 "parser.y"
4009 {(yyval.code)=code_new();}
4018 /* Line 1464 of skeleton.m4 */
4019 #line 1728 "parser.y"
4020 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4029 /* Line 1464 of skeleton.m4 */
4030 #line 1729 "parser.y"
4031 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4040 /* Line 1464 of skeleton.m4 */
4041 #line 1745 "parser.y"
4051 /* Line 1464 of skeleton.m4 */
4052 #line 1752 "parser.y"
4053 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4062 /* Line 1464 of skeleton.m4 */
4063 #line 1754 "parser.y"
4064 {/*TODO*/(yyval.code)=0;}
4073 /* Line 1464 of skeleton.m4 */
4074 #line 1756 "parser.y"
4075 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4084 /* Line 1464 of skeleton.m4 */
4085 #line 1757 "parser.y"
4095 /* Line 1464 of skeleton.m4 */
4096 #line 1758 "parser.y"
4097 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4106 /* Line 1464 of skeleton.m4 */
4107 #line 1759 "parser.y"
4108 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4117 /* Line 1464 of skeleton.m4 */
4118 #line 1763 "parser.y"
4120 code_t**cc = &global->init->method->body->code;
4121 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4131 /* Line 1464 of skeleton.m4 */
4132 #line 1774 "parser.y"
4133 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4142 /* Line 1464 of skeleton.m4 */
4143 #line 1775 "parser.y"
4144 {(yyval.value).c=abc_pushundefined(0);
4145 (yyval.value).t=TYPE_ANY;
4155 /* Line 1464 of skeleton.m4 */
4156 #line 1779 "parser.y"
4157 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4166 /* Line 1464 of skeleton.m4 */
4167 #line 1780 "parser.y"
4168 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4177 /* Line 1464 of skeleton.m4 */
4178 #line 1782 "parser.y"
4179 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4188 /* Line 1464 of skeleton.m4 */
4189 #line 1783 "parser.y"
4190 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4199 /* Line 1464 of skeleton.m4 */
4200 #line 1786 "parser.y"
4202 if(variable_exists((yyvsp[(1) - (3)].id)))
4203 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4205 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4206 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4207 (yyvsp[(2) - (3)].classinfo)->name);
4210 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
4212 if((yyvsp[(2) - (3)].classinfo)) {
4213 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4214 (yyval.code) = (yyvsp[(3) - (3)].value).c;
4215 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4216 (yyval.code) = abc_setlocal((yyval.code), index);
4218 code_free((yyvsp[(3) - (3)].value).c);
4219 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
4220 (yyval.code) = abc_setlocal((yyval.code), index);
4223 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4224 (yyval.code) = (yyvsp[(3) - (3)].value).c;
4225 (yyval.code) = abc_coerce_a((yyval.code));
4226 (yyval.code) = abc_setlocal((yyval.code), index);
4228 code_free((yyvsp[(3) - (3)].value).c);
4229 (yyval.code) = code_new();
4233 /* that's the default for a local register, anyway
4235 state->method->initcode = abc_pushundefined(state->method->initcode);
4236 state->method->initcode = abc_setlocal(state->method->initcode, index);
4238 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
4248 /* Line 1464 of skeleton.m4 */
4249 #line 1828 "parser.y"
4250 {(yyval.code) = code_new();}
4259 /* Line 1464 of skeleton.m4 */
4260 #line 1829 "parser.y"
4261 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4270 /* Line 1464 of skeleton.m4 */
4271 #line 1832 "parser.y"
4281 /* Line 1464 of skeleton.m4 */
4282 #line 1832 "parser.y"
4285 (yyval.code) = code_new();
4286 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4287 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4289 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4290 if((yyvsp[(7) - (7)].code)) {
4291 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4293 myif->branch = (yyval.code) = abc_nop((yyval.code));
4294 if((yyvsp[(7) - (7)].code)) {
4295 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4296 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4298 (yyval.code) = var_block((yyval.code));
4309 /* Line 1464 of skeleton.m4 */
4310 #line 1851 "parser.y"
4311 {(yyval.code)=code_new();}
4320 /* Line 1464 of skeleton.m4 */
4321 #line 1856 "parser.y"
4323 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
4333 /* Line 1464 of skeleton.m4 */
4334 #line 1859 "parser.y"
4336 (yyval.id)=(yyvsp[(1) - (1)].id);
4346 /* Line 1464 of skeleton.m4 */
4347 #line 1863 "parser.y"
4348 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4357 /* Line 1464 of skeleton.m4 */
4358 #line 1864 "parser.y"
4359 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4368 /* Line 1464 of skeleton.m4 */
4369 #line 1866 "parser.y"
4371 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4372 (yyval.code) = code_new();
4373 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4374 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4375 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4376 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4377 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4378 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4379 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4380 (yyval.code) = abc_jump((yyval.code), loopstart);
4381 code_t*out = (yyval.code) = abc_nop((yyval.code));
4382 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4383 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4386 (yyval.code) = var_block((yyval.code));
4397 /* Line 1464 of skeleton.m4 */
4398 #line 1886 "parser.y"
4400 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4401 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4402 int it = new_variable(tmp1name, TYPE_INT, 0);
4403 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4404 int array = new_variable(tmp1name, 0, 0);
4406 (yyval.code) = code_new();
4407 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4408 (yyval.code) = abc_coerce_a((yyval.code));
4409 (yyval.code) = abc_setlocal((yyval.code), array);
4410 (yyval.code) = abc_pushbyte((yyval.code), 0);
4411 (yyval.code) = abc_setlocal((yyval.code), it);
4413 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4415 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4416 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4417 (yyval.code) = abc_getlocal((yyval.code), array);
4418 (yyval.code) = abc_getlocal((yyval.code), it);
4419 if(!(yyvsp[(1) - (6)].for_start).each)
4420 (yyval.code) = abc_nextname((yyval.code));
4422 (yyval.code) = abc_nextvalue((yyval.code));
4423 (yyval.code) = converttype((yyval.code), 0, var->type);
4424 (yyval.code) = abc_setlocal((yyval.code), var->index);
4426 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4427 (yyval.code) = abc_jump((yyval.code), loopstart);
4429 code_t*out = (yyval.code) = abc_nop((yyval.code));
4430 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4431 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4435 (yyval.code) = var_block((yyval.code));
4449 /* Line 1464 of skeleton.m4 */
4450 #line 1929 "parser.y"
4460 /* Line 1464 of skeleton.m4 */
4461 #line 1929 "parser.y"
4464 (yyval.code) = code_new();
4466 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4467 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4468 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4469 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4470 myjmp->branch = cont;
4471 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4472 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4473 code_t*out = (yyval.code) = abc_nop((yyval.code));
4474 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4475 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4477 (yyval.code) = var_block((yyval.code));
4488 /* Line 1464 of skeleton.m4 */
4489 #line 1948 "parser.y"
4499 /* Line 1464 of skeleton.m4 */
4500 #line 1948 "parser.y"
4502 (yyval.code) = code_new();
4503 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4504 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4505 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4506 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4507 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4508 code_t*out = (yyval.code) = abc_nop((yyval.code));
4509 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4510 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4512 (yyval.code) = var_block((yyval.code));
4523 /* Line 1464 of skeleton.m4 */
4524 #line 1963 "parser.y"
4526 (yyval.code) = abc___break__(0, "");
4536 /* Line 1464 of skeleton.m4 */
4537 #line 1966 "parser.y"
4539 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4549 /* Line 1464 of skeleton.m4 */
4550 #line 1969 "parser.y"
4552 (yyval.code) = abc___continue__(0, "");
4562 /* Line 1464 of skeleton.m4 */
4563 #line 1972 "parser.y"
4565 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4575 /* Line 1464 of skeleton.m4 */
4576 #line 1976 "parser.y"
4586 /* Line 1464 of skeleton.m4 */
4587 #line 1977 "parser.y"
4588 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4597 /* Line 1464 of skeleton.m4 */
4598 #line 1978 "parser.y"
4599 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4608 /* Line 1464 of skeleton.m4 */
4609 #line 1979 "parser.y"
4610 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4619 /* Line 1464 of skeleton.m4 */
4620 #line 1980 "parser.y"
4621 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4630 /* Line 1464 of skeleton.m4 */
4631 #line 1981 "parser.y"
4632 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4641 /* Line 1464 of skeleton.m4 */
4642 #line 1983 "parser.y"
4644 (yyval.code) = abc_dup(0);
4645 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4646 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4647 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4648 if((yyval.code)->opcode != OPCODE___BREAK__) {
4649 (yyval.code) = abc___fallthrough__((yyval.code), "");
4651 code_t*e = (yyval.code) = abc_nop((yyval.code));
4662 /* Line 1464 of skeleton.m4 */
4663 #line 1994 "parser.y"
4665 (yyval.code) = (yyvsp[(3) - (3)].code);
4675 /* Line 1464 of skeleton.m4 */
4676 #line 1997 "parser.y"
4686 /* Line 1464 of skeleton.m4 */
4687 #line 1997 "parser.y"
4689 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4690 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4691 code_t*out = (yyval.code) = abc_pop((yyval.code));
4692 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4694 code_t*c = (yyval.code),*lastblock=0;
4696 if(c->opcode == OPCODE_IFNE) {
4697 if(!c->next) syntaxerror("internal error in fallthrough handling");
4699 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4701 c->opcode = OPCODE_JUMP;
4702 c->branch = lastblock;
4704 /* fall through end of switch */
4705 c->opcode = OPCODE_NOP;
4711 (yyval.code) = var_block((yyval.code));
4722 /* Line 1464 of skeleton.m4 */
4723 #line 2026 "parser.y"
4724 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4733 /* Line 1464 of skeleton.m4 */
4734 #line 2027 "parser.y"
4736 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4737 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4739 NEW(abc_exception_t, e)
4740 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4741 e->var_name = multiname_clone(&name);
4742 (yyval.exception) = e;
4745 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4746 e->target = c = abc_nop(0);
4747 c = abc_setlocal(c, i);
4748 c = code_append(c, (yyvsp[(8) - (9)].code));
4762 /* Line 1464 of skeleton.m4 */
4763 #line 2046 "parser.y"
4764 {new_state();state->exception_name=0;}
4773 /* Line 1464 of skeleton.m4 */
4774 #line 2046 "parser.y"
4776 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4777 if(!(yyvsp[(4) - (5)].code)) {
4778 (yyval.exception)=0;
4781 NEW(abc_exception_t, e)
4782 e->exc_type = 0; //all exceptions
4783 e->var_name = 0; //no name
4786 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4788 (yyval.exception) = e;
4799 /* Line 1464 of skeleton.m4 */
4800 #line 2063 "parser.y"
4801 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4810 /* Line 1464 of skeleton.m4 */
4811 #line 2064 "parser.y"
4812 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4821 /* Line 1464 of skeleton.m4 */
4822 #line 2065 "parser.y"
4823 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4832 /* Line 1464 of skeleton.m4 */
4833 #line 2066 "parser.y"
4835 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4836 (yyval.catch_list).finally = 0;
4837 if((yyvsp[(2) - (2)].exception)) {
4838 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4839 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4850 /* Line 1464 of skeleton.m4 */
4851 #line 2074 "parser.y"
4853 (yyval.catch_list).l=list_new();
4854 (yyval.catch_list).finally = 0;
4855 if((yyvsp[(1) - (1)].exception)) {
4856 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4857 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4868 /* Line 1464 of skeleton.m4 */
4869 #line 2083 "parser.y"
4879 /* Line 1464 of skeleton.m4 */
4880 #line 2083 "parser.y"
4882 code_t*out = abc_nop(0);
4884 code_t*start = abc_nop(0);
4885 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4886 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4887 (yyval.code) = abc_jump((yyval.code), out);
4889 code_t*end = (yyval.code) = abc_nop((yyval.code));
4892 if((yyvsp[(6) - (6)].catch_list).finally)
4893 tmp = new_variable("__finally__", 0, 0);
4895 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4898 abc_exception_t*e = l->abc_exception;
4900 (yyval.code) = code_append((yyval.code), e->target);
4901 (yyval.code) = abc_jump((yyval.code), out);
4903 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4905 e->target = (yyval.code) = abc_nop((yyval.code));
4906 (yyval.code) = abc___rethrow__((yyval.code));
4914 (yyval.code) = code_append((yyval.code), out);
4916 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4918 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4920 (yyval.code) = var_block((yyval.code));
4931 /* Line 1464 of skeleton.m4 */
4932 #line 2128 "parser.y"
4934 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4935 (yyval.code)=abc_throw((yyval.code));
4945 /* Line 1464 of skeleton.m4 */
4946 #line 2132 "parser.y"
4948 if(!state->exception_name)
4949 syntaxerror("re-throw only possible within a catch block");
4950 variable_t*v = find_variable(state->exception_name);
4951 (yyval.code)=code_new();
4952 (yyval.code)=abc_getlocal((yyval.code), v->index);
4953 (yyval.code)=abc_throw((yyval.code));
4963 /* Line 1464 of skeleton.m4 */
4964 #line 2143 "parser.y"
4966 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4967 (yyval.code) = abc_pushscope((yyval.code));
4968 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4969 (yyval.code) = abc_popscope((yyval.code));
4979 /* Line 1464 of skeleton.m4 */
4980 #line 2153 "parser.y"
4981 {PASS12 (yyval.id)="package";}
4990 /* Line 1464 of skeleton.m4 */
4991 #line 2155 "parser.y"
4992 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5001 /* Line 1464 of skeleton.m4 */
5002 #line 2156 "parser.y"
5003 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5012 /* Line 1464 of skeleton.m4 */
5013 #line 2158 "parser.y"
5014 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5023 /* Line 1464 of skeleton.m4 */
5024 #line 2159 "parser.y"
5025 {PASS12 endpackage();(yyval.code)=0;}
5034 /* Line 1464 of skeleton.m4 */
5035 #line 2160 "parser.y"
5036 {PASS12 startpackage("");}
5045 /* Line 1464 of skeleton.m4 */
5046 #line 2161 "parser.y"
5047 {PASS12 endpackage();(yyval.code)=0;}
5056 /* Line 1464 of skeleton.m4 */
5057 #line 2163 "parser.y"
5060 if(!registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name)) {
5061 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5065 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5067 syntaxerror("Couldn't import class\n");
5068 state_has_imports();
5069 dict_put(state->imports, c->name, c);
5080 /* Line 1464 of skeleton.m4 */
5081 #line 2177 "parser.y"
5084 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
5085 as3_schedule_package((yyvsp[(2) - (4)].id));
5090 i->package = (yyvsp[(2) - (4)].id);
5091 state_has_imports();
5092 list_append(state->wildcard_imports, i);
5103 /* Line 1464 of skeleton.m4 */
5104 #line 2193 "parser.y"
5105 {PASS12 (yyval.flags)=0;}
5114 /* Line 1464 of skeleton.m4 */
5115 #line 2194 "parser.y"
5116 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5125 /* Line 1464 of skeleton.m4 */
5126 #line 2195 "parser.y"
5127 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
5136 /* Line 1464 of skeleton.m4 */
5137 #line 2196 "parser.y"
5138 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
5147 /* Line 1464 of skeleton.m4 */
5148 #line 2198 "parser.y"
5149 {PASS12 (yyval.token)=FLAG_PUBLIC;}
5158 /* Line 1464 of skeleton.m4 */
5159 #line 2199 "parser.y"
5160 {PASS12 (yyval.token)=FLAG_PRIVATE;}
5169 /* Line 1464 of skeleton.m4 */
5170 #line 2200 "parser.y"
5171 {PASS12 (yyval.token)=FLAG_PROTECTED;}
5180 /* Line 1464 of skeleton.m4 */
5181 #line 2201 "parser.y"
5182 {PASS12 (yyval.token)=FLAG_STATIC;}
5191 /* Line 1464 of skeleton.m4 */
5192 #line 2202 "parser.y"
5193 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
5202 /* Line 1464 of skeleton.m4 */
5203 #line 2203 "parser.y"
5204 {PASS12 (yyval.token)=FLAG_FINAL;}
5213 /* Line 1464 of skeleton.m4 */
5214 #line 2204 "parser.y"
5215 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
5224 /* Line 1464 of skeleton.m4 */
5225 #line 2205 "parser.y"
5226 {PASS12 (yyval.token)=FLAG_NATIVE;}
5235 /* Line 1464 of skeleton.m4 */
5236 #line 2206 "parser.y"
5237 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
5246 /* Line 1464 of skeleton.m4 */
5247 #line 2207 "parser.y"
5248 {PASS12 (yyval.token)=FLAG_NAMESPACE;}
5257 /* Line 1464 of skeleton.m4 */
5258 #line 2209 "parser.y"
5259 {(yyval.classinfo)=registry_getobjectclass();}
5268 /* Line 1464 of skeleton.m4 */
5269 #line 2210 "parser.y"
5270 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5279 /* Line 1464 of skeleton.m4 */
5280 #line 2212 "parser.y"
5281 {PASS12 (yyval.classinfo_list)=list_new();}
5290 /* Line 1464 of skeleton.m4 */
5291 #line 2213 "parser.y"
5292 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5301 /* Line 1464 of skeleton.m4 */
5302 #line 2215 "parser.y"
5303 {PASS12 (yyval.classinfo_list)=list_new();}
5312 /* Line 1464 of skeleton.m4 */
5313 #line 2216 "parser.y"
5314 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5323 /* Line 1464 of skeleton.m4 */
5324 #line 2220 "parser.y"
5325 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5334 /* Line 1464 of skeleton.m4 */
5335 #line 2222 "parser.y"
5336 {PASS12 endclass();(yyval.code)=0;}
5345 /* Line 1464 of skeleton.m4 */
5346 #line 2226 "parser.y"
5347 {PASS12 startclass((yyvsp[(1) - (5)].flags)|FLAG_INTERFACE,(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5356 /* Line 1464 of skeleton.m4 */
5357 #line 2228 "parser.y"
5358 {PASS12 endclass();(yyval.code)=0;}
5367 /* Line 1464 of skeleton.m4 */
5368 #line 2241 "parser.y"
5370 code_t*c = state->cls->static_init;
5371 c = code_append(c, (yyvsp[(1) - (1)].code));
5372 state->cls->static_init = c;
5382 /* Line 1464 of skeleton.m4 */
5383 #line 2252 "parser.y"
5385 syntaxerror("variable declarations not allowed in interfaces");
5395 /* Line 1464 of skeleton.m4 */
5396 #line 2255 "parser.y"
5399 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5400 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5401 syntaxerror("invalid method modifiers: interface methods always need to be public");
5403 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5404 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5405 list_deep_free((yyvsp[(6) - (8)].params).list);
5415 /* Line 1464 of skeleton.m4 */
5416 #line 2270 "parser.y"
5418 int flags = (yyvsp[(1) - (5)].flags);
5419 U8 access = flags2access((yyvsp[(1) - (5)].flags));
5421 varinfo_t* info = 0;
5423 memberinfo_t*i = registry_findmember(state->cls->info, (yyvsp[(3) - (5)].id), 1);
5425 check_override(i, flags);
5428 info = varinfo_register_onclass(state->cls->info, access, (yyvsp[(3) - (5)].id));
5430 slotinfo_t*i = registry_find(state->package, (yyvsp[(3) - (5)].id));
5432 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(3) - (5)].id));
5434 info = varinfo_register_global(access, state->package, (yyvsp[(3) - (5)].id));
5437 info->type = (yyvsp[(4) - (5)].classinfo);
5438 info->flags = flags;
5441 namespace_t mname_ns = {access, ""};
5442 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5444 trait_list_t**traits;
5448 mname_ns.name = state->package;
5449 traits = &global->init->traits;
5450 code = &global->init->method->body->code;
5451 } else if(flags&FLAG_STATIC) {
5453 traits = &state->cls->abc->static_traits;
5454 code = &state->cls->static_init;
5456 // instance variable
5457 traits = &state->cls->abc->traits;
5458 code = &state->cls->init;
5462 if((yyvsp[(4) - (5)].classinfo)) {
5463 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5464 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5466 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5468 info->slot = t->slot_id;
5470 /* initalization code (if needed) */
5472 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5473 c = abc_getlocal_0(c);
5474 c = code_append(c, (yyvsp[(5) - (5)].value).c);
5475 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5476 c = abc_setslot(c, t->slot_id);
5479 *code = code_append(*code, c);
5481 if((yyvsp[(2) - (5)].token)==KW_CONST) {
5482 t->kind= TRAIT_CONST;
5495 /* Line 1464 of skeleton.m4 */
5496 #line 2343 "parser.y"
5497 {(yyval.constant)=0;}
5506 /* Line 1464 of skeleton.m4 */
5507 #line 2344 "parser.y"
5508 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5517 /* Line 1464 of skeleton.m4 */
5518 #line 2346 "parser.y"
5519 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5528 /* Line 1464 of skeleton.m4 */
5529 #line 2347 "parser.y"
5530 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5539 /* Line 1464 of skeleton.m4 */
5540 #line 2348 "parser.y"
5541 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5550 /* Line 1464 of skeleton.m4 */
5551 #line 2349 "parser.y"
5552 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5561 /* Line 1464 of skeleton.m4 */
5562 #line 2350 "parser.y"
5563 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5572 /* Line 1464 of skeleton.m4 */
5573 #line 2352 "parser.y"
5574 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5583 /* Line 1464 of skeleton.m4 */
5584 #line 2353 "parser.y"
5585 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5594 /* Line 1464 of skeleton.m4 */
5595 #line 2354 "parser.y"
5596 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5605 /* Line 1464 of skeleton.m4 */
5606 #line 2355 "parser.y"
5609 as3_warning("Couldn't resolve %s", (yyvsp[(1) - (1)].id));
5610 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5620 /* Line 1464 of skeleton.m4 */
5621 #line 2364 "parser.y"
5624 memset(&(yyval.params),0,sizeof((yyval.params)));
5634 /* Line 1464 of skeleton.m4 */
5635 #line 2368 "parser.y"
5638 (yyval.params)=(yyvsp[(1) - (1)].params);
5648 /* Line 1464 of skeleton.m4 */
5649 #line 2374 "parser.y"
5652 memset(&(yyval.params),0,sizeof((yyval.params)));
5653 (yyval.params).varargs=1;
5654 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5664 /* Line 1464 of skeleton.m4 */
5665 #line 2380 "parser.y"
5668 (yyval.params) =(yyvsp[(1) - (4)].params);
5669 (yyval.params).varargs=1;
5670 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5680 /* Line 1464 of skeleton.m4 */
5681 #line 2388 "parser.y"
5684 (yyval.params) = (yyvsp[(1) - (3)].params);
5685 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5695 /* Line 1464 of skeleton.m4 */
5696 #line 2393 "parser.y"
5699 memset(&(yyval.params),0,sizeof((yyval.params)));
5700 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5710 /* Line 1464 of skeleton.m4 */
5711 #line 2399 "parser.y"
5713 PASS1 (yyval.param)=0;
5715 (yyval.param) = malloc(sizeof(param_t));
5716 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5717 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5718 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5728 /* Line 1464 of skeleton.m4 */
5729 #line 2407 "parser.y"
5731 PASS1 (yyval.param)=0;
5733 (yyval.param) = malloc(sizeof(param_t));
5734 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5735 (yyval.param)->type = TYPE_ANY;
5736 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5746 /* Line 1464 of skeleton.m4 */
5747 #line 2415 "parser.y"
5748 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5757 /* Line 1464 of skeleton.m4 */
5758 #line 2416 "parser.y"
5759 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5768 /* Line 1464 of skeleton.m4 */
5769 #line 2417 "parser.y"
5779 /* Line 1464 of skeleton.m4 */
5780 #line 2420 "parser.y"
5781 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5790 /* Line 1464 of skeleton.m4 */
5791 #line 2421 "parser.y"
5793 PASS1 old_state();list_deep_free((yyvsp[(6) - (12)].params).list);
5795 if(!state->method->info) syntaxerror("internal error");
5797 code_t*c = method_header();
5798 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5800 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5801 list_deep_free((yyvsp[(6) - (12)].params).list);
5812 /* Line 1464 of skeleton.m4 */
5813 #line 2435 "parser.y"
5814 {PASS12 (yyval.id)=0;}
5823 /* Line 1464 of skeleton.m4 */
5824 #line 2437 "parser.y"
5825 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5834 /* Line 1464 of skeleton.m4 */
5835 #line 2438 "parser.y"
5837 PASS1 old_state();list_deep_free((yyvsp[(4) - (10)].params).list);
5839 methodinfo_t*f = state->method->info;
5840 if(!f) syntaxerror("internal error");
5842 code_t*c = method_header();
5843 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5845 int index = state->method->var_index;
5846 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5847 list_deep_free((yyvsp[(4) - (10)].params).list);
5849 (yyval.value).c = abc_getlocal(0, index);
5850 (yyval.value).t = TYPE_FUNCTION(f);
5860 /* Line 1464 of skeleton.m4 */
5861 #line 2458 "parser.y"
5863 PASS1 (yyval.classinfo)=0;
5865 /* try current package */
5866 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
5867 if(!s) syntaxerror("Could not find class/method %s\n", (yyvsp[(1) - (1)].id));
5868 (yyval.classinfo) = (classinfo_t*)s;
5878 /* Line 1464 of skeleton.m4 */
5879 #line 2467 "parser.y"
5881 PASS1 static classinfo_t c;
5882 memset(&c, 0, sizeof(c));
5883 c.package = (yyvsp[(1) - (3)].id);
5884 c.name = (yyvsp[(3) - (3)].id);
5885 (yyval.classinfo)=&c;
5887 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5888 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5889 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5890 (yyval.classinfo) = (classinfo_t*)s;
5900 /* Line 1464 of skeleton.m4 */
5901 #line 2483 "parser.y"
5902 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5911 /* Line 1464 of skeleton.m4 */
5912 #line 2484 "parser.y"
5913 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5922 /* Line 1464 of skeleton.m4 */
5923 #line 2486 "parser.y"
5924 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5933 /* Line 1464 of skeleton.m4 */
5934 #line 2487 "parser.y"
5935 {(yyval.classinfo)=registry_getanytype();}
5944 /* Line 1464 of skeleton.m4 */
5945 #line 2488 "parser.y"
5946 {(yyval.classinfo)=registry_getanytype();}
5955 /* Line 1464 of skeleton.m4 */
5956 #line 2497 "parser.y"
5957 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5966 /* Line 1464 of skeleton.m4 */
5967 #line 2498 "parser.y"
5968 {(yyval.classinfo)=0;}
5977 /* Line 1464 of skeleton.m4 */
5978 #line 2502 "parser.y"
5979 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5988 /* Line 1464 of skeleton.m4 */
5989 #line 2503 "parser.y"
5990 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5999 /* Line 1464 of skeleton.m4 */
6000 #line 2505 "parser.y"
6001 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6010 /* Line 1464 of skeleton.m4 */
6011 #line 2509 "parser.y"
6012 {(yyval.value_list).len=1;
6013 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6023 /* Line 1464 of skeleton.m4 */
6024 #line 2513 "parser.y"
6025 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6034 /* Line 1464 of skeleton.m4 */
6035 #line 2514 "parser.y"
6037 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6038 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6048 /* Line 1464 of skeleton.m4 */
6049 #line 2520 "parser.y"
6051 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6052 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6054 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6055 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6056 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6057 (yyval.value).c = code_cutlast((yyval.value).c);
6058 (yyval.value).c = code_append((yyval.value).c, paramcode);
6059 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6060 multiname_destroy(name);
6061 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6062 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6063 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
6064 multiname_t*name = t->name;
6065 (yyval.value).c = code_cutlast((yyval.value).c);
6066 (yyval.value).c = code_append((yyval.value).c, paramcode);
6067 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6069 (yyval.value).c = code_append((yyval.value).c, paramcode);
6070 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6073 (yyval.value).t = TYPE_ANY;
6074 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6075 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6077 (yyval.value).c = abc_coerce_a((yyval.value).c);
6078 (yyval.value).t = TYPE_ANY;
6089 /* Line 1464 of skeleton.m4 */
6090 #line 2556 "parser.y"
6093 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6094 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6095 (yyval.value).c = code_cutlast((yyval.value).c);
6097 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6099 (yyval.value).t = TYPE_ANY;
6100 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6101 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6102 (yyval.value).c = code_cutlast((yyval.value).c);
6103 (yyval.value).c = code_append((yyval.value).c, paramcode);
6104 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6105 multiname_destroy(name);
6106 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6107 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6108 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
6109 if(t->kind!=TRAIT_METHOD) {
6110 //ok: flash allows to assign closures to members.
6112 multiname_t*name = t->name;
6113 (yyval.value).c = code_cutlast((yyval.value).c);
6114 (yyval.value).c = code_append((yyval.value).c, paramcode);
6115 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6116 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6117 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6118 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6119 (yyval.value).c = code_cutlast((yyval.value).c);
6120 (yyval.value).c = code_append((yyval.value).c, paramcode);
6121 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6122 multiname_destroy(name);
6124 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6125 (yyval.value).c = code_append((yyval.value).c, paramcode);
6126 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6129 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6130 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6132 (yyval.value).c = abc_coerce_a((yyval.value).c);
6133 (yyval.value).t = TYPE_ANY;
6144 /* Line 1464 of skeleton.m4 */
6145 #line 2602 "parser.y"
6147 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6148 if(!state->method) syntaxerror("super() not allowed outside of a function");
6149 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6151 (yyval.value).c = code_new();
6152 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6154 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6156 this is dependent on the control path, check this somewhere else
6157 if(state->method->has_super)
6158 syntaxerror("constructor may call super() only once");
6160 state->method->has_super = 1;
6162 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6163 (yyval.value).c = abc_pushundefined((yyval.value).c);
6164 (yyval.value).t = TYPE_ANY;
6174 /* Line 1464 of skeleton.m4 */
6175 #line 2623 "parser.y"
6177 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6178 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6179 (yyval.value).c = code_cutlast((yyval.value).c);
6181 multiname_t*name = 0;
6182 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6183 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6184 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6185 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6186 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
6187 (yyval.value).c = code_cutlast((yyval.value).c);
6188 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6190 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6191 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6192 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6194 (yyval.value).t = TYPE_BOOLEAN;
6204 /* Line 1464 of skeleton.m4 */
6205 #line 2644 "parser.y"
6207 (yyval.code) = abc_returnvoid(0);
6217 /* Line 1464 of skeleton.m4 */
6218 #line 2647 "parser.y"
6220 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6221 (yyval.code) = abc_returnvalue((yyval.code));
6231 /* Line 1464 of skeleton.m4 */
6232 #line 2654 "parser.y"
6233 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6242 /* Line 1464 of skeleton.m4 */
6243 #line 2655 "parser.y"
6244 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6253 /* Line 1464 of skeleton.m4 */
6254 #line 2656 "parser.y"
6256 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6257 (yyval.value).c = cut_last_push((yyval.value).c);
6258 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6259 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6269 /* Line 1464 of skeleton.m4 */
6270 #line 2662 "parser.y"
6272 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6282 /* Line 1464 of skeleton.m4 */
6283 #line 2668 "parser.y"
6284 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6293 /* Line 1464 of skeleton.m4 */
6294 #line 2672 "parser.y"
6295 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6304 /* Line 1464 of skeleton.m4 */
6305 #line 2674 "parser.y"
6306 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6315 /* Line 1464 of skeleton.m4 */
6316 #line 2676 "parser.y"
6317 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6326 /* Line 1464 of skeleton.m4 */
6327 #line 2680 "parser.y"
6329 (yyval.value).c = 0;
6330 namespace_t ns = {ACCESS_PACKAGE, ""};
6331 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6332 if(!(yyvsp[(1) - (1)].regexp).options) {
6333 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6334 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6335 (yyval.value).c = abc_construct((yyval.value).c, 1);
6337 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6338 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6339 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6340 (yyval.value).c = abc_construct((yyval.value).c, 2);
6342 (yyval.value).t = TYPE_REGEXP;
6352 /* Line 1464 of skeleton.m4 */
6353 #line 2697 "parser.y"
6354 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6355 //MULTINAME(m, registry_getintclass());
6356 //$$.c = abc_coerce2($$.c, &m); // FIXME
6357 (yyval.value).t = TYPE_INT;
6367 /* Line 1464 of skeleton.m4 */
6368 #line 2702 "parser.y"
6369 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6370 (yyval.value).t = TYPE_INT;
6380 /* Line 1464 of skeleton.m4 */
6381 #line 2705 "parser.y"
6382 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6383 (yyval.value).t = TYPE_INT;
6393 /* Line 1464 of skeleton.m4 */
6394 #line 2708 "parser.y"
6395 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6396 (yyval.value).t = TYPE_UINT;
6406 /* Line 1464 of skeleton.m4 */
6407 #line 2711 "parser.y"
6408 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6409 (yyval.value).t = TYPE_FLOAT;
6419 /* Line 1464 of skeleton.m4 */
6420 #line 2714 "parser.y"
6421 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6422 (yyval.value).t = TYPE_STRING;
6432 /* Line 1464 of skeleton.m4 */
6433 #line 2717 "parser.y"
6434 {(yyval.value).c = abc_pushundefined(0);
6435 (yyval.value).t = TYPE_ANY;
6445 /* Line 1464 of skeleton.m4 */
6446 #line 2720 "parser.y"
6447 {(yyval.value).c = abc_pushtrue(0);
6448 (yyval.value).t = TYPE_BOOLEAN;
6458 /* Line 1464 of skeleton.m4 */
6459 #line 2723 "parser.y"
6460 {(yyval.value).c = abc_pushfalse(0);
6461 (yyval.value).t = TYPE_BOOLEAN;
6471 /* Line 1464 of skeleton.m4 */
6472 #line 2726 "parser.y"
6473 {(yyval.value).c = abc_pushnull(0);
6474 (yyval.value).t = TYPE_NULL;
6484 /* Line 1464 of skeleton.m4 */
6485 #line 2730 "parser.y"
6486 {(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);
6487 (yyval.value).t = TYPE_BOOLEAN;
6497 /* Line 1464 of skeleton.m4 */
6498 #line 2733 "parser.y"
6499 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6500 (yyval.value).t = TYPE_BOOLEAN;
6510 /* Line 1464 of skeleton.m4 */
6511 #line 2736 "parser.y"
6512 {(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);
6513 (yyval.value).t = TYPE_BOOLEAN;
6523 /* Line 1464 of skeleton.m4 */
6524 #line 2739 "parser.y"
6525 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6526 (yyval.value).t = TYPE_BOOLEAN;
6536 /* Line 1464 of skeleton.m4 */
6537 #line 2742 "parser.y"
6538 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6539 (yyval.value).t = TYPE_BOOLEAN;
6549 /* Line 1464 of skeleton.m4 */
6550 #line 2745 "parser.y"
6551 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6552 (yyval.value).t = TYPE_BOOLEAN;
6562 /* Line 1464 of skeleton.m4 */
6563 #line 2748 "parser.y"
6564 {(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);
6565 (yyval.value).t = TYPE_BOOLEAN;
6575 /* Line 1464 of skeleton.m4 */
6576 #line 2751 "parser.y"
6577 {(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);
6578 (yyval.value).t = TYPE_BOOLEAN;
6588 /* Line 1464 of skeleton.m4 */
6589 #line 2755 "parser.y"
6590 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6591 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6592 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6593 (yyval.value).c = abc_dup((yyval.value).c);
6594 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6595 (yyval.value).c = cut_last_push((yyval.value).c);
6596 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6597 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6598 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6599 jmp->branch = label;
6609 /* Line 1464 of skeleton.m4 */
6610 #line 2766 "parser.y"
6612 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6613 /*printf("%08x:\n",$1.t);
6614 code_dump($1.c, 0, 0, "", stdout);
6615 printf("%08x:\n",$3.t);
6616 code_dump($3.c, 0, 0, "", stdout);
6617 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6618 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6619 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6620 (yyval.value).c = abc_dup((yyval.value).c);
6621 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6622 (yyval.value).c = cut_last_push((yyval.value).c);
6623 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6624 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6625 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6626 jmp->branch = label;
6636 /* Line 1464 of skeleton.m4 */
6637 #line 2784 "parser.y"
6638 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6639 (yyval.value).c = abc_not((yyval.value).c);
6640 (yyval.value).t = TYPE_BOOLEAN;
6650 /* Line 1464 of skeleton.m4 */
6651 #line 2789 "parser.y"
6652 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6653 (yyval.value).c = abc_bitnot((yyval.value).c);
6654 (yyval.value).t = TYPE_INT;
6664 /* Line 1464 of skeleton.m4 */
6665 #line 2794 "parser.y"
6666 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6667 (yyval.value).c = abc_bitand((yyval.value).c);
6668 (yyval.value).t = TYPE_INT;
6678 /* Line 1464 of skeleton.m4 */
6679 #line 2799 "parser.y"
6680 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6681 (yyval.value).c = abc_bitxor((yyval.value).c);
6682 (yyval.value).t = TYPE_INT;
6692 /* Line 1464 of skeleton.m4 */
6693 #line 2804 "parser.y"
6694 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6695 (yyval.value).c = abc_bitor((yyval.value).c);
6696 (yyval.value).t = TYPE_INT;
6706 /* Line 1464 of skeleton.m4 */
6707 #line 2809 "parser.y"
6708 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6709 (yyval.value).c = abc_rshift((yyval.value).c);
6710 (yyval.value).t = TYPE_INT;
6720 /* Line 1464 of skeleton.m4 */
6721 #line 2813 "parser.y"
6722 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6723 (yyval.value).c = abc_urshift((yyval.value).c);
6724 (yyval.value).t = TYPE_INT;
6734 /* Line 1464 of skeleton.m4 */
6735 #line 2817 "parser.y"
6736 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6737 (yyval.value).c = abc_lshift((yyval.value).c);
6738 (yyval.value).t = TYPE_INT;
6748 /* Line 1464 of skeleton.m4 */
6749 #line 2822 "parser.y"
6750 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6751 (yyval.value).c = abc_divide((yyval.value).c);
6752 (yyval.value).t = TYPE_NUMBER;
6762 /* Line 1464 of skeleton.m4 */
6763 #line 2826 "parser.y"
6764 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6765 (yyval.value).c = abc_modulo((yyval.value).c);
6766 (yyval.value).t = TYPE_NUMBER;
6776 /* Line 1464 of skeleton.m4 */
6777 #line 2830 "parser.y"
6778 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6779 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6780 (yyval.value).c = abc_add_i((yyval.value).c);
6781 (yyval.value).t = TYPE_INT;
6783 (yyval.value).c = abc_add((yyval.value).c);
6784 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6795 /* Line 1464 of skeleton.m4 */
6796 #line 2839 "parser.y"
6797 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6798 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6799 (yyval.value).c = abc_subtract_i((yyval.value).c);
6800 (yyval.value).t = TYPE_INT;
6802 (yyval.value).c = abc_subtract((yyval.value).c);
6803 (yyval.value).t = TYPE_NUMBER;
6814 /* Line 1464 of skeleton.m4 */
6815 #line 2848 "parser.y"
6816 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6817 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6818 (yyval.value).c = abc_multiply_i((yyval.value).c);
6819 (yyval.value).t = TYPE_INT;
6821 (yyval.value).c = abc_multiply((yyval.value).c);
6822 (yyval.value).t = TYPE_NUMBER;
6833 /* Line 1464 of skeleton.m4 */
6834 #line 2858 "parser.y"
6835 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6836 (yyval.value).c = abc_in((yyval.value).c);
6837 (yyval.value).t = TYPE_BOOLEAN;
6847 /* Line 1464 of skeleton.m4 */
6848 #line 2863 "parser.y"
6849 {char use_astype=0; // flash player's astype works differently than astypelate
6850 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
6851 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
6852 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6853 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
6855 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6856 (yyval.value).c = abc_astypelate((yyval.value).c);
6857 (yyval.value).t = TYPE_ANY;
6868 /* Line 1464 of skeleton.m4 */
6869 #line 2876 "parser.y"
6870 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6871 (yyval.value).c = abc_instanceof((yyval.value).c);
6872 (yyval.value).t = TYPE_BOOLEAN;
6882 /* Line 1464 of skeleton.m4 */
6883 #line 2881 "parser.y"
6884 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6885 (yyval.value).c = abc_istypelate((yyval.value).c);
6886 (yyval.value).t = TYPE_BOOLEAN;
6896 /* Line 1464 of skeleton.m4 */
6897 #line 2886 "parser.y"
6899 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6900 (yyval.value).c = abc_typeof((yyval.value).c);
6901 (yyval.value).t = TYPE_STRING;
6911 /* Line 1464 of skeleton.m4 */
6912 #line 2892 "parser.y"
6914 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6915 (yyval.value).c = abc_pushundefined((yyval.value).c);
6916 (yyval.value).t = TYPE_ANY;
6926 /* Line 1464 of skeleton.m4 */
6927 #line 2898 "parser.y"
6928 { (yyval.value).c = abc_pushundefined(0);
6929 (yyval.value).t = TYPE_ANY;
6939 /* Line 1464 of skeleton.m4 */
6940 #line 2902 "parser.y"
6941 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6950 /* Line 1464 of skeleton.m4 */
6951 #line 2904 "parser.y"
6953 (yyval.value)=(yyvsp[(2) - (2)].value);
6954 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6955 (yyval.value).c=abc_negate_i((yyval.value).c);
6956 (yyval.value).t = TYPE_INT;
6958 (yyval.value).c=abc_negate((yyval.value).c);
6959 (yyval.value).t = TYPE_NUMBER;
6970 /* Line 1464 of skeleton.m4 */
6971 #line 2915 "parser.y"
6973 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6974 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6976 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6977 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6978 (yyval.value).t = 0; // array elements have unknown type
6988 /* Line 1464 of skeleton.m4 */
6989 #line 2924 "parser.y"
6991 (yyval.value).c = code_new();
6992 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6993 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6994 (yyval.value).t = registry_getarrayclass();
7004 /* Line 1464 of skeleton.m4 */
7005 #line 2931 "parser.y"
7006 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7015 /* Line 1464 of skeleton.m4 */
7016 #line 2932 "parser.y"
7017 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7026 /* Line 1464 of skeleton.m4 */
7027 #line 2934 "parser.y"
7029 (yyval.value_list).cc = 0;
7030 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7031 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7032 (yyval.value_list).len = 2;
7042 /* Line 1464 of skeleton.m4 */
7043 #line 2940 "parser.y"
7045 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7046 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7047 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7048 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7058 /* Line 1464 of skeleton.m4 */
7059 #line 2949 "parser.y"
7061 (yyval.value).c = code_new();
7062 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7063 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7064 (yyval.value).t = registry_getobjectclass();
7074 /* Line 1464 of skeleton.m4 */
7075 #line 2956 "parser.y"
7077 code_t*c = (yyvsp[(3) - (3)].value).c;
7078 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7079 c=abc_multiply_i(c);
7083 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7084 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7085 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7095 /* Line 1464 of skeleton.m4 */
7096 #line 2968 "parser.y"
7098 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7099 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7100 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7101 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7111 /* Line 1464 of skeleton.m4 */
7112 #line 2974 "parser.y"
7114 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7115 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7116 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7117 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7127 /* Line 1464 of skeleton.m4 */
7128 #line 2980 "parser.y"
7130 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7131 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7132 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7133 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7143 /* Line 1464 of skeleton.m4 */
7144 #line 2986 "parser.y"
7146 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7147 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7148 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7149 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7159 /* Line 1464 of skeleton.m4 */
7160 #line 2992 "parser.y"
7162 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7163 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7164 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7165 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7175 /* Line 1464 of skeleton.m4 */
7176 #line 2998 "parser.y"
7178 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7179 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7180 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7181 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7191 /* Line 1464 of skeleton.m4 */
7192 #line 3004 "parser.y"
7194 code_t*c = (yyvsp[(3) - (3)].value).c;
7196 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7200 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7203 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7204 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7214 /* Line 1464 of skeleton.m4 */
7215 #line 3017 "parser.y"
7216 { code_t*c = (yyvsp[(3) - (3)].value).c;
7217 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7218 c=abc_subtract_i(c);
7221 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7224 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7225 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7235 /* Line 1464 of skeleton.m4 */
7236 #line 3028 "parser.y"
7238 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7239 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7240 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7241 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7251 /* Line 1464 of skeleton.m4 */
7252 #line 3035 "parser.y"
7254 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7255 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7256 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7257 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7258 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7259 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7260 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7261 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7262 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7263 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7273 /* Line 1464 of skeleton.m4 */
7274 #line 3048 "parser.y"
7276 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7277 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7278 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7279 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7280 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7281 (yyval.value).c = abc_getlocal(0, nr);
7282 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7283 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7284 (yyval.value).c = abc_getlocal(0, nr);
7285 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7286 } else syntaxerror("internal error");
7288 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7289 c=abc_increment_i(c);
7295 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7296 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7297 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7308 /* Line 1464 of skeleton.m4 */
7309 #line 3075 "parser.y"
7311 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7312 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7313 c=abc_decrement_i(c);
7319 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7320 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7321 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7331 /* Line 1464 of skeleton.m4 */
7332 #line 3089 "parser.y"
7334 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7335 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7336 c=abc_increment_i(c);
7342 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7343 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7344 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7354 /* Line 1464 of skeleton.m4 */
7355 #line 3103 "parser.y"
7357 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7358 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7359 c=abc_decrement_i(c);
7365 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7366 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7367 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7377 /* Line 1464 of skeleton.m4 */
7378 #line 3118 "parser.y"
7379 { if(!state->cls->info)
7380 syntaxerror("super keyword not allowed outside a class");
7381 classinfo_t*t = state->cls->info->superclass;
7382 if(!t) t = TYPE_OBJECT;
7384 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7385 namespace_t ns = {f->access, ""};
7386 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7387 (yyval.value).c = 0;
7388 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7389 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7390 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7400 /* Line 1464 of skeleton.m4 */
7401 #line 3132 "parser.y"
7404 (yyval.value).c = abc_pushundefined(0);
7405 (yyval.value).t = 0;
7406 as3_warning("ignored @ operator");
7416 /* Line 1464 of skeleton.m4 */
7417 #line 3139 "parser.y"
7419 // child attribute TODO
7420 (yyval.value).c = abc_pushundefined(0);
7421 (yyval.value).t = 0;
7422 as3_warning("ignored .@ operator");
7432 /* Line 1464 of skeleton.m4 */
7433 #line 3146 "parser.y"
7435 // namespace declaration TODO
7436 (yyval.value).c = abc_pushundefined(0);
7437 (yyval.value).t = 0;
7438 as3_warning("ignored :: operator");
7448 /* Line 1464 of skeleton.m4 */
7449 #line 3153 "parser.y"
7452 (yyval.value).c = abc_pushundefined(0);
7453 (yyval.value).t = 0;
7454 as3_warning("ignored .. operator");
7464 /* Line 1464 of skeleton.m4 */
7465 #line 3160 "parser.y"
7468 (yyval.value).c = abc_pushundefined(0);
7469 (yyval.value).t = 0;
7470 as3_warning("ignored .() operator");
7480 /* Line 1464 of skeleton.m4 */
7481 #line 3172 "parser.y"
7482 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7483 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7485 if(TYPE_IS_CLASS(t) && t->data) {
7490 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7492 if(f && !is_static != !(f->flags&FLAG_STATIC))
7494 if(f && f->slot && !noslot) {
7495 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7497 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7498 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7500 /* determine type */
7501 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7502 if(!(yyval.value).t)
7503 (yyval.value).c = abc_coerce_a((yyval.value).c);
7505 /* when resolving a property on an unknown type, we do know the
7506 name of the property (and don't seem to need the package), but
7507 we need to make avm2 try out all access modes */
7508 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7509 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7510 (yyval.value).c = abc_coerce_a((yyval.value).c);
7511 (yyval.value).t = registry_getanytype();
7522 /* Line 1464 of skeleton.m4 */
7523 #line 3205 "parser.y"
7525 (yyval.value).t = 0;
7526 (yyval.value).c = 0;
7531 /* look at variables */
7532 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
7533 // $1 is a local variable
7534 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7535 (yyval.value).t = v->type;
7539 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7541 /* look at current class' members */
7542 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7543 (f->flags&FLAG_STATIC) >= i_am_static) {
7544 // $1 is a function in this class
7545 int var_is_static = (f->flags&FLAG_STATIC);
7547 if(f->kind == INFOTYPE_METHOD) {
7548 (yyval.value).t = TYPE_FUNCTION(f);
7550 (yyval.value).t = f->type;
7552 if(var_is_static && !i_am_static) {
7553 /* access to a static member from a non-static location.
7554 do this via findpropstrict:
7555 there doesn't seem to be any non-lookup way to access
7556 static properties of a class */
7557 state->method->late_binding = 1;
7558 (yyval.value).t = f->type;
7559 namespace_t ns = {f->access, ""};
7560 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7561 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7562 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7564 } else if(f->slot>0) {
7565 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7566 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7569 namespace_t ns = {f->access, ""};
7570 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7571 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7572 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7577 /* look at actual classes, in the current package and imported */
7578 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7579 if(a->access == ACCESS_PACKAGEINTERNAL &&
7580 strcmp(a->package, state->package) &&
7581 strcmp(a->package, internal_filename_package)
7583 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
7584 infotypename(a),(yyvsp[(1) - (1)].id), a->package, state->package);
7586 if(a->kind != INFOTYPE_CLASS) {
7588 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7589 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7590 if(a->kind == INFOTYPE_METHOD) {
7591 methodinfo_t*f = (methodinfo_t*)a;
7592 (yyval.value).t = TYPE_FUNCTION(f);
7594 varinfo_t*v = (varinfo_t*)a;
7595 (yyval.value).t = v->type;
7598 classinfo_t*c = (classinfo_t*)a;
7600 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7601 (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
7604 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7606 (yyval.value).t = TYPE_CLASS(c);
7611 /* unknown object, let the avm2 resolve it */
7613 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7614 state->method->late_binding = 1;
7616 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7618 (yyval.value).t = 0;
7619 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7620 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7631 /* Line 1464 of skeleton.m4 */
7632 #line 3307 "parser.y"
7642 /* Line 1464 of skeleton.m4 */
7643 #line 3308 "parser.y"
7653 /* Line 1464 of skeleton.m4 */
7654 #line 3309 "parser.y"
7664 /* Line 1464 of skeleton.m4 */
7665 #line 3311 "parser.y"
7668 tokenizer_register_namespace((yyvsp[(3) - (3)].id));
7677 /* Line 1464 of skeleton.m4 */
7678 #line 7679 "parser.tab.c"
7681 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7685 YY_STACK_PRINT (yyss, yyssp);
7689 /* Now `shift' the result of the reduction. Determine what state
7690 that goes to, based on the state we popped back to and the rule
7691 number reduced by. */
7695 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7696 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7697 yystate = yytable[yystate];
7699 yystate = yydefgoto[yyn - YYNTOKENS];
7704 /*------------------------------------.
7705 | yyerrlab -- here on detecting error |
7706 `------------------------------------*/
7708 /* If not already recovering from an error, report this error. */
7712 #if ! YYERROR_VERBOSE
7713 yyerror (YY_("syntax error"));
7716 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7717 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7719 YYSIZE_T yyalloc = 2 * yysize;
7720 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7721 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7722 if (yymsg != yymsgbuf)
7723 YYSTACK_FREE (yymsg);
7724 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7726 yymsg_alloc = yyalloc;
7730 yymsg_alloc = sizeof yymsgbuf;
7734 if (0 < yysize && yysize <= yymsg_alloc)
7736 (void) yysyntax_error (yymsg, yystate, yychar);
7741 yyerror (YY_("syntax error"));
7743 goto yyexhaustedlab;
7751 if (yyerrstatus == 3)
7753 /* If just tried and failed to reuse lookahead token after an
7754 error, discard it. */
7756 if (yychar <= YYEOF)
7758 /* Return failure if at end of input. */
7759 if (yychar == YYEOF)
7764 yydestruct ("Error: discarding",
7770 /* Else will try to reuse lookahead token after shifting the error
7775 /*---------------------------------------------------.
7776 | yyerrorlab -- error raised explicitly by YYERROR. |
7777 `---------------------------------------------------*/
7780 /* Pacify compilers like GCC when the user code never invokes
7781 YYERROR and the label yyerrorlab therefore never appears in user
7783 if (/*CONSTCOND*/ 0)
7786 /* Do not reclaim the symbols of the rule which action triggered
7790 YY_STACK_PRINT (yyss, yyssp);
7795 /*-------------------------------------------------------------.
7796 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7797 `-------------------------------------------------------------*/
7799 yyerrstatus = 3; /* Each real token shifted decrements this. */
7803 yyn = yypact[yystate];
7804 if (yyn != YYPACT_NINF)
7807 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7815 /* Pop the current state because it cannot handle the error token. */
7820 yydestruct ("Error: popping",
7821 yystos[yystate], yyvsp);
7824 YY_STACK_PRINT (yyss, yyssp);
7830 /* Shift the error token. */
7831 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7837 /*-------------------------------------.
7838 | yyacceptlab -- YYACCEPT comes here. |
7839 `-------------------------------------*/
7844 /*-----------------------------------.
7845 | yyabortlab -- YYABORT comes here. |
7846 `-----------------------------------*/
7851 #if !defined(yyoverflow) || YYERROR_VERBOSE
7852 /*-------------------------------------------------.
7853 | yyexhaustedlab -- memory exhaustion comes here. |
7854 `-------------------------------------------------*/
7856 yyerror (YY_("memory exhausted"));
7862 if (yychar != YYEMPTY)
7863 yydestruct ("Cleanup: discarding lookahead",
7865 /* Do not reclaim the symbols of the rule which action triggered
7866 this YYABORT or YYACCEPT. */
7868 YY_STACK_PRINT (yyss, yyssp);
7869 while (yyssp != yyss)
7871 yydestruct ("Cleanup: popping",
7872 yystos[*yyssp], yyvsp);
7877 YYSTACK_FREE (yyss);
7880 if (yymsg != yymsgbuf)
7881 YYSTACK_FREE (yymsg);
7883 /* Make sure YYID is used. */
7884 return YYID (yyresult);