2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse avm2_parse
68 #define yylex avm2_lex
69 #define yyerror avm2_error
70 #define yylval avm2_lval
71 #define yychar avm2_char
72 #define yydebug avm2_debug
73 #define yynerrs avm2_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
94 /* Line 198 of skeleton.m4 */
95 #line 96 "parser.tab.c"
97 /* Enabling traces. */
102 /* Enabling verbose error messages. */
103 #ifdef YYERROR_VERBOSE
104 # undef YYERROR_VERBOSE
105 # define YYERROR_VERBOSE 1
107 # define YYERROR_VERBOSE 1
110 /* Enabling the token table. */
111 #ifndef YYTOKEN_TABLE
112 # define YYTOKEN_TABLE 0
119 /* Put the tokens into the symbol table, so that GDB and other debuggers
214 below_semicolon = 350,
215 below_assignment = 351,
217 minusminus_prefix = 355,
218 plusplus_prefix = 356,
220 above_identifier = 358,
228 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
230 /* Line 223 of skeleton.m4 */
235 /* Line 223 of skeleton.m4 */
238 enum yytokentype token;
241 classinfo_t*classinfo;
242 classinfo_list_t*classinfo_list;
245 unsigned int number_uint;
249 //typedcode_list_t*value_list;
250 codeandnumber_t value_list;
256 for_start_t for_start;
257 abc_exception_t *exception;
260 abc_exception_list_t *l;
266 /* Line 223 of skeleton.m4 */
267 #line 268 "parser.tab.c"
269 # define YYSTYPE_IS_TRIVIAL 1
270 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
271 # define YYSTYPE_IS_DECLARED 1
275 /* Copy the second part of user declarations. */
277 /* Line 273 of skeleton.m4 */
281 static int yyerror(char*s)
283 syntaxerror("%s", s);
284 return 0; //make gcc happy
287 static char* concat2(const char* t1, const char* t2)
291 char*text = malloc(l1+l2+1);
292 memcpy(text , t1, l1);
293 memcpy(text+l1, t2, l2);
297 static char* concat3(const char* t1, const char* t2, const char* t3)
302 char*text = malloc(l1+l2+l3+1);
303 memcpy(text , t1, l1);
304 memcpy(text+l1, t2, l2);
305 memcpy(text+l1+l2, t3, l3);
310 typedef struct _import {
314 DECLARE_LIST(import);
316 typedef struct _classstate {
322 char has_constructor;
325 typedef struct _methodstate {
332 abc_exception_list_t*exceptions;
335 typedef struct _state {
340 import_list_t*wildcard_imports;
342 char has_own_imports;
345 methodstate_t*method;
352 typedef struct _global {
359 static global_t*global = 0;
360 static state_t* state = 0;
364 #define MULTINAME(m,x) \
367 registry_fill_multiname(&m, &m##_ns, x);
369 #define MEMBER_MULTINAME(m,f,n) \
373 m##_ns = flags2namespace(f->flags, ""); \
376 m.namespace_set = 0; \
379 m.type = MULTINAME; \
381 m.namespace_set = &nopackage_namespace_set; \
385 /* warning: list length of namespace set is undefined */
386 #define MULTINAME_LATE(m, access, package) \
387 namespace_t m##_ns = {access, package}; \
388 namespace_set_t m##_nsset; \
389 namespace_list_t m##_l;m##_l.next = 0; \
390 m##_nsset.namespaces = &m##_l; \
391 m##_nsset = m##_nsset; \
392 m##_l.namespace = &m##_ns; \
393 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
395 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
396 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
397 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
398 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
399 static namespace_list_t nl4 = {&ns4,0};
400 static namespace_list_t nl3 = {&ns3,&nl4};
401 static namespace_list_t nl2 = {&ns2,&nl3};
402 static namespace_list_t nl1 = {&ns1,&nl2};
403 static namespace_set_t nopackage_namespace_set = {&nl1};
405 static void new_state()
408 state_t*oldstate = state;
410 memcpy(s, state, sizeof(state_t)); //shallow copy
412 s->imports = dict_new();
416 state->has_own_imports = 0;
417 state->vars = dict_new();
418 state->old = oldstate;
420 static void state_has_imports()
422 state->wildcard_imports = list_clone(state->wildcard_imports);
423 state->imports = dict_clone(state->imports);
424 state->has_own_imports = 1;
427 static void state_destroy(state_t*state)
429 if(state->has_own_imports) {
430 list_free(state->wildcard_imports);
431 dict_destroy(state->imports);state->imports=0;
433 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
434 dict_destroy(state->imports);state->imports=0;
438 for(t=0;t<state->vars->hashsize;t++) {
439 dictentry_t*e =state->vars->slots[t];
441 free(e->data);e->data=0;
445 dict_destroy(state->vars);state->vars=0;
451 static void old_state()
453 if(!state || !state->old)
454 syntaxerror("invalid nesting");
455 state_t*leaving = state;
459 if(leaving->method && leaving->method != state->method) {
460 free(leaving->method);
463 if(leaving->cls && leaving->cls != state->cls) {
468 state_destroy(leaving);
471 void initialize_parser()
473 global = rfx_calloc(sizeof(global_t));
474 global->file = abc_file_new();
475 global->file->flags &= ~ABCFILE_LAZY;
476 global->variable_count = 1;
477 global->init = abc_initscript(global->file);
478 code_t*c = global->init->method->body->code;
479 c = abc_getlocal_0(c);
480 c = abc_pushscope(c);
481 /*c = abc_findpropstrict(c, "[package]::trace");
482 c = abc_pushstring(c, "[entering global init function]");
483 c = abc_callpropvoid(c, "[package]::trace", 1);*/
484 global->init->method->body->code = c;
487 void initialize_file(char*filename)
490 state->package = filename;
491 // needed for state->method->late_binding:
492 state->method = rfx_calloc(sizeof(methodstate_t));
496 if(!state || state->level!=1) {
497 syntaxerror("unexpected end of file");
499 state_destroy(state);state=0;
502 void* finish_parser()
504 code_t*c = global->init->method->body->code;
505 /*c = abc_findpropstrict(c, "[package]::trace");
506 c = abc_pushstring(c, "[leaving global init function]");
507 c = abc_callpropvoid(c, "[package]::trace", 1);*/
508 c = abc_returnvoid(c);
509 global->init->method->body->code = c;
514 static void xx_scopetest()
516 /* findpropstrict doesn't just return a scope object- it
517 also makes it "active" somehow. Push local_0 on the
518 scope stack and read it back with findpropstrict, it'll
519 contain properties like "trace". Trying to find the same
520 property on a "vanilla" local_0 yields only a "undefined" */
521 //c = abc_findpropstrict(c, "[package]::trace");
523 /*c = abc_getlocal_0(c);
524 c = abc_findpropstrict(c, "[package]::trace");
526 c = abc_setlocal_1(c);
528 c = abc_pushbyte(c, 0);
529 c = abc_setlocal_2(c);
531 code_t*xx = c = abc_label(c);
532 c = abc_findpropstrict(c, "[package]::trace");
533 c = abc_pushstring(c, "prop:");
534 c = abc_hasnext2(c, 1, 2);
536 c = abc_setlocal_3(c);
537 c = abc_callpropvoid(c, "[package]::trace", 2);
538 c = abc_getlocal_3(c);
540 c = abc_iftrue(c,xx);*/
544 typedef struct _variable {
550 static variable_t* find_variable(char*name)
556 v = dict_lookup(s->vars, name);
564 static variable_t* find_variable_safe(char*name)
566 variable_t* v = find_variable(name);
568 syntaxerror("undefined variable: %s", name);
571 static char variable_exists(char*name)
573 return dict_lookup(state->vars, name)!=0;
575 code_t*defaultvalue(code_t*c, classinfo_t*type);
576 static int new_variable(char*name, classinfo_t*type, char init)
579 v->index = global->variable_count;
583 dict_put(state->vars, name, v);
585 return global->variable_count++;
587 #define TEMPVARNAME "__as3_temp__"
588 static int gettempvar()
590 variable_t*v = find_variable(TEMPVARNAME);
593 return new_variable(TEMPVARNAME, 0, 0);
596 code_t* var_block(code_t*body)
602 for(t=0;t<state->vars->hashsize;t++) {
603 dictentry_t*e = state->vars->slots[t];
605 variable_t*v = (variable_t*)e->data;
606 if(v->type && v->init) {
607 c = defaultvalue(c, v->type);
608 c = abc_setlocal(c, v->index);
609 k = abc_kill(k, v->index);
619 if(x->opcode== OPCODE___BREAK__ ||
620 x->opcode== OPCODE___CONTINUE__) {
621 /* link kill code before break/continue */
622 code_t*e = code_dup(k);
623 code_t*s = code_start(e);
635 c = code_append(c, body);
636 c = code_append(c, k);
640 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
642 c = code_append(c, header);
643 c = code_append(c, var_block(body));
644 /* append return if necessary */
645 if(!c || (c->opcode != OPCODE_RETURNVOID &&
646 c->opcode != OPCODE_RETURNVALUE)) {
647 c = abc_returnvoid(c);
653 static void startpackage(char*name)
656 /*printf("entering package \"%s\"\n", name);*/
657 state->package = strdup(name);
658 global->variable_count = 1;
660 static void endpackage()
662 /*printf("leaving package \"%s\"\n", state->package);*/
664 //used e.g. in classinfo_register:
665 //free(state->package);state->package=0;
670 void parserassert(int b)
672 if(!b) syntaxerror("internal error: assertion failed");
676 char*as3_globalclass=0;
677 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
680 syntaxerror("inner classes now allowed");
683 global->variable_count = 1;
684 state->cls = rfx_calloc(sizeof(classstate_t));
685 state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
688 classinfo_list_t*mlist=0;
690 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
691 syntaxerror("invalid modifier(s)");
693 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
694 syntaxerror("public and internal not supported at the same time.");
696 /* create the class name, together with the proper attributes */
700 if(!(flags&FLAG_PUBLIC) && !state->package) {
701 access = ACCESS_PRIVATE; package = current_filename;
702 } else if(!(flags&FLAG_PUBLIC) && state->package) {
703 access = ACCESS_PACKAGEINTERNAL; package = state->package;
704 } else if(state->package) {
705 access = ACCESS_PACKAGE; package = state->package;
707 syntaxerror("public classes only allowed inside a package");
711 if(registry_findclass(package, classname)) {
712 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
714 /* build info struct */
715 int num_interfaces = (list_length(implements));
716 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
720 state->cls->info = registry_findclass(package, classname);
721 parserassert((int)state->cls->info);
723 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
724 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
726 classinfo_list_t*l = implements;
727 for(l=implements;l;l=l->next) {
728 state->cls->info->interfaces[pos++] = l->classinfo;
731 /* generate the abc code for this class */
732 MULTINAME(classname2,state->cls->info);
733 multiname_t*extends2 = sig2mname(extends);
735 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
736 if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
737 if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
739 state->cls->info->flags |= CLASS_INTERFACE;
740 abc_class_interface(state->cls->abc);
743 abc_class_protectedNS(state->cls->abc, classname);
745 for(mlist=implements;mlist;mlist=mlist->next) {
746 MULTINAME(m, mlist->classinfo);
747 abc_class_add_interface(state->cls->abc, &m);
750 /* write the construction code for this class to the global init
752 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
754 abc_method_body_t*m = global->init->method->body;
755 __ getglobalscope(m);
756 classinfo_t*s = extends;
761 //TODO: take a look at the current scope stack, maybe
762 // we can re-use something
767 multiname_t*s2 = sig2mname(s);
769 multiname_destroy(s2);
771 __ pushscope(m); count++;
772 m->code = m->code->prev->prev; // invert
774 /* continue appending after last op end */
775 while(m->code && m->code->next) m->code = m->code->next;
777 /* TODO: if this is one of *our* classes, we can also
778 do a getglobalscope/getslot <nr> (which references
779 the init function's slots) */
781 __ getlex2(m, extends2);
783 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
784 stack is not the superclass */
785 __ pushscope(m);count++;
788 /* notice: we get a verify error #1107 if the top element on the scope
789 stack is not the global object */
791 __ pushscope(m);count++;
793 __ newclass(m,state->cls->abc);
797 __ setslot(m, slotindex);
798 multiname_destroy(extends2);
800 /* flash.display.MovieClip handling */
802 if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
803 if(state->package && state->package[0]) {
804 as3_globalclass = concat3(state->package, ".", classname);
806 as3_globalclass = strdup(classname);
812 static void endclass()
815 if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
817 c = abc_getlocal_0(c);
818 c = abc_constructsuper(c, 0);
819 state->cls->init = code_append(state->cls->init, c);
821 if(!state->method->late_binding) {
822 // class initialization code uses late binding
824 c = abc_getlocal_0(c);
825 c = abc_pushscope(c);
826 state->cls->static_init = code_append(c, state->cls->static_init);
829 if(state->cls->init) {
830 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
831 m->body->code = wrap_function(0, state->cls->init, m->body->code);
833 if(state->cls->static_init) {
834 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
835 m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
842 void check_code_for_break(code_t*c)
845 if(c->opcode == OPCODE___BREAK__) {
846 char*name = string_cstr(c->data[0]);
847 syntaxerror("Unresolved \"break %s\"", name);
849 if(c->opcode == OPCODE___CONTINUE__) {
850 char*name = string_cstr(c->data[0]);
851 syntaxerror("Unresolved \"continue %s\"", name);
858 static void check_constant_against_type(classinfo_t*t, constant_t*c)
860 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
861 if(TYPE_IS_NUMBER(t)) {
862 xassert(c->type == CONSTANT_FLOAT
863 || c->type == CONSTANT_INT
864 || c->type == CONSTANT_UINT);
865 } else if(TYPE_IS_UINT(t)) {
866 xassert(c->type == CONSTANT_UINT ||
867 (c->type == CONSTANT_INT && c->i>0));
868 } else if(TYPE_IS_INT(t)) {
869 xassert(c->type == CONSTANT_INT);
870 } else if(TYPE_IS_BOOLEAN(t)) {
871 xassert(c->type == CONSTANT_TRUE
872 || c->type == CONSTANT_FALSE);
877 static int flags2access(int flags)
880 if(flags&FLAG_PUBLIC) {
881 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
882 syntaxerror("invalid combination of access levels");
883 access = ACCESS_PACKAGE;
884 } else if(flags&FLAG_PRIVATE) {
885 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
886 syntaxerror("invalid combination of access levels");
887 access = ACCESS_PRIVATE;
888 } else if(flags&FLAG_PROTECTED) {
889 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
890 syntaxerror("invalid combination of access levels");
891 access = ACCESS_PROTECTED;
893 access = ACCESS_PACKAGEINTERNAL;
899 static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
901 memberinfo_t*minfo = 0;
904 minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
905 minfo->return_type = return_type;
906 } else if(getset != KW_GET && getset != KW_SET) {
908 if((minfo = registry_findmember(state->cls->info, name, 0))) {
909 if(minfo->parent == state->cls->info) {
910 syntaxerror("class already contains a member/method called '%s'", name);
911 } else if(!minfo->parent) {
912 syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
914 if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
915 syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
918 minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
919 minfo->return_type = return_type;
920 // getslot on a member slot only returns "undefined", so no need
921 // to actually store these
922 //state->minfo->slot = state->method->abc->method->trait->slot_id;
924 //class getter/setter
925 int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
929 else if(params->list)
930 type = params->list->param->type;
931 // not sure wether to look into superclasses here, too
932 if((minfo=registry_findmember(state->cls->info, name, 0))) {
933 if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
934 syntaxerror("class already contains a member or method called '%s'", name);
936 syntaxerror("getter/setter for '%s' already defined", name);
937 /* make a setter or getter into a getset */
942 if(type && minfo->type != type)
943 syntaxerror("different type in getter and setter");
945 minfo = memberinfo_register(state->cls->info, name, gs);
948 /* can't assign a slot as getter and setter might have different slots */
949 //minfo->slot = slot;
951 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
952 if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
953 if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
954 if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
955 if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
956 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
960 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
961 params_t*params, classinfo_t*return_type)
963 if(state->method && state->method->info) {
964 syntaxerror("not able to start another method scope");
967 state->method = rfx_calloc(sizeof(methodstate_t));
968 state->method->has_super = 0;
971 state->method->is_constructor = !strcmp(state->cls->info->name,name);
972 state->cls->has_constructor |= state->method->is_constructor;
974 state->method->is_global = 1;
975 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
977 if(state->method->is_constructor)
978 name = "__as3_constructor__";
982 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
986 /* retrieve the member info that we stored in the first pass.
987 TODO: better getter/setter support? */
988 if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
989 else state->method->info = registry_findmember(state->cls->info, name, 0);
990 state->method->info->return_type = return_type;
992 global->variable_count = 0;
993 /* state->vars is initialized by state_new */
994 if(!state->method->is_global)
995 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
997 new_variable("globalscope", 0, 0);
999 for(p=params->list;p;p=p->next) {
1000 new_variable(p->param->name, p->param->type, 0);
1005 static void endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1006 params_t*params, classinfo_t*return_type, code_t*body)
1015 multiname_t*type2 = sig2mname(return_type);
1017 if(state->method->is_constructor) {
1018 f = abc_class_getconstructor(state->cls->abc, type2);
1019 } else if(!state->method->is_global) {
1020 namespace_t mname_ns = flags2namespace(flags, "");
1021 multiname_t mname = {QNAME, &mname_ns, 0, name};
1023 if(flags&FLAG_STATIC)
1024 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1026 f = abc_class_method(state->cls->abc, type2, &mname);
1027 slot = f->trait->slot_id;
1029 namespace_t mname_ns = flags2namespace(flags, state->package);
1030 multiname_t mname = {QNAME, &mname_ns, 0, name};
1032 f = abc_method_new(global->file, type2, 1);
1033 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1034 //abc_code_t*c = global->init->method->body->code;
1036 //flash doesn't seem to allow us to access function slots
1037 //state->method->info->slot = slot;
1039 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1040 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1041 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1042 if(params->varargs) f->flags |= METHOD_NEED_REST;
1046 for(p=params->list;p;p=p->next) {
1047 if(params->varargs && !p->next) {
1048 break; //varargs: omit last parameter in function signature
1050 multiname_t*m = sig2mname(p->param->type);
1051 list_append(f->parameters, m);
1052 if(p->param->value) {
1053 check_constant_against_type(p->param->type, p->param->value);
1054 opt=1;list_append(f->optional_parameters, p->param->value);
1056 syntaxerror("non-optional parameter not allowed after optional parameters");
1059 check_code_for_break(body);
1062 f->body->code = body;
1063 f->body->exceptions = state->method->exceptions;
1064 } else { //interface
1066 syntaxerror("interface methods can't have a method body");
1074 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1079 void breakjumpsto(code_t*c, char*name, code_t*jump)
1082 if(c->opcode == OPCODE___BREAK__) {
1083 string_t*name2 = c->data[0];
1084 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1085 c->opcode = OPCODE_JUMP;
1092 void continuejumpsto(code_t*c, char*name, code_t*jump)
1095 if(c->opcode == OPCODE___CONTINUE__) {
1096 string_t*name2 = c->data[0];
1097 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1098 c->opcode = OPCODE_JUMP;
1106 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1107 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1108 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1110 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1112 if(!type1 || !type2)
1113 return registry_getanytype();
1114 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1115 return registry_getanytype();
1118 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1127 return registry_getanytype();
1129 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1134 return abc_coerce_a(c);
1138 // cast an "any" type to a specific type. subject to
1139 // runtime exceptions
1140 return abc_coerce2(c, &m);
1143 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1144 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1145 // allow conversion between number types
1146 return abc_coerce2(c, &m);
1148 //printf("%s.%s\n", from.package, from.name);
1149 //printf("%s.%s\n", to.package, to.name);
1151 classinfo_t*supertype = from;
1153 if(supertype == to) {
1154 // target type is one of from's superclasses
1155 return abc_coerce2(c, &m);
1158 while(supertype->interfaces[t]) {
1159 if(supertype->interfaces[t]==to) {
1160 // target type is one of from's interfaces
1161 return abc_coerce2(c, &m);
1165 supertype = supertype->superclass;
1167 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1169 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1171 syntaxerror("can't convert type %s to %s", from->name, to->name);
1172 return 0; // make gcc happy
1175 code_t*defaultvalue(code_t*c, classinfo_t*type)
1177 if(TYPE_IS_INT(type)) {
1178 c = abc_pushbyte(c, 0);
1179 } else if(TYPE_IS_UINT(type)) {
1180 c = abc_pushuint(c, 0);
1181 } else if(TYPE_IS_FLOAT(type)) {
1183 } else if(TYPE_IS_BOOLEAN(type)) {
1184 c = abc_pushfalse(c);
1186 //c = abc_pushundefined(c);
1188 c = abc_pushnull(c);
1190 c = abc_coerce2(c, &m);
1195 char is_pushundefined(code_t*c)
1197 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1200 static classinfo_t* find_class(char*name)
1204 c = registry_findclass(state->package, name);
1207 /* try explicit imports */
1208 dictentry_t* e = dict_get_slot(state->imports, name);
1211 if(!strcmp(e->key, name)) {
1212 c = (classinfo_t*)e->data;
1218 /* try package.* imports */
1219 import_list_t*l = state->wildcard_imports;
1221 //printf("does package %s contain a class %s?\n", l->import->package, name);
1222 c = registry_findclass(l->import->package, name);
1227 /* try global package */
1228 c = registry_findclass("", name);
1231 /* try local "filename" package */
1232 c = registry_findclass(current_filename_short, name);
1238 static char is_getlocal(code_t*c)
1240 if(!c || c->prev || c->next)
1242 return(c->opcode == OPCODE_GETLOCAL
1243 || c->opcode == OPCODE_GETLOCAL_0
1244 || c->opcode == OPCODE_GETLOCAL_1
1245 || c->opcode == OPCODE_GETLOCAL_2
1246 || c->opcode == OPCODE_GETLOCAL_3);
1248 static int getlocalnr(code_t*c)
1250 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1251 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1252 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1253 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1254 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1255 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1259 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1263 [prefix code] [read instruction]
1267 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1270 if(in && in->opcode == OPCODE_COERCE_A) {
1271 in = code_cutlast(in);
1274 syntaxerror("internal error");
1276 /* chop off read instruction */
1280 prefix = r->prev;r->prev = 0;
1286 char use_temp_var = readbefore;
1288 /* generate the write instruction, and maybe append a dup to the prefix code */
1289 code_t* write = abc_nop(0);
1290 if(r->opcode == OPCODE_GETPROPERTY) {
1291 write->opcode = OPCODE_SETPROPERTY;
1292 multiname_t*m = (multiname_t*)r->data[0];
1293 write->data[0] = multiname_clone(m);
1294 if(m->type == QNAME || m->type == MULTINAME) {
1296 prefix = abc_dup(prefix); // we need the object, too
1299 } else if(m->type == MULTINAMEL) {
1301 /* dupping two values on the stack requires 5 operations and one register-
1302 couldn't adobe just have given us a dup2? */
1303 int temp = gettempvar();
1304 prefix = abc_setlocal(prefix, temp);
1305 prefix = abc_dup(prefix);
1306 prefix = abc_getlocal(prefix, temp);
1307 prefix = abc_swap(prefix);
1308 prefix = abc_getlocal(prefix, temp);
1310 prefix = abc_kill(prefix, temp);
1314 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1316 } else if(r->opcode == OPCODE_GETSLOT) {
1317 write->opcode = OPCODE_SETSLOT;
1318 write->data[0] = r->data[0];
1320 prefix = abc_dup(prefix); // we need the object, too
1323 } else if(r->opcode == OPCODE_GETLOCAL) {
1324 write->opcode = OPCODE_SETLOCAL;
1325 write->data[0] = r->data[0];
1326 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1327 write->opcode = OPCODE_SETLOCAL_0;
1328 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1329 write->opcode = OPCODE_SETLOCAL_1;
1330 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1331 write->opcode = OPCODE_SETLOCAL_2;
1332 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1333 write->opcode = OPCODE_SETLOCAL_3;
1336 syntaxerror("illegal lvalue: can't assign a value to this expression");
1343 /* with getproperty/getslot, we have to be extra careful not
1344 to execute the read code twice, as it might have side-effects
1345 (e.g. if the property is in fact a setter/getter combination)
1347 So read the value, modify it, and write it again,
1348 using prefix only once and making sure (by using a temporary
1349 register) that the return value is what we just wrote */
1350 temp = gettempvar();
1351 c = code_append(c, prefix);
1352 c = code_append(c, r);
1355 c = abc_setlocal(c, temp);
1357 c = code_append(c, middlepart);
1360 c = abc_setlocal(c, temp);
1362 c = code_append(c, write);
1363 c = abc_getlocal(c, temp);
1364 c = abc_kill(c, temp);
1366 /* if we're allowed to execute the read code twice *and*
1367 the middlepart doesn't modify the code, things are easier.
1369 code_t* r2 = code_dup(r);
1370 //c = code_append(c, prefix);
1371 parserassert(!prefix);
1372 c = code_append(c, r);
1373 c = code_append(c, middlepart);
1374 c = code_append(c, write);
1375 c = code_append(c, r2);
1378 /* even smaller version: overwrite the value without reading
1382 c = code_append(c, prefix);
1385 c = code_append(c, middlepart);
1386 c = code_append(c, write);
1387 c = code_append(c, r);
1389 temp = gettempvar();
1391 c = code_append(c, prefix);
1393 c = code_append(c, middlepart);
1395 c = abc_setlocal(c, temp);
1396 c = code_append(c, write);
1397 c = abc_getlocal(c, temp);
1398 c = abc_kill(c, temp);
1404 char is_break_or_jump(code_t*c)
1408 if(c->opcode == OPCODE_JUMP ||
1409 c->opcode == OPCODE___BREAK__ ||
1410 c->opcode == OPCODE___CONTINUE__ ||
1411 c->opcode == OPCODE_THROW ||
1412 c->opcode == OPCODE_RETURNVOID ||
1413 c->opcode == OPCODE_RETURNVALUE) {
1420 #define IS_FINALLY_TARGET(op) \
1421 ((op) == OPCODE___CONTINUE__ || \
1422 (op) == OPCODE___BREAK__ || \
1423 (op) == OPCODE_RETURNVOID || \
1424 (op) == OPCODE_RETURNVALUE || \
1425 (op) == OPCODE___RETHROW__)
1427 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1429 #define NEED_EXTRA_STACK_ARG
1430 code_t*finally_label = abc_nop(0);
1431 NEW(lookupswitch_t, l);
1437 code_t*prev = i->prev;
1438 if(IS_FINALLY_TARGET(i->opcode)) {
1441 if(i->opcode == OPCODE___RETHROW__ ||
1442 i->opcode == OPCODE_RETURNVALUE) {
1443 if(i->opcode == OPCODE___RETHROW__)
1444 i->opcode = OPCODE_THROW;
1446 p = abc_coerce_a(p);
1447 p = abc_setlocal(p, tempvar);
1449 p = abc_pushbyte(p, count++);
1450 p = abc_jump(p, finally_label);
1451 code_t*target = p = abc_label(p);
1452 #ifdef NEED_EXTRA_STACK_ARG
1456 p = abc_getlocal(p, tempvar);
1459 p->next = i;i->prev = p;
1460 list_append(l->targets, target);
1466 c = abc_pushbyte(c, -1);
1467 c = code_append(c, finally_label);
1468 c = code_append(c, finally);
1470 #ifdef NEED_EXTRA_STACK_ARG
1473 c = abc_lookupswitch(c, l);
1474 c = l->def = abc_label(c);
1475 #ifdef NEED_EXTRA_STACK_ARG
1482 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1486 code_t*prev = i->prev;
1487 if(IS_FINALLY_TARGET(i->opcode)) {
1488 if(i->opcode == OPCODE___RETHROW__)
1489 i->opcode = OPCODE_THROW;
1490 code_t*end = code_dup(finally);
1491 code_t*start = code_start(end);
1492 if(prev) prev->next = start;
1499 return code_append(c, finally);
1502 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1508 int num_insertion_points=0;
1510 if(IS_FINALLY_TARGET(i->opcode))
1511 num_insertion_points++;
1518 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1523 int simple_version_cost = (1+num_insertion_points)*code_size;
1524 int lookup_version_cost = 4*num_insertion_points + 5;
1526 if(cantdup || simple_version_cost > lookup_version_cost) {
1527 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1528 return insert_finally_lookup(c, finally, tempvar);
1530 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1531 return insert_finally_simple(c, finally, tempvar);
1535 #define PASS1 }} if(as3_pass == 1) {{
1536 #define PASS1END }} if(as3_pass == 2) {{
1537 #define PASS2 }} if(as3_pass == 2) {{
1538 #define PASS12 }} {{
1539 #define PASS12END }} if(as3_pass == 2) {{
1543 /* Line 273 of skeleton.m4 */
1544 #line 1545 "parser.tab.c"
1551 typedef YYTYPE_UINT8 yytype_uint8;
1553 typedef unsigned char yytype_uint8;
1557 typedef YYTYPE_INT8 yytype_int8;
1558 #elif (defined __STDC__ || defined __C99__FUNC__ \
1559 || defined __cplusplus || defined _MSC_VER)
1560 typedef signed char yytype_int8;
1562 typedef short int yytype_int8;
1565 #ifdef YYTYPE_UINT16
1566 typedef YYTYPE_UINT16 yytype_uint16;
1568 typedef unsigned short int yytype_uint16;
1572 typedef YYTYPE_INT16 yytype_int16;
1574 typedef short int yytype_int16;
1578 # ifdef __SIZE_TYPE__
1579 # define YYSIZE_T __SIZE_TYPE__
1580 # elif defined size_t
1581 # define YYSIZE_T size_t
1582 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1583 || defined __cplusplus || defined _MSC_VER)
1584 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1585 # define YYSIZE_T size_t
1587 # define YYSIZE_T unsigned int
1591 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1596 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1597 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1601 # define YY_(msgid) msgid
1605 /* Suppress unused-variable warnings by "using" E. */
1606 #if ! defined lint || defined __GNUC__
1607 # define YYUSE(e) ((void) (e))
1609 # define YYUSE(e) /* empty */
1612 /* Identity function, used to suppress warnings about constant conditions. */
1614 # define YYID(n) (n)
1616 #if (defined __STDC__ || defined __C99__FUNC__ \
1617 || defined __cplusplus || defined _MSC_VER)
1630 #if ! defined yyoverflow || YYERROR_VERBOSE
1632 /* The parser invokes alloca or malloc; define the necessary symbols. */
1634 # ifdef YYSTACK_USE_ALLOCA
1635 # if YYSTACK_USE_ALLOCA
1637 # define YYSTACK_ALLOC __builtin_alloca
1638 # elif defined __BUILTIN_VA_ARG_INCR
1639 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1641 # define YYSTACK_ALLOC __alloca
1642 # elif defined _MSC_VER
1643 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1644 # define alloca _alloca
1646 # define YYSTACK_ALLOC alloca
1647 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1648 || defined __cplusplus || defined _MSC_VER)
1649 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1651 # define _STDLIB_H 1
1658 # ifdef YYSTACK_ALLOC
1659 /* Pacify GCC's `empty if-body' warning. */
1660 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1661 # ifndef YYSTACK_ALLOC_MAXIMUM
1662 /* The OS might guarantee only one guard page at the bottom of the stack,
1663 and a page size can be as small as 4096 bytes. So we cannot safely
1664 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1665 to allow for a few compiler-allocated temporary stack slots. */
1666 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1669 # define YYSTACK_ALLOC YYMALLOC
1670 # define YYSTACK_FREE YYFREE
1671 # ifndef YYSTACK_ALLOC_MAXIMUM
1672 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1674 # if (defined __cplusplus && ! defined _STDLIB_H \
1675 && ! ((defined YYMALLOC || defined malloc) \
1676 && (defined YYFREE || defined free)))
1677 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1679 # define _STDLIB_H 1
1683 # define YYMALLOC malloc
1684 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1685 || defined __cplusplus || defined _MSC_VER)
1686 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1690 # define YYFREE free
1691 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1692 || defined __cplusplus || defined _MSC_VER)
1693 void free (void *); /* INFRINGES ON USER NAME SPACE */
1697 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1700 #if (! defined yyoverflow \
1701 && (! defined __cplusplus \
1702 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1704 /* A type that is properly aligned for any stack member. */
1707 yytype_int16 yyss_alloc;
1711 /* The size of the maximum gap between one aligned stack and the next. */
1712 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1714 /* The size of an array large to enough to hold all stacks, each with
1716 # define YYSTACK_BYTES(N) \
1717 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1718 + YYSTACK_GAP_MAXIMUM)
1720 /* Copy COUNT objects from FROM to TO. The source and destination do
1723 # if defined __GNUC__ && 1 < __GNUC__
1724 # define YYCOPY(To, From, Count) \
1725 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1727 # define YYCOPY(To, From, Count) \
1731 for (yyi = 0; yyi < (Count); yyi++) \
1732 (To)[yyi] = (From)[yyi]; \
1738 /* Relocate STACK from its old location to the new one. The
1739 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1740 elements in the stack, and YYPTR gives the new location of the
1741 stack. Advance YYPTR to a properly aligned location for the next
1743 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1746 YYSIZE_T yynewbytes; \
1747 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1748 Stack = &yyptr->Stack_alloc; \
1749 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1750 yyptr += yynewbytes / sizeof (*yyptr); \
1756 /* YYFINAL -- State number of the termination state. */
1758 /* YYLAST -- Last index in YYTABLE. */
1761 /* YYNTOKENS -- Number of terminals. */
1762 #define YYNTOKENS 130
1763 /* YYNNTS -- Number of nonterminals. */
1765 /* YYNRULES -- Number of rules. */
1766 #define YYNRULES 285
1767 /* YYNRULES -- Number of states. */
1768 #define YYNSTATES 478
1770 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1771 #define YYUNDEFTOK 2
1772 #define YYMAXUTOK 360
1774 #define YYTRANSLATE(YYX) \
1775 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1777 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1778 static const yytype_uint8 yytranslate[] =
1780 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1781 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1782 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1783 2, 2, 2, 116, 2, 2, 2, 114, 106, 2,
1784 126, 129, 113, 111, 97, 110, 123, 112, 2, 2,
1785 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
1786 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
1787 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1788 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1789 2, 120, 2, 121, 105, 2, 2, 2, 2, 2,
1790 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1791 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1792 2, 2, 2, 122, 104, 128, 115, 2, 2, 2,
1793 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1794 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1795 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1796 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1797 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1798 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1799 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1800 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1801 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1802 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1803 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1804 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1805 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1806 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1807 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1808 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1809 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1810 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1811 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1812 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1813 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1814 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1815 95, 98, 100, 101, 109, 117, 118, 119, 124, 125,
1820 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1822 static const yytype_uint16 yyprhs[] =
1824 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
1825 19, 21, 23, 25, 27, 28, 30, 32, 35, 37,
1826 39, 41, 43, 45, 47, 49, 50, 53, 55, 57,
1827 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
1828 79, 81, 83, 85, 87, 89, 91, 93, 97, 100,
1829 103, 105, 107, 110, 111, 114, 117, 119, 123, 127,
1830 128, 131, 132, 140, 141, 143, 145, 149, 151, 154,
1831 158, 167, 174, 175, 182, 183, 191, 193, 196, 198,
1832 201, 202, 204, 206, 209, 211, 214, 219, 223, 224,
1833 233, 234, 244, 245, 251, 253, 256, 258, 261, 263,
1834 264, 271, 274, 276, 282, 284, 286, 290, 292, 293,
1835 300, 301, 307, 310, 315, 316, 318, 320, 323, 325,
1836 327, 329, 331, 333, 335, 337, 339, 341, 342, 345,
1837 346, 349, 350, 353, 354, 364, 365, 374, 375, 377,
1838 379, 382, 384, 386, 388, 390, 391, 393, 395, 398,
1839 400, 403, 412, 414, 416, 422, 423, 426, 428, 430,
1840 432, 434, 436, 438, 440, 442, 443, 445, 448, 453,
1841 457, 459, 464, 467, 469, 471, 472, 473, 486, 488,
1842 489, 499, 501, 505, 507, 509, 511, 515, 517, 519,
1843 521, 524, 525, 526, 530, 531, 533, 535, 539, 543,
1844 548, 553, 556, 558, 561, 563, 565, 569, 571, 573,
1845 575, 577, 579, 581, 583, 585, 587, 589, 591, 593,
1846 595, 597, 599, 601, 603, 605, 609, 613, 617, 621,
1847 625, 629, 633, 637, 641, 645, 648, 651, 655, 659,
1848 663, 667, 671, 675, 679, 683, 687, 691, 695, 699,
1849 703, 707, 711, 716, 719, 721, 725, 728, 733, 737,
1850 738, 740, 744, 750, 754, 758, 762, 766, 770, 774,
1851 778, 782, 786, 790, 794, 800, 803, 806, 809, 812,
1852 816, 820, 822, 826, 832, 838
1855 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1856 static const yytype_int16 yyrhs[] =
1858 131, 0, -1, 132, -1, -1, 133, -1, 134, -1,
1859 133, 134, -1, 180, -1, 192, -1, 190, -1, 208,
1860 -1, 201, -1, 143, -1, 96, -1, -1, 136, -1,
1861 137, -1, 136, 137, -1, 192, -1, 190, -1, 208,
1862 -1, 201, -1, 143, -1, 96, -1, 139, -1, -1,
1863 139, 141, -1, 141, -1, 183, -1, 154, -1, 155,
1864 -1, 156, -1, 158, -1, 166, -1, 149, -1, 177,
1865 -1, 174, -1, 227, -1, 96, -1, 140, -1, 145,
1866 -1, 160, -1, 161, -1, 224, -1, 176, -1, 233,
1867 -1, 234, -1, 122, 139, 128, -1, 122, 128, -1,
1868 141, 96, -1, 141, -1, 140, -1, 99, 225, -1,
1869 -1, 45, 146, -1, 31, 146, -1, 147, -1, 146,
1870 97, 147, -1, 3, 217, 144, -1, -1, 64, 142,
1871 -1, -1, 63, 126, 150, 226, 129, 142, 148, -1,
1872 -1, 145, -1, 227, -1, 45, 3, 217, -1, 3,
1873 -1, 12, 126, -1, 12, 49, 126, -1, 153, 151,
1874 96, 226, 96, 227, 129, 142, -1, 153, 152, 67,
1875 226, 129, 142, -1, -1, 13, 126, 157, 226, 129,
1876 142, -1, -1, 14, 159, 142, 13, 126, 226, 129,
1877 -1, 65, -1, 65, 3, -1, 29, -1, 29, 3,
1878 -1, -1, 163, -1, 165, -1, 163, 165, -1, 164,
1879 -1, 163, 164, -1, 33, 228, 103, 138, -1, 61,
1880 103, 138, -1, -1, 15, 126, 167, 228, 129, 122,
1881 162, 128, -1, -1, 32, 126, 3, 217, 129, 169,
1882 122, 138, 128, -1, -1, 27, 122, 171, 138, 128,
1883 -1, 168, -1, 172, 168, -1, 172, -1, 172, 170,
1884 -1, 170, -1, -1, 51, 122, 175, 138, 128, 173,
1885 -1, 36, 226, -1, 36, -1, 38, 126, 226, 129,
1886 142, -1, 3, -1, 18, -1, 179, 123, 178, -1,
1887 178, -1, -1, 18, 179, 122, 181, 135, 128, -1,
1888 -1, 18, 122, 182, 135, 128, -1, 40, 214, -1,
1889 40, 179, 123, 113, -1, -1, 185, -1, 186, -1,
1890 185, 186, -1, 20, -1, 21, -1, 19, -1, 37,
1891 -1, 46, -1, 48, -1, 47, -1, 25, -1, 23,
1892 -1, -1, 53, 214, -1, -1, 53, 215, -1, -1,
1893 16, 215, -1, -1, 184, 30, 3, 187, 189, 122,
1894 191, 194, 128, -1, -1, 184, 43, 3, 188, 122,
1895 193, 197, 128, -1, -1, 195, -1, 196, -1, 195,
1896 196, -1, 96, -1, 201, -1, 208, -1, 140, -1,
1897 -1, 198, -1, 199, -1, 198, 199, -1, 96, -1,
1898 45, 3, -1, 184, 26, 207, 3, 126, 204, 129,
1899 217, -1, 45, -1, 31, -1, 184, 200, 3, 217,
1900 144, -1, -1, 99, 203, -1, 9, -1, 7, -1,
1901 8, -1, 11, -1, 4, -1, 55, -1, 54, -1,
1902 44, -1, -1, 205, -1, 90, 206, -1, 205, 97,
1903 90, 206, -1, 205, 97, 206, -1, 206, -1, 3,
1904 103, 216, 202, -1, 3, 202, -1, 50, -1, 34,
1905 -1, -1, -1, 184, 26, 207, 3, 126, 204, 129,
1906 217, 122, 209, 138, 128, -1, 3, -1, -1, 26,
1907 210, 126, 204, 129, 217, 122, 138, 128, -1, 3,
1908 -1, 179, 123, 3, -1, 213, -1, 212, -1, 214,
1909 -1, 215, 97, 214, -1, 214, -1, 113, -1, 35,
1910 -1, 103, 216, -1, -1, -1, 126, 219, 129, -1,
1911 -1, 220, -1, 225, -1, 220, 97, 225, -1, 24,
1912 212, 218, -1, 228, 126, 219, 129, -1, 52, 126,
1913 219, 129, -1, 62, 228, -1, 41, -1, 41, 226,
1914 -1, 228, -1, 228, -1, 226, 97, 228, -1, 226,
1915 -1, 211, -1, 229, -1, 232, -1, 221, -1, 223,
1916 -1, 5, -1, 9, -1, 10, -1, 7, -1, 8,
1917 -1, 11, -1, 4, -1, 28, -1, 55, -1, 54,
1918 -1, 44, -1, 222, -1, 228, 107, 228, -1, 228,
1919 108, 228, -1, 228, 73, 228, -1, 228, 74, 228,
1920 -1, 228, 69, 228, -1, 228, 70, 228, -1, 228,
1921 72, 228, -1, 228, 71, 228, -1, 228, 84, 228,
1922 -1, 228, 85, 228, -1, 116, 228, -1, 115, 228,
1923 -1, 228, 106, 228, -1, 228, 105, 228, -1, 228,
1924 104, 228, -1, 228, 93, 228, -1, 228, 92, 228,
1925 -1, 228, 91, 228, -1, 228, 112, 228, -1, 228,
1926 114, 228, -1, 228, 111, 228, -1, 228, 110, 228,
1927 -1, 228, 113, 228, -1, 228, 67, 228, -1, 228,
1928 68, 228, -1, 228, 39, 228, -1, 228, 66, 228,
1929 -1, 42, 126, 228, 129, -1, 35, 228, -1, 35,
1930 -1, 126, 226, 129, -1, 110, 228, -1, 228, 120,
1931 228, 121, -1, 120, 219, 121, -1, -1, 231, -1,
1932 225, 103, 225, -1, 231, 97, 225, 103, 225, -1,
1933 122, 230, 128, -1, 228, 78, 228, -1, 228, 77,
1934 228, -1, 228, 82, 228, -1, 228, 81, 228, -1,
1935 228, 83, 228, -1, 228, 76, 228, -1, 228, 75,
1936 228, -1, 228, 79, 228, -1, 228, 80, 228, -1,
1937 228, 99, 228, -1, 228, 102, 228, 103, 228, -1,
1938 228, 88, -1, 228, 87, -1, 88, 228, -1, 87,
1939 228, -1, 52, 123, 3, -1, 228, 123, 3, -1,
1940 3, -1, 184, 17, 3, -1, 184, 17, 3, 99,
1941 3, -1, 184, 17, 3, 99, 4, -1, 22, 17,
1945 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1946 static const yytype_uint16 yyrline[] =
1948 0, 1519, 1519, 1521, 1521, 1522, 1523, 1525, 1526, 1527,
1949 1528, 1529, 1530, 1531, 1533, 1533, 1534, 1535, 1537, 1538,
1950 1539, 1540, 1541, 1542, 1544, 1545, 1547, 1548, 1551, 1552,
1951 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1563, 1564,
1952 1565, 1566, 1567, 1568, 1569, 1571, 1572, 1574, 1575, 1576,
1953 1577, 1581, 1588, 1589, 1593, 1594, 1596, 1597, 1599, 1640,
1954 1641, 1644, 1644, 1663, 1664, 1665, 1668, 1671, 1675, 1676,
1955 1678, 1698, 1741, 1741, 1760, 1760, 1775, 1778, 1781, 1784,
1956 1788, 1789, 1790, 1791, 1792, 1793, 1795, 1806, 1809, 1809,
1957 1838, 1838, 1858, 1858, 1875, 1876, 1877, 1878, 1886, 1895,
1958 1895, 1940, 1944, 1955, 1964, 1965, 1967, 1968, 1970, 1970,
1959 1972, 1972, 1975, 1983, 1993, 1994, 1995, 1996, 1998, 1999,
1960 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2011,
1961 2012, 2014, 2015, 2019, 2017, 2025, 2023, 2031, 2032, 2033,
1962 2034, 2035, 2036, 2037, 2039, 2045, 2046, 2047, 2048, 2049,
1963 2050, 2053, 2065, 2065, 2067, 2126, 2127, 2129, 2130, 2131,
1964 2132, 2133, 2135, 2136, 2137, 2142, 2145, 2150, 2155, 2162,
1965 2166, 2171, 2177, 2183, 2184, 2185, 2188, 2187, 2208, 2209,
1966 2210, 2218, 2226, 2234, 2235, 2237, 2238, 2240, 2241, 2242,
1967 2251, 2252, 2256, 2257, 2259, 2260, 2261, 2264, 2269, 2293,
1968 2341, 2361, 2382, 2385, 2392, 2393, 2394, 2400, 2406, 2408,
1969 2410, 2412, 2414, 2416, 2433, 2438, 2441, 2444, 2447, 2450,
1970 2453, 2456, 2459, 2462, 2466, 2467, 2470, 2473, 2476, 2479,
1971 2482, 2485, 2488, 2492, 2503, 2521, 2526, 2531, 2536, 2541,
1972 2546, 2550, 2554, 2559, 2563, 2567, 2576, 2585, 2595, 2600,
1973 2612, 2618, 2623, 2629, 2635, 2639, 2641, 2652, 2661, 2668,
1974 2669, 2671, 2677, 2686, 2693, 2705, 2711, 2717, 2723, 2729,
1975 2735, 2741, 2754, 2765, 2772, 2785, 2812, 2826, 2840, 2854,
1976 2869, 2903, 3001, 3002, 3003, 3005
1980 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1981 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1982 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1983 static const char *const yytname[] =
1985 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
1986 "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
1987 "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
1988 "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
1989 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
1990 "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
1991 "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
1992 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
1993 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
1994 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
1995 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
1996 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
1997 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
1998 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
1999 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
2000 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
2001 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2002 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2003 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2004 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2005 "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
2006 "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
2007 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2008 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2009 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2010 "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
2011 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2012 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2013 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2014 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2015 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2016 "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
2017 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2018 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2019 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2020 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2021 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2022 "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
2023 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2024 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2025 "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE", "MAYBETYPE",
2026 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST", "NEW",
2027 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2028 "VOIDEXPRESSION", "E", "CONSTANT", "MAYBE_EXPRPAIR_LIST",
2029 "EXPRPAIR_LIST", "VAR_READ", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2034 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2036 static const yytype_uint16 yytoknum[] =
2038 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2039 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2040 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2041 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2042 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2043 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2044 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2045 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2046 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2047 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
2048 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
2049 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
2050 91, 93, 123, 46, 358, 359, 40, 360, 125, 41
2054 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2055 static const yytype_uint8 yyr1[] =
2057 0, 130, 131, 132, 132, 133, 133, 134, 134, 134,
2058 134, 134, 134, 134, 135, 135, 136, 136, 137, 137,
2059 137, 137, 137, 137, 138, 138, 139, 139, 140, 140,
2060 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
2061 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
2062 142, 143, 144, 144, 145, 145, 146, 146, 147, 148,
2063 148, 150, 149, 151, 151, 151, 152, 152, 153, 153,
2064 154, 155, 157, 156, 159, 158, 160, 160, 161, 161,
2065 162, 162, 162, 162, 163, 163, 164, 165, 167, 166,
2066 169, 168, 171, 170, 172, 172, 173, 173, 173, 175,
2067 174, 176, 176, 177, 178, 178, 179, 179, 181, 180,
2068 182, 180, 183, 183, 184, 184, 185, 185, 186, 186,
2069 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
2070 188, 189, 189, 191, 190, 193, 192, 194, 194, 195,
2071 195, 196, 196, 196, 196, 197, 197, 198, 198, 199,
2072 199, 199, 200, 200, 201, 202, 202, 203, 203, 203,
2073 203, 203, 203, 203, 203, 204, 204, 204, 204, 205,
2074 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
2075 211, 212, 213, 214, 214, 215, 215, 216, 216, 216,
2076 217, 217, 218, 218, 219, 219, 220, 220, 221, 222,
2077 222, 223, 224, 224, 225, 226, 226, 227, 228, 228,
2078 228, 228, 228, 228, 229, 229, 229, 229, 229, 229,
2079 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
2080 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2081 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2082 228, 228, 228, 228, 228, 228, 228, 228, 228, 230,
2083 230, 231, 231, 228, 228, 228, 228, 228, 228, 228,
2084 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2085 228, 232, 233, 233, 233, 234
2088 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2089 static const yytype_uint8 yyr2[] =
2091 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2092 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
2093 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
2094 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2095 1, 1, 1, 1, 1, 1, 1, 3, 2, 2,
2096 1, 1, 2, 0, 2, 2, 1, 3, 3, 0,
2097 2, 0, 7, 0, 1, 1, 3, 1, 2, 3,
2098 8, 6, 0, 6, 0, 7, 1, 2, 1, 2,
2099 0, 1, 1, 2, 1, 2, 4, 3, 0, 8,
2100 0, 9, 0, 5, 1, 2, 1, 2, 1, 0,
2101 6, 2, 1, 5, 1, 1, 3, 1, 0, 6,
2102 0, 5, 2, 4, 0, 1, 1, 2, 1, 1,
2103 1, 1, 1, 1, 1, 1, 1, 0, 2, 0,
2104 2, 0, 2, 0, 9, 0, 8, 0, 1, 1,
2105 2, 1, 1, 1, 1, 0, 1, 1, 2, 1,
2106 2, 8, 1, 1, 5, 0, 2, 1, 1, 1,
2107 1, 1, 1, 1, 1, 0, 1, 2, 4, 3,
2108 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
2109 9, 1, 3, 1, 1, 1, 3, 1, 1, 1,
2110 2, 0, 0, 3, 0, 1, 1, 3, 3, 4,
2111 4, 2, 1, 2, 1, 1, 3, 1, 1, 1,
2112 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2113 1, 1, 1, 1, 1, 3, 3, 3, 3, 3,
2114 3, 3, 3, 3, 3, 2, 2, 3, 3, 3,
2115 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2116 3, 3, 4, 2, 1, 3, 2, 4, 3, 0,
2117 1, 3, 5, 3, 3, 3, 3, 3, 3, 3,
2118 3, 3, 3, 3, 5, 2, 2, 2, 2, 3,
2122 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2123 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2124 means the default is an error. */
2125 static const yytype_uint16 yydefact[] =
2127 114, 281, 219, 213, 216, 217, 214, 215, 218, 0,
2128 0, 74, 0, 0, 120, 118, 119, 126, 0, 125,
2129 179, 220, 254, 121, 0, 0, 0, 223, 122, 124,
2130 123, 0, 0, 222, 221, 0, 0, 0, 0, 13,
2131 0, 0, 0, 194, 259, 0, 0, 2, 114, 5,
2132 51, 12, 34, 63, 29, 30, 31, 32, 33, 36,
2133 35, 7, 28, 0, 115, 116, 9, 8, 11, 10,
2134 208, 211, 224, 212, 207, 37, 205, 209, 210, 0,
2135 68, 72, 114, 88, 104, 105, 110, 107, 0, 181,
2136 192, 178, 0, 253, 0, 181, 0, 184, 183, 112,
2137 0, 99, 0, 194, 201, 61, 278, 277, 256, 236,
2138 235, 0, 195, 196, 204, 0, 0, 260, 0, 1,
2139 6, 281, 0, 0, 64, 0, 0, 65, 175, 0,
2140 153, 0, 152, 0, 117, 0, 0, 0, 0, 0,
2141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2142 0, 0, 0, 0, 0, 0, 0, 276, 275, 0,
2143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2144 0, 0, 0, 0, 0, 0, 194, 69, 0, 0,
2145 78, 102, 202, 0, 76, 38, 114, 39, 50, 0,
2146 40, 41, 42, 44, 0, 43, 45, 46, 0, 114,
2147 108, 0, 194, 198, 165, 0, 0, 0, 25, 279,
2148 0, 0, 258, 0, 0, 263, 0, 255, 191, 55,
2149 56, 191, 54, 0, 0, 174, 173, 0, 127, 129,
2150 191, 206, 250, 251, 248, 249, 229, 230, 232, 231,
2151 227, 228, 270, 269, 265, 264, 271, 272, 267, 266,
2152 268, 233, 234, 242, 241, 240, 273, 0, 239, 238,
2153 237, 225, 226, 246, 245, 243, 247, 244, 0, 280,
2154 0, 0, 0, 79, 101, 203, 77, 48, 114, 27,
2155 205, 49, 0, 0, 0, 23, 0, 114, 16, 22,
2156 19, 18, 21, 20, 114, 106, 0, 155, 0, 0,
2157 166, 170, 114, 182, 113, 252, 0, 24, 200, 0,
2158 197, 261, 0, 0, 53, 0, 53, 0, 0, 0,
2159 0, 131, 0, 0, 53, 0, 257, 199, 114, 285,
2160 47, 26, 0, 282, 0, 111, 17, 0, 193, 0,
2161 0, 172, 167, 191, 0, 103, 0, 114, 0, 189,
2162 188, 0, 187, 190, 0, 58, 57, 0, 114, 165,
2163 128, 0, 0, 185, 130, 135, 154, 274, 73, 0,
2164 0, 80, 109, 161, 158, 159, 157, 160, 164, 163,
2165 162, 156, 155, 0, 0, 169, 0, 0, 94, 98,
2166 96, 100, 59, 262, 0, 52, 0, 71, 0, 132,
2167 133, 0, 114, 75, 283, 284, 0, 0, 0, 81,
2168 84, 82, 171, 25, 168, 92, 0, 95, 97, 114,
2169 62, 114, 191, 114, 186, 0, 149, 0, 0, 114,
2170 147, 0, 25, 89, 85, 83, 0, 25, 191, 60,
2171 70, 0, 141, 144, 0, 0, 114, 139, 142, 143,
2172 150, 175, 136, 148, 25, 87, 180, 0, 0, 176,
2173 134, 140, 0, 86, 93, 90, 25, 0, 0, 0,
2174 165, 25, 177, 0, 0, 191, 91, 151
2177 /* YYDEFGOTO[NTERM-NUM]. */
2178 static const yytype_int16 yydefgoto[] =
2180 -1, 46, 47, 48, 49, 286, 287, 288, 306, 307,
2181 187, 279, 189, 289, 355, 190, 222, 220, 420, 52,
2182 211, 125, 126, 53, 54, 55, 56, 178, 57, 82,
2183 191, 192, 408, 409, 410, 411, 58, 198, 388, 468,
2184 389, 437, 390, 391, 59, 208, 193, 60, 87, 351,
2185 61, 294, 199, 62, 194, 64, 65, 321, 323, 362,
2186 290, 423, 291, 402, 445, 446, 447, 428, 429, 430,
2187 133, 292, 341, 381, 299, 300, 301, 227, 293, 466,
2188 92, 70, 97, 98, 352, 364, 353, 314, 203, 111,
2189 112, 71, 72, 73, 195, 113, 74, 75, 76, 77,
2190 116, 117, 78, 196, 197
2193 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2195 #define YYPACT_NINF -308
2196 static const yytype_int16 yypact[] =
2198 349, -308, -308, -308, -308, -308, -308, -308, -308, -38,
2199 -86, -308, -72, 35, -308, -308, -308, -308, 30, -308,
2200 97, -308, 52, -308, -14, 18, 36, -308, -308, -308,
2201 -308, 57, 44, -308, -308, 1538, 40, 1538, 1538, -308,
2202 1538, 1538, 1538, 1538, 1538, 1538, 102, -308, 473, -308,
2203 -308, -308, -308, 211, -308, -308, -308, -308, -308, -308,
2204 -308, -308, -308, 275, 640, -308, -308, -308, -308, -308,
2205 -308, -308, -308, -308, 96, -308, 1971, -308, -308, 82,
2206 -308, -308, 1469, -308, -308, -308, -308, -308, -32, -308,
2207 83, -308, 84, 104, 1538, 88, 89, -308, -308, -308,
2208 1538, -308, 186, 1538, 104, -308, 104, 104, 163, 104,
2209 104, 108, 116, -308, 1971, 114, 105, 128, -88, -308,
2210 -308, 165, 231, 233, -308, 144, 174, -308, -5, 240,
2211 -308, 241, -308, 244, -308, 1538, 1538, 1538, 1538, 1538,
2212 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2213 1538, 1538, 1538, 1538, 1538, 1538, 1538, -308, -308, 1538,
2214 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2215 1538, 1538, 1538, 1538, 1538, 245, 1538, -308, 1538, 232,
2216 255, 1538, 1538, 231, 256, -308, 593, -308, 164, 248,
2217 -308, -308, -308, -308, 247, -308, -308, -308, 1538, 845,
2218 -308, 90, 1538, -308, 9, -82, 68, 1599, 1349, -308,
2219 138, 1538, -308, 1538, 1538, -308, 1538, -308, 166, 171,
2220 -308, 166, 171, 1538, 1538, -308, -308, 267, 219, 221,
2221 166, 1971, 962, 836, 836, 836, 2337, 2337, 2337, 2337,
2222 962, 962, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
2223 1971, 2032, 2093, 340, 340, 340, 1971, 1727, 2154, 2215,
2224 2276, 962, 962, 163, 163, 104, 104, 104, 1788, -308,
2225 149, -62, 276, -308, 96, 96, -308, -308, 719, -308,
2226 1849, -308, 154, 278, 1663, -308, 156, 971, -308, -308,
2227 -308, -308, -308, -308, 845, -308, 161, -69, 282, 167,
2228 195, -308, 1469, 88, -308, -308, 169, 1349, -308, -55,
2229 -308, -308, 190, 63, 204, 231, -24, 86, 74, 178,
2230 18, 292, 18, 187, 204, 1538, -308, -308, 1469, -308,
2231 -308, -308, 1538, 213, 188, -308, -308, 185, -308, 61,
2232 63, -308, -308, 166, 11, -308, 62, 1469, 1538, -308,
2233 -308, 191, -308, -308, 1538, -308, -308, 1538, 1469, 9,
2234 -308, 18, 194, -308, 220, -308, -308, 1971, -308, 76,
2235 182, 136, -308, -308, -308, -308, -308, -308, -308, -308,
2236 -308, -308, 224, 197, 282, -308, 202, 199, -308, -308,
2237 62, -308, 265, -308, 92, -308, 203, -308, 205, 220,
2238 -308, 18, 394, -308, -308, -308, 1538, 235, 207, 136,
2239 -308, -308, -308, 1349, -308, -308, 336, -308, -308, 1469,
2240 -308, 1469, 166, 1097, -308, 337, -308, 316, 216, 529,
2241 -308, 1910, 1349, -308, -308, -308, 218, 1349, 166, -308,
2242 -308, 225, -308, -308, 66, 222, 1223, -308, -308, -308,
2243 -308, -5, -308, -308, 1349, -308, -308, 223, 226, -308,
2244 -308, -308, 345, -308, -308, -308, 1349, 239, 249, 238,
2245 9, 1349, -308, 246, 250, 166, -308, -308
2248 /* YYPGOTO[NTERM-NUM]. */
2249 static const yytype_int16 yypgoto[] =
2251 -308, -308, -308, -308, 328, 85, -308, 93, -209, 196,
2252 1, -76, -244, 16, 59, 332, 268, 77, -308, -308,
2253 -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
2254 -308, -308, -308, -308, -15, -11, -308, -308, 15, -308,
2255 17, -308, -308, -308, -308, -308, -308, -308, -193, 19,
2256 -308, -308, -308, -308, 0, -308, 335, -308, -308, -308,
2257 31, -308, 39, -308, -308, -308, -40, -308, -308, -21,
2258 -308, 2, 27, -308, -307, -308, -271, -41, 3, -308,
2259 -308, -308, 398, -308, -20, 60, 78, -184, -308, -93,
2260 -308, -308, -308, -308, -308, -26, -17, -46, -18, -308,
2261 -308, -308, -308, -308, -308
2264 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2265 positive, shift that token. If negative, reduce the rule which
2266 number is the opposite. If zero, do what YYDEFACT says.
2267 If YYTABLE_NINF, syntax error. */
2268 #define YYTABLE_NINF -205
2269 static const yytype_int16 yytable[] =
2271 63, 50, 68, 69, 93, 99, 188, 127, 295, 135,
2272 210, 79, 297, 295, 297, 135, 51, 104, 115, 106,
2273 107, 95, 108, 109, 110, 114, 114, 342, 118, 225,
2274 339, 66, 88, 89, 340, 135, 85, 316, 84, 67,
2275 81, 217, 135, -66, 96, 226, 324, 302, 63, 50,
2276 68, 69, 398, 85, 83, 1, 2, 3, 345, 4,
2277 5, 6, 7, 8, 51, 373, 95, 328, 374, 375,
2278 376, 303, 377, 385, 347, 354, 18, 205, 20, 66,
2279 21, 85, 207, 270, 368, 114, 85, 67, 80, 386,
2280 200, 201, 128, 84, 387, 303, 27, 130, 349, 298,
2281 91, 384, 119, 392, 32, 378, 33, 34, 85, 296,
2282 85, 132, 94, 414, 397, 379, 380, 231, 232, 233,
2283 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
2284 244, 245, 246, 247, 248, 249, 250, 251, 252, 37,
2285 38, 253, 254, 255, 256, 257, 258, 259, 260, 261,
2286 262, 263, 264, 265, 266, 267, 268, 86, 114, 383,
2287 115, 271, 100, 473, 274, 275, 105, 102, 280, 406,
2288 103, 135, 43, 135, 44, 439, 350, 440, 45, 101,
2289 284, 304, 357, 135, 114, 404, 405, 310, 311, 209,
2290 312, 157, 158, 135, 309, 114, 114, 407, 114, 63,
2291 50, 295, 331, 358, 436, 403, 317, 318, 177, 202,
2292 204, -104, 206, 213, 121, 2, 3, 214, 4, 5,
2293 6, 7, 8, 455, 174, 216, 188, 175, 457, 212,
2294 176, 331, -67, 215, 218, 18, 221, 20, 441, 21,
2295 223, 224, 122, 228, 229, 463, 22, 230, 269, 272,
2296 157, 158, 188, 26, 458, 27, 123, 469, 273, 276,
2297 281, 282, 474, 32, 283, 33, 34, 308, 315, 313,
2298 319, 188, 320, 35, 322, 171, 172, 173, 327, 329,
2299 332, 333, 188, 174, 335, 297, 175, 63, 50, 176,
2300 338, 477, 344, 348, 63, 50, 343, 346, 37, 38,
2301 360, 128, 363, 354, 359, 129, 130, 367, 361, 365,
2302 371, 396, 370, 372, 394, 369, 400, 401, 131, 413,
2303 132, 40, 393, 339, 415, 416, 41, 42, 395, 419,
2304 114, 43, 421, 44, 422, 433, 114, 45, 432, 438,
2305 450, 363, 451, 188, 452, 188, 456, 459, 467, -3,
2306 460, 464, 1, 2, 3, 465, 4, 5, 6, 7,
2307 8, 9, 10, 11, 12, 470, 472, 13, 14, 15,
2308 16, 471, 17, 18, 19, 475, 120, 21, 476, 337,
2309 336, 424, 278, 366, 22, 124, 23, 24, 431, 25,
2310 219, 26, 356, 27, 434, 28, 29, 30, 435, 134,
2311 31, 32, 427, 33, 34, 417, 461, 418, 453, 412,
2312 462, 35, 36, 14, 15, 16, 90, 17, 382, 19,
2313 0, 399, 0, 444, 443, 448, 449, 157, 158, 427,
2314 0, 23, 0, 0, 0, 0, 37, 38, 0, 425,
2315 28, 29, 30, 0, 0, 39, 444, 443, 448, 449,
2316 169, 170, 171, 172, 173, 0, 0, 0, 0, 40,
2317 174, 0, 0, 175, 41, 42, 176, 0, 0, 43,
2318 0, 44, 0, -4, 0, 45, 1, 2, 3, 0,
2319 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2320 426, 13, 14, 15, 16, 0, 17, 18, 19, 0,
2321 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2322 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2323 29, 30, -145, 0, 31, 32, 0, 33, 34, 0,
2324 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2325 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
2326 16, 0, 17, 0, 19, 0, 0, 0, 0, 0,
2327 37, 38, 0, 0, 0, 0, 23, 0, 0, 39,
2328 0, 0, 0, 0, 425, 28, 29, 30, 0, 0,
2329 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2330 0, 0, 0, 43, 0, 44, 1, 2, 3, 45,
2331 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2332 0, 0, 14, 15, 16, 179, 17, 18, 19, 20,
2333 0, 21, 180, 0, 122, 426, 0, 0, 22, 181,
2334 23, 24, 0, 25, 182, 26, 0, 27, 183, 28,
2335 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2336 0, 0, 0, 0, 0, 35, 36, -146, 184, 14,
2337 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
2338 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
2339 37, 38, 0, 0, 0, 0, 28, 29, 30, 185,
2340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2341 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2342 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2343 0, 277, 1, 2, 3, 0, 4, 5, 6, 7,
2344 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2345 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2346 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2347 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2348 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2349 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2351 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2352 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2353 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2354 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2355 0, 44, 0, 0, 0, 45, 0, 330, 1, 2,
2356 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
2357 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
2358 19, 0, 0, 21, 0, 136, 0, 0, 0, 0,
2359 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
2360 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2361 34, 0, -205, -205, -205, 0, 0, 35, 36, 144,
2362 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2363 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2364 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2365 0, 285, 0, 167, 168, 0, 169, 170, 171, 172,
2366 173, 0, 0, 0, 0, 40, 174, 0, 0, 175,
2367 41, 42, 176, 0, 0, 43, 0, 44, 0, 0,
2368 0, 45, 0, -14, 1, 2, 3, 0, 4, 5,
2369 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
2370 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
2371 0, -205, 0, 0, 0, 0, 22, 0, 23, 24,
2372 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
2373 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
2374 0, 0, 0, 35, 36, -205, -205, 0, 0, 0,
2375 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
2376 158, 0, 0, 159, 160, 161, 0, 0, 37, 38,
2377 0, 0, 0, 0, 0, 0, 0, 285, 0, -205,
2378 -205, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2379 0, 40, 174, 0, 0, 175, 41, 42, 176, 0,
2380 0, 43, 0, 44, 0, 0, 0, 45, 0, -15,
2381 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
2382 10, 11, 12, 0, 0, 0, 14, 15, 16, 0,
2383 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
2384 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
2385 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
2386 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2387 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2389 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
2390 0, 0, 0, 442, 0, 0, 0, 0, 0, 0,
2391 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2392 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2393 0, 0, 0, 45, 0, -137, 1, 2, 3, 0,
2394 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2395 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
2396 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2397 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2398 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2399 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2401 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2402 37, 38, 0, 0, 0, 0, 0, 0, 0, 442,
2403 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2404 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2405 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2406 0, -138, 1, 2, 3, 0, 4, 5, 6, 7,
2407 8, 9, 10, 11, 12, 0, -114, 0, 14, 15,
2408 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2409 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2410 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2411 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2412 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2414 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2415 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2416 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2417 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2418 0, 44, 1, 2, 3, 45, 4, 5, 6, 7,
2419 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2420 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2421 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2422 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2423 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2424 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2425 0, 1, 2, 3, 0, 4, 5, 6, 7, 8,
2426 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2427 0, 0, 18, 0, 20, 185, 21, 0, 0, 0,
2428 0, 0, 0, 22, 0, 0, 0, 0, 0, 40,
2429 26, 0, 27, 0, 41, 42, 0, 0, 0, 43,
2430 32, 186, 33, 34, 0, 45, 0, 0, 0, 0,
2431 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2433 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2434 0, 0, 0, 0, 0, 0, 0, 0, 136, 0,
2435 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
2436 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
2437 44, 0, 0, 0, 45, 137, 138, 139, 140, 141,
2438 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2439 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2440 159, 160, 161, 0, 0, 0, 0, 0, 162, 0,
2441 0, 163, 136, 164, 165, 166, 167, 168, 0, 169,
2442 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2443 0, 0, 175, 0, 0, 176, 0, 0, 305, 137,
2444 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2445 148, 149, 150, 151, 152, 153, 154, 155, 156, 0,
2446 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2447 0, 0, 162, 0, 0, 163, 136, 164, 165, 166,
2448 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2449 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2450 0, 0, 334, 137, 138, 139, 140, 141, 142, 143,
2451 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2452 154, 155, 156, 0, 157, 158, 0, 0, 159, 160,
2453 161, 0, 0, 0, 0, 0, 162, 136, 0, 163,
2454 325, 164, 165, 166, 167, 168, 0, 169, 170, 171,
2455 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2456 175, 0, 0, 176, 137, 138, 139, 140, 141, 142,
2457 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
2458 153, 154, 155, 156, 0, 157, 158, 0, 0, 159,
2459 160, 161, 0, 0, 0, 0, 0, 162, 136, 0,
2460 163, 0, 164, 165, 166, 167, 168, 0, 169, 170,
2461 171, 172, 173, 0, 0, 0, 0, 0, 174, 326,
2462 0, 175, 0, 0, 176, 137, 138, 139, 140, 141,
2463 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2464 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2465 159, 160, 161, 0, 0, 0, 0, 0, 162, 136,
2466 0, 163, -204, 164, 165, 166, 167, 168, 0, 169,
2467 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2468 0, 0, 175, 0, 0, 176, 137, 138, 139, 140,
2469 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
2470 151, 152, 153, 154, 155, 156, 0, 157, 158, 0,
2471 0, 159, 160, 161, 0, 0, 0, 0, 0, 162,
2472 136, 0, 163, 454, 164, 165, 166, 167, 168, 0,
2473 169, 170, 171, 172, 173, 0, 0, 0, 0, 0,
2474 174, 0, 0, 175, 0, 0, 176, 137, 138, 139,
2475 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
2476 150, 151, 152, 153, 154, 155, 156, 0, 157, 158,
2477 0, 0, 159, 160, 161, 0, 0, 0, 0, 0,
2478 162, 136, 0, 163, 0, 164, 165, 166, 167, 168,
2479 0, 169, 170, 171, 172, 173, 0, 0, 0, 0,
2480 0, 174, 0, 0, 175, 0, 0, 176, 137, 138,
2481 139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
2482 0, 0, 0, 0, 0, 0, 0, 156, 0, 157,
2483 158, 0, 0, 159, 160, 161, 0, 0, 0, 0,
2484 0, 0, 136, 0, 0, 0, 164, 165, 166, 167,
2485 168, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2486 0, 0, 174, 0, 0, 175, 0, 0, 176, 137,
2487 138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
2488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2489 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2490 0, 0, 0, 136, 0, 0, 0, 164, 165, 166,
2491 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2492 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2493 137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
2494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2495 0, 157, 158, 0, 0, 159, 160, 161, 0, 0,
2496 0, 0, 0, 0, 136, 0, 0, 0, 0, 165,
2497 166, 167, 168, 0, 169, 170, 171, 172, 173, 0,
2498 0, 0, 0, 0, 174, 0, 0, 175, 0, 0,
2499 176, 137, 138, 139, 140, 141, 142, 143, 144, 145,
2500 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2501 0, 0, 157, 158, 0, 0, 159, 160, 161, 0,
2502 0, 0, 0, 0, 0, 136, 0, 0, 0, 0,
2503 0, 166, 167, 168, 0, 169, 170, 171, 172, 173,
2504 0, 0, 0, 0, 0, 174, 0, 0, 175, 0,
2505 0, 176, 137, 138, 139, 140, 141, 142, 143, 144,
2506 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2507 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2508 0, 0, 0, 0, 0, 0, 136, 0, 0, 0,
2509 0, 0, -205, 167, 168, 0, 169, 170, 171, 172,
2510 173, 0, 0, 0, 0, 0, 174, 0, 0, 175,
2511 0, 0, 176, 137, 138, 139, -205, -205, -205, -205,
2512 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
2513 0, 0, 0, 0, 157, 158, 0, 0, 159, 160,
2514 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2515 0, 0, 0, 0, 167, 168, 0, 169, 170, 171,
2516 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2520 static const yytype_int16 yycheck[] =
2522 0, 0, 0, 0, 22, 25, 82, 53, 201, 97,
2523 103, 49, 3, 206, 3, 97, 0, 35, 44, 37,
2524 38, 3, 40, 41, 42, 43, 44, 298, 45, 34,
2525 99, 0, 13, 3, 103, 97, 18, 221, 3, 0,
2526 126, 129, 97, 67, 25, 50, 230, 129, 48, 48,
2527 48, 48, 359, 18, 126, 3, 4, 5, 302, 7,
2528 8, 9, 10, 11, 48, 4, 3, 129, 7, 8,
2529 9, 3, 11, 344, 129, 99, 24, 94, 26, 48,
2530 28, 18, 100, 176, 328, 103, 18, 48, 126, 27,
2531 122, 123, 26, 3, 32, 3, 44, 31, 35, 90,
2532 3, 90, 0, 347, 52, 44, 54, 55, 18, 202,
2533 18, 45, 126, 384, 358, 54, 55, 135, 136, 137,
2534 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2535 148, 149, 150, 151, 152, 153, 154, 155, 156, 87,
2536 88, 159, 160, 161, 162, 163, 164, 165, 166, 167,
2537 168, 169, 170, 171, 172, 173, 174, 122, 176, 343,
2538 186, 178, 126, 470, 181, 182, 126, 123, 186, 33,
2539 126, 97, 120, 97, 122, 419, 113, 421, 126, 122,
2540 198, 113, 96, 97, 202, 3, 4, 213, 214, 3,
2541 216, 87, 88, 97, 211, 213, 214, 61, 216, 199,
2542 199, 394, 278, 129, 413, 129, 223, 224, 126, 126,
2543 126, 123, 123, 97, 3, 4, 5, 103, 7, 8,
2544 9, 10, 11, 432, 120, 97, 302, 123, 437, 121,
2545 126, 307, 67, 128, 3, 24, 3, 26, 422, 28,
2546 96, 67, 31, 3, 3, 454, 35, 3, 3, 17,
2547 87, 88, 328, 42, 438, 44, 45, 466, 3, 3,
2548 96, 13, 471, 52, 17, 54, 55, 129, 97, 103,
2549 3, 347, 53, 62, 53, 112, 113, 114, 129, 3,
2550 126, 3, 358, 120, 128, 3, 123, 287, 287, 126,
2551 129, 475, 97, 103, 294, 294, 129, 128, 87, 88,
2552 320, 26, 322, 99, 126, 30, 31, 325, 16, 122,
2553 122, 357, 99, 128, 123, 332, 122, 97, 43, 122,
2554 45, 110, 348, 99, 122, 126, 115, 116, 354, 64,
2555 348, 120, 129, 122, 129, 128, 354, 126, 103, 3,
2556 3, 361, 26, 419, 128, 421, 128, 122, 3, 0,
2557 128, 128, 3, 4, 5, 129, 7, 8, 9, 10,
2558 11, 12, 13, 14, 15, 126, 128, 18, 19, 20,
2559 21, 122, 23, 24, 25, 129, 48, 28, 128, 294,
2560 287, 401, 186, 324, 35, 53, 37, 38, 406, 40,
2561 122, 42, 315, 44, 409, 46, 47, 48, 409, 64,
2562 51, 52, 402, 54, 55, 390, 446, 390, 429, 382,
2563 451, 62, 63, 19, 20, 21, 18, 23, 340, 25,
2564 -1, 361, -1, 423, 423, 423, 423, 87, 88, 429,
2565 -1, 37, -1, -1, -1, -1, 87, 88, -1, 45,
2566 46, 47, 48, -1, -1, 96, 446, 446, 446, 446,
2567 110, 111, 112, 113, 114, -1, -1, -1, -1, 110,
2568 120, -1, -1, 123, 115, 116, 126, -1, -1, 120,
2569 -1, 122, -1, 0, -1, 126, 3, 4, 5, -1,
2570 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2571 96, 18, 19, 20, 21, -1, 23, 24, 25, -1,
2572 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2573 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2574 47, 48, 128, -1, 51, 52, -1, 54, 55, -1,
2575 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2576 -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
2577 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
2578 87, 88, -1, -1, -1, -1, 37, -1, -1, 96,
2579 -1, -1, -1, -1, 45, 46, 47, 48, -1, -1,
2580 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2581 -1, -1, -1, 120, -1, 122, 3, 4, 5, 126,
2582 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2583 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
2584 -1, 28, 29, -1, 31, 96, -1, -1, 35, 36,
2585 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
2586 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2587 -1, -1, -1, -1, -1, 62, 63, 128, 65, 19,
2588 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
2589 -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
2590 87, 88, -1, -1, -1, -1, 46, 47, 48, 96,
2591 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2592 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2593 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2594 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2595 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2596 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2597 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2598 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2599 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2600 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2601 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2602 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2603 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2604 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2605 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2606 -1, 122, -1, -1, -1, 126, -1, 128, 3, 4,
2607 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
2608 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
2609 25, -1, -1, 28, -1, 39, -1, -1, -1, -1,
2610 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
2611 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2612 55, -1, 66, 67, 68, -1, -1, 62, 63, 73,
2613 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2614 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2615 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2616 -1, 96, -1, 107, 108, -1, 110, 111, 112, 113,
2617 114, -1, -1, -1, -1, 110, 120, -1, -1, 123,
2618 115, 116, 126, -1, -1, 120, -1, 122, -1, -1,
2619 -1, 126, -1, 128, 3, 4, 5, -1, 7, 8,
2620 9, 10, 11, 12, 13, 14, 15, -1, -1, -1,
2621 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
2622 -1, 39, -1, -1, -1, -1, 35, -1, 37, 38,
2623 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
2624 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
2625 -1, -1, -1, 62, 63, 73, 74, -1, -1, -1,
2626 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2627 88, -1, -1, 91, 92, 93, -1, -1, 87, 88,
2628 -1, -1, -1, -1, -1, -1, -1, 96, -1, 107,
2629 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2630 -1, 110, 120, -1, -1, 123, 115, 116, 126, -1,
2631 -1, 120, -1, 122, -1, -1, -1, 126, -1, 128,
2632 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
2633 13, 14, 15, -1, -1, -1, 19, 20, 21, -1,
2634 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
2635 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
2636 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
2637 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2638 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2639 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2640 -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
2641 -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
2642 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2643 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2644 -1, -1, -1, 126, -1, 128, 3, 4, 5, -1,
2645 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2646 -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
2647 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2648 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2649 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2650 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2652 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2653 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2654 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2655 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2656 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2657 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2658 11, 12, 13, 14, 15, -1, 17, -1, 19, 20,
2659 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2660 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2661 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2662 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2663 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2664 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2665 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2666 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2667 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2668 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2669 -1, 122, 3, 4, 5, 126, 7, 8, 9, 10,
2670 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2671 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2672 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2673 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2674 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2675 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2676 -1, 3, 4, 5, -1, 7, 8, 9, 10, 11,
2677 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2678 -1, -1, 24, -1, 26, 96, 28, -1, -1, -1,
2679 -1, -1, -1, 35, -1, -1, -1, -1, -1, 110,
2680 42, -1, 44, -1, 115, 116, -1, -1, -1, 120,
2681 52, 122, 54, 55, -1, 126, -1, -1, -1, -1,
2682 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2683 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2684 -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
2685 -1, -1, -1, -1, -1, -1, -1, -1, 39, -1,
2686 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
2687 -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
2688 122, -1, -1, -1, 126, 66, 67, 68, 69, 70,
2689 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2690 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2691 91, 92, 93, -1, -1, -1, -1, -1, 99, -1,
2692 -1, 102, 39, 104, 105, 106, 107, 108, -1, 110,
2693 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2694 -1, -1, 123, -1, -1, 126, -1, -1, 129, 66,
2695 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
2696 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
2697 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2698 -1, -1, 99, -1, -1, 102, 39, 104, 105, 106,
2699 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2700 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2701 -1, -1, 129, 66, 67, 68, 69, 70, 71, 72,
2702 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
2703 83, 84, 85, -1, 87, 88, -1, -1, 91, 92,
2704 93, -1, -1, -1, -1, -1, 99, 39, -1, 102,
2705 103, 104, 105, 106, 107, 108, -1, 110, 111, 112,
2706 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2707 123, -1, -1, 126, 66, 67, 68, 69, 70, 71,
2708 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
2709 82, 83, 84, 85, -1, 87, 88, -1, -1, 91,
2710 92, 93, -1, -1, -1, -1, -1, 99, 39, -1,
2711 102, -1, 104, 105, 106, 107, 108, -1, 110, 111,
2712 112, 113, 114, -1, -1, -1, -1, -1, 120, 121,
2713 -1, 123, -1, -1, 126, 66, 67, 68, 69, 70,
2714 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2715 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2716 91, 92, 93, -1, -1, -1, -1, -1, 99, 39,
2717 -1, 102, 103, 104, 105, 106, 107, 108, -1, 110,
2718 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2719 -1, -1, 123, -1, -1, 126, 66, 67, 68, 69,
2720 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2721 80, 81, 82, 83, 84, 85, -1, 87, 88, -1,
2722 -1, 91, 92, 93, -1, -1, -1, -1, -1, 99,
2723 39, -1, 102, 103, 104, 105, 106, 107, 108, -1,
2724 110, 111, 112, 113, 114, -1, -1, -1, -1, -1,
2725 120, -1, -1, 123, -1, -1, 126, 66, 67, 68,
2726 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2727 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2728 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2729 99, 39, -1, 102, -1, 104, 105, 106, 107, 108,
2730 -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2731 -1, 120, -1, -1, 123, -1, -1, 126, 66, 67,
2732 68, 69, 70, 71, 72, 73, 74, -1, -1, -1,
2733 -1, -1, -1, -1, -1, -1, -1, 85, -1, 87,
2734 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
2735 -1, -1, 39, -1, -1, -1, 104, 105, 106, 107,
2736 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2737 -1, -1, 120, -1, -1, 123, -1, -1, 126, 66,
2738 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
2739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2740 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2741 -1, -1, -1, 39, -1, -1, -1, 104, 105, 106,
2742 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2743 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2744 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
2745 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2746 -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
2747 -1, -1, -1, -1, 39, -1, -1, -1, -1, 105,
2748 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
2749 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
2750 126, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2751 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2752 -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2753 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2754 -1, 106, 107, 108, -1, 110, 111, 112, 113, 114,
2755 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
2756 -1, 126, 66, 67, 68, 69, 70, 71, 72, 73,
2757 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2758 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2759 -1, -1, -1, -1, -1, -1, 39, -1, -1, -1,
2760 -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
2761 114, -1, -1, -1, -1, -1, 120, -1, -1, 123,
2762 -1, -1, 126, 66, 67, 68, 69, 70, 71, 72,
2763 73, 74, -1, -1, -1, -1, -1, -1, -1, -1,
2764 -1, -1, -1, -1, 87, 88, -1, -1, 91, 92,
2765 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2766 -1, -1, -1, -1, 107, 108, -1, 110, 111, 112,
2767 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2771 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2772 symbol of state STATE-NUM. */
2773 static const yytype_uint8 yystos[] =
2775 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
2776 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
2777 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
2778 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
2779 110, 115, 116, 120, 122, 126, 131, 132, 133, 134,
2780 140, 143, 149, 153, 154, 155, 156, 158, 166, 174,
2781 177, 180, 183, 184, 185, 186, 190, 192, 201, 208,
2782 211, 221, 222, 223, 226, 227, 228, 229, 232, 49,
2783 126, 126, 159, 126, 3, 18, 122, 178, 179, 3,
2784 212, 3, 210, 228, 126, 3, 179, 212, 213, 214,
2785 126, 122, 123, 126, 228, 126, 228, 228, 228, 228,
2786 228, 219, 220, 225, 228, 225, 230, 231, 226, 0,
2787 134, 3, 31, 45, 145, 151, 152, 227, 26, 30,
2788 31, 43, 45, 200, 186, 97, 39, 66, 67, 68,
2789 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2790 79, 80, 81, 82, 83, 84, 85, 87, 88, 91,
2791 92, 93, 99, 102, 104, 105, 106, 107, 108, 110,
2792 111, 112, 113, 114, 120, 123, 126, 126, 157, 22,
2793 29, 36, 41, 45, 65, 96, 122, 140, 141, 142,
2794 145, 160, 161, 176, 184, 224, 233, 234, 167, 182,
2795 122, 123, 126, 218, 126, 226, 123, 228, 175, 3,
2796 219, 150, 121, 97, 103, 128, 97, 129, 3, 146,
2797 147, 3, 146, 96, 67, 34, 50, 207, 3, 3,
2798 3, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2799 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2800 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2801 228, 228, 228, 228, 228, 228, 228, 228, 228, 3,
2802 219, 226, 17, 3, 226, 226, 3, 128, 139, 141,
2803 228, 96, 13, 17, 228, 96, 135, 136, 137, 143,
2804 190, 192, 201, 208, 181, 178, 219, 3, 90, 204,
2805 205, 206, 129, 3, 113, 129, 138, 139, 129, 226,
2806 225, 225, 225, 103, 217, 97, 217, 226, 226, 3,
2807 53, 187, 53, 188, 217, 103, 121, 129, 129, 3,
2808 128, 141, 126, 3, 129, 128, 137, 135, 129, 99,
2809 103, 202, 206, 129, 97, 142, 128, 129, 103, 35,
2810 113, 179, 214, 216, 99, 144, 147, 96, 129, 126,
2811 214, 16, 189, 214, 215, 122, 144, 228, 142, 226,
2812 99, 122, 128, 4, 7, 8, 9, 11, 44, 54,
2813 55, 203, 216, 217, 90, 206, 27, 32, 168, 170,
2814 172, 173, 142, 225, 123, 225, 227, 142, 204, 215,
2815 122, 97, 193, 129, 3, 4, 33, 61, 162, 163,
2816 164, 165, 202, 122, 206, 122, 126, 168, 170, 64,
2817 148, 129, 129, 191, 214, 45, 96, 184, 197, 198,
2818 199, 228, 103, 128, 164, 165, 138, 171, 3, 142,
2819 142, 217, 96, 140, 184, 194, 195, 196, 201, 208,
2820 3, 26, 128, 199, 103, 138, 128, 138, 217, 122,
2821 128, 196, 207, 138, 128, 129, 209, 3, 169, 138,
2822 126, 122, 128, 204, 138, 129, 128, 217
2825 #define yyerrok (yyerrstatus = 0)
2826 #define yyclearin (yychar = YYEMPTY)
2827 #define YYEMPTY (-2)
2830 #define YYACCEPT goto yyacceptlab
2831 #define YYABORT goto yyabortlab
2832 #define YYERROR goto yyerrorlab
2835 /* Like YYERROR except do call yyerror. This remains here temporarily
2836 to ease the transition to the new meaning of YYERROR, for GCC.
2837 Once GCC version 2 has supplanted version 1, this can go. */
2839 #define YYFAIL goto yyerrlab
2841 #define YYRECOVERING() (!!yyerrstatus)
2843 #define YYBACKUP(Token, Value) \
2845 if (yychar == YYEMPTY && yylen == 1) \
2849 yytoken = YYTRANSLATE (yychar); \
2855 yyerror (YY_("syntax error: cannot back up")); \
2862 #define YYERRCODE 256
2865 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2866 If N is 0, then set CURRENT to the empty location which ends
2867 the previous symbol: RHS[0] (always defined). */
2869 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2870 #ifndef YYLLOC_DEFAULT
2871 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2875 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2876 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2877 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2878 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2882 (Current).first_line = (Current).last_line = \
2883 YYRHSLOC (Rhs, 0).last_line; \
2884 (Current).first_column = (Current).last_column = \
2885 YYRHSLOC (Rhs, 0).last_column; \
2891 /* YY_LOCATION_PRINT -- Print the location on the stream.
2892 This macro was not mandated originally: define only if we know
2893 we won't break user code: when these are the locations we know. */
2895 #ifndef YY_LOCATION_PRINT
2896 # if YYLTYPE_IS_TRIVIAL
2897 # define YY_LOCATION_PRINT(File, Loc) \
2898 fprintf (File, "%d.%d-%d.%d", \
2899 (Loc).first_line, (Loc).first_column, \
2900 (Loc).last_line, (Loc).last_column)
2902 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2907 /* YYLEX -- calling `yylex' with the right arguments. */
2910 # define YYLEX yylex (YYLEX_PARAM)
2912 # define YYLEX yylex ()
2915 /* Enable debugging if requested. */
2919 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2920 # define YYFPRINTF fprintf
2923 # define YYDPRINTF(Args) \
2929 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2933 YYFPRINTF (stderr, "%s ", Title); \
2934 yy_symbol_print (stderr, \
2936 YYFPRINTF (stderr, "\n"); \
2941 /*--------------------------------.
2942 | Print this symbol on YYOUTPUT. |
2943 `--------------------------------*/
2946 #if (defined __STDC__ || defined __C99__FUNC__ \
2947 || defined __cplusplus || defined _MSC_VER)
2949 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2952 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
2955 YYSTYPE const * const yyvaluep;
2961 if (yytype < YYNTOKENS)
2962 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2974 /*--------------------------------.
2975 | Print this symbol on YYOUTPUT. |
2976 `--------------------------------*/
2978 #if (defined __STDC__ || defined __C99__FUNC__ \
2979 || defined __cplusplus || defined _MSC_VER)
2981 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2984 yy_symbol_print (yyoutput, yytype, yyvaluep)
2987 YYSTYPE const * const yyvaluep;
2990 if (yytype < YYNTOKENS)
2991 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2993 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2995 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
2996 YYFPRINTF (yyoutput, ")");
2999 /*------------------------------------------------------------------.
3000 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3002 `------------------------------------------------------------------*/
3004 #if (defined __STDC__ || defined __C99__FUNC__ \
3005 || defined __cplusplus || defined _MSC_VER)
3007 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3010 yy_stack_print (yybottom, yytop)
3011 yytype_int16 *yybottom;
3012 yytype_int16 *yytop;
3015 YYFPRINTF (stderr, "Stack now");
3016 for (; yybottom <= yytop; yybottom++)
3018 int yybot = *yybottom;
3019 YYFPRINTF (stderr, " %d", yybot);
3021 YYFPRINTF (stderr, "\n");
3024 # define YY_STACK_PRINT(Bottom, Top) \
3027 yy_stack_print ((Bottom), (Top)); \
3031 /*------------------------------------------------.
3032 | Report that the YYRULE is going to be reduced. |
3033 `------------------------------------------------*/
3035 #if (defined __STDC__ || defined __C99__FUNC__ \
3036 || defined __cplusplus || defined _MSC_VER)
3038 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3041 yy_reduce_print (yyvsp, yyrule)
3046 int yynrhs = yyr2[yyrule];
3048 unsigned long int yylno = yyrline[yyrule];
3049 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3051 /* The symbols being reduced. */
3052 for (yyi = 0; yyi < yynrhs; yyi++)
3054 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3055 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3056 &(yyvsp[(yyi + 1) - (yynrhs)])
3058 YYFPRINTF (stderr, "\n");
3062 # define YY_REDUCE_PRINT(Rule) \
3065 yy_reduce_print (yyvsp, Rule); \
3068 /* Nonzero means print parse trace. It is left uninitialized so that
3069 multiple parsers can coexist. */
3071 #else /* !YYDEBUG */
3072 # define YYDPRINTF(Args)
3073 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3074 # define YY_STACK_PRINT(Bottom, Top)
3075 # define YY_REDUCE_PRINT(Rule)
3076 #endif /* !YYDEBUG */
3079 /* YYINITDEPTH -- initial size of the parser's stacks. */
3081 # define YYINITDEPTH 200
3084 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3085 if the built-in stack extension method is used).
3087 Do not make this value too large; the results are undefined if
3088 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3089 evaluated with infinite-precision integer arithmetic. */
3092 # define YYMAXDEPTH 10000
3100 # if defined __GLIBC__ && defined _STRING_H
3101 # define yystrlen strlen
3103 /* Return the length of YYSTR. */
3104 #if (defined __STDC__ || defined __C99__FUNC__ \
3105 || defined __cplusplus || defined _MSC_VER)
3107 yystrlen (const char *yystr)
3115 for (yylen = 0; yystr[yylen]; yylen++)
3123 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3124 # define yystpcpy stpcpy
3126 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3128 #if (defined __STDC__ || defined __C99__FUNC__ \
3129 || defined __cplusplus || defined _MSC_VER)
3131 yystpcpy (char *yydest, const char *yysrc)
3134 yystpcpy (yydest, yysrc)
3140 const char *yys = yysrc;
3142 while ((*yyd++ = *yys++) != '\0')
3151 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3152 quotes and backslashes, so that it's suitable for yyerror. The
3153 heuristic is that double-quoting is unnecessary unless the string
3154 contains an apostrophe, a comma, or backslash (other than
3155 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3156 null, do not copy; instead, return the length of what the result
3159 yytnamerr (char *yyres, const char *yystr)
3164 char const *yyp = yystr;
3171 goto do_not_strip_quotes;
3175 goto do_not_strip_quotes;
3188 do_not_strip_quotes: ;
3192 return yystrlen (yystr);
3194 return yystpcpy (yyres, yystr) - yyres;
3198 /* Copy into YYRESULT an error message about the unexpected token
3199 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3200 including the terminating null byte. If YYRESULT is null, do not
3201 copy anything; just return the number of bytes that would be
3202 copied. As a special case, return 0 if an ordinary "syntax error"
3203 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3204 size calculation. */
3206 yysyntax_error (char *yyresult, int yystate, int yychar)
3208 int yyn = yypact[yystate];
3210 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3214 int yytype = YYTRANSLATE (yychar);
3215 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3216 YYSIZE_T yysize = yysize0;
3218 int yysize_overflow = 0;
3219 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3220 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3224 /* This is so xgettext sees the translatable formats that are
3225 constructed on the fly. */
3226 YY_("syntax error, unexpected %s");
3227 YY_("syntax error, unexpected %s, expecting %s");
3228 YY_("syntax error, unexpected %s, expecting %s or %s");
3229 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3230 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3234 static char const yyunexpected[] = "syntax error, unexpected %s";
3235 static char const yyexpecting[] = ", expecting %s";
3236 static char const yyor[] = " or %s";
3237 char yyformat[sizeof yyunexpected
3238 + sizeof yyexpecting - 1
3239 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3240 * (sizeof yyor - 1))];
3241 char const *yyprefix = yyexpecting;
3243 /* Start YYX at -YYN if negative to avoid negative indexes in
3245 int yyxbegin = yyn < 0 ? -yyn : 0;
3247 /* Stay within bounds of both yycheck and yytname. */
3248 int yychecklim = YYLAST - yyn + 1;
3249 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3252 yyarg[0] = yytname[yytype];
3253 yyfmt = yystpcpy (yyformat, yyunexpected);
3255 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3256 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3258 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3262 yyformat[sizeof yyunexpected - 1] = '\0';
3265 yyarg[yycount++] = yytname[yyx];
3266 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3267 yysize_overflow |= (yysize1 < yysize);
3269 yyfmt = yystpcpy (yyfmt, yyprefix);
3273 yyf = YY_(yyformat);
3274 yysize1 = yysize + yystrlen (yyf);
3275 yysize_overflow |= (yysize1 < yysize);
3278 if (yysize_overflow)
3279 return YYSIZE_MAXIMUM;
3283 /* Avoid sprintf, as that infringes on the user's name space.
3284 Don't have undefined behavior even if the translation
3285 produced a string with the wrong number of "%s"s. */
3286 char *yyp = yyresult;
3288 while ((*yyp = *yyf) != '\0')
3290 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3292 yyp += yytnamerr (yyp, yyarg[yyi++]);
3305 #endif /* YYERROR_VERBOSE */
3308 /*-----------------------------------------------.
3309 | Release the memory associated to this symbol. |
3310 `-----------------------------------------------*/
3313 #if (defined __STDC__ || defined __C99__FUNC__ \
3314 || defined __cplusplus || defined _MSC_VER)
3316 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3319 yydestruct (yymsg, yytype, yyvaluep)
3329 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3339 /* Prevent warnings from -Wmissing-prototypes. */
3340 #ifdef YYPARSE_PARAM
3341 #if defined __STDC__ || defined __cplusplus
3342 int yyparse (void *YYPARSE_PARAM);
3346 #else /* ! YYPARSE_PARAM */
3347 #if defined __STDC__ || defined __cplusplus
3352 #endif /* ! YYPARSE_PARAM */
3355 /* The lookahead symbol. */
3358 /* The semantic value of the lookahead symbol. */
3361 /* Number of syntax errors so far. */
3366 /*-------------------------.
3367 | yyparse or yypush_parse. |
3368 `-------------------------*/
3370 #ifdef YYPARSE_PARAM
3371 #if (defined __STDC__ || defined __C99__FUNC__ \
3372 || defined __cplusplus || defined _MSC_VER)
3374 yyparse (void *YYPARSE_PARAM)
3377 yyparse (YYPARSE_PARAM)
3378 void *YYPARSE_PARAM;
3380 #else /* ! YYPARSE_PARAM */
3381 #if (defined __STDC__ || defined __C99__FUNC__ \
3382 || defined __cplusplus || defined _MSC_VER)
3395 /* Number of tokens to shift before error messages enabled. */
3398 /* The stacks and their tools:
3399 `yyss': related to states.
3400 `yyvs': related to semantic values.
3402 Refer to the stacks thru separate pointers, to allow yyoverflow
3403 to reallocate them elsewhere. */
3405 /* The state stack. */
3406 yytype_int16 yyssa[YYINITDEPTH];
3408 yytype_int16 *yyssp;
3410 /* The semantic value stack. */
3411 YYSTYPE yyvsa[YYINITDEPTH];
3415 YYSIZE_T yystacksize;
3419 /* Lookahead token as an internal (translated) token number. */
3421 /* The variables used to return semantic value and location from the
3426 /* Buffer for error messages, and its allocated size. */
3428 char *yymsg = yymsgbuf;
3429 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3432 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3434 /* The number of symbols on the RHS of the reduced rule.
3435 Keep to zero when no symbol should be popped. */
3441 yystacksize = YYINITDEPTH;
3443 YYDPRINTF ((stderr, "Starting parse\n"));
3448 yychar = YYEMPTY; /* Cause a token to be read. */
3450 /* Initialize stack pointers.
3451 Waste one element of value and location stack
3452 so that they stay on the same level as the state stack.
3453 The wasted elements are never initialized. */
3459 /*------------------------------------------------------------.
3460 | yynewstate -- Push a new state, which is found in yystate. |
3461 `------------------------------------------------------------*/
3463 /* In all cases, when you get here, the value and location stacks
3464 have just been pushed. So pushing a state here evens the stacks. */
3470 if (yyss + yystacksize - 1 <= yyssp)
3472 /* Get the current used size of the three stacks, in elements. */
3473 YYSIZE_T yysize = yyssp - yyss + 1;
3477 /* Give user a chance to reallocate the stack. Use copies of
3478 these so that the &'s don't force the real ones into
3480 YYSTYPE *yyvs1 = yyvs;
3481 yytype_int16 *yyss1 = yyss;
3483 /* Each stack pointer address is followed by the size of the
3484 data in use in that stack, in bytes. This used to be a
3485 conditional around just the two extra args, but that might
3486 be undefined if yyoverflow is a macro. */
3487 yyoverflow (YY_("memory exhausted"),
3488 &yyss1, yysize * sizeof (*yyssp),
3489 &yyvs1, yysize * sizeof (*yyvsp),
3495 #else /* no yyoverflow */
3496 # ifndef YYSTACK_RELOCATE
3497 goto yyexhaustedlab;
3499 /* Extend the stack our own way. */
3500 if (YYMAXDEPTH <= yystacksize)
3501 goto yyexhaustedlab;
3503 if (YYMAXDEPTH < yystacksize)
3504 yystacksize = YYMAXDEPTH;
3507 yytype_int16 *yyss1 = yyss;
3508 union yyalloc *yyptr =
3509 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3511 goto yyexhaustedlab;
3512 YYSTACK_RELOCATE (yyss_alloc, yyss);
3513 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3514 # undef YYSTACK_RELOCATE
3516 YYSTACK_FREE (yyss1);
3519 #endif /* no yyoverflow */
3521 yyssp = yyss + yysize - 1;
3522 yyvsp = yyvs + yysize - 1;
3524 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3525 (unsigned long int) yystacksize));
3527 if (yyss + yystacksize - 1 <= yyssp)
3531 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3533 if (yystate == YYFINAL)
3543 /* Do appropriate processing given the current state. Read a
3544 lookahead token if we need one and don't already have one. */
3546 /* First try to decide what to do without reference to lookahead token. */
3547 yyn = yypact[yystate];
3548 if (yyn == YYPACT_NINF)
3551 /* Not known => get a lookahead token if don't already have one. */
3553 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3554 if (yychar == YYEMPTY)
3556 YYDPRINTF ((stderr, "Reading a token: "));
3560 if (yychar <= YYEOF)
3562 yychar = yytoken = YYEOF;
3563 YYDPRINTF ((stderr, "Now at end of input.\n"));
3567 yytoken = YYTRANSLATE (yychar);
3568 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3571 /* If the proper action on seeing token YYTOKEN is to reduce or to
3572 detect an error, take that action. */
3574 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3579 if (yyn == 0 || yyn == YYTABLE_NINF)
3585 /* Count tokens shifted since error; after three, turn off error
3590 /* Shift the lookahead token. */
3591 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3593 /* Discard the shifted token. */
3602 /*-----------------------------------------------------------.
3603 | yydefault -- do the default action for the current state. |
3604 `-----------------------------------------------------------*/
3606 yyn = yydefact[yystate];
3612 /*-----------------------------.
3613 | yyreduce -- Do a reduction. |
3614 `-----------------------------*/
3616 /* yyn is the number of a rule to reduce with. */
3619 /* If YYLEN is nonzero, implement the default value of the action:
3622 Otherwise, the following line sets YYVAL to garbage.
3623 This behavior is undocumented and Bison
3624 users should not rely upon it. Assigning to YYVAL
3625 unconditionally makes the parser a bit smaller, and it avoids a
3626 GCC warning that YYVAL may be used uninitialized. */
3627 yyval = yyvsp[1-yylen];
3630 YY_REDUCE_PRINT (yyn);
3637 /* Line 1464 of skeleton.m4 */
3638 #line 1544 "parser.y"
3639 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3648 /* Line 1464 of skeleton.m4 */
3649 #line 1545 "parser.y"
3650 {(yyval.code)=code_new();}
3659 /* Line 1464 of skeleton.m4 */
3660 #line 1547 "parser.y"
3661 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
3670 /* Line 1464 of skeleton.m4 */
3671 #line 1548 "parser.y"
3672 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3681 /* Line 1464 of skeleton.m4 */
3682 #line 1563 "parser.y"
3692 /* Line 1464 of skeleton.m4 */
3693 #line 1571 "parser.y"
3694 {/*TODO*/(yyval.code)=0;}
3703 /* Line 1464 of skeleton.m4 */
3704 #line 1572 "parser.y"
3705 {/*TODO*/(yyval.code)=0;}
3714 /* Line 1464 of skeleton.m4 */
3715 #line 1574 "parser.y"
3716 {(yyval.code)=(yyvsp[(2) - (3)].code);}
3725 /* Line 1464 of skeleton.m4 */
3726 #line 1575 "parser.y"
3736 /* Line 1464 of skeleton.m4 */
3737 #line 1576 "parser.y"
3738 {(yyval.code)=(yyvsp[(1) - (2)].code);}
3747 /* Line 1464 of skeleton.m4 */
3748 #line 1577 "parser.y"
3749 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3758 /* Line 1464 of skeleton.m4 */
3759 #line 1581 "parser.y"
3761 code_t**cc = &global->init->method->body->code;
3762 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
3772 /* Line 1464 of skeleton.m4 */
3773 #line 1588 "parser.y"
3774 {(yyval.value)=(yyvsp[(2) - (2)].value);}
3783 /* Line 1464 of skeleton.m4 */
3784 #line 1589 "parser.y"
3785 {(yyval.value).c=abc_pushundefined(0);
3786 (yyval.value).t=TYPE_ANY;
3796 /* Line 1464 of skeleton.m4 */
3797 #line 1593 "parser.y"
3798 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3807 /* Line 1464 of skeleton.m4 */
3808 #line 1594 "parser.y"
3809 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3818 /* Line 1464 of skeleton.m4 */
3819 #line 1596 "parser.y"
3820 {(yyval.code) = (yyvsp[(1) - (1)].code);}
3829 /* Line 1464 of skeleton.m4 */
3830 #line 1597 "parser.y"
3831 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
3840 /* Line 1464 of skeleton.m4 */
3841 #line 1600 "parser.y"
3843 if(variable_exists((yyvsp[(1) - (3)].id)))
3844 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3846 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3847 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
3848 (yyvsp[(2) - (3)].classinfo)->name);
3851 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3853 if((yyvsp[(2) - (3)].classinfo)) {
3854 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3855 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3856 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3857 (yyval.code) = abc_setlocal((yyval.code), index);
3859 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3860 (yyval.code) = abc_setlocal((yyval.code), index);
3863 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3864 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3865 (yyval.code) = abc_coerce_a((yyval.code));
3866 (yyval.code) = abc_setlocal((yyval.code), index);
3868 (yyval.code) = code_new();
3872 /* that's the default for a local register, anyway
3874 state->method->initcode = abc_pushundefined(state->method->initcode);
3875 state->method->initcode = abc_setlocal(state->method->initcode, index);
3877 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3887 /* Line 1464 of skeleton.m4 */
3888 #line 1640 "parser.y"
3889 {(yyval.code) = code_new();}
3898 /* Line 1464 of skeleton.m4 */
3899 #line 1641 "parser.y"
3900 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3909 /* Line 1464 of skeleton.m4 */
3910 #line 1644 "parser.y"
3920 /* Line 1464 of skeleton.m4 */
3921 #line 1644 "parser.y"
3924 (yyval.code) = code_new();
3925 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3926 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3928 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3929 if((yyvsp[(7) - (7)].code)) {
3930 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3932 myif->branch = (yyval.code) = abc_nop((yyval.code));
3933 if((yyvsp[(7) - (7)].code)) {
3934 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3935 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3937 (yyval.code) = var_block((yyval.code));
3948 /* Line 1464 of skeleton.m4 */
3949 #line 1663 "parser.y"
3950 {(yyval.code)=code_new();}
3959 /* Line 1464 of skeleton.m4 */
3960 #line 1668 "parser.y"
3962 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
3972 /* Line 1464 of skeleton.m4 */
3973 #line 1671 "parser.y"
3975 (yyval.id)=(yyvsp[(1) - (1)].id);
3985 /* Line 1464 of skeleton.m4 */
3986 #line 1675 "parser.y"
3987 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
3996 /* Line 1464 of skeleton.m4 */
3997 #line 1676 "parser.y"
3998 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4007 /* Line 1464 of skeleton.m4 */
4008 #line 1678 "parser.y"
4010 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4011 (yyval.code) = code_new();
4012 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4013 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4014 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4015 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4016 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4017 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4018 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4019 (yyval.code) = abc_jump((yyval.code), loopstart);
4020 code_t*out = (yyval.code) = abc_nop((yyval.code));
4021 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4022 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4025 (yyval.code) = var_block((yyval.code));
4036 /* Line 1464 of skeleton.m4 */
4037 #line 1698 "parser.y"
4039 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4040 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4041 int it = new_variable(tmp1name, TYPE_INT, 0);
4042 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4043 int array = new_variable(tmp1name, 0, 0);
4045 (yyval.code) = code_new();
4046 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4047 (yyval.code) = abc_coerce_a((yyval.code));
4048 (yyval.code) = abc_setlocal((yyval.code), array);
4049 (yyval.code) = abc_pushbyte((yyval.code), 0);
4050 (yyval.code) = abc_setlocal((yyval.code), it);
4052 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4054 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4055 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4056 (yyval.code) = abc_getlocal((yyval.code), array);
4057 (yyval.code) = abc_getlocal((yyval.code), it);
4058 if(!(yyvsp[(1) - (6)].for_start).each)
4059 (yyval.code) = abc_nextname((yyval.code));
4061 (yyval.code) = abc_nextvalue((yyval.code));
4062 (yyval.code) = converttype((yyval.code), 0, var->type);
4063 (yyval.code) = abc_setlocal((yyval.code), var->index);
4065 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4066 (yyval.code) = abc_jump((yyval.code), loopstart);
4068 code_t*out = (yyval.code) = abc_nop((yyval.code));
4069 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4070 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4074 (yyval.code) = var_block((yyval.code));
4088 /* Line 1464 of skeleton.m4 */
4089 #line 1741 "parser.y"
4099 /* Line 1464 of skeleton.m4 */
4100 #line 1741 "parser.y"
4103 (yyval.code) = code_new();
4105 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4106 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4107 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4108 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4109 myjmp->branch = cont;
4110 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4111 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4112 code_t*out = (yyval.code) = abc_nop((yyval.code));
4113 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4114 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4116 (yyval.code) = var_block((yyval.code));
4127 /* Line 1464 of skeleton.m4 */
4128 #line 1760 "parser.y"
4138 /* Line 1464 of skeleton.m4 */
4139 #line 1760 "parser.y"
4141 (yyval.code) = code_new();
4142 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4143 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4144 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4145 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4146 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4147 code_t*out = (yyval.code) = abc_nop((yyval.code));
4148 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4149 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4151 (yyval.code) = var_block((yyval.code));
4162 /* Line 1464 of skeleton.m4 */
4163 #line 1775 "parser.y"
4165 (yyval.code) = abc___break__(0, "");
4175 /* Line 1464 of skeleton.m4 */
4176 #line 1778 "parser.y"
4178 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4188 /* Line 1464 of skeleton.m4 */
4189 #line 1781 "parser.y"
4191 (yyval.code) = abc___continue__(0, "");
4201 /* Line 1464 of skeleton.m4 */
4202 #line 1784 "parser.y"
4204 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4214 /* Line 1464 of skeleton.m4 */
4215 #line 1788 "parser.y"
4225 /* Line 1464 of skeleton.m4 */
4226 #line 1789 "parser.y"
4227 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4236 /* Line 1464 of skeleton.m4 */
4237 #line 1790 "parser.y"
4238 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4247 /* Line 1464 of skeleton.m4 */
4248 #line 1791 "parser.y"
4249 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4258 /* Line 1464 of skeleton.m4 */
4259 #line 1792 "parser.y"
4260 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4269 /* Line 1464 of skeleton.m4 */
4270 #line 1793 "parser.y"
4271 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4280 /* Line 1464 of skeleton.m4 */
4281 #line 1795 "parser.y"
4283 (yyval.code) = abc_dup(0);
4284 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4285 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4286 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4287 if((yyval.code)->opcode != OPCODE___BREAK__) {
4288 (yyval.code) = abc___fallthrough__((yyval.code), "");
4290 code_t*e = (yyval.code) = abc_nop((yyval.code));
4301 /* Line 1464 of skeleton.m4 */
4302 #line 1806 "parser.y"
4304 (yyval.code) = (yyvsp[(3) - (3)].code);
4314 /* Line 1464 of skeleton.m4 */
4315 #line 1809 "parser.y"
4325 /* Line 1464 of skeleton.m4 */
4326 #line 1809 "parser.y"
4328 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4329 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4330 code_t*out = (yyval.code) = abc_pop((yyval.code));
4331 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4333 code_t*c = (yyval.code),*lastblock=0;
4335 if(c->opcode == OPCODE_IFNE) {
4336 if(!c->next) syntaxerror("internal error in fallthrough handling");
4338 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4340 c->opcode = OPCODE_JUMP;
4341 c->branch = lastblock;
4343 /* fall through end of switch */
4344 c->opcode = OPCODE_NOP;
4350 (yyval.code) = var_block((yyval.code));
4361 /* Line 1464 of skeleton.m4 */
4362 #line 1838 "parser.y"
4363 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4372 /* Line 1464 of skeleton.m4 */
4373 #line 1839 "parser.y"
4375 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4376 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4378 NEW(abc_exception_t, e)
4379 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4380 e->var_name = multiname_clone(&name);
4381 (yyval.exception) = e;
4384 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4385 e->target = c = abc_nop(0);
4386 c = abc_setlocal(c, i);
4387 c = code_append(c, (yyvsp[(8) - (9)].code));
4401 /* Line 1464 of skeleton.m4 */
4402 #line 1858 "parser.y"
4403 {new_state();state->exception_name=0;}
4412 /* Line 1464 of skeleton.m4 */
4413 #line 1858 "parser.y"
4415 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4416 if(!(yyvsp[(4) - (5)].code)) {
4417 (yyval.exception)=0;
4420 NEW(abc_exception_t, e)
4421 e->exc_type = 0; //all exceptions
4422 e->var_name = 0; //no name
4425 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4427 (yyval.exception) = e;
4438 /* Line 1464 of skeleton.m4 */
4439 #line 1875 "parser.y"
4440 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4449 /* Line 1464 of skeleton.m4 */
4450 #line 1876 "parser.y"
4451 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4460 /* Line 1464 of skeleton.m4 */
4461 #line 1877 "parser.y"
4462 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4471 /* Line 1464 of skeleton.m4 */
4472 #line 1878 "parser.y"
4474 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4475 (yyval.catch_list).finally = 0;
4476 if((yyvsp[(2) - (2)].exception)) {
4477 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4478 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4489 /* Line 1464 of skeleton.m4 */
4490 #line 1886 "parser.y"
4492 (yyval.catch_list).l=list_new();
4493 (yyval.catch_list).finally = 0;
4494 if((yyvsp[(1) - (1)].exception)) {
4495 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4496 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4507 /* Line 1464 of skeleton.m4 */
4508 #line 1895 "parser.y"
4518 /* Line 1464 of skeleton.m4 */
4519 #line 1895 "parser.y"
4521 code_t*out = abc_nop(0);
4523 code_t*start = abc_nop(0);
4524 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4525 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4526 (yyval.code) = abc_jump((yyval.code), out);
4528 code_t*end = (yyval.code) = abc_nop((yyval.code));
4531 if((yyvsp[(6) - (6)].catch_list).finally)
4532 tmp = new_variable("__finally__", 0, 0);
4534 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4537 abc_exception_t*e = l->abc_exception;
4539 (yyval.code) = code_append((yyval.code), e->target);
4540 (yyval.code) = abc_jump((yyval.code), out);
4542 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4544 e->target = (yyval.code) = abc_nop((yyval.code));
4545 (yyval.code) = abc___rethrow__((yyval.code));
4553 (yyval.code) = code_append((yyval.code), out);
4555 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4557 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4559 (yyval.code) = var_block((yyval.code));
4570 /* Line 1464 of skeleton.m4 */
4571 #line 1940 "parser.y"
4573 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4574 (yyval.code)=abc_throw((yyval.code));
4584 /* Line 1464 of skeleton.m4 */
4585 #line 1944 "parser.y"
4587 if(!state->exception_name)
4588 syntaxerror("re-throw only possible within a catch block");
4589 variable_t*v = find_variable(state->exception_name);
4590 (yyval.code)=code_new();
4591 (yyval.code)=abc_getlocal((yyval.code), v->index);
4592 (yyval.code)=abc_throw((yyval.code));
4602 /* Line 1464 of skeleton.m4 */
4603 #line 1955 "parser.y"
4605 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4606 (yyval.code) = abc_pushscope((yyval.code));
4607 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4608 (yyval.code) = abc_popscope((yyval.code));
4618 /* Line 1464 of skeleton.m4 */
4619 #line 1965 "parser.y"
4620 {PASS12 (yyval.id)="package";}
4629 /* Line 1464 of skeleton.m4 */
4630 #line 1967 "parser.y"
4631 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
4640 /* Line 1464 of skeleton.m4 */
4641 #line 1968 "parser.y"
4642 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
4651 /* Line 1464 of skeleton.m4 */
4652 #line 1970 "parser.y"
4653 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
4662 /* Line 1464 of skeleton.m4 */
4663 #line 1971 "parser.y"
4664 {PASS12 endpackage();(yyval.code)=0;}
4673 /* Line 1464 of skeleton.m4 */
4674 #line 1972 "parser.y"
4675 {PASS12 startpackage("");}
4684 /* Line 1464 of skeleton.m4 */
4685 #line 1973 "parser.y"
4686 {PASS12 endpackage();(yyval.code)=0;}
4695 /* Line 1464 of skeleton.m4 */
4696 #line 1975 "parser.y"
4698 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4700 syntaxerror("Couldn't import class\n");
4701 state_has_imports();
4702 dict_put(state->imports, c->name, c);
4713 /* Line 1464 of skeleton.m4 */
4714 #line 1983 "parser.y"
4717 i->package = (yyvsp[(2) - (4)].id);
4718 state_has_imports();
4719 list_append(state->wildcard_imports, i);
4730 /* Line 1464 of skeleton.m4 */
4731 #line 1993 "parser.y"
4732 {PASS12 (yyval.flags)=0;}
4741 /* Line 1464 of skeleton.m4 */
4742 #line 1994 "parser.y"
4743 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
4752 /* Line 1464 of skeleton.m4 */
4753 #line 1995 "parser.y"
4754 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
4763 /* Line 1464 of skeleton.m4 */
4764 #line 1996 "parser.y"
4765 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
4774 /* Line 1464 of skeleton.m4 */
4775 #line 1998 "parser.y"
4776 {PASS12 (yyval.token)=FLAG_PUBLIC;}
4785 /* Line 1464 of skeleton.m4 */
4786 #line 1999 "parser.y"
4787 {PASS12 (yyval.token)=FLAG_PRIVATE;}
4796 /* Line 1464 of skeleton.m4 */
4797 #line 2000 "parser.y"
4798 {PASS12 (yyval.token)=FLAG_PROTECTED;}
4807 /* Line 1464 of skeleton.m4 */
4808 #line 2001 "parser.y"
4809 {PASS12 (yyval.token)=FLAG_STATIC;}
4818 /* Line 1464 of skeleton.m4 */
4819 #line 2002 "parser.y"
4820 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
4829 /* Line 1464 of skeleton.m4 */
4830 #line 2003 "parser.y"
4831 {PASS12 (yyval.token)=FLAG_FINAL;}
4840 /* Line 1464 of skeleton.m4 */
4841 #line 2004 "parser.y"
4842 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
4851 /* Line 1464 of skeleton.m4 */
4852 #line 2005 "parser.y"
4853 {PASS12 (yyval.token)=FLAG_NATIVE;}
4862 /* Line 1464 of skeleton.m4 */
4863 #line 2006 "parser.y"
4864 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
4873 /* Line 1464 of skeleton.m4 */
4874 #line 2008 "parser.y"
4875 {(yyval.classinfo)=registry_getobjectclass();}
4884 /* Line 1464 of skeleton.m4 */
4885 #line 2009 "parser.y"
4886 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
4895 /* Line 1464 of skeleton.m4 */
4896 #line 2011 "parser.y"
4897 {(yyval.classinfo_list)=list_new();}
4906 /* Line 1464 of skeleton.m4 */
4907 #line 2012 "parser.y"
4908 {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4917 /* Line 1464 of skeleton.m4 */
4918 #line 2014 "parser.y"
4919 {PASS12 (yyval.classinfo_list)=list_new();}
4928 /* Line 1464 of skeleton.m4 */
4929 #line 2015 "parser.y"
4930 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4939 /* Line 1464 of skeleton.m4 */
4940 #line 2019 "parser.y"
4941 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
4950 /* Line 1464 of skeleton.m4 */
4951 #line 2021 "parser.y"
4952 {PASS12 endclass();(yyval.code)=0;}
4961 /* Line 1464 of skeleton.m4 */
4962 #line 2025 "parser.y"
4963 {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
4972 /* Line 1464 of skeleton.m4 */
4973 #line 2027 "parser.y"
4974 {PASS12 endclass();(yyval.code)=0;}
4983 /* Line 1464 of skeleton.m4 */
4984 #line 2039 "parser.y"
4986 code_t*c = state->cls->static_init;
4987 c = code_append(c, (yyvsp[(1) - (1)].code));
4988 state->cls->static_init = c;
4998 /* Line 1464 of skeleton.m4 */
4999 #line 2050 "parser.y"
5001 syntaxerror("variable declarations not allowed in interfaces");
5011 /* Line 1464 of skeleton.m4 */
5012 #line 2053 "parser.y"
5015 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5016 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5017 syntaxerror("invalid method modifiers: interface methods always need to be public");
5019 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5020 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5030 /* Line 1464 of skeleton.m4 */
5031 #line 2067 "parser.y"
5033 int flags = (yyvsp[(1) - (5)].flags);
5034 memberinfo_t* info = state->cls?
5035 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
5036 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
5038 info->type = (yyvsp[(4) - (5)].classinfo);
5039 info->flags = flags;
5042 namespace_t mname_ns = {flags2access(flags), ""};
5043 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5045 trait_list_t**traits;
5049 mname_ns.name = state->package;
5050 traits = &global->init->traits;
5051 code = &global->init->method->body->code;
5052 } else if(flags&FLAG_STATIC) {
5054 traits = &state->cls->abc->static_traits;
5055 code = &state->cls->static_init;
5057 // instance variable
5058 traits = &state->cls->abc->traits;
5059 code = &state->cls->init;
5063 if((yyvsp[(4) - (5)].classinfo)) {
5064 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5065 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5067 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5069 info->slot = t->slot_id;
5071 /* initalization code (if needed) */
5073 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5074 c = abc_getlocal_0(c);
5075 c = code_append(c, (yyvsp[(5) - (5)].value).c);
5076 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5077 c = abc_setslot(c, t->slot_id);
5080 *code = code_append(*code, c);
5082 if((yyvsp[(2) - (5)].token)==KW_CONST) {
5083 t->kind= TRAIT_CONST;
5096 /* Line 1464 of skeleton.m4 */
5097 #line 2126 "parser.y"
5098 {(yyval.constant)=0;}
5107 /* Line 1464 of skeleton.m4 */
5108 #line 2127 "parser.y"
5109 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5118 /* Line 1464 of skeleton.m4 */
5119 #line 2129 "parser.y"
5120 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5129 /* Line 1464 of skeleton.m4 */
5130 #line 2130 "parser.y"
5131 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5140 /* Line 1464 of skeleton.m4 */
5141 #line 2131 "parser.y"
5142 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5151 /* Line 1464 of skeleton.m4 */
5152 #line 2132 "parser.y"
5153 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5162 /* Line 1464 of skeleton.m4 */
5163 #line 2133 "parser.y"
5164 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);}
5173 /* Line 1464 of skeleton.m4 */
5174 #line 2135 "parser.y"
5175 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5184 /* Line 1464 of skeleton.m4 */
5185 #line 2136 "parser.y"
5186 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5195 /* Line 1464 of skeleton.m4 */
5196 #line 2137 "parser.y"
5197 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5206 /* Line 1464 of skeleton.m4 */
5207 #line 2142 "parser.y"
5209 memset(&(yyval.params),0,sizeof((yyval.params)));
5219 /* Line 1464 of skeleton.m4 */
5220 #line 2145 "parser.y"
5222 (yyval.params)=(yyvsp[(1) - (1)].params);
5232 /* Line 1464 of skeleton.m4 */
5233 #line 2150 "parser.y"
5235 memset(&(yyval.params),0,sizeof((yyval.params)));
5236 (yyval.params).varargs=1;
5237 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5247 /* Line 1464 of skeleton.m4 */
5248 #line 2155 "parser.y"
5250 (yyval.params) =(yyvsp[(1) - (4)].params);
5251 (yyval.params).varargs=1;
5252 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5262 /* Line 1464 of skeleton.m4 */
5263 #line 2162 "parser.y"
5265 (yyval.params) = (yyvsp[(1) - (3)].params);
5266 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5276 /* Line 1464 of skeleton.m4 */
5277 #line 2166 "parser.y"
5279 memset(&(yyval.params),0,sizeof((yyval.params)));
5280 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5290 /* Line 1464 of skeleton.m4 */
5291 #line 2171 "parser.y"
5293 (yyval.param) = malloc(sizeof(param_t));
5294 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5295 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5296 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5306 /* Line 1464 of skeleton.m4 */
5307 #line 2177 "parser.y"
5309 (yyval.param) = malloc(sizeof(param_t));
5310 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5311 (yyval.param)->type = TYPE_ANY;
5312 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5322 /* Line 1464 of skeleton.m4 */
5323 #line 2183 "parser.y"
5324 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5333 /* Line 1464 of skeleton.m4 */
5334 #line 2184 "parser.y"
5335 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5344 /* Line 1464 of skeleton.m4 */
5345 #line 2185 "parser.y"
5355 /* Line 1464 of skeleton.m4 */
5356 #line 2188 "parser.y"
5357 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5366 /* Line 1464 of skeleton.m4 */
5367 #line 2189 "parser.y"
5372 if(state->method->late_binding) {
5373 c = abc_getlocal_0(c);
5374 c = abc_pushscope(c);
5376 if(state->method->is_constructor && !state->method->has_super) {
5377 // call default constructor
5378 c = abc_getlocal_0(c);
5379 c = abc_constructsuper(c, 0);
5381 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5383 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5394 /* Line 1464 of skeleton.m4 */
5395 #line 2209 "parser.y"
5405 /* Line 1464 of skeleton.m4 */
5406 #line 2211 "parser.y"
5408 syntaxerror("nested functions not supported yet");
5418 /* Line 1464 of skeleton.m4 */
5419 #line 2218 "parser.y"
5421 PASS1 (yyval.classinfo)=0;
5423 /* try current package */
5424 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
5425 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
5435 /* Line 1464 of skeleton.m4 */
5436 #line 2226 "parser.y"
5438 PASS1 (yyval.classinfo)=0;
5440 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5441 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5442 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5452 /* Line 1464 of skeleton.m4 */
5453 #line 2237 "parser.y"
5454 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5463 /* Line 1464 of skeleton.m4 */
5464 #line 2238 "parser.y"
5465 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5474 /* Line 1464 of skeleton.m4 */
5475 #line 2240 "parser.y"
5476 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5485 /* Line 1464 of skeleton.m4 */
5486 #line 2241 "parser.y"
5487 {(yyval.classinfo)=registry_getanytype();}
5496 /* Line 1464 of skeleton.m4 */
5497 #line 2242 "parser.y"
5498 {(yyval.classinfo)=registry_getanytype();}
5507 /* Line 1464 of skeleton.m4 */
5508 #line 2251 "parser.y"
5509 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5518 /* Line 1464 of skeleton.m4 */
5519 #line 2252 "parser.y"
5520 {(yyval.classinfo)=0;}
5529 /* Line 1464 of skeleton.m4 */
5530 #line 2256 "parser.y"
5531 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5540 /* Line 1464 of skeleton.m4 */
5541 #line 2257 "parser.y"
5542 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5551 /* Line 1464 of skeleton.m4 */
5552 #line 2259 "parser.y"
5553 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5562 /* Line 1464 of skeleton.m4 */
5563 #line 2261 "parser.y"
5564 {(yyval.value_list).len=1;
5565 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
5575 /* Line 1464 of skeleton.m4 */
5576 #line 2264 "parser.y"
5578 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
5579 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
5589 /* Line 1464 of skeleton.m4 */
5590 #line 2269 "parser.y"
5592 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5593 (yyval.value).c = code_new();
5595 if((yyvsp[(2) - (3)].classinfo)->slot) {
5596 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5597 (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5599 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5602 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5604 if((yyvsp[(2) - (3)].classinfo)->slot)
5605 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5607 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5608 (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5618 /* Line 1464 of skeleton.m4 */
5619 #line 2293 "parser.y"
5622 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5623 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5624 (yyval.value).c = code_cutlast((yyval.value).c);
5626 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5628 (yyval.value).t = TYPE_ANY;
5629 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5630 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5631 (yyval.value).c = code_cutlast((yyval.value).c);
5632 (yyval.value).c = code_append((yyval.value).c, paramcode);
5633 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5634 multiname_destroy(name);
5635 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5636 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5637 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5638 if(t->kind!=TRAIT_METHOD) {
5639 //ok: flash allows to assign closures to members.
5641 multiname_t*name = t->name;
5642 (yyval.value).c = code_cutlast((yyval.value).c);
5643 (yyval.value).c = code_append((yyval.value).c, paramcode);
5644 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5645 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5646 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5647 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5648 (yyval.value).c = code_cutlast((yyval.value).c);
5649 (yyval.value).c = code_append((yyval.value).c, paramcode);
5650 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5651 multiname_destroy(name);
5653 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5654 (yyval.value).c = code_append((yyval.value).c, paramcode);
5655 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5660 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5661 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5663 (yyval.value).c = abc_coerce_a((yyval.value).c);
5664 (yyval.value).t = TYPE_ANY;
5676 /* Line 1464 of skeleton.m4 */
5677 #line 2341 "parser.y"
5679 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5680 if(!state->method) syntaxerror("super() not allowed outside of a function");
5681 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5683 (yyval.value).c = code_new();
5684 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5686 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5688 this is dependent on the control path, check this somewhere else
5689 if(state->method->has_super)
5690 syntaxerror("constructor may call super() only once");
5692 state->method->has_super = 1;
5693 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5694 (yyval.value).c = abc_pushundefined((yyval.value).c);
5695 (yyval.value).t = TYPE_ANY;
5705 /* Line 1464 of skeleton.m4 */
5706 #line 2361 "parser.y"
5708 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5709 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5710 (yyval.value).c = code_cutlast((yyval.value).c);
5712 multiname_t*name = 0;
5713 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5714 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5715 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5716 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5717 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5718 (yyval.value).c = code_cutlast((yyval.value).c);
5719 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5721 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5722 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5723 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5725 (yyval.value).t = TYPE_BOOLEAN;
5735 /* Line 1464 of skeleton.m4 */
5736 #line 2382 "parser.y"
5738 (yyval.code) = abc_returnvoid(0);
5748 /* Line 1464 of skeleton.m4 */
5749 #line 2385 "parser.y"
5751 (yyval.code) = (yyvsp[(2) - (2)].value).c;
5752 (yyval.code) = abc_returnvalue((yyval.code));
5762 /* Line 1464 of skeleton.m4 */
5763 #line 2392 "parser.y"
5764 {(yyval.value)=(yyvsp[(1) - (1)].value);}
5773 /* Line 1464 of skeleton.m4 */
5774 #line 2393 "parser.y"
5775 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5784 /* Line 1464 of skeleton.m4 */
5785 #line 2394 "parser.y"
5787 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5788 (yyval.value).c = cut_last_push((yyval.value).c);
5789 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5790 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5800 /* Line 1464 of skeleton.m4 */
5801 #line 2400 "parser.y"
5803 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5813 /* Line 1464 of skeleton.m4 */
5814 #line 2406 "parser.y"
5815 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5824 /* Line 1464 of skeleton.m4 */
5825 #line 2410 "parser.y"
5826 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5835 /* Line 1464 of skeleton.m4 */
5836 #line 2412 "parser.y"
5837 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5846 /* Line 1464 of skeleton.m4 */
5847 #line 2414 "parser.y"
5848 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5857 /* Line 1464 of skeleton.m4 */
5858 #line 2416 "parser.y"
5860 (yyval.value).c = 0;
5861 namespace_t ns = {ACCESS_PACKAGE, ""};
5862 multiname_t m = {QNAME, &ns, 0, "RegExp"};
5863 if(!(yyvsp[(1) - (1)].regexp).options) {
5864 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5865 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5866 (yyval.value).c = abc_construct((yyval.value).c, 1);
5868 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5869 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5870 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5871 (yyval.value).c = abc_construct((yyval.value).c, 2);
5873 (yyval.value).t = TYPE_REGEXP;
5883 /* Line 1464 of skeleton.m4 */
5884 #line 2433 "parser.y"
5885 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5886 //MULTINAME(m, registry_getintclass());
5887 //$$.c = abc_coerce2($$.c, &m); // FIXME
5888 (yyval.value).t = TYPE_INT;
5898 /* Line 1464 of skeleton.m4 */
5899 #line 2438 "parser.y"
5900 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5901 (yyval.value).t = TYPE_INT;
5911 /* Line 1464 of skeleton.m4 */
5912 #line 2441 "parser.y"
5913 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5914 (yyval.value).t = TYPE_INT;
5924 /* Line 1464 of skeleton.m4 */
5925 #line 2444 "parser.y"
5926 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5927 (yyval.value).t = TYPE_UINT;
5937 /* Line 1464 of skeleton.m4 */
5938 #line 2447 "parser.y"
5939 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
5940 (yyval.value).t = TYPE_FLOAT;
5950 /* Line 1464 of skeleton.m4 */
5951 #line 2450 "parser.y"
5952 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
5953 (yyval.value).t = TYPE_STRING;
5963 /* Line 1464 of skeleton.m4 */
5964 #line 2453 "parser.y"
5965 {(yyval.value).c = abc_pushundefined(0);
5966 (yyval.value).t = TYPE_ANY;
5976 /* Line 1464 of skeleton.m4 */
5977 #line 2456 "parser.y"
5978 {(yyval.value).c = abc_pushtrue(0);
5979 (yyval.value).t = TYPE_BOOLEAN;
5989 /* Line 1464 of skeleton.m4 */
5990 #line 2459 "parser.y"
5991 {(yyval.value).c = abc_pushfalse(0);
5992 (yyval.value).t = TYPE_BOOLEAN;
6002 /* Line 1464 of skeleton.m4 */
6003 #line 2462 "parser.y"
6004 {(yyval.value).c = abc_pushnull(0);
6005 (yyval.value).t = TYPE_NULL;
6015 /* Line 1464 of skeleton.m4 */
6016 #line 2467 "parser.y"
6017 {(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);
6018 (yyval.value).t = TYPE_BOOLEAN;
6028 /* Line 1464 of skeleton.m4 */
6029 #line 2470 "parser.y"
6030 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6031 (yyval.value).t = TYPE_BOOLEAN;
6041 /* Line 1464 of skeleton.m4 */
6042 #line 2473 "parser.y"
6043 {(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);
6044 (yyval.value).t = TYPE_BOOLEAN;
6054 /* Line 1464 of skeleton.m4 */
6055 #line 2476 "parser.y"
6056 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6057 (yyval.value).t = TYPE_BOOLEAN;
6067 /* Line 1464 of skeleton.m4 */
6068 #line 2479 "parser.y"
6069 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6070 (yyval.value).t = TYPE_BOOLEAN;
6080 /* Line 1464 of skeleton.m4 */
6081 #line 2482 "parser.y"
6082 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6083 (yyval.value).t = TYPE_BOOLEAN;
6093 /* Line 1464 of skeleton.m4 */
6094 #line 2485 "parser.y"
6095 {(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);
6096 (yyval.value).t = TYPE_BOOLEAN;
6106 /* Line 1464 of skeleton.m4 */
6107 #line 2488 "parser.y"
6108 {(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);
6109 (yyval.value).t = TYPE_BOOLEAN;
6119 /* Line 1464 of skeleton.m4 */
6120 #line 2492 "parser.y"
6121 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6122 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6123 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6124 (yyval.value).c = abc_dup((yyval.value).c);
6125 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6126 (yyval.value).c = cut_last_push((yyval.value).c);
6127 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6128 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6129 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6130 jmp->branch = label;
6140 /* Line 1464 of skeleton.m4 */
6141 #line 2503 "parser.y"
6143 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6144 /*printf("%08x:\n",$1.t);
6145 code_dump($1.c, 0, 0, "", stdout);
6146 printf("%08x:\n",$3.t);
6147 code_dump($3.c, 0, 0, "", stdout);
6148 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6149 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6150 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6151 (yyval.value).c = abc_dup((yyval.value).c);
6152 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6153 (yyval.value).c = cut_last_push((yyval.value).c);
6154 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6155 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6156 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6157 jmp->branch = label;
6167 /* Line 1464 of skeleton.m4 */
6168 #line 2521 "parser.y"
6169 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6170 (yyval.value).c = abc_not((yyval.value).c);
6171 (yyval.value).t = TYPE_BOOLEAN;
6181 /* Line 1464 of skeleton.m4 */
6182 #line 2526 "parser.y"
6183 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6184 (yyval.value).c = abc_bitnot((yyval.value).c);
6185 (yyval.value).t = TYPE_INT;
6195 /* Line 1464 of skeleton.m4 */
6196 #line 2531 "parser.y"
6197 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6198 (yyval.value).c = abc_bitand((yyval.value).c);
6199 (yyval.value).t = TYPE_INT;
6209 /* Line 1464 of skeleton.m4 */
6210 #line 2536 "parser.y"
6211 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6212 (yyval.value).c = abc_bitxor((yyval.value).c);
6213 (yyval.value).t = TYPE_INT;
6223 /* Line 1464 of skeleton.m4 */
6224 #line 2541 "parser.y"
6225 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6226 (yyval.value).c = abc_bitor((yyval.value).c);
6227 (yyval.value).t = TYPE_INT;
6237 /* Line 1464 of skeleton.m4 */
6238 #line 2546 "parser.y"
6239 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6240 (yyval.value).c = abc_rshift((yyval.value).c);
6241 (yyval.value).t = TYPE_INT;
6251 /* Line 1464 of skeleton.m4 */
6252 #line 2550 "parser.y"
6253 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6254 (yyval.value).c = abc_urshift((yyval.value).c);
6255 (yyval.value).t = TYPE_INT;
6265 /* Line 1464 of skeleton.m4 */
6266 #line 2554 "parser.y"
6267 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6268 (yyval.value).c = abc_lshift((yyval.value).c);
6269 (yyval.value).t = TYPE_INT;
6279 /* Line 1464 of skeleton.m4 */
6280 #line 2559 "parser.y"
6281 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6282 (yyval.value).c = abc_divide((yyval.value).c);
6283 (yyval.value).t = TYPE_NUMBER;
6293 /* Line 1464 of skeleton.m4 */
6294 #line 2563 "parser.y"
6295 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6296 (yyval.value).c = abc_modulo((yyval.value).c);
6297 (yyval.value).t = TYPE_NUMBER;
6307 /* Line 1464 of skeleton.m4 */
6308 #line 2567 "parser.y"
6309 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6310 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6311 (yyval.value).c = abc_add_i((yyval.value).c);
6312 (yyval.value).t = TYPE_INT;
6314 (yyval.value).c = abc_add((yyval.value).c);
6315 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6326 /* Line 1464 of skeleton.m4 */
6327 #line 2576 "parser.y"
6328 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6329 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6330 (yyval.value).c = abc_subtract_i((yyval.value).c);
6331 (yyval.value).t = TYPE_INT;
6333 (yyval.value).c = abc_subtract((yyval.value).c);
6334 (yyval.value).t = TYPE_NUMBER;
6345 /* Line 1464 of skeleton.m4 */
6346 #line 2585 "parser.y"
6347 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6348 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6349 (yyval.value).c = abc_multiply_i((yyval.value).c);
6350 (yyval.value).t = TYPE_INT;
6352 (yyval.value).c = abc_multiply((yyval.value).c);
6353 (yyval.value).t = TYPE_NUMBER;
6364 /* Line 1464 of skeleton.m4 */
6365 #line 2595 "parser.y"
6366 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6367 (yyval.value).c = abc_in((yyval.value).c);
6368 (yyval.value).t = TYPE_BOOLEAN;
6378 /* Line 1464 of skeleton.m4 */
6379 #line 2600 "parser.y"
6380 {char use_astype=0; // flash player's astype works differently than astypelate
6381 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
6382 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
6383 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6384 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
6386 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6387 (yyval.value).c = abc_astypelate((yyval.value).c);
6388 (yyval.value).t = TYPE_ANY;
6399 /* Line 1464 of skeleton.m4 */
6400 #line 2613 "parser.y"
6401 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6402 (yyval.value).c = abc_instanceof((yyval.value).c);
6403 (yyval.value).t = TYPE_BOOLEAN;
6413 /* Line 1464 of skeleton.m4 */
6414 #line 2618 "parser.y"
6415 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6416 (yyval.value).c = abc_istypelate((yyval.value).c);
6417 (yyval.value).t = TYPE_BOOLEAN;
6427 /* Line 1464 of skeleton.m4 */
6428 #line 2623 "parser.y"
6430 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6431 (yyval.value).c = abc_typeof((yyval.value).c);
6432 (yyval.value).t = TYPE_STRING;
6442 /* Line 1464 of skeleton.m4 */
6443 #line 2629 "parser.y"
6445 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6446 (yyval.value).c = abc_pushundefined((yyval.value).c);
6447 (yyval.value).t = TYPE_ANY;
6457 /* Line 1464 of skeleton.m4 */
6458 #line 2635 "parser.y"
6459 { (yyval.value).c = abc_pushundefined(0);
6460 (yyval.value).t = TYPE_ANY;
6470 /* Line 1464 of skeleton.m4 */
6471 #line 2639 "parser.y"
6472 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6481 /* Line 1464 of skeleton.m4 */
6482 #line 2641 "parser.y"
6484 (yyval.value)=(yyvsp[(2) - (2)].value);
6485 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6486 (yyval.value).c=abc_negate_i((yyval.value).c);
6487 (yyval.value).t = TYPE_INT;
6489 (yyval.value).c=abc_negate((yyval.value).c);
6490 (yyval.value).t = TYPE_NUMBER;
6501 /* Line 1464 of skeleton.m4 */
6502 #line 2652 "parser.y"
6504 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6505 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6507 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6508 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6509 (yyval.value).t = 0; // array elements have unknown type
6519 /* Line 1464 of skeleton.m4 */
6520 #line 2661 "parser.y"
6522 (yyval.value).c = code_new();
6523 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6524 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6525 (yyval.value).t = registry_getarrayclass();
6535 /* Line 1464 of skeleton.m4 */
6536 #line 2668 "parser.y"
6537 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6546 /* Line 1464 of skeleton.m4 */
6547 #line 2669 "parser.y"
6548 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6557 /* Line 1464 of skeleton.m4 */
6558 #line 2671 "parser.y"
6560 (yyval.value_list).cc = 0;
6561 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6562 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6563 (yyval.value_list).len = 2;
6573 /* Line 1464 of skeleton.m4 */
6574 #line 2677 "parser.y"
6576 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6577 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
6578 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6579 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6589 /* Line 1464 of skeleton.m4 */
6590 #line 2686 "parser.y"
6592 (yyval.value).c = code_new();
6593 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6594 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
6595 (yyval.value).t = registry_getobjectclass();
6605 /* Line 1464 of skeleton.m4 */
6606 #line 2693 "parser.y"
6608 code_t*c = (yyvsp[(3) - (3)].value).c;
6609 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6610 c=abc_multiply_i(c);
6614 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
6615 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6616 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6626 /* Line 1464 of skeleton.m4 */
6627 #line 2705 "parser.y"
6629 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
6630 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
6631 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6632 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6642 /* Line 1464 of skeleton.m4 */
6643 #line 2711 "parser.y"
6645 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
6646 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
6647 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6648 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6658 /* Line 1464 of skeleton.m4 */
6659 #line 2717 "parser.y"
6661 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
6662 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
6663 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6664 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6674 /* Line 1464 of skeleton.m4 */
6675 #line 2723 "parser.y"
6677 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
6678 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
6679 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6680 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6690 /* Line 1464 of skeleton.m4 */
6691 #line 2729 "parser.y"
6693 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
6694 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
6695 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6696 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6706 /* Line 1464 of skeleton.m4 */
6707 #line 2735 "parser.y"
6709 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
6710 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
6711 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6712 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6722 /* Line 1464 of skeleton.m4 */
6723 #line 2741 "parser.y"
6725 code_t*c = (yyvsp[(3) - (3)].value).c;
6727 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6731 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
6734 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6735 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6745 /* Line 1464 of skeleton.m4 */
6746 #line 2754 "parser.y"
6747 { code_t*c = (yyvsp[(3) - (3)].value).c;
6748 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6749 c=abc_subtract_i(c);
6752 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
6755 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6756 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6766 /* Line 1464 of skeleton.m4 */
6767 #line 2765 "parser.y"
6769 c = code_append(c, (yyvsp[(3) - (3)].value).c);
6770 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
6771 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
6772 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6782 /* Line 1464 of skeleton.m4 */
6783 #line 2772 "parser.y"
6785 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
6786 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
6787 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6788 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
6789 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6790 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
6791 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
6792 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
6793 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6794 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
6804 /* Line 1464 of skeleton.m4 */
6805 #line 2785 "parser.y"
6807 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6808 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6809 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
6810 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
6811 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
6812 (yyval.value).c = abc_getlocal(0, nr);
6813 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
6814 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6815 (yyval.value).c = abc_getlocal(0, nr);
6816 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
6817 } else syntaxerror("internal error");
6819 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6820 c=abc_increment_i(c);
6826 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6827 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6828 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6839 /* Line 1464 of skeleton.m4 */
6840 #line 2812 "parser.y"
6842 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6843 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6844 c=abc_decrement_i(c);
6850 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6851 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6852 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6862 /* Line 1464 of skeleton.m4 */
6863 #line 2826 "parser.y"
6865 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6866 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6867 c=abc_increment_i(c);
6873 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6874 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6875 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6885 /* Line 1464 of skeleton.m4 */
6886 #line 2840 "parser.y"
6888 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6889 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6890 c=abc_decrement_i(c);
6896 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6897 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6898 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6908 /* Line 1464 of skeleton.m4 */
6909 #line 2855 "parser.y"
6910 { if(!state->cls->info)
6911 syntaxerror("super keyword not allowed outside a class");
6912 classinfo_t*t = state->cls->info->superclass;
6913 if(!t) t = TYPE_OBJECT;
6915 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6916 namespace_t ns = flags2namespace(f->flags, "");
6917 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6918 (yyval.value).c = 0;
6919 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6920 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6921 (yyval.value).t = memberinfo_gettype(f);
6931 /* Line 1464 of skeleton.m4 */
6932 #line 2870 "parser.y"
6933 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
6934 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
6936 if(TYPE_IS_CLASS(t) && t->cls) {
6941 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6943 if(f && !is_static != !(f->flags&FLAG_STATIC))
6945 if(f && f->slot && !noslot) {
6946 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
6948 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6949 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6951 /* determine type */
6952 (yyval.value).t = memberinfo_gettype(f);
6953 if(!(yyval.value).t)
6954 (yyval.value).c = abc_coerce_a((yyval.value).c);
6956 /* when resolving a property on an unknown type, we do know the
6957 name of the property (and don't seem to need the package), but
6958 we need to make avm2 try out all access modes */
6959 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
6960 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6961 (yyval.value).c = abc_coerce_a((yyval.value).c);
6962 (yyval.value).t = registry_getanytype();
6973 /* Line 1464 of skeleton.m4 */
6974 #line 2903 "parser.y"
6976 (yyval.value).t = 0;
6977 (yyval.value).c = 0;
6982 /* look at variables */
6983 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
6984 // $1 is a local variable
6985 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
6986 (yyval.value).t = v->type;
6990 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
6992 /* look at current class' members */
6993 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
6994 (f->flags&FLAG_STATIC) >= i_am_static) {
6995 // $1 is a function in this class
6996 int var_is_static = (f->flags&FLAG_STATIC);
6998 if(f->kind == MEMBER_METHOD) {
6999 (yyval.value).t = TYPE_FUNCTION(f);
7001 (yyval.value).t = f->type;
7003 if(var_is_static && !i_am_static) {
7004 /* access to a static member from a non-static location.
7005 do this via findpropstrict:
7006 there doesn't seem to be any non-lookup way to access
7007 static properties of a class */
7008 state->method->late_binding = 1;
7009 (yyval.value).t = f->type;
7010 namespace_t ns = {flags2access(f->flags), ""};
7011 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7012 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7013 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7015 } else if(f->slot>0) {
7016 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7017 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7020 namespace_t ns = {flags2access(f->flags), ""};
7021 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7022 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7023 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7028 /* look at actual classes, in the current package and imported */
7029 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7030 if(a->flags & FLAG_METHOD) {
7032 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7033 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7034 if(a->function->kind == MEMBER_METHOD) {
7035 (yyval.value).t = TYPE_FUNCTION(a->function);
7037 (yyval.value).t = a->function->type;
7041 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7042 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
7045 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7047 (yyval.value).t = TYPE_CLASS(a);
7052 /* unknown object, let the avm2 resolve it */
7054 if(strcmp((yyvsp[(1) - (1)].id),"trace"))
7055 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7056 state->method->late_binding = 1;
7058 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7060 (yyval.value).t = 0;
7061 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7062 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7073 /* Line 1464 of skeleton.m4 */
7074 #line 3001 "parser.y"
7084 /* Line 1464 of skeleton.m4 */
7085 #line 3002 "parser.y"
7095 /* Line 1464 of skeleton.m4 */
7096 #line 3003 "parser.y"
7106 /* Line 1464 of skeleton.m4 */
7107 #line 3005 "parser.y"
7115 /* Line 1464 of skeleton.m4 */
7116 #line 7117 "parser.tab.c"
7119 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7123 YY_STACK_PRINT (yyss, yyssp);
7127 /* Now `shift' the result of the reduction. Determine what state
7128 that goes to, based on the state we popped back to and the rule
7129 number reduced by. */
7133 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7134 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7135 yystate = yytable[yystate];
7137 yystate = yydefgoto[yyn - YYNTOKENS];
7142 /*------------------------------------.
7143 | yyerrlab -- here on detecting error |
7144 `------------------------------------*/
7146 /* If not already recovering from an error, report this error. */
7150 #if ! YYERROR_VERBOSE
7151 yyerror (YY_("syntax error"));
7154 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7155 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7157 YYSIZE_T yyalloc = 2 * yysize;
7158 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7159 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7160 if (yymsg != yymsgbuf)
7161 YYSTACK_FREE (yymsg);
7162 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7164 yymsg_alloc = yyalloc;
7168 yymsg_alloc = sizeof yymsgbuf;
7172 if (0 < yysize && yysize <= yymsg_alloc)
7174 (void) yysyntax_error (yymsg, yystate, yychar);
7179 yyerror (YY_("syntax error"));
7181 goto yyexhaustedlab;
7189 if (yyerrstatus == 3)
7191 /* If just tried and failed to reuse lookahead token after an
7192 error, discard it. */
7194 if (yychar <= YYEOF)
7196 /* Return failure if at end of input. */
7197 if (yychar == YYEOF)
7202 yydestruct ("Error: discarding",
7208 /* Else will try to reuse lookahead token after shifting the error
7213 /*---------------------------------------------------.
7214 | yyerrorlab -- error raised explicitly by YYERROR. |
7215 `---------------------------------------------------*/
7218 /* Pacify compilers like GCC when the user code never invokes
7219 YYERROR and the label yyerrorlab therefore never appears in user
7221 if (/*CONSTCOND*/ 0)
7224 /* Do not reclaim the symbols of the rule which action triggered
7228 YY_STACK_PRINT (yyss, yyssp);
7233 /*-------------------------------------------------------------.
7234 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7235 `-------------------------------------------------------------*/
7237 yyerrstatus = 3; /* Each real token shifted decrements this. */
7241 yyn = yypact[yystate];
7242 if (yyn != YYPACT_NINF)
7245 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7253 /* Pop the current state because it cannot handle the error token. */
7258 yydestruct ("Error: popping",
7259 yystos[yystate], yyvsp);
7262 YY_STACK_PRINT (yyss, yyssp);
7268 /* Shift the error token. */
7269 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7275 /*-------------------------------------.
7276 | yyacceptlab -- YYACCEPT comes here. |
7277 `-------------------------------------*/
7282 /*-----------------------------------.
7283 | yyabortlab -- YYABORT comes here. |
7284 `-----------------------------------*/
7289 #if !defined(yyoverflow) || YYERROR_VERBOSE
7290 /*-------------------------------------------------.
7291 | yyexhaustedlab -- memory exhaustion comes here. |
7292 `-------------------------------------------------*/
7294 yyerror (YY_("memory exhausted"));
7300 if (yychar != YYEMPTY)
7301 yydestruct ("Cleanup: discarding lookahead",
7303 /* Do not reclaim the symbols of the rule which action triggered
7304 this YYABORT or YYACCEPT. */
7306 YY_STACK_PRINT (yyss, yyssp);
7307 while (yyssp != yyss)
7309 yydestruct ("Cleanup: popping",
7310 yystos[*yyssp], yyvsp);
7315 YYSTACK_FREE (yyss);
7318 if (yymsg != yymsgbuf)
7319 YYSTACK_FREE (yymsg);
7321 /* Make sure YYID is used. */
7322 return YYID (yyresult);