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__";
981 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
985 /* retrieve the member info that we stored in the first pass.
986 TODO: better getter/setter support? */
987 if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
988 else state->method->info = registry_findmember(state->cls->info, name, 0);
990 global->variable_count = 0;
991 /* state->vars is initialized by state_new */
992 if(!state->method->is_global)
993 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
995 new_variable("globalscope", 0, 0);
997 for(p=params->list;p;p=p->next) {
998 new_variable(p->param->name, p->param->type, 0);
1003 static void endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1004 params_t*params, classinfo_t*return_type, code_t*body)
1013 multiname_t*type2 = sig2mname(return_type);
1015 if(state->method->is_constructor) {
1016 f = abc_class_getconstructor(state->cls->abc, type2);
1017 } else if(!state->method->is_global) {
1018 namespace_t mname_ns = flags2namespace(flags, "");
1019 multiname_t mname = {QNAME, &mname_ns, 0, name};
1021 if(flags&FLAG_STATIC)
1022 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1024 f = abc_class_method(state->cls->abc, type2, &mname);
1025 slot = f->trait->slot_id;
1027 namespace_t mname_ns = flags2namespace(flags, state->package);
1028 multiname_t mname = {QNAME, &mname_ns, 0, name};
1030 f = abc_method_new(global->file, type2, 1);
1031 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1032 //abc_code_t*c = global->init->method->body->code;
1034 //flash doesn't seem to allow us to access function slots
1035 //state->method->info->slot = slot;
1037 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1038 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1039 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1040 if(params->varargs) f->flags |= METHOD_NEED_REST;
1044 for(p=params->list;p;p=p->next) {
1045 if(params->varargs && !p->next) {
1046 break; //varargs: omit last parameter in function signature
1048 multiname_t*m = sig2mname(p->param->type);
1049 list_append(f->parameters, m);
1050 if(p->param->value) {
1051 check_constant_against_type(p->param->type, p->param->value);
1052 opt=1;list_append(f->optional_parameters, p->param->value);
1054 syntaxerror("non-optional parameter not allowed after optional parameters");
1057 check_code_for_break(body);
1060 f->body->code = body;
1061 f->body->exceptions = state->method->exceptions;
1062 } else { //interface
1064 syntaxerror("interface methods can't have a method body");
1072 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1077 void breakjumpsto(code_t*c, char*name, code_t*jump)
1080 if(c->opcode == OPCODE___BREAK__) {
1081 string_t*name2 = c->data[0];
1082 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1083 c->opcode = OPCODE_JUMP;
1090 void continuejumpsto(code_t*c, char*name, code_t*jump)
1093 if(c->opcode == OPCODE___CONTINUE__) {
1094 string_t*name2 = c->data[0];
1095 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1096 c->opcode = OPCODE_JUMP;
1104 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1105 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1106 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1108 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1110 if(!type1 || !type2)
1111 return registry_getanytype();
1112 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1113 return registry_getanytype();
1116 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1125 return registry_getanytype();
1127 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1132 return abc_coerce_a(c);
1136 // cast an "any" type to a specific type. subject to
1137 // runtime exceptions
1138 return abc_coerce2(c, &m);
1141 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1142 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1143 // allow conversion between number types
1144 return abc_coerce2(c, &m);
1146 //printf("%s.%s\n", from.package, from.name);
1147 //printf("%s.%s\n", to.package, to.name);
1149 classinfo_t*supertype = from;
1151 if(supertype == to) {
1152 // target type is one of from's superclasses
1153 return abc_coerce2(c, &m);
1156 while(supertype->interfaces[t]) {
1157 if(supertype->interfaces[t]==to) {
1158 // target type is one of from's interfaces
1159 return abc_coerce2(c, &m);
1163 supertype = supertype->superclass;
1165 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1167 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1169 syntaxerror("can't convert type %s to %s", from->name, to->name);
1170 return 0; // make gcc happy
1173 code_t*defaultvalue(code_t*c, classinfo_t*type)
1175 if(TYPE_IS_INT(type)) {
1176 c = abc_pushbyte(c, 0);
1177 } else if(TYPE_IS_UINT(type)) {
1178 c = abc_pushuint(c, 0);
1179 } else if(TYPE_IS_FLOAT(type)) {
1181 } else if(TYPE_IS_BOOLEAN(type)) {
1182 c = abc_pushfalse(c);
1184 //c = abc_pushundefined(c);
1186 c = abc_pushnull(c);
1188 c = abc_coerce2(c, &m);
1193 char is_pushundefined(code_t*c)
1195 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1198 static classinfo_t* find_class(char*name)
1202 c = registry_findclass(state->package, name);
1205 /* try explicit imports */
1206 dictentry_t* e = dict_get_slot(state->imports, name);
1209 if(!strcmp(e->key, name)) {
1210 c = (classinfo_t*)e->data;
1216 /* try package.* imports */
1217 import_list_t*l = state->wildcard_imports;
1219 //printf("does package %s contain a class %s?\n", l->import->package, name);
1220 c = registry_findclass(l->import->package, name);
1225 /* try global package */
1226 c = registry_findclass("", name);
1229 /* try local "filename" package */
1230 c = registry_findclass(current_filename_short, name);
1236 static char is_getlocal(code_t*c)
1238 if(!c || c->prev || c->next)
1240 return(c->opcode == OPCODE_GETLOCAL
1241 || c->opcode == OPCODE_GETLOCAL_0
1242 || c->opcode == OPCODE_GETLOCAL_1
1243 || c->opcode == OPCODE_GETLOCAL_2
1244 || c->opcode == OPCODE_GETLOCAL_3);
1246 static int getlocalnr(code_t*c)
1248 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1249 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1250 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1251 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1252 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1253 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1257 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1261 [prefix code] [read instruction]
1265 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1268 if(in && in->opcode == OPCODE_COERCE_A) {
1269 in = code_cutlast(in);
1272 syntaxerror("internal error");
1274 /* chop off read instruction */
1278 prefix = r->prev;r->prev = 0;
1284 char use_temp_var = readbefore;
1286 /* generate the write instruction, and maybe append a dup to the prefix code */
1287 code_t* write = abc_nop(0);
1288 if(r->opcode == OPCODE_GETPROPERTY) {
1289 write->opcode = OPCODE_SETPROPERTY;
1290 multiname_t*m = (multiname_t*)r->data[0];
1291 write->data[0] = multiname_clone(m);
1292 if(m->type == QNAME || m->type == MULTINAME) {
1294 prefix = abc_dup(prefix); // we need the object, too
1297 } else if(m->type == MULTINAMEL) {
1299 /* dupping two values on the stack requires 5 operations and one register-
1300 couldn't adobe just have given us a dup2? */
1301 int temp = gettempvar();
1302 prefix = abc_setlocal(prefix, temp);
1303 prefix = abc_dup(prefix);
1304 prefix = abc_getlocal(prefix, temp);
1305 prefix = abc_swap(prefix);
1306 prefix = abc_getlocal(prefix, temp);
1308 prefix = abc_kill(prefix, temp);
1312 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1314 } else if(r->opcode == OPCODE_GETSLOT) {
1315 write->opcode = OPCODE_SETSLOT;
1316 write->data[0] = r->data[0];
1318 prefix = abc_dup(prefix); // we need the object, too
1321 } else if(r->opcode == OPCODE_GETLOCAL) {
1322 write->opcode = OPCODE_SETLOCAL;
1323 write->data[0] = r->data[0];
1324 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1325 write->opcode = OPCODE_SETLOCAL_0;
1326 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1327 write->opcode = OPCODE_SETLOCAL_1;
1328 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1329 write->opcode = OPCODE_SETLOCAL_2;
1330 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1331 write->opcode = OPCODE_SETLOCAL_3;
1334 syntaxerror("illegal lvalue: can't assign a value to this expression");
1341 /* with getproperty/getslot, we have to be extra careful not
1342 to execute the read code twice, as it might have side-effects
1343 (e.g. if the property is in fact a setter/getter combination)
1345 So read the value, modify it, and write it again,
1346 using prefix only once and making sure (by using a temporary
1347 register) that the return value is what we just wrote */
1348 temp = gettempvar();
1349 c = code_append(c, prefix);
1350 c = code_append(c, r);
1353 c = abc_setlocal(c, temp);
1355 c = code_append(c, middlepart);
1358 c = abc_setlocal(c, temp);
1360 c = code_append(c, write);
1361 c = abc_getlocal(c, temp);
1362 c = abc_kill(c, temp);
1364 /* if we're allowed to execute the read code twice *and*
1365 the middlepart doesn't modify the code, things are easier.
1367 code_t* r2 = code_dup(r);
1368 //c = code_append(c, prefix);
1369 parserassert(!prefix);
1370 c = code_append(c, r);
1371 c = code_append(c, middlepart);
1372 c = code_append(c, write);
1373 c = code_append(c, r2);
1376 /* even smaller version: overwrite the value without reading
1380 c = code_append(c, prefix);
1383 c = code_append(c, middlepart);
1384 c = code_append(c, write);
1385 c = code_append(c, r);
1387 temp = gettempvar();
1389 c = code_append(c, prefix);
1391 c = code_append(c, middlepart);
1393 c = abc_setlocal(c, temp);
1394 c = code_append(c, write);
1395 c = abc_getlocal(c, temp);
1396 c = abc_kill(c, temp);
1402 char is_break_or_jump(code_t*c)
1406 if(c->opcode == OPCODE_JUMP ||
1407 c->opcode == OPCODE___BREAK__ ||
1408 c->opcode == OPCODE___CONTINUE__ ||
1409 c->opcode == OPCODE_THROW ||
1410 c->opcode == OPCODE_RETURNVOID ||
1411 c->opcode == OPCODE_RETURNVALUE) {
1418 #define IS_FINALLY_TARGET(op) \
1419 ((op) == OPCODE___CONTINUE__ || \
1420 (op) == OPCODE___BREAK__ || \
1421 (op) == OPCODE_RETURNVOID || \
1422 (op) == OPCODE_RETURNVALUE || \
1423 (op) == OPCODE___RETHROW__)
1425 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1427 #define NEED_EXTRA_STACK_ARG
1428 code_t*finally_label = abc_nop(0);
1429 NEW(lookupswitch_t, l);
1435 code_t*prev = i->prev;
1436 if(IS_FINALLY_TARGET(i->opcode)) {
1439 if(i->opcode == OPCODE___RETHROW__ ||
1440 i->opcode == OPCODE_RETURNVALUE) {
1441 if(i->opcode == OPCODE___RETHROW__)
1442 i->opcode = OPCODE_THROW;
1444 p = abc_coerce_a(p);
1445 p = abc_setlocal(p, tempvar);
1447 p = abc_pushbyte(p, count++);
1448 p = abc_jump(p, finally_label);
1449 code_t*target = p = abc_label(p);
1450 #ifdef NEED_EXTRA_STACK_ARG
1454 p = abc_getlocal(p, tempvar);
1457 p->next = i;i->prev = p;
1458 list_append(l->targets, target);
1464 c = abc_pushbyte(c, -1);
1465 c = code_append(c, finally_label);
1466 c = code_append(c, finally);
1468 #ifdef NEED_EXTRA_STACK_ARG
1471 c = abc_lookupswitch(c, l);
1472 c = l->def = abc_label(c);
1473 #ifdef NEED_EXTRA_STACK_ARG
1480 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1484 code_t*prev = i->prev;
1485 if(IS_FINALLY_TARGET(i->opcode)) {
1486 if(i->opcode == OPCODE___RETHROW__)
1487 i->opcode = OPCODE_THROW;
1488 code_t*end = code_dup(finally);
1489 code_t*start = code_start(end);
1490 if(prev) prev->next = start;
1497 return code_append(c, finally);
1500 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1506 int num_insertion_points=0;
1508 if(IS_FINALLY_TARGET(i->opcode))
1509 num_insertion_points++;
1516 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1521 int simple_version_cost = (1+num_insertion_points)*code_size;
1522 int lookup_version_cost = 4*num_insertion_points + 5;
1524 if(cantdup || simple_version_cost > lookup_version_cost) {
1525 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1526 return insert_finally_lookup(c, finally, tempvar);
1528 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1529 return insert_finally_simple(c, finally, tempvar);
1533 #define PASS1 }} if(as3_pass == 1) {{
1534 #define PASS1END }} if(as3_pass == 2) {{
1535 #define PASS2 }} if(as3_pass == 2) {{
1536 #define PASS12 }} {{
1537 #define PASS12END }} if(as3_pass == 2) {{
1541 /* Line 273 of skeleton.m4 */
1542 #line 1543 "parser.tab.c"
1549 typedef YYTYPE_UINT8 yytype_uint8;
1551 typedef unsigned char yytype_uint8;
1555 typedef YYTYPE_INT8 yytype_int8;
1556 #elif (defined __STDC__ || defined __C99__FUNC__ \
1557 || defined __cplusplus || defined _MSC_VER)
1558 typedef signed char yytype_int8;
1560 typedef short int yytype_int8;
1563 #ifdef YYTYPE_UINT16
1564 typedef YYTYPE_UINT16 yytype_uint16;
1566 typedef unsigned short int yytype_uint16;
1570 typedef YYTYPE_INT16 yytype_int16;
1572 typedef short int yytype_int16;
1576 # ifdef __SIZE_TYPE__
1577 # define YYSIZE_T __SIZE_TYPE__
1578 # elif defined size_t
1579 # define YYSIZE_T size_t
1580 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1581 || defined __cplusplus || defined _MSC_VER)
1582 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1583 # define YYSIZE_T size_t
1585 # define YYSIZE_T unsigned int
1589 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1594 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1595 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1599 # define YY_(msgid) msgid
1603 /* Suppress unused-variable warnings by "using" E. */
1604 #if ! defined lint || defined __GNUC__
1605 # define YYUSE(e) ((void) (e))
1607 # define YYUSE(e) /* empty */
1610 /* Identity function, used to suppress warnings about constant conditions. */
1612 # define YYID(n) (n)
1614 #if (defined __STDC__ || defined __C99__FUNC__ \
1615 || defined __cplusplus || defined _MSC_VER)
1628 #if ! defined yyoverflow || YYERROR_VERBOSE
1630 /* The parser invokes alloca or malloc; define the necessary symbols. */
1632 # ifdef YYSTACK_USE_ALLOCA
1633 # if YYSTACK_USE_ALLOCA
1635 # define YYSTACK_ALLOC __builtin_alloca
1636 # elif defined __BUILTIN_VA_ARG_INCR
1637 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1639 # define YYSTACK_ALLOC __alloca
1640 # elif defined _MSC_VER
1641 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1642 # define alloca _alloca
1644 # define YYSTACK_ALLOC alloca
1645 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1646 || defined __cplusplus || defined _MSC_VER)
1647 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1649 # define _STDLIB_H 1
1656 # ifdef YYSTACK_ALLOC
1657 /* Pacify GCC's `empty if-body' warning. */
1658 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1659 # ifndef YYSTACK_ALLOC_MAXIMUM
1660 /* The OS might guarantee only one guard page at the bottom of the stack,
1661 and a page size can be as small as 4096 bytes. So we cannot safely
1662 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1663 to allow for a few compiler-allocated temporary stack slots. */
1664 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1667 # define YYSTACK_ALLOC YYMALLOC
1668 # define YYSTACK_FREE YYFREE
1669 # ifndef YYSTACK_ALLOC_MAXIMUM
1670 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1672 # if (defined __cplusplus && ! defined _STDLIB_H \
1673 && ! ((defined YYMALLOC || defined malloc) \
1674 && (defined YYFREE || defined free)))
1675 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1677 # define _STDLIB_H 1
1681 # define YYMALLOC malloc
1682 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1683 || defined __cplusplus || defined _MSC_VER)
1684 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1688 # define YYFREE free
1689 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1690 || defined __cplusplus || defined _MSC_VER)
1691 void free (void *); /* INFRINGES ON USER NAME SPACE */
1695 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1698 #if (! defined yyoverflow \
1699 && (! defined __cplusplus \
1700 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1702 /* A type that is properly aligned for any stack member. */
1705 yytype_int16 yyss_alloc;
1709 /* The size of the maximum gap between one aligned stack and the next. */
1710 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1712 /* The size of an array large to enough to hold all stacks, each with
1714 # define YYSTACK_BYTES(N) \
1715 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1716 + YYSTACK_GAP_MAXIMUM)
1718 /* Copy COUNT objects from FROM to TO. The source and destination do
1721 # if defined __GNUC__ && 1 < __GNUC__
1722 # define YYCOPY(To, From, Count) \
1723 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1725 # define YYCOPY(To, From, Count) \
1729 for (yyi = 0; yyi < (Count); yyi++) \
1730 (To)[yyi] = (From)[yyi]; \
1736 /* Relocate STACK from its old location to the new one. The
1737 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1738 elements in the stack, and YYPTR gives the new location of the
1739 stack. Advance YYPTR to a properly aligned location for the next
1741 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1744 YYSIZE_T yynewbytes; \
1745 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1746 Stack = &yyptr->Stack_alloc; \
1747 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1748 yyptr += yynewbytes / sizeof (*yyptr); \
1754 /* YYFINAL -- State number of the termination state. */
1756 /* YYLAST -- Last index in YYTABLE. */
1759 /* YYNTOKENS -- Number of terminals. */
1760 #define YYNTOKENS 130
1761 /* YYNNTS -- Number of nonterminals. */
1763 /* YYNRULES -- Number of rules. */
1764 #define YYNRULES 285
1765 /* YYNRULES -- Number of states. */
1766 #define YYNSTATES 478
1768 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1769 #define YYUNDEFTOK 2
1770 #define YYMAXUTOK 360
1772 #define YYTRANSLATE(YYX) \
1773 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1775 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1776 static const yytype_uint8 yytranslate[] =
1778 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1779 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1780 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1781 2, 2, 2, 116, 2, 2, 2, 114, 106, 2,
1782 126, 129, 113, 111, 97, 110, 123, 112, 2, 2,
1783 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
1784 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
1785 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1786 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1787 2, 120, 2, 121, 105, 2, 2, 2, 2, 2,
1788 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1789 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1790 2, 2, 2, 122, 104, 128, 115, 2, 2, 2,
1791 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1792 2, 2, 2, 2, 2, 2, 2, 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, 1, 2, 3, 4,
1804 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1805 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1806 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1807 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1808 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1809 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1810 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1811 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1812 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1813 95, 98, 100, 101, 109, 117, 118, 119, 124, 125,
1818 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1820 static const yytype_uint16 yyprhs[] =
1822 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
1823 19, 21, 23, 25, 27, 28, 30, 32, 35, 37,
1824 39, 41, 43, 45, 47, 49, 50, 53, 55, 57,
1825 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
1826 79, 81, 83, 85, 87, 89, 91, 93, 97, 100,
1827 103, 105, 107, 110, 111, 114, 117, 119, 123, 127,
1828 128, 131, 132, 140, 141, 143, 145, 149, 151, 154,
1829 158, 167, 174, 175, 182, 183, 191, 193, 196, 198,
1830 201, 202, 204, 206, 209, 211, 214, 219, 223, 224,
1831 233, 234, 244, 245, 251, 253, 256, 258, 261, 263,
1832 264, 271, 274, 276, 282, 284, 286, 290, 292, 293,
1833 300, 301, 307, 310, 315, 316, 318, 320, 323, 325,
1834 327, 329, 331, 333, 335, 337, 339, 341, 342, 345,
1835 346, 349, 350, 353, 354, 364, 365, 374, 375, 377,
1836 379, 382, 384, 386, 388, 390, 391, 393, 395, 398,
1837 400, 403, 412, 414, 416, 422, 423, 426, 428, 430,
1838 432, 434, 436, 438, 440, 442, 443, 445, 448, 453,
1839 457, 459, 464, 467, 469, 471, 472, 473, 486, 488,
1840 489, 499, 501, 505, 507, 509, 511, 515, 517, 519,
1841 521, 524, 525, 526, 530, 531, 533, 535, 539, 543,
1842 548, 553, 556, 558, 561, 563, 565, 569, 571, 573,
1843 575, 577, 579, 581, 583, 585, 587, 589, 591, 593,
1844 595, 597, 599, 601, 603, 605, 609, 613, 617, 621,
1845 625, 629, 633, 637, 641, 645, 648, 651, 655, 659,
1846 663, 667, 671, 675, 679, 683, 687, 691, 695, 699,
1847 703, 707, 711, 716, 719, 721, 725, 728, 733, 737,
1848 738, 740, 744, 750, 754, 758, 762, 766, 770, 774,
1849 778, 782, 786, 790, 794, 800, 803, 806, 809, 812,
1850 816, 820, 822, 826, 832, 838
1853 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1854 static const yytype_int16 yyrhs[] =
1856 131, 0, -1, 132, -1, -1, 133, -1, 134, -1,
1857 133, 134, -1, 180, -1, 192, -1, 190, -1, 208,
1858 -1, 201, -1, 143, -1, 96, -1, -1, 136, -1,
1859 137, -1, 136, 137, -1, 192, -1, 190, -1, 208,
1860 -1, 201, -1, 143, -1, 96, -1, 139, -1, -1,
1861 139, 141, -1, 141, -1, 183, -1, 154, -1, 155,
1862 -1, 156, -1, 158, -1, 166, -1, 149, -1, 177,
1863 -1, 174, -1, 227, -1, 96, -1, 140, -1, 145,
1864 -1, 160, -1, 161, -1, 224, -1, 176, -1, 233,
1865 -1, 234, -1, 122, 139, 128, -1, 122, 128, -1,
1866 141, 96, -1, 141, -1, 140, -1, 99, 225, -1,
1867 -1, 45, 146, -1, 31, 146, -1, 147, -1, 146,
1868 97, 147, -1, 3, 217, 144, -1, -1, 64, 142,
1869 -1, -1, 63, 126, 150, 226, 129, 142, 148, -1,
1870 -1, 145, -1, 227, -1, 45, 3, 217, -1, 3,
1871 -1, 12, 126, -1, 12, 49, 126, -1, 153, 151,
1872 96, 226, 96, 227, 129, 142, -1, 153, 152, 67,
1873 226, 129, 142, -1, -1, 13, 126, 157, 226, 129,
1874 142, -1, -1, 14, 159, 142, 13, 126, 226, 129,
1875 -1, 65, -1, 65, 3, -1, 29, -1, 29, 3,
1876 -1, -1, 163, -1, 165, -1, 163, 165, -1, 164,
1877 -1, 163, 164, -1, 33, 228, 103, 138, -1, 61,
1878 103, 138, -1, -1, 15, 126, 167, 228, 129, 122,
1879 162, 128, -1, -1, 32, 126, 3, 217, 129, 169,
1880 122, 138, 128, -1, -1, 27, 122, 171, 138, 128,
1881 -1, 168, -1, 172, 168, -1, 172, -1, 172, 170,
1882 -1, 170, -1, -1, 51, 122, 175, 138, 128, 173,
1883 -1, 36, 226, -1, 36, -1, 38, 126, 226, 129,
1884 142, -1, 3, -1, 18, -1, 179, 123, 178, -1,
1885 178, -1, -1, 18, 179, 122, 181, 135, 128, -1,
1886 -1, 18, 122, 182, 135, 128, -1, 40, 214, -1,
1887 40, 179, 123, 113, -1, -1, 185, -1, 186, -1,
1888 185, 186, -1, 20, -1, 21, -1, 19, -1, 37,
1889 -1, 46, -1, 48, -1, 47, -1, 25, -1, 23,
1890 -1, -1, 53, 214, -1, -1, 53, 215, -1, -1,
1891 16, 215, -1, -1, 184, 30, 3, 187, 189, 122,
1892 191, 194, 128, -1, -1, 184, 43, 3, 188, 122,
1893 193, 197, 128, -1, -1, 195, -1, 196, -1, 195,
1894 196, -1, 96, -1, 201, -1, 208, -1, 140, -1,
1895 -1, 198, -1, 199, -1, 198, 199, -1, 96, -1,
1896 45, 3, -1, 184, 26, 207, 3, 126, 204, 129,
1897 217, -1, 45, -1, 31, -1, 184, 200, 3, 217,
1898 144, -1, -1, 99, 203, -1, 9, -1, 7, -1,
1899 8, -1, 11, -1, 4, -1, 55, -1, 54, -1,
1900 44, -1, -1, 205, -1, 90, 206, -1, 205, 97,
1901 90, 206, -1, 205, 97, 206, -1, 206, -1, 3,
1902 103, 216, 202, -1, 3, 202, -1, 50, -1, 34,
1903 -1, -1, -1, 184, 26, 207, 3, 126, 204, 129,
1904 217, 122, 209, 138, 128, -1, 3, -1, -1, 26,
1905 210, 126, 204, 129, 217, 122, 138, 128, -1, 3,
1906 -1, 179, 123, 3, -1, 213, -1, 212, -1, 214,
1907 -1, 215, 97, 214, -1, 214, -1, 113, -1, 35,
1908 -1, 103, 216, -1, -1, -1, 126, 219, 129, -1,
1909 -1, 220, -1, 225, -1, 220, 97, 225, -1, 24,
1910 212, 218, -1, 228, 126, 219, 129, -1, 52, 126,
1911 219, 129, -1, 62, 228, -1, 41, -1, 41, 226,
1912 -1, 228, -1, 228, -1, 226, 97, 228, -1, 226,
1913 -1, 211, -1, 229, -1, 232, -1, 221, -1, 223,
1914 -1, 5, -1, 9, -1, 10, -1, 7, -1, 8,
1915 -1, 11, -1, 4, -1, 28, -1, 55, -1, 54,
1916 -1, 44, -1, 222, -1, 228, 107, 228, -1, 228,
1917 108, 228, -1, 228, 73, 228, -1, 228, 74, 228,
1918 -1, 228, 69, 228, -1, 228, 70, 228, -1, 228,
1919 72, 228, -1, 228, 71, 228, -1, 228, 84, 228,
1920 -1, 228, 85, 228, -1, 116, 228, -1, 115, 228,
1921 -1, 228, 106, 228, -1, 228, 105, 228, -1, 228,
1922 104, 228, -1, 228, 93, 228, -1, 228, 92, 228,
1923 -1, 228, 91, 228, -1, 228, 112, 228, -1, 228,
1924 114, 228, -1, 228, 111, 228, -1, 228, 110, 228,
1925 -1, 228, 113, 228, -1, 228, 67, 228, -1, 228,
1926 68, 228, -1, 228, 39, 228, -1, 228, 66, 228,
1927 -1, 42, 126, 228, 129, -1, 35, 228, -1, 35,
1928 -1, 126, 226, 129, -1, 110, 228, -1, 228, 120,
1929 228, 121, -1, 120, 219, 121, -1, -1, 231, -1,
1930 225, 103, 225, -1, 231, 97, 225, 103, 225, -1,
1931 122, 230, 128, -1, 228, 78, 228, -1, 228, 77,
1932 228, -1, 228, 82, 228, -1, 228, 81, 228, -1,
1933 228, 83, 228, -1, 228, 76, 228, -1, 228, 75,
1934 228, -1, 228, 79, 228, -1, 228, 80, 228, -1,
1935 228, 99, 228, -1, 228, 102, 228, 103, 228, -1,
1936 228, 88, -1, 228, 87, -1, 88, 228, -1, 87,
1937 228, -1, 52, 123, 3, -1, 228, 123, 3, -1,
1938 3, -1, 184, 17, 3, -1, 184, 17, 3, 99,
1939 3, -1, 184, 17, 3, 99, 4, -1, 22, 17,
1943 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1944 static const yytype_uint16 yyrline[] =
1946 0, 1517, 1517, 1519, 1519, 1520, 1521, 1523, 1524, 1525,
1947 1526, 1527, 1528, 1529, 1531, 1531, 1532, 1533, 1535, 1536,
1948 1537, 1538, 1539, 1540, 1542, 1543, 1545, 1546, 1549, 1550,
1949 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1561, 1562,
1950 1563, 1564, 1565, 1566, 1567, 1569, 1570, 1572, 1573, 1574,
1951 1575, 1579, 1586, 1587, 1591, 1592, 1594, 1595, 1597, 1638,
1952 1639, 1642, 1642, 1661, 1662, 1663, 1666, 1669, 1673, 1674,
1953 1676, 1696, 1739, 1739, 1758, 1758, 1773, 1776, 1779, 1782,
1954 1786, 1787, 1788, 1789, 1790, 1791, 1793, 1804, 1807, 1807,
1955 1836, 1836, 1856, 1856, 1873, 1874, 1875, 1876, 1884, 1893,
1956 1893, 1938, 1942, 1953, 1962, 1963, 1965, 1966, 1968, 1968,
1957 1970, 1970, 1973, 1981, 1991, 1992, 1993, 1994, 1996, 1997,
1958 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009,
1959 2010, 2012, 2013, 2017, 2015, 2023, 2021, 2029, 2030, 2031,
1960 2032, 2033, 2034, 2035, 2037, 2043, 2044, 2045, 2046, 2047,
1961 2048, 2051, 2063, 2063, 2065, 2123, 2124, 2126, 2127, 2128,
1962 2129, 2130, 2132, 2133, 2134, 2139, 2142, 2147, 2152, 2159,
1963 2163, 2168, 2174, 2180, 2181, 2182, 2185, 2184, 2205, 2206,
1964 2207, 2215, 2223, 2231, 2232, 2234, 2235, 2237, 2238, 2239,
1965 2248, 2249, 2253, 2254, 2256, 2257, 2258, 2261, 2266, 2290,
1966 2338, 2358, 2379, 2382, 2389, 2390, 2391, 2397, 2403, 2405,
1967 2407, 2409, 2411, 2413, 2430, 2435, 2438, 2441, 2444, 2447,
1968 2450, 2453, 2456, 2459, 2463, 2464, 2467, 2470, 2473, 2476,
1969 2479, 2482, 2485, 2489, 2500, 2518, 2523, 2528, 2533, 2538,
1970 2543, 2547, 2551, 2556, 2560, 2564, 2573, 2582, 2592, 2597,
1971 2609, 2615, 2620, 2626, 2632, 2636, 2638, 2649, 2658, 2665,
1972 2666, 2668, 2674, 2683, 2690, 2702, 2708, 2714, 2720, 2726,
1973 2732, 2738, 2751, 2762, 2769, 2782, 2809, 2823, 2837, 2851,
1974 2866, 2900, 2998, 2999, 3000, 3002
1978 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1979 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1980 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1981 static const char *const yytname[] =
1983 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
1984 "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
1985 "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
1986 "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
1987 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
1988 "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
1989 "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
1990 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
1991 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
1992 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
1993 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
1994 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
1995 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
1996 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
1997 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
1998 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
1999 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
2000 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
2001 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
2002 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2003 "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
2004 "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
2005 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
2006 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
2007 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
2008 "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
2009 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2010 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2011 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2012 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2013 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2014 "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
2015 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2016 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2017 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2018 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2019 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2020 "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
2021 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2022 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2023 "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE", "MAYBETYPE",
2024 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST", "NEW",
2025 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2026 "VOIDEXPRESSION", "E", "CONSTANT", "MAYBE_EXPRPAIR_LIST",
2027 "EXPRPAIR_LIST", "VAR_READ", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2032 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2034 static const yytype_uint16 yytoknum[] =
2036 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2037 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2038 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2039 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2040 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2041 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2042 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2043 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2044 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2045 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
2046 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
2047 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
2048 91, 93, 123, 46, 358, 359, 40, 360, 125, 41
2052 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2053 static const yytype_uint8 yyr1[] =
2055 0, 130, 131, 132, 132, 133, 133, 134, 134, 134,
2056 134, 134, 134, 134, 135, 135, 136, 136, 137, 137,
2057 137, 137, 137, 137, 138, 138, 139, 139, 140, 140,
2058 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
2059 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
2060 142, 143, 144, 144, 145, 145, 146, 146, 147, 148,
2061 148, 150, 149, 151, 151, 151, 152, 152, 153, 153,
2062 154, 155, 157, 156, 159, 158, 160, 160, 161, 161,
2063 162, 162, 162, 162, 163, 163, 164, 165, 167, 166,
2064 169, 168, 171, 170, 172, 172, 173, 173, 173, 175,
2065 174, 176, 176, 177, 178, 178, 179, 179, 181, 180,
2066 182, 180, 183, 183, 184, 184, 185, 185, 186, 186,
2067 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
2068 188, 189, 189, 191, 190, 193, 192, 194, 194, 195,
2069 195, 196, 196, 196, 196, 197, 197, 198, 198, 199,
2070 199, 199, 200, 200, 201, 202, 202, 203, 203, 203,
2071 203, 203, 203, 203, 203, 204, 204, 204, 204, 205,
2072 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
2073 211, 212, 213, 214, 214, 215, 215, 216, 216, 216,
2074 217, 217, 218, 218, 219, 219, 220, 220, 221, 222,
2075 222, 223, 224, 224, 225, 226, 226, 227, 228, 228,
2076 228, 228, 228, 228, 229, 229, 229, 229, 229, 229,
2077 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
2078 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2079 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2080 228, 228, 228, 228, 228, 228, 228, 228, 228, 230,
2081 230, 231, 231, 228, 228, 228, 228, 228, 228, 228,
2082 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2083 228, 232, 233, 233, 233, 234
2086 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2087 static const yytype_uint8 yyr2[] =
2089 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2090 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
2091 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
2092 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2093 1, 1, 1, 1, 1, 1, 1, 3, 2, 2,
2094 1, 1, 2, 0, 2, 2, 1, 3, 3, 0,
2095 2, 0, 7, 0, 1, 1, 3, 1, 2, 3,
2096 8, 6, 0, 6, 0, 7, 1, 2, 1, 2,
2097 0, 1, 1, 2, 1, 2, 4, 3, 0, 8,
2098 0, 9, 0, 5, 1, 2, 1, 2, 1, 0,
2099 6, 2, 1, 5, 1, 1, 3, 1, 0, 6,
2100 0, 5, 2, 4, 0, 1, 1, 2, 1, 1,
2101 1, 1, 1, 1, 1, 1, 1, 0, 2, 0,
2102 2, 0, 2, 0, 9, 0, 8, 0, 1, 1,
2103 2, 1, 1, 1, 1, 0, 1, 1, 2, 1,
2104 2, 8, 1, 1, 5, 0, 2, 1, 1, 1,
2105 1, 1, 1, 1, 1, 0, 1, 2, 4, 3,
2106 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
2107 9, 1, 3, 1, 1, 1, 3, 1, 1, 1,
2108 2, 0, 0, 3, 0, 1, 1, 3, 3, 4,
2109 4, 2, 1, 2, 1, 1, 3, 1, 1, 1,
2110 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2111 1, 1, 1, 1, 1, 3, 3, 3, 3, 3,
2112 3, 3, 3, 3, 3, 2, 2, 3, 3, 3,
2113 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2114 3, 3, 4, 2, 1, 3, 2, 4, 3, 0,
2115 1, 3, 5, 3, 3, 3, 3, 3, 3, 3,
2116 3, 3, 3, 3, 5, 2, 2, 2, 2, 3,
2120 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2121 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2122 means the default is an error. */
2123 static const yytype_uint16 yydefact[] =
2125 114, 281, 219, 213, 216, 217, 214, 215, 218, 0,
2126 0, 74, 0, 0, 120, 118, 119, 126, 0, 125,
2127 179, 220, 254, 121, 0, 0, 0, 223, 122, 124,
2128 123, 0, 0, 222, 221, 0, 0, 0, 0, 13,
2129 0, 0, 0, 194, 259, 0, 0, 2, 114, 5,
2130 51, 12, 34, 63, 29, 30, 31, 32, 33, 36,
2131 35, 7, 28, 0, 115, 116, 9, 8, 11, 10,
2132 208, 211, 224, 212, 207, 37, 205, 209, 210, 0,
2133 68, 72, 114, 88, 104, 105, 110, 107, 0, 181,
2134 192, 178, 0, 253, 0, 181, 0, 184, 183, 112,
2135 0, 99, 0, 194, 201, 61, 278, 277, 256, 236,
2136 235, 0, 195, 196, 204, 0, 0, 260, 0, 1,
2137 6, 281, 0, 0, 64, 0, 0, 65, 175, 0,
2138 153, 0, 152, 0, 117, 0, 0, 0, 0, 0,
2139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2140 0, 0, 0, 0, 0, 0, 0, 276, 275, 0,
2141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2142 0, 0, 0, 0, 0, 0, 194, 69, 0, 0,
2143 78, 102, 202, 0, 76, 38, 114, 39, 50, 0,
2144 40, 41, 42, 44, 0, 43, 45, 46, 0, 114,
2145 108, 0, 194, 198, 165, 0, 0, 0, 25, 279,
2146 0, 0, 258, 0, 0, 263, 0, 255, 191, 55,
2147 56, 191, 54, 0, 0, 174, 173, 0, 127, 129,
2148 191, 206, 250, 251, 248, 249, 229, 230, 232, 231,
2149 227, 228, 270, 269, 265, 264, 271, 272, 267, 266,
2150 268, 233, 234, 242, 241, 240, 273, 0, 239, 238,
2151 237, 225, 226, 246, 245, 243, 247, 244, 0, 280,
2152 0, 0, 0, 79, 101, 203, 77, 48, 114, 27,
2153 205, 49, 0, 0, 0, 23, 0, 114, 16, 22,
2154 19, 18, 21, 20, 114, 106, 0, 155, 0, 0,
2155 166, 170, 114, 182, 113, 252, 0, 24, 200, 0,
2156 197, 261, 0, 0, 53, 0, 53, 0, 0, 0,
2157 0, 131, 0, 0, 53, 0, 257, 199, 114, 285,
2158 47, 26, 0, 282, 0, 111, 17, 0, 193, 0,
2159 0, 172, 167, 191, 0, 103, 0, 114, 0, 189,
2160 188, 0, 187, 190, 0, 58, 57, 0, 114, 165,
2161 128, 0, 0, 185, 130, 135, 154, 274, 73, 0,
2162 0, 80, 109, 161, 158, 159, 157, 160, 164, 163,
2163 162, 156, 155, 0, 0, 169, 0, 0, 94, 98,
2164 96, 100, 59, 262, 0, 52, 0, 71, 0, 132,
2165 133, 0, 114, 75, 283, 284, 0, 0, 0, 81,
2166 84, 82, 171, 25, 168, 92, 0, 95, 97, 114,
2167 62, 114, 191, 114, 186, 0, 149, 0, 0, 114,
2168 147, 0, 25, 89, 85, 83, 0, 25, 191, 60,
2169 70, 0, 141, 144, 0, 0, 114, 139, 142, 143,
2170 150, 175, 136, 148, 25, 87, 180, 0, 0, 176,
2171 134, 140, 0, 86, 93, 90, 25, 0, 0, 0,
2172 165, 25, 177, 0, 0, 191, 91, 151
2175 /* YYDEFGOTO[NTERM-NUM]. */
2176 static const yytype_int16 yydefgoto[] =
2178 -1, 46, 47, 48, 49, 286, 287, 288, 306, 307,
2179 187, 279, 189, 289, 355, 190, 222, 220, 420, 52,
2180 211, 125, 126, 53, 54, 55, 56, 178, 57, 82,
2181 191, 192, 408, 409, 410, 411, 58, 198, 388, 468,
2182 389, 437, 390, 391, 59, 208, 193, 60, 87, 351,
2183 61, 294, 199, 62, 194, 64, 65, 321, 323, 362,
2184 290, 423, 291, 402, 445, 446, 447, 428, 429, 430,
2185 133, 292, 341, 381, 299, 300, 301, 227, 293, 466,
2186 92, 70, 97, 98, 352, 364, 353, 314, 203, 111,
2187 112, 71, 72, 73, 195, 113, 74, 75, 76, 77,
2188 116, 117, 78, 196, 197
2191 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2193 #define YYPACT_NINF -308
2194 static const yytype_int16 yypact[] =
2196 349, -308, -308, -308, -308, -308, -308, -308, -308, -38,
2197 -86, -308, -72, 35, -308, -308, -308, -308, 30, -308,
2198 97, -308, 52, -308, -14, 18, 36, -308, -308, -308,
2199 -308, 57, 44, -308, -308, 1538, 40, 1538, 1538, -308,
2200 1538, 1538, 1538, 1538, 1538, 1538, 102, -308, 473, -308,
2201 -308, -308, -308, 211, -308, -308, -308, -308, -308, -308,
2202 -308, -308, -308, 275, 640, -308, -308, -308, -308, -308,
2203 -308, -308, -308, -308, 96, -308, 1971, -308, -308, 82,
2204 -308, -308, 1469, -308, -308, -308, -308, -308, -32, -308,
2205 83, -308, 84, 104, 1538, 88, 89, -308, -308, -308,
2206 1538, -308, 186, 1538, 104, -308, 104, 104, 163, 104,
2207 104, 108, 116, -308, 1971, 114, 105, 128, -88, -308,
2208 -308, 165, 231, 233, -308, 144, 174, -308, -5, 240,
2209 -308, 241, -308, 244, -308, 1538, 1538, 1538, 1538, 1538,
2210 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2211 1538, 1538, 1538, 1538, 1538, 1538, 1538, -308, -308, 1538,
2212 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2213 1538, 1538, 1538, 1538, 1538, 245, 1538, -308, 1538, 232,
2214 255, 1538, 1538, 231, 256, -308, 593, -308, 164, 248,
2215 -308, -308, -308, -308, 247, -308, -308, -308, 1538, 845,
2216 -308, 90, 1538, -308, 9, -82, 68, 1599, 1349, -308,
2217 138, 1538, -308, 1538, 1538, -308, 1538, -308, 166, 171,
2218 -308, 166, 171, 1538, 1538, -308, -308, 267, 219, 221,
2219 166, 1971, 962, 836, 836, 836, 2337, 2337, 2337, 2337,
2220 962, 962, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
2221 1971, 2032, 2093, 340, 340, 340, 1971, 1727, 2154, 2215,
2222 2276, 962, 962, 163, 163, 104, 104, 104, 1788, -308,
2223 149, -62, 276, -308, 96, 96, -308, -308, 719, -308,
2224 1849, -308, 154, 278, 1663, -308, 156, 971, -308, -308,
2225 -308, -308, -308, -308, 845, -308, 161, -69, 282, 167,
2226 195, -308, 1469, 88, -308, -308, 169, 1349, -308, -55,
2227 -308, -308, 190, 63, 204, 231, -24, 86, 74, 178,
2228 18, 292, 18, 187, 204, 1538, -308, -308, 1469, -308,
2229 -308, -308, 1538, 213, 188, -308, -308, 185, -308, 61,
2230 63, -308, -308, 166, 11, -308, 62, 1469, 1538, -308,
2231 -308, 191, -308, -308, 1538, -308, -308, 1538, 1469, 9,
2232 -308, 18, 194, -308, 220, -308, -308, 1971, -308, 76,
2233 182, 136, -308, -308, -308, -308, -308, -308, -308, -308,
2234 -308, -308, 224, 197, 282, -308, 202, 199, -308, -308,
2235 62, -308, 265, -308, 92, -308, 203, -308, 205, 220,
2236 -308, 18, 394, -308, -308, -308, 1538, 235, 207, 136,
2237 -308, -308, -308, 1349, -308, -308, 336, -308, -308, 1469,
2238 -308, 1469, 166, 1097, -308, 337, -308, 316, 216, 529,
2239 -308, 1910, 1349, -308, -308, -308, 218, 1349, 166, -308,
2240 -308, 225, -308, -308, 66, 222, 1223, -308, -308, -308,
2241 -308, -5, -308, -308, 1349, -308, -308, 223, 226, -308,
2242 -308, -308, 345, -308, -308, -308, 1349, 239, 249, 238,
2243 9, 1349, -308, 246, 250, 166, -308, -308
2246 /* YYPGOTO[NTERM-NUM]. */
2247 static const yytype_int16 yypgoto[] =
2249 -308, -308, -308, -308, 328, 85, -308, 93, -209, 196,
2250 1, -76, -244, 16, 59, 332, 268, 77, -308, -308,
2251 -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
2252 -308, -308, -308, -308, -15, -11, -308, -308, 15, -308,
2253 17, -308, -308, -308, -308, -308, -308, -308, -193, 19,
2254 -308, -308, -308, -308, 0, -308, 335, -308, -308, -308,
2255 31, -308, 39, -308, -308, -308, -40, -308, -308, -21,
2256 -308, 2, 27, -308, -307, -308, -271, -41, 3, -308,
2257 -308, -308, 398, -308, -20, 60, 78, -184, -308, -93,
2258 -308, -308, -308, -308, -308, -26, -17, -46, -18, -308,
2259 -308, -308, -308, -308, -308
2262 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2263 positive, shift that token. If negative, reduce the rule which
2264 number is the opposite. If zero, do what YYDEFACT says.
2265 If YYTABLE_NINF, syntax error. */
2266 #define YYTABLE_NINF -205
2267 static const yytype_int16 yytable[] =
2269 63, 50, 68, 69, 93, 99, 188, 127, 295, 135,
2270 210, 79, 297, 295, 297, 135, 51, 104, 115, 106,
2271 107, 95, 108, 109, 110, 114, 114, 342, 118, 225,
2272 339, 66, 88, 89, 340, 135, 85, 316, 84, 67,
2273 81, 217, 135, -66, 96, 226, 324, 302, 63, 50,
2274 68, 69, 398, 85, 83, 1, 2, 3, 345, 4,
2275 5, 6, 7, 8, 51, 373, 95, 328, 374, 375,
2276 376, 303, 377, 385, 347, 354, 18, 205, 20, 66,
2277 21, 85, 207, 270, 368, 114, 85, 67, 80, 386,
2278 200, 201, 128, 84, 387, 303, 27, 130, 349, 298,
2279 91, 384, 119, 392, 32, 378, 33, 34, 85, 296,
2280 85, 132, 94, 414, 397, 379, 380, 231, 232, 233,
2281 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
2282 244, 245, 246, 247, 248, 249, 250, 251, 252, 37,
2283 38, 253, 254, 255, 256, 257, 258, 259, 260, 261,
2284 262, 263, 264, 265, 266, 267, 268, 86, 114, 383,
2285 115, 271, 100, 473, 274, 275, 105, 102, 280, 406,
2286 103, 135, 43, 135, 44, 439, 350, 440, 45, 101,
2287 284, 304, 357, 135, 114, 404, 405, 310, 311, 209,
2288 312, 157, 158, 135, 309, 114, 114, 407, 114, 63,
2289 50, 295, 331, 358, 436, 403, 317, 318, 177, 202,
2290 204, -104, 206, 213, 121, 2, 3, 214, 4, 5,
2291 6, 7, 8, 455, 174, 216, 188, 175, 457, 212,
2292 176, 331, -67, 215, 218, 18, 221, 20, 441, 21,
2293 223, 224, 122, 228, 229, 463, 22, 230, 269, 272,
2294 157, 158, 188, 26, 458, 27, 123, 469, 273, 276,
2295 281, 282, 474, 32, 283, 33, 34, 308, 315, 313,
2296 319, 188, 320, 35, 322, 171, 172, 173, 327, 329,
2297 332, 333, 188, 174, 335, 297, 175, 63, 50, 176,
2298 338, 477, 344, 348, 63, 50, 343, 346, 37, 38,
2299 360, 128, 363, 354, 359, 129, 130, 367, 361, 365,
2300 371, 396, 370, 372, 394, 369, 400, 401, 131, 413,
2301 132, 40, 393, 339, 415, 416, 41, 42, 395, 419,
2302 114, 43, 421, 44, 422, 433, 114, 45, 432, 438,
2303 450, 363, 451, 188, 452, 188, 456, 459, 467, -3,
2304 460, 464, 1, 2, 3, 465, 4, 5, 6, 7,
2305 8, 9, 10, 11, 12, 470, 472, 13, 14, 15,
2306 16, 471, 17, 18, 19, 475, 120, 21, 476, 337,
2307 336, 424, 278, 366, 22, 124, 23, 24, 431, 25,
2308 219, 26, 356, 27, 434, 28, 29, 30, 435, 134,
2309 31, 32, 427, 33, 34, 417, 461, 418, 453, 412,
2310 462, 35, 36, 14, 15, 16, 90, 17, 382, 19,
2311 0, 399, 0, 444, 443, 448, 449, 157, 158, 427,
2312 0, 23, 0, 0, 0, 0, 37, 38, 0, 425,
2313 28, 29, 30, 0, 0, 39, 444, 443, 448, 449,
2314 169, 170, 171, 172, 173, 0, 0, 0, 0, 40,
2315 174, 0, 0, 175, 41, 42, 176, 0, 0, 43,
2316 0, 44, 0, -4, 0, 45, 1, 2, 3, 0,
2317 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2318 426, 13, 14, 15, 16, 0, 17, 18, 19, 0,
2319 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2320 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2321 29, 30, -145, 0, 31, 32, 0, 33, 34, 0,
2322 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2323 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
2324 16, 0, 17, 0, 19, 0, 0, 0, 0, 0,
2325 37, 38, 0, 0, 0, 0, 23, 0, 0, 39,
2326 0, 0, 0, 0, 425, 28, 29, 30, 0, 0,
2327 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2328 0, 0, 0, 43, 0, 44, 1, 2, 3, 45,
2329 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2330 0, 0, 14, 15, 16, 179, 17, 18, 19, 20,
2331 0, 21, 180, 0, 122, 426, 0, 0, 22, 181,
2332 23, 24, 0, 25, 182, 26, 0, 27, 183, 28,
2333 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2334 0, 0, 0, 0, 0, 35, 36, -146, 184, 14,
2335 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
2336 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
2337 37, 38, 0, 0, 0, 0, 28, 29, 30, 185,
2338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2339 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2340 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2341 0, 277, 1, 2, 3, 0, 4, 5, 6, 7,
2342 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2343 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2344 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2345 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2346 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2347 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2349 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2350 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2351 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2352 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2353 0, 44, 0, 0, 0, 45, 0, 330, 1, 2,
2354 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
2355 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
2356 19, 0, 0, 21, 0, 136, 0, 0, 0, 0,
2357 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
2358 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2359 34, 0, -205, -205, -205, 0, 0, 35, 36, 144,
2360 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2361 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2362 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2363 0, 285, 0, 167, 168, 0, 169, 170, 171, 172,
2364 173, 0, 0, 0, 0, 40, 174, 0, 0, 175,
2365 41, 42, 176, 0, 0, 43, 0, 44, 0, 0,
2366 0, 45, 0, -14, 1, 2, 3, 0, 4, 5,
2367 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
2368 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
2369 0, -205, 0, 0, 0, 0, 22, 0, 23, 24,
2370 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
2371 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
2372 0, 0, 0, 35, 36, -205, -205, 0, 0, 0,
2373 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
2374 158, 0, 0, 159, 160, 161, 0, 0, 37, 38,
2375 0, 0, 0, 0, 0, 0, 0, 285, 0, -205,
2376 -205, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2377 0, 40, 174, 0, 0, 175, 41, 42, 176, 0,
2378 0, 43, 0, 44, 0, 0, 0, 45, 0, -15,
2379 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
2380 10, 11, 12, 0, 0, 0, 14, 15, 16, 0,
2381 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
2382 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
2383 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
2384 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2385 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2387 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
2388 0, 0, 0, 442, 0, 0, 0, 0, 0, 0,
2389 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2390 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2391 0, 0, 0, 45, 0, -137, 1, 2, 3, 0,
2392 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2393 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
2394 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2395 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2396 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2397 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2400 37, 38, 0, 0, 0, 0, 0, 0, 0, 442,
2401 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2402 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2403 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2404 0, -138, 1, 2, 3, 0, 4, 5, 6, 7,
2405 8, 9, 10, 11, 12, 0, -114, 0, 14, 15,
2406 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2407 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2408 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2409 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2410 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2412 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2413 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2414 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2415 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2416 0, 44, 1, 2, 3, 45, 4, 5, 6, 7,
2417 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2418 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2419 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2420 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2421 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2422 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2423 0, 1, 2, 3, 0, 4, 5, 6, 7, 8,
2424 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2425 0, 0, 18, 0, 20, 185, 21, 0, 0, 0,
2426 0, 0, 0, 22, 0, 0, 0, 0, 0, 40,
2427 26, 0, 27, 0, 41, 42, 0, 0, 0, 43,
2428 32, 186, 33, 34, 0, 45, 0, 0, 0, 0,
2429 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2431 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2432 0, 0, 0, 0, 0, 0, 0, 0, 136, 0,
2433 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
2434 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
2435 44, 0, 0, 0, 45, 137, 138, 139, 140, 141,
2436 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2437 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2438 159, 160, 161, 0, 0, 0, 0, 0, 162, 0,
2439 0, 163, 136, 164, 165, 166, 167, 168, 0, 169,
2440 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2441 0, 0, 175, 0, 0, 176, 0, 0, 305, 137,
2442 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2443 148, 149, 150, 151, 152, 153, 154, 155, 156, 0,
2444 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2445 0, 0, 162, 0, 0, 163, 136, 164, 165, 166,
2446 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2447 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2448 0, 0, 334, 137, 138, 139, 140, 141, 142, 143,
2449 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2450 154, 155, 156, 0, 157, 158, 0, 0, 159, 160,
2451 161, 0, 0, 0, 0, 0, 162, 136, 0, 163,
2452 325, 164, 165, 166, 167, 168, 0, 169, 170, 171,
2453 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2454 175, 0, 0, 176, 137, 138, 139, 140, 141, 142,
2455 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
2456 153, 154, 155, 156, 0, 157, 158, 0, 0, 159,
2457 160, 161, 0, 0, 0, 0, 0, 162, 136, 0,
2458 163, 0, 164, 165, 166, 167, 168, 0, 169, 170,
2459 171, 172, 173, 0, 0, 0, 0, 0, 174, 326,
2460 0, 175, 0, 0, 176, 137, 138, 139, 140, 141,
2461 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2462 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2463 159, 160, 161, 0, 0, 0, 0, 0, 162, 136,
2464 0, 163, -204, 164, 165, 166, 167, 168, 0, 169,
2465 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2466 0, 0, 175, 0, 0, 176, 137, 138, 139, 140,
2467 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
2468 151, 152, 153, 154, 155, 156, 0, 157, 158, 0,
2469 0, 159, 160, 161, 0, 0, 0, 0, 0, 162,
2470 136, 0, 163, 454, 164, 165, 166, 167, 168, 0,
2471 169, 170, 171, 172, 173, 0, 0, 0, 0, 0,
2472 174, 0, 0, 175, 0, 0, 176, 137, 138, 139,
2473 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
2474 150, 151, 152, 153, 154, 155, 156, 0, 157, 158,
2475 0, 0, 159, 160, 161, 0, 0, 0, 0, 0,
2476 162, 136, 0, 163, 0, 164, 165, 166, 167, 168,
2477 0, 169, 170, 171, 172, 173, 0, 0, 0, 0,
2478 0, 174, 0, 0, 175, 0, 0, 176, 137, 138,
2479 139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
2480 0, 0, 0, 0, 0, 0, 0, 156, 0, 157,
2481 158, 0, 0, 159, 160, 161, 0, 0, 0, 0,
2482 0, 0, 136, 0, 0, 0, 164, 165, 166, 167,
2483 168, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2484 0, 0, 174, 0, 0, 175, 0, 0, 176, 137,
2485 138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
2486 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2487 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2488 0, 0, 0, 136, 0, 0, 0, 164, 165, 166,
2489 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2490 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2491 137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
2492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2493 0, 157, 158, 0, 0, 159, 160, 161, 0, 0,
2494 0, 0, 0, 0, 136, 0, 0, 0, 0, 165,
2495 166, 167, 168, 0, 169, 170, 171, 172, 173, 0,
2496 0, 0, 0, 0, 174, 0, 0, 175, 0, 0,
2497 176, 137, 138, 139, 140, 141, 142, 143, 144, 145,
2498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2499 0, 0, 157, 158, 0, 0, 159, 160, 161, 0,
2500 0, 0, 0, 0, 0, 136, 0, 0, 0, 0,
2501 0, 166, 167, 168, 0, 169, 170, 171, 172, 173,
2502 0, 0, 0, 0, 0, 174, 0, 0, 175, 0,
2503 0, 176, 137, 138, 139, 140, 141, 142, 143, 144,
2504 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2505 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2506 0, 0, 0, 0, 0, 0, 136, 0, 0, 0,
2507 0, 0, -205, 167, 168, 0, 169, 170, 171, 172,
2508 173, 0, 0, 0, 0, 0, 174, 0, 0, 175,
2509 0, 0, 176, 137, 138, 139, -205, -205, -205, -205,
2510 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
2511 0, 0, 0, 0, 157, 158, 0, 0, 159, 160,
2512 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2513 0, 0, 0, 0, 167, 168, 0, 169, 170, 171,
2514 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2518 static const yytype_int16 yycheck[] =
2520 0, 0, 0, 0, 22, 25, 82, 53, 201, 97,
2521 103, 49, 3, 206, 3, 97, 0, 35, 44, 37,
2522 38, 3, 40, 41, 42, 43, 44, 298, 45, 34,
2523 99, 0, 13, 3, 103, 97, 18, 221, 3, 0,
2524 126, 129, 97, 67, 25, 50, 230, 129, 48, 48,
2525 48, 48, 359, 18, 126, 3, 4, 5, 302, 7,
2526 8, 9, 10, 11, 48, 4, 3, 129, 7, 8,
2527 9, 3, 11, 344, 129, 99, 24, 94, 26, 48,
2528 28, 18, 100, 176, 328, 103, 18, 48, 126, 27,
2529 122, 123, 26, 3, 32, 3, 44, 31, 35, 90,
2530 3, 90, 0, 347, 52, 44, 54, 55, 18, 202,
2531 18, 45, 126, 384, 358, 54, 55, 135, 136, 137,
2532 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2533 148, 149, 150, 151, 152, 153, 154, 155, 156, 87,
2534 88, 159, 160, 161, 162, 163, 164, 165, 166, 167,
2535 168, 169, 170, 171, 172, 173, 174, 122, 176, 343,
2536 186, 178, 126, 470, 181, 182, 126, 123, 186, 33,
2537 126, 97, 120, 97, 122, 419, 113, 421, 126, 122,
2538 198, 113, 96, 97, 202, 3, 4, 213, 214, 3,
2539 216, 87, 88, 97, 211, 213, 214, 61, 216, 199,
2540 199, 394, 278, 129, 413, 129, 223, 224, 126, 126,
2541 126, 123, 123, 97, 3, 4, 5, 103, 7, 8,
2542 9, 10, 11, 432, 120, 97, 302, 123, 437, 121,
2543 126, 307, 67, 128, 3, 24, 3, 26, 422, 28,
2544 96, 67, 31, 3, 3, 454, 35, 3, 3, 17,
2545 87, 88, 328, 42, 438, 44, 45, 466, 3, 3,
2546 96, 13, 471, 52, 17, 54, 55, 129, 97, 103,
2547 3, 347, 53, 62, 53, 112, 113, 114, 129, 3,
2548 126, 3, 358, 120, 128, 3, 123, 287, 287, 126,
2549 129, 475, 97, 103, 294, 294, 129, 128, 87, 88,
2550 320, 26, 322, 99, 126, 30, 31, 325, 16, 122,
2551 122, 357, 99, 128, 123, 332, 122, 97, 43, 122,
2552 45, 110, 348, 99, 122, 126, 115, 116, 354, 64,
2553 348, 120, 129, 122, 129, 128, 354, 126, 103, 3,
2554 3, 361, 26, 419, 128, 421, 128, 122, 3, 0,
2555 128, 128, 3, 4, 5, 129, 7, 8, 9, 10,
2556 11, 12, 13, 14, 15, 126, 128, 18, 19, 20,
2557 21, 122, 23, 24, 25, 129, 48, 28, 128, 294,
2558 287, 401, 186, 324, 35, 53, 37, 38, 406, 40,
2559 122, 42, 315, 44, 409, 46, 47, 48, 409, 64,
2560 51, 52, 402, 54, 55, 390, 446, 390, 429, 382,
2561 451, 62, 63, 19, 20, 21, 18, 23, 340, 25,
2562 -1, 361, -1, 423, 423, 423, 423, 87, 88, 429,
2563 -1, 37, -1, -1, -1, -1, 87, 88, -1, 45,
2564 46, 47, 48, -1, -1, 96, 446, 446, 446, 446,
2565 110, 111, 112, 113, 114, -1, -1, -1, -1, 110,
2566 120, -1, -1, 123, 115, 116, 126, -1, -1, 120,
2567 -1, 122, -1, 0, -1, 126, 3, 4, 5, -1,
2568 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2569 96, 18, 19, 20, 21, -1, 23, 24, 25, -1,
2570 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2571 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2572 47, 48, 128, -1, 51, 52, -1, 54, 55, -1,
2573 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2574 -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
2575 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
2576 87, 88, -1, -1, -1, -1, 37, -1, -1, 96,
2577 -1, -1, -1, -1, 45, 46, 47, 48, -1, -1,
2578 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2579 -1, -1, -1, 120, -1, 122, 3, 4, 5, 126,
2580 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2581 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
2582 -1, 28, 29, -1, 31, 96, -1, -1, 35, 36,
2583 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
2584 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2585 -1, -1, -1, -1, -1, 62, 63, 128, 65, 19,
2586 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
2587 -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
2588 87, 88, -1, -1, -1, -1, 46, 47, 48, 96,
2589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2590 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2591 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2592 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2593 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2594 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2595 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2596 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2597 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2598 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2599 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2600 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2601 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2602 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2603 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2604 -1, 122, -1, -1, -1, 126, -1, 128, 3, 4,
2605 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
2606 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
2607 25, -1, -1, 28, -1, 39, -1, -1, -1, -1,
2608 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
2609 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2610 55, -1, 66, 67, 68, -1, -1, 62, 63, 73,
2611 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2612 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2613 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2614 -1, 96, -1, 107, 108, -1, 110, 111, 112, 113,
2615 114, -1, -1, -1, -1, 110, 120, -1, -1, 123,
2616 115, 116, 126, -1, -1, 120, -1, 122, -1, -1,
2617 -1, 126, -1, 128, 3, 4, 5, -1, 7, 8,
2618 9, 10, 11, 12, 13, 14, 15, -1, -1, -1,
2619 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
2620 -1, 39, -1, -1, -1, -1, 35, -1, 37, 38,
2621 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
2622 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
2623 -1, -1, -1, 62, 63, 73, 74, -1, -1, -1,
2624 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2625 88, -1, -1, 91, 92, 93, -1, -1, 87, 88,
2626 -1, -1, -1, -1, -1, -1, -1, 96, -1, 107,
2627 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2628 -1, 110, 120, -1, -1, 123, 115, 116, 126, -1,
2629 -1, 120, -1, 122, -1, -1, -1, 126, -1, 128,
2630 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
2631 13, 14, 15, -1, -1, -1, 19, 20, 21, -1,
2632 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
2633 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
2634 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
2635 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2636 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2638 -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
2639 -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
2640 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2641 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2642 -1, -1, -1, 126, -1, 128, 3, 4, 5, -1,
2643 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2644 -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
2645 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2646 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2647 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2648 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2649 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2651 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2652 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2653 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2654 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2655 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2656 11, 12, 13, 14, 15, -1, 17, -1, 19, 20,
2657 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2658 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2659 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2660 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2661 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2663 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2664 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2665 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2666 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2667 -1, 122, 3, 4, 5, 126, 7, 8, 9, 10,
2668 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2669 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2670 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2671 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2672 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2673 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2674 -1, 3, 4, 5, -1, 7, 8, 9, 10, 11,
2675 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2676 -1, -1, 24, -1, 26, 96, 28, -1, -1, -1,
2677 -1, -1, -1, 35, -1, -1, -1, -1, -1, 110,
2678 42, -1, 44, -1, 115, 116, -1, -1, -1, 120,
2679 52, 122, 54, 55, -1, 126, -1, -1, -1, -1,
2680 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2682 -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
2683 -1, -1, -1, -1, -1, -1, -1, -1, 39, -1,
2684 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
2685 -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
2686 122, -1, -1, -1, 126, 66, 67, 68, 69, 70,
2687 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2688 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2689 91, 92, 93, -1, -1, -1, -1, -1, 99, -1,
2690 -1, 102, 39, 104, 105, 106, 107, 108, -1, 110,
2691 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2692 -1, -1, 123, -1, -1, 126, -1, -1, 129, 66,
2693 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
2694 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
2695 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2696 -1, -1, 99, -1, -1, 102, 39, 104, 105, 106,
2697 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2698 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2699 -1, -1, 129, 66, 67, 68, 69, 70, 71, 72,
2700 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
2701 83, 84, 85, -1, 87, 88, -1, -1, 91, 92,
2702 93, -1, -1, -1, -1, -1, 99, 39, -1, 102,
2703 103, 104, 105, 106, 107, 108, -1, 110, 111, 112,
2704 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2705 123, -1, -1, 126, 66, 67, 68, 69, 70, 71,
2706 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
2707 82, 83, 84, 85, -1, 87, 88, -1, -1, 91,
2708 92, 93, -1, -1, -1, -1, -1, 99, 39, -1,
2709 102, -1, 104, 105, 106, 107, 108, -1, 110, 111,
2710 112, 113, 114, -1, -1, -1, -1, -1, 120, 121,
2711 -1, 123, -1, -1, 126, 66, 67, 68, 69, 70,
2712 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2713 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2714 91, 92, 93, -1, -1, -1, -1, -1, 99, 39,
2715 -1, 102, 103, 104, 105, 106, 107, 108, -1, 110,
2716 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2717 -1, -1, 123, -1, -1, 126, 66, 67, 68, 69,
2718 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2719 80, 81, 82, 83, 84, 85, -1, 87, 88, -1,
2720 -1, 91, 92, 93, -1, -1, -1, -1, -1, 99,
2721 39, -1, 102, 103, 104, 105, 106, 107, 108, -1,
2722 110, 111, 112, 113, 114, -1, -1, -1, -1, -1,
2723 120, -1, -1, 123, -1, -1, 126, 66, 67, 68,
2724 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2725 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2726 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2727 99, 39, -1, 102, -1, 104, 105, 106, 107, 108,
2728 -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2729 -1, 120, -1, -1, 123, -1, -1, 126, 66, 67,
2730 68, 69, 70, 71, 72, 73, 74, -1, -1, -1,
2731 -1, -1, -1, -1, -1, -1, -1, 85, -1, 87,
2732 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
2733 -1, -1, 39, -1, -1, -1, 104, 105, 106, 107,
2734 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2735 -1, -1, 120, -1, -1, 123, -1, -1, 126, 66,
2736 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
2737 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2738 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2739 -1, -1, -1, 39, -1, -1, -1, 104, 105, 106,
2740 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2741 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2742 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
2743 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2744 -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
2745 -1, -1, -1, -1, 39, -1, -1, -1, -1, 105,
2746 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
2747 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
2748 126, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2749 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2750 -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2751 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2752 -1, 106, 107, 108, -1, 110, 111, 112, 113, 114,
2753 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
2754 -1, 126, 66, 67, 68, 69, 70, 71, 72, 73,
2755 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2756 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2757 -1, -1, -1, -1, -1, -1, 39, -1, -1, -1,
2758 -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
2759 114, -1, -1, -1, -1, -1, 120, -1, -1, 123,
2760 -1, -1, 126, 66, 67, 68, 69, 70, 71, 72,
2761 73, 74, -1, -1, -1, -1, -1, -1, -1, -1,
2762 -1, -1, -1, -1, 87, 88, -1, -1, 91, 92,
2763 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2764 -1, -1, -1, -1, 107, 108, -1, 110, 111, 112,
2765 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2769 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2770 symbol of state STATE-NUM. */
2771 static const yytype_uint8 yystos[] =
2773 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
2774 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
2775 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
2776 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
2777 110, 115, 116, 120, 122, 126, 131, 132, 133, 134,
2778 140, 143, 149, 153, 154, 155, 156, 158, 166, 174,
2779 177, 180, 183, 184, 185, 186, 190, 192, 201, 208,
2780 211, 221, 222, 223, 226, 227, 228, 229, 232, 49,
2781 126, 126, 159, 126, 3, 18, 122, 178, 179, 3,
2782 212, 3, 210, 228, 126, 3, 179, 212, 213, 214,
2783 126, 122, 123, 126, 228, 126, 228, 228, 228, 228,
2784 228, 219, 220, 225, 228, 225, 230, 231, 226, 0,
2785 134, 3, 31, 45, 145, 151, 152, 227, 26, 30,
2786 31, 43, 45, 200, 186, 97, 39, 66, 67, 68,
2787 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2788 79, 80, 81, 82, 83, 84, 85, 87, 88, 91,
2789 92, 93, 99, 102, 104, 105, 106, 107, 108, 110,
2790 111, 112, 113, 114, 120, 123, 126, 126, 157, 22,
2791 29, 36, 41, 45, 65, 96, 122, 140, 141, 142,
2792 145, 160, 161, 176, 184, 224, 233, 234, 167, 182,
2793 122, 123, 126, 218, 126, 226, 123, 228, 175, 3,
2794 219, 150, 121, 97, 103, 128, 97, 129, 3, 146,
2795 147, 3, 146, 96, 67, 34, 50, 207, 3, 3,
2796 3, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2797 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2798 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2799 228, 228, 228, 228, 228, 228, 228, 228, 228, 3,
2800 219, 226, 17, 3, 226, 226, 3, 128, 139, 141,
2801 228, 96, 13, 17, 228, 96, 135, 136, 137, 143,
2802 190, 192, 201, 208, 181, 178, 219, 3, 90, 204,
2803 205, 206, 129, 3, 113, 129, 138, 139, 129, 226,
2804 225, 225, 225, 103, 217, 97, 217, 226, 226, 3,
2805 53, 187, 53, 188, 217, 103, 121, 129, 129, 3,
2806 128, 141, 126, 3, 129, 128, 137, 135, 129, 99,
2807 103, 202, 206, 129, 97, 142, 128, 129, 103, 35,
2808 113, 179, 214, 216, 99, 144, 147, 96, 129, 126,
2809 214, 16, 189, 214, 215, 122, 144, 228, 142, 226,
2810 99, 122, 128, 4, 7, 8, 9, 11, 44, 54,
2811 55, 203, 216, 217, 90, 206, 27, 32, 168, 170,
2812 172, 173, 142, 225, 123, 225, 227, 142, 204, 215,
2813 122, 97, 193, 129, 3, 4, 33, 61, 162, 163,
2814 164, 165, 202, 122, 206, 122, 126, 168, 170, 64,
2815 148, 129, 129, 191, 214, 45, 96, 184, 197, 198,
2816 199, 228, 103, 128, 164, 165, 138, 171, 3, 142,
2817 142, 217, 96, 140, 184, 194, 195, 196, 201, 208,
2818 3, 26, 128, 199, 103, 138, 128, 138, 217, 122,
2819 128, 196, 207, 138, 128, 129, 209, 3, 169, 138,
2820 126, 122, 128, 204, 138, 129, 128, 217
2823 #define yyerrok (yyerrstatus = 0)
2824 #define yyclearin (yychar = YYEMPTY)
2825 #define YYEMPTY (-2)
2828 #define YYACCEPT goto yyacceptlab
2829 #define YYABORT goto yyabortlab
2830 #define YYERROR goto yyerrorlab
2833 /* Like YYERROR except do call yyerror. This remains here temporarily
2834 to ease the transition to the new meaning of YYERROR, for GCC.
2835 Once GCC version 2 has supplanted version 1, this can go. */
2837 #define YYFAIL goto yyerrlab
2839 #define YYRECOVERING() (!!yyerrstatus)
2841 #define YYBACKUP(Token, Value) \
2843 if (yychar == YYEMPTY && yylen == 1) \
2847 yytoken = YYTRANSLATE (yychar); \
2853 yyerror (YY_("syntax error: cannot back up")); \
2860 #define YYERRCODE 256
2863 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2864 If N is 0, then set CURRENT to the empty location which ends
2865 the previous symbol: RHS[0] (always defined). */
2867 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2868 #ifndef YYLLOC_DEFAULT
2869 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2873 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2874 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2875 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2876 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2880 (Current).first_line = (Current).last_line = \
2881 YYRHSLOC (Rhs, 0).last_line; \
2882 (Current).first_column = (Current).last_column = \
2883 YYRHSLOC (Rhs, 0).last_column; \
2889 /* YY_LOCATION_PRINT -- Print the location on the stream.
2890 This macro was not mandated originally: define only if we know
2891 we won't break user code: when these are the locations we know. */
2893 #ifndef YY_LOCATION_PRINT
2894 # if YYLTYPE_IS_TRIVIAL
2895 # define YY_LOCATION_PRINT(File, Loc) \
2896 fprintf (File, "%d.%d-%d.%d", \
2897 (Loc).first_line, (Loc).first_column, \
2898 (Loc).last_line, (Loc).last_column)
2900 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2905 /* YYLEX -- calling `yylex' with the right arguments. */
2908 # define YYLEX yylex (YYLEX_PARAM)
2910 # define YYLEX yylex ()
2913 /* Enable debugging if requested. */
2917 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2918 # define YYFPRINTF fprintf
2921 # define YYDPRINTF(Args) \
2927 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2931 YYFPRINTF (stderr, "%s ", Title); \
2932 yy_symbol_print (stderr, \
2934 YYFPRINTF (stderr, "\n"); \
2939 /*--------------------------------.
2940 | Print this symbol on YYOUTPUT. |
2941 `--------------------------------*/
2944 #if (defined __STDC__ || defined __C99__FUNC__ \
2945 || defined __cplusplus || defined _MSC_VER)
2947 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2950 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
2953 YYSTYPE const * const yyvaluep;
2959 if (yytype < YYNTOKENS)
2960 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2972 /*--------------------------------.
2973 | Print this symbol on YYOUTPUT. |
2974 `--------------------------------*/
2976 #if (defined __STDC__ || defined __C99__FUNC__ \
2977 || defined __cplusplus || defined _MSC_VER)
2979 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2982 yy_symbol_print (yyoutput, yytype, yyvaluep)
2985 YYSTYPE const * const yyvaluep;
2988 if (yytype < YYNTOKENS)
2989 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2991 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2993 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
2994 YYFPRINTF (yyoutput, ")");
2997 /*------------------------------------------------------------------.
2998 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3000 `------------------------------------------------------------------*/
3002 #if (defined __STDC__ || defined __C99__FUNC__ \
3003 || defined __cplusplus || defined _MSC_VER)
3005 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3008 yy_stack_print (yybottom, yytop)
3009 yytype_int16 *yybottom;
3010 yytype_int16 *yytop;
3013 YYFPRINTF (stderr, "Stack now");
3014 for (; yybottom <= yytop; yybottom++)
3016 int yybot = *yybottom;
3017 YYFPRINTF (stderr, " %d", yybot);
3019 YYFPRINTF (stderr, "\n");
3022 # define YY_STACK_PRINT(Bottom, Top) \
3025 yy_stack_print ((Bottom), (Top)); \
3029 /*------------------------------------------------.
3030 | Report that the YYRULE is going to be reduced. |
3031 `------------------------------------------------*/
3033 #if (defined __STDC__ || defined __C99__FUNC__ \
3034 || defined __cplusplus || defined _MSC_VER)
3036 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3039 yy_reduce_print (yyvsp, yyrule)
3044 int yynrhs = yyr2[yyrule];
3046 unsigned long int yylno = yyrline[yyrule];
3047 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3049 /* The symbols being reduced. */
3050 for (yyi = 0; yyi < yynrhs; yyi++)
3052 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3053 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3054 &(yyvsp[(yyi + 1) - (yynrhs)])
3056 YYFPRINTF (stderr, "\n");
3060 # define YY_REDUCE_PRINT(Rule) \
3063 yy_reduce_print (yyvsp, Rule); \
3066 /* Nonzero means print parse trace. It is left uninitialized so that
3067 multiple parsers can coexist. */
3069 #else /* !YYDEBUG */
3070 # define YYDPRINTF(Args)
3071 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3072 # define YY_STACK_PRINT(Bottom, Top)
3073 # define YY_REDUCE_PRINT(Rule)
3074 #endif /* !YYDEBUG */
3077 /* YYINITDEPTH -- initial size of the parser's stacks. */
3079 # define YYINITDEPTH 200
3082 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3083 if the built-in stack extension method is used).
3085 Do not make this value too large; the results are undefined if
3086 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3087 evaluated with infinite-precision integer arithmetic. */
3090 # define YYMAXDEPTH 10000
3098 # if defined __GLIBC__ && defined _STRING_H
3099 # define yystrlen strlen
3101 /* Return the length of YYSTR. */
3102 #if (defined __STDC__ || defined __C99__FUNC__ \
3103 || defined __cplusplus || defined _MSC_VER)
3105 yystrlen (const char *yystr)
3113 for (yylen = 0; yystr[yylen]; yylen++)
3121 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3122 # define yystpcpy stpcpy
3124 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3126 #if (defined __STDC__ || defined __C99__FUNC__ \
3127 || defined __cplusplus || defined _MSC_VER)
3129 yystpcpy (char *yydest, const char *yysrc)
3132 yystpcpy (yydest, yysrc)
3138 const char *yys = yysrc;
3140 while ((*yyd++ = *yys++) != '\0')
3149 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3150 quotes and backslashes, so that it's suitable for yyerror. The
3151 heuristic is that double-quoting is unnecessary unless the string
3152 contains an apostrophe, a comma, or backslash (other than
3153 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3154 null, do not copy; instead, return the length of what the result
3157 yytnamerr (char *yyres, const char *yystr)
3162 char const *yyp = yystr;
3169 goto do_not_strip_quotes;
3173 goto do_not_strip_quotes;
3186 do_not_strip_quotes: ;
3190 return yystrlen (yystr);
3192 return yystpcpy (yyres, yystr) - yyres;
3196 /* Copy into YYRESULT an error message about the unexpected token
3197 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3198 including the terminating null byte. If YYRESULT is null, do not
3199 copy anything; just return the number of bytes that would be
3200 copied. As a special case, return 0 if an ordinary "syntax error"
3201 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3202 size calculation. */
3204 yysyntax_error (char *yyresult, int yystate, int yychar)
3206 int yyn = yypact[yystate];
3208 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3212 int yytype = YYTRANSLATE (yychar);
3213 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3214 YYSIZE_T yysize = yysize0;
3216 int yysize_overflow = 0;
3217 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3218 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3222 /* This is so xgettext sees the translatable formats that are
3223 constructed on the fly. */
3224 YY_("syntax error, unexpected %s");
3225 YY_("syntax error, unexpected %s, expecting %s");
3226 YY_("syntax error, unexpected %s, expecting %s or %s");
3227 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3228 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3232 static char const yyunexpected[] = "syntax error, unexpected %s";
3233 static char const yyexpecting[] = ", expecting %s";
3234 static char const yyor[] = " or %s";
3235 char yyformat[sizeof yyunexpected
3236 + sizeof yyexpecting - 1
3237 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3238 * (sizeof yyor - 1))];
3239 char const *yyprefix = yyexpecting;
3241 /* Start YYX at -YYN if negative to avoid negative indexes in
3243 int yyxbegin = yyn < 0 ? -yyn : 0;
3245 /* Stay within bounds of both yycheck and yytname. */
3246 int yychecklim = YYLAST - yyn + 1;
3247 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3250 yyarg[0] = yytname[yytype];
3251 yyfmt = yystpcpy (yyformat, yyunexpected);
3253 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3254 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3256 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3260 yyformat[sizeof yyunexpected - 1] = '\0';
3263 yyarg[yycount++] = yytname[yyx];
3264 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3265 yysize_overflow |= (yysize1 < yysize);
3267 yyfmt = yystpcpy (yyfmt, yyprefix);
3271 yyf = YY_(yyformat);
3272 yysize1 = yysize + yystrlen (yyf);
3273 yysize_overflow |= (yysize1 < yysize);
3276 if (yysize_overflow)
3277 return YYSIZE_MAXIMUM;
3281 /* Avoid sprintf, as that infringes on the user's name space.
3282 Don't have undefined behavior even if the translation
3283 produced a string with the wrong number of "%s"s. */
3284 char *yyp = yyresult;
3286 while ((*yyp = *yyf) != '\0')
3288 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3290 yyp += yytnamerr (yyp, yyarg[yyi++]);
3303 #endif /* YYERROR_VERBOSE */
3306 /*-----------------------------------------------.
3307 | Release the memory associated to this symbol. |
3308 `-----------------------------------------------*/
3311 #if (defined __STDC__ || defined __C99__FUNC__ \
3312 || defined __cplusplus || defined _MSC_VER)
3314 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3317 yydestruct (yymsg, yytype, yyvaluep)
3327 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3337 /* Prevent warnings from -Wmissing-prototypes. */
3338 #ifdef YYPARSE_PARAM
3339 #if defined __STDC__ || defined __cplusplus
3340 int yyparse (void *YYPARSE_PARAM);
3344 #else /* ! YYPARSE_PARAM */
3345 #if defined __STDC__ || defined __cplusplus
3350 #endif /* ! YYPARSE_PARAM */
3353 /* The lookahead symbol. */
3356 /* The semantic value of the lookahead symbol. */
3359 /* Number of syntax errors so far. */
3364 /*-------------------------.
3365 | yyparse or yypush_parse. |
3366 `-------------------------*/
3368 #ifdef YYPARSE_PARAM
3369 #if (defined __STDC__ || defined __C99__FUNC__ \
3370 || defined __cplusplus || defined _MSC_VER)
3372 yyparse (void *YYPARSE_PARAM)
3375 yyparse (YYPARSE_PARAM)
3376 void *YYPARSE_PARAM;
3378 #else /* ! YYPARSE_PARAM */
3379 #if (defined __STDC__ || defined __C99__FUNC__ \
3380 || defined __cplusplus || defined _MSC_VER)
3393 /* Number of tokens to shift before error messages enabled. */
3396 /* The stacks and their tools:
3397 `yyss': related to states.
3398 `yyvs': related to semantic values.
3400 Refer to the stacks thru separate pointers, to allow yyoverflow
3401 to reallocate them elsewhere. */
3403 /* The state stack. */
3404 yytype_int16 yyssa[YYINITDEPTH];
3406 yytype_int16 *yyssp;
3408 /* The semantic value stack. */
3409 YYSTYPE yyvsa[YYINITDEPTH];
3413 YYSIZE_T yystacksize;
3417 /* Lookahead token as an internal (translated) token number. */
3419 /* The variables used to return semantic value and location from the
3424 /* Buffer for error messages, and its allocated size. */
3426 char *yymsg = yymsgbuf;
3427 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3430 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3432 /* The number of symbols on the RHS of the reduced rule.
3433 Keep to zero when no symbol should be popped. */
3439 yystacksize = YYINITDEPTH;
3441 YYDPRINTF ((stderr, "Starting parse\n"));
3446 yychar = YYEMPTY; /* Cause a token to be read. */
3448 /* Initialize stack pointers.
3449 Waste one element of value and location stack
3450 so that they stay on the same level as the state stack.
3451 The wasted elements are never initialized. */
3457 /*------------------------------------------------------------.
3458 | yynewstate -- Push a new state, which is found in yystate. |
3459 `------------------------------------------------------------*/
3461 /* In all cases, when you get here, the value and location stacks
3462 have just been pushed. So pushing a state here evens the stacks. */
3468 if (yyss + yystacksize - 1 <= yyssp)
3470 /* Get the current used size of the three stacks, in elements. */
3471 YYSIZE_T yysize = yyssp - yyss + 1;
3475 /* Give user a chance to reallocate the stack. Use copies of
3476 these so that the &'s don't force the real ones into
3478 YYSTYPE *yyvs1 = yyvs;
3479 yytype_int16 *yyss1 = yyss;
3481 /* Each stack pointer address is followed by the size of the
3482 data in use in that stack, in bytes. This used to be a
3483 conditional around just the two extra args, but that might
3484 be undefined if yyoverflow is a macro. */
3485 yyoverflow (YY_("memory exhausted"),
3486 &yyss1, yysize * sizeof (*yyssp),
3487 &yyvs1, yysize * sizeof (*yyvsp),
3493 #else /* no yyoverflow */
3494 # ifndef YYSTACK_RELOCATE
3495 goto yyexhaustedlab;
3497 /* Extend the stack our own way. */
3498 if (YYMAXDEPTH <= yystacksize)
3499 goto yyexhaustedlab;
3501 if (YYMAXDEPTH < yystacksize)
3502 yystacksize = YYMAXDEPTH;
3505 yytype_int16 *yyss1 = yyss;
3506 union yyalloc *yyptr =
3507 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3509 goto yyexhaustedlab;
3510 YYSTACK_RELOCATE (yyss_alloc, yyss);
3511 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3512 # undef YYSTACK_RELOCATE
3514 YYSTACK_FREE (yyss1);
3517 #endif /* no yyoverflow */
3519 yyssp = yyss + yysize - 1;
3520 yyvsp = yyvs + yysize - 1;
3522 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3523 (unsigned long int) yystacksize));
3525 if (yyss + yystacksize - 1 <= yyssp)
3529 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3531 if (yystate == YYFINAL)
3541 /* Do appropriate processing given the current state. Read a
3542 lookahead token if we need one and don't already have one. */
3544 /* First try to decide what to do without reference to lookahead token. */
3545 yyn = yypact[yystate];
3546 if (yyn == YYPACT_NINF)
3549 /* Not known => get a lookahead token if don't already have one. */
3551 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3552 if (yychar == YYEMPTY)
3554 YYDPRINTF ((stderr, "Reading a token: "));
3558 if (yychar <= YYEOF)
3560 yychar = yytoken = YYEOF;
3561 YYDPRINTF ((stderr, "Now at end of input.\n"));
3565 yytoken = YYTRANSLATE (yychar);
3566 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3569 /* If the proper action on seeing token YYTOKEN is to reduce or to
3570 detect an error, take that action. */
3572 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3577 if (yyn == 0 || yyn == YYTABLE_NINF)
3583 /* Count tokens shifted since error; after three, turn off error
3588 /* Shift the lookahead token. */
3589 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3591 /* Discard the shifted token. */
3600 /*-----------------------------------------------------------.
3601 | yydefault -- do the default action for the current state. |
3602 `-----------------------------------------------------------*/
3604 yyn = yydefact[yystate];
3610 /*-----------------------------.
3611 | yyreduce -- Do a reduction. |
3612 `-----------------------------*/
3614 /* yyn is the number of a rule to reduce with. */
3617 /* If YYLEN is nonzero, implement the default value of the action:
3620 Otherwise, the following line sets YYVAL to garbage.
3621 This behavior is undocumented and Bison
3622 users should not rely upon it. Assigning to YYVAL
3623 unconditionally makes the parser a bit smaller, and it avoids a
3624 GCC warning that YYVAL may be used uninitialized. */
3625 yyval = yyvsp[1-yylen];
3628 YY_REDUCE_PRINT (yyn);
3635 /* Line 1464 of skeleton.m4 */
3636 #line 1542 "parser.y"
3637 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3646 /* Line 1464 of skeleton.m4 */
3647 #line 1543 "parser.y"
3648 {(yyval.code)=code_new();}
3657 /* Line 1464 of skeleton.m4 */
3658 #line 1545 "parser.y"
3659 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
3668 /* Line 1464 of skeleton.m4 */
3669 #line 1546 "parser.y"
3670 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3679 /* Line 1464 of skeleton.m4 */
3680 #line 1561 "parser.y"
3690 /* Line 1464 of skeleton.m4 */
3691 #line 1569 "parser.y"
3692 {/*TODO*/(yyval.code)=0;}
3701 /* Line 1464 of skeleton.m4 */
3702 #line 1570 "parser.y"
3703 {/*TODO*/(yyval.code)=0;}
3712 /* Line 1464 of skeleton.m4 */
3713 #line 1572 "parser.y"
3714 {(yyval.code)=(yyvsp[(2) - (3)].code);}
3723 /* Line 1464 of skeleton.m4 */
3724 #line 1573 "parser.y"
3734 /* Line 1464 of skeleton.m4 */
3735 #line 1574 "parser.y"
3736 {(yyval.code)=(yyvsp[(1) - (2)].code);}
3745 /* Line 1464 of skeleton.m4 */
3746 #line 1575 "parser.y"
3747 {(yyval.code)=(yyvsp[(1) - (1)].code);}
3756 /* Line 1464 of skeleton.m4 */
3757 #line 1579 "parser.y"
3759 code_t**cc = &global->init->method->body->code;
3760 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
3770 /* Line 1464 of skeleton.m4 */
3771 #line 1586 "parser.y"
3772 {(yyval.value)=(yyvsp[(2) - (2)].value);}
3781 /* Line 1464 of skeleton.m4 */
3782 #line 1587 "parser.y"
3783 {(yyval.value).c=abc_pushundefined(0);
3784 (yyval.value).t=TYPE_ANY;
3794 /* Line 1464 of skeleton.m4 */
3795 #line 1591 "parser.y"
3796 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3805 /* Line 1464 of skeleton.m4 */
3806 #line 1592 "parser.y"
3807 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3816 /* Line 1464 of skeleton.m4 */
3817 #line 1594 "parser.y"
3818 {(yyval.code) = (yyvsp[(1) - (1)].code);}
3827 /* Line 1464 of skeleton.m4 */
3828 #line 1595 "parser.y"
3829 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
3838 /* Line 1464 of skeleton.m4 */
3839 #line 1598 "parser.y"
3841 if(variable_exists((yyvsp[(1) - (3)].id)))
3842 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3844 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3845 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
3846 (yyvsp[(2) - (3)].classinfo)->name);
3849 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3851 if((yyvsp[(2) - (3)].classinfo)) {
3852 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3853 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3854 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3855 (yyval.code) = abc_setlocal((yyval.code), index);
3857 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3858 (yyval.code) = abc_setlocal((yyval.code), index);
3861 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3862 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3863 (yyval.code) = abc_coerce_a((yyval.code));
3864 (yyval.code) = abc_setlocal((yyval.code), index);
3866 (yyval.code) = code_new();
3870 /* that's the default for a local register, anyway
3872 state->method->initcode = abc_pushundefined(state->method->initcode);
3873 state->method->initcode = abc_setlocal(state->method->initcode, index);
3875 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3885 /* Line 1464 of skeleton.m4 */
3886 #line 1638 "parser.y"
3887 {(yyval.code) = code_new();}
3896 /* Line 1464 of skeleton.m4 */
3897 #line 1639 "parser.y"
3898 {(yyval.code)=(yyvsp[(2) - (2)].code);}
3907 /* Line 1464 of skeleton.m4 */
3908 #line 1642 "parser.y"
3918 /* Line 1464 of skeleton.m4 */
3919 #line 1642 "parser.y"
3922 (yyval.code) = code_new();
3923 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3924 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3926 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3927 if((yyvsp[(7) - (7)].code)) {
3928 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3930 myif->branch = (yyval.code) = abc_nop((yyval.code));
3931 if((yyvsp[(7) - (7)].code)) {
3932 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3933 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3935 (yyval.code) = var_block((yyval.code));
3946 /* Line 1464 of skeleton.m4 */
3947 #line 1661 "parser.y"
3948 {(yyval.code)=code_new();}
3957 /* Line 1464 of skeleton.m4 */
3958 #line 1666 "parser.y"
3960 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
3970 /* Line 1464 of skeleton.m4 */
3971 #line 1669 "parser.y"
3973 (yyval.id)=(yyvsp[(1) - (1)].id);
3983 /* Line 1464 of skeleton.m4 */
3984 #line 1673 "parser.y"
3985 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
3994 /* Line 1464 of skeleton.m4 */
3995 #line 1674 "parser.y"
3996 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4005 /* Line 1464 of skeleton.m4 */
4006 #line 1676 "parser.y"
4008 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4009 (yyval.code) = code_new();
4010 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4011 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4012 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4013 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4014 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4015 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4016 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4017 (yyval.code) = abc_jump((yyval.code), loopstart);
4018 code_t*out = (yyval.code) = abc_nop((yyval.code));
4019 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4020 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4023 (yyval.code) = var_block((yyval.code));
4034 /* Line 1464 of skeleton.m4 */
4035 #line 1696 "parser.y"
4037 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4038 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4039 int it = new_variable(tmp1name, TYPE_INT, 0);
4040 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4041 int array = new_variable(tmp1name, 0, 0);
4043 (yyval.code) = code_new();
4044 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4045 (yyval.code) = abc_coerce_a((yyval.code));
4046 (yyval.code) = abc_setlocal((yyval.code), array);
4047 (yyval.code) = abc_pushbyte((yyval.code), 0);
4048 (yyval.code) = abc_setlocal((yyval.code), it);
4050 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4052 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4053 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4054 (yyval.code) = abc_getlocal((yyval.code), array);
4055 (yyval.code) = abc_getlocal((yyval.code), it);
4056 if(!(yyvsp[(1) - (6)].for_start).each)
4057 (yyval.code) = abc_nextname((yyval.code));
4059 (yyval.code) = abc_nextvalue((yyval.code));
4060 (yyval.code) = converttype((yyval.code), 0, var->type);
4061 (yyval.code) = abc_setlocal((yyval.code), var->index);
4063 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4064 (yyval.code) = abc_jump((yyval.code), loopstart);
4066 code_t*out = (yyval.code) = abc_nop((yyval.code));
4067 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4068 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4072 (yyval.code) = var_block((yyval.code));
4086 /* Line 1464 of skeleton.m4 */
4087 #line 1739 "parser.y"
4097 /* Line 1464 of skeleton.m4 */
4098 #line 1739 "parser.y"
4101 (yyval.code) = code_new();
4103 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4104 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4105 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4106 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4107 myjmp->branch = cont;
4108 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4109 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4110 code_t*out = (yyval.code) = abc_nop((yyval.code));
4111 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4112 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4114 (yyval.code) = var_block((yyval.code));
4125 /* Line 1464 of skeleton.m4 */
4126 #line 1758 "parser.y"
4136 /* Line 1464 of skeleton.m4 */
4137 #line 1758 "parser.y"
4139 (yyval.code) = code_new();
4140 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4141 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4142 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4143 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4144 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4145 code_t*out = (yyval.code) = abc_nop((yyval.code));
4146 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4147 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4149 (yyval.code) = var_block((yyval.code));
4160 /* Line 1464 of skeleton.m4 */
4161 #line 1773 "parser.y"
4163 (yyval.code) = abc___break__(0, "");
4173 /* Line 1464 of skeleton.m4 */
4174 #line 1776 "parser.y"
4176 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4186 /* Line 1464 of skeleton.m4 */
4187 #line 1779 "parser.y"
4189 (yyval.code) = abc___continue__(0, "");
4199 /* Line 1464 of skeleton.m4 */
4200 #line 1782 "parser.y"
4202 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4212 /* Line 1464 of skeleton.m4 */
4213 #line 1786 "parser.y"
4223 /* Line 1464 of skeleton.m4 */
4224 #line 1787 "parser.y"
4225 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4234 /* Line 1464 of skeleton.m4 */
4235 #line 1788 "parser.y"
4236 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4245 /* Line 1464 of skeleton.m4 */
4246 #line 1789 "parser.y"
4247 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4256 /* Line 1464 of skeleton.m4 */
4257 #line 1790 "parser.y"
4258 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4267 /* Line 1464 of skeleton.m4 */
4268 #line 1791 "parser.y"
4269 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4278 /* Line 1464 of skeleton.m4 */
4279 #line 1793 "parser.y"
4281 (yyval.code) = abc_dup(0);
4282 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4283 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4284 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4285 if((yyval.code)->opcode != OPCODE___BREAK__) {
4286 (yyval.code) = abc___fallthrough__((yyval.code), "");
4288 code_t*e = (yyval.code) = abc_nop((yyval.code));
4299 /* Line 1464 of skeleton.m4 */
4300 #line 1804 "parser.y"
4302 (yyval.code) = (yyvsp[(3) - (3)].code);
4312 /* Line 1464 of skeleton.m4 */
4313 #line 1807 "parser.y"
4323 /* Line 1464 of skeleton.m4 */
4324 #line 1807 "parser.y"
4326 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4327 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4328 code_t*out = (yyval.code) = abc_pop((yyval.code));
4329 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4331 code_t*c = (yyval.code),*lastblock=0;
4333 if(c->opcode == OPCODE_IFNE) {
4334 if(!c->next) syntaxerror("internal error in fallthrough handling");
4336 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4338 c->opcode = OPCODE_JUMP;
4339 c->branch = lastblock;
4341 /* fall through end of switch */
4342 c->opcode = OPCODE_NOP;
4348 (yyval.code) = var_block((yyval.code));
4359 /* Line 1464 of skeleton.m4 */
4360 #line 1836 "parser.y"
4361 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4370 /* Line 1464 of skeleton.m4 */
4371 #line 1837 "parser.y"
4373 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4374 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4376 NEW(abc_exception_t, e)
4377 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4378 e->var_name = multiname_clone(&name);
4379 (yyval.exception) = e;
4382 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4383 e->target = c = abc_nop(0);
4384 c = abc_setlocal(c, i);
4385 c = code_append(c, (yyvsp[(8) - (9)].code));
4399 /* Line 1464 of skeleton.m4 */
4400 #line 1856 "parser.y"
4401 {new_state();state->exception_name=0;}
4410 /* Line 1464 of skeleton.m4 */
4411 #line 1856 "parser.y"
4413 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4414 if(!(yyvsp[(4) - (5)].code)) {
4415 (yyval.exception)=0;
4418 NEW(abc_exception_t, e)
4419 e->exc_type = 0; //all exceptions
4420 e->var_name = 0; //no name
4423 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4425 (yyval.exception) = e;
4436 /* Line 1464 of skeleton.m4 */
4437 #line 1873 "parser.y"
4438 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4447 /* Line 1464 of skeleton.m4 */
4448 #line 1874 "parser.y"
4449 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4458 /* Line 1464 of skeleton.m4 */
4459 #line 1875 "parser.y"
4460 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4469 /* Line 1464 of skeleton.m4 */
4470 #line 1876 "parser.y"
4472 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4473 (yyval.catch_list).finally = 0;
4474 if((yyvsp[(2) - (2)].exception)) {
4475 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4476 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4487 /* Line 1464 of skeleton.m4 */
4488 #line 1884 "parser.y"
4490 (yyval.catch_list).l=list_new();
4491 (yyval.catch_list).finally = 0;
4492 if((yyvsp[(1) - (1)].exception)) {
4493 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4494 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4505 /* Line 1464 of skeleton.m4 */
4506 #line 1893 "parser.y"
4516 /* Line 1464 of skeleton.m4 */
4517 #line 1893 "parser.y"
4519 code_t*out = abc_nop(0);
4521 code_t*start = abc_nop(0);
4522 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4523 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4524 (yyval.code) = abc_jump((yyval.code), out);
4526 code_t*end = (yyval.code) = abc_nop((yyval.code));
4529 if((yyvsp[(6) - (6)].catch_list).finally)
4530 tmp = new_variable("__finally__", 0, 0);
4532 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4535 abc_exception_t*e = l->abc_exception;
4537 (yyval.code) = code_append((yyval.code), e->target);
4538 (yyval.code) = abc_jump((yyval.code), out);
4540 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4542 e->target = (yyval.code) = abc_nop((yyval.code));
4543 (yyval.code) = abc___rethrow__((yyval.code));
4551 (yyval.code) = code_append((yyval.code), out);
4553 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4555 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4557 (yyval.code) = var_block((yyval.code));
4568 /* Line 1464 of skeleton.m4 */
4569 #line 1938 "parser.y"
4571 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4572 (yyval.code)=abc_throw((yyval.code));
4582 /* Line 1464 of skeleton.m4 */
4583 #line 1942 "parser.y"
4585 if(!state->exception_name)
4586 syntaxerror("re-throw only possible within a catch block");
4587 variable_t*v = find_variable(state->exception_name);
4588 (yyval.code)=code_new();
4589 (yyval.code)=abc_getlocal((yyval.code), v->index);
4590 (yyval.code)=abc_throw((yyval.code));
4600 /* Line 1464 of skeleton.m4 */
4601 #line 1953 "parser.y"
4603 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4604 (yyval.code) = abc_pushscope((yyval.code));
4605 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4606 (yyval.code) = abc_popscope((yyval.code));
4616 /* Line 1464 of skeleton.m4 */
4617 #line 1963 "parser.y"
4618 {PASS12 (yyval.id)="package";}
4627 /* Line 1464 of skeleton.m4 */
4628 #line 1965 "parser.y"
4629 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
4638 /* Line 1464 of skeleton.m4 */
4639 #line 1966 "parser.y"
4640 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
4649 /* Line 1464 of skeleton.m4 */
4650 #line 1968 "parser.y"
4651 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
4660 /* Line 1464 of skeleton.m4 */
4661 #line 1969 "parser.y"
4662 {PASS12 endpackage();(yyval.code)=0;}
4671 /* Line 1464 of skeleton.m4 */
4672 #line 1970 "parser.y"
4673 {PASS12 startpackage("");}
4682 /* Line 1464 of skeleton.m4 */
4683 #line 1971 "parser.y"
4684 {PASS12 endpackage();(yyval.code)=0;}
4693 /* Line 1464 of skeleton.m4 */
4694 #line 1973 "parser.y"
4696 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4698 syntaxerror("Couldn't import class\n");
4699 state_has_imports();
4700 dict_put(state->imports, c->name, c);
4711 /* Line 1464 of skeleton.m4 */
4712 #line 1981 "parser.y"
4715 i->package = (yyvsp[(2) - (4)].id);
4716 state_has_imports();
4717 list_append(state->wildcard_imports, i);
4728 /* Line 1464 of skeleton.m4 */
4729 #line 1991 "parser.y"
4730 {PASS12 (yyval.flags)=0;}
4739 /* Line 1464 of skeleton.m4 */
4740 #line 1992 "parser.y"
4741 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
4750 /* Line 1464 of skeleton.m4 */
4751 #line 1993 "parser.y"
4752 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
4761 /* Line 1464 of skeleton.m4 */
4762 #line 1994 "parser.y"
4763 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
4772 /* Line 1464 of skeleton.m4 */
4773 #line 1996 "parser.y"
4774 {PASS12 (yyval.token)=FLAG_PUBLIC;}
4783 /* Line 1464 of skeleton.m4 */
4784 #line 1997 "parser.y"
4785 {PASS12 (yyval.token)=FLAG_PRIVATE;}
4794 /* Line 1464 of skeleton.m4 */
4795 #line 1998 "parser.y"
4796 {PASS12 (yyval.token)=FLAG_PROTECTED;}
4805 /* Line 1464 of skeleton.m4 */
4806 #line 1999 "parser.y"
4807 {PASS12 (yyval.token)=FLAG_STATIC;}
4816 /* Line 1464 of skeleton.m4 */
4817 #line 2000 "parser.y"
4818 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
4827 /* Line 1464 of skeleton.m4 */
4828 #line 2001 "parser.y"
4829 {PASS12 (yyval.token)=FLAG_FINAL;}
4838 /* Line 1464 of skeleton.m4 */
4839 #line 2002 "parser.y"
4840 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
4849 /* Line 1464 of skeleton.m4 */
4850 #line 2003 "parser.y"
4851 {PASS12 (yyval.token)=FLAG_NATIVE;}
4860 /* Line 1464 of skeleton.m4 */
4861 #line 2004 "parser.y"
4862 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
4871 /* Line 1464 of skeleton.m4 */
4872 #line 2006 "parser.y"
4873 {(yyval.classinfo)=registry_getobjectclass();}
4882 /* Line 1464 of skeleton.m4 */
4883 #line 2007 "parser.y"
4884 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
4893 /* Line 1464 of skeleton.m4 */
4894 #line 2009 "parser.y"
4895 {(yyval.classinfo_list)=list_new();}
4904 /* Line 1464 of skeleton.m4 */
4905 #line 2010 "parser.y"
4906 {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4915 /* Line 1464 of skeleton.m4 */
4916 #line 2012 "parser.y"
4917 {PASS12 (yyval.classinfo_list)=list_new();}
4926 /* Line 1464 of skeleton.m4 */
4927 #line 2013 "parser.y"
4928 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
4937 /* Line 1464 of skeleton.m4 */
4938 #line 2017 "parser.y"
4939 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
4948 /* Line 1464 of skeleton.m4 */
4949 #line 2019 "parser.y"
4950 {PASS12 endclass();(yyval.code)=0;}
4959 /* Line 1464 of skeleton.m4 */
4960 #line 2023 "parser.y"
4961 {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
4970 /* Line 1464 of skeleton.m4 */
4971 #line 2025 "parser.y"
4972 {PASS12 endclass();(yyval.code)=0;}
4981 /* Line 1464 of skeleton.m4 */
4982 #line 2037 "parser.y"
4984 code_t*c = state->cls->static_init;
4985 c = code_append(c, (yyvsp[(1) - (1)].code));
4986 state->cls->static_init = c;
4996 /* Line 1464 of skeleton.m4 */
4997 #line 2048 "parser.y"
4999 syntaxerror("variable declarations not allowed in interfaces");
5009 /* Line 1464 of skeleton.m4 */
5010 #line 2051 "parser.y"
5013 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5014 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5015 syntaxerror("invalid method modifiers: interface methods always need to be public");
5017 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5018 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5028 /* Line 1464 of skeleton.m4 */
5029 #line 2065 "parser.y"
5031 int flags = (yyvsp[(1) - (5)].flags);
5032 memberinfo_t* info = state->cls?
5033 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
5034 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
5036 info->type = (yyvsp[(4) - (5)].classinfo);
5037 info->flags = flags;
5040 namespace_t mname_ns = {flags2access(flags), ""};
5041 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
5043 trait_list_t**traits;
5047 traits = &global->init->traits;
5048 code = &global->init->method->body->code;
5049 } else if(flags&FLAG_STATIC) {
5051 traits = &state->cls->abc->static_traits;
5052 code = &state->cls->static_init;
5054 // instance variable
5055 traits = &state->cls->abc->traits;
5056 code = &state->cls->init;
5060 if((yyvsp[(4) - (5)].classinfo)) {
5061 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
5062 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5064 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5066 info->slot = t->slot_id;
5068 /* initalization code (if needed) */
5070 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
5071 c = abc_getlocal_0(c);
5072 c = code_append(c, (yyvsp[(5) - (5)].value).c);
5073 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
5074 c = abc_setslot(c, t->slot_id);
5077 *code = code_append(*code, c);
5079 if((yyvsp[(2) - (5)].token)==KW_CONST) {
5080 t->kind= TRAIT_CONST;
5093 /* Line 1464 of skeleton.m4 */
5094 #line 2123 "parser.y"
5095 {(yyval.constant)=0;}
5104 /* Line 1464 of skeleton.m4 */
5105 #line 2124 "parser.y"
5106 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5115 /* Line 1464 of skeleton.m4 */
5116 #line 2126 "parser.y"
5117 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5126 /* Line 1464 of skeleton.m4 */
5127 #line 2127 "parser.y"
5128 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2128 "parser.y"
5139 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5148 /* Line 1464 of skeleton.m4 */
5149 #line 2129 "parser.y"
5150 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5159 /* Line 1464 of skeleton.m4 */
5160 #line 2130 "parser.y"
5161 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);}
5170 /* Line 1464 of skeleton.m4 */
5171 #line 2132 "parser.y"
5172 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5181 /* Line 1464 of skeleton.m4 */
5182 #line 2133 "parser.y"
5183 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5192 /* Line 1464 of skeleton.m4 */
5193 #line 2134 "parser.y"
5194 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5203 /* Line 1464 of skeleton.m4 */
5204 #line 2139 "parser.y"
5206 memset(&(yyval.params),0,sizeof((yyval.params)));
5216 /* Line 1464 of skeleton.m4 */
5217 #line 2142 "parser.y"
5219 (yyval.params)=(yyvsp[(1) - (1)].params);
5229 /* Line 1464 of skeleton.m4 */
5230 #line 2147 "parser.y"
5232 memset(&(yyval.params),0,sizeof((yyval.params)));
5233 (yyval.params).varargs=1;
5234 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5244 /* Line 1464 of skeleton.m4 */
5245 #line 2152 "parser.y"
5247 (yyval.params) =(yyvsp[(1) - (4)].params);
5248 (yyval.params).varargs=1;
5249 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5259 /* Line 1464 of skeleton.m4 */
5260 #line 2159 "parser.y"
5262 (yyval.params) = (yyvsp[(1) - (3)].params);
5263 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5273 /* Line 1464 of skeleton.m4 */
5274 #line 2163 "parser.y"
5276 memset(&(yyval.params),0,sizeof((yyval.params)));
5277 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5287 /* Line 1464 of skeleton.m4 */
5288 #line 2168 "parser.y"
5290 (yyval.param) = malloc(sizeof(param_t));
5291 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5292 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5293 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5303 /* Line 1464 of skeleton.m4 */
5304 #line 2174 "parser.y"
5306 (yyval.param) = malloc(sizeof(param_t));
5307 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5308 (yyval.param)->type = TYPE_ANY;
5309 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5319 /* Line 1464 of skeleton.m4 */
5320 #line 2180 "parser.y"
5321 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5330 /* Line 1464 of skeleton.m4 */
5331 #line 2181 "parser.y"
5332 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5341 /* Line 1464 of skeleton.m4 */
5342 #line 2182 "parser.y"
5352 /* Line 1464 of skeleton.m4 */
5353 #line 2185 "parser.y"
5354 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5363 /* Line 1464 of skeleton.m4 */
5364 #line 2186 "parser.y"
5369 if(state->method->late_binding) {
5370 c = abc_getlocal_0(c);
5371 c = abc_pushscope(c);
5373 if(state->method->is_constructor && !state->method->has_super) {
5374 // call default constructor
5375 c = abc_getlocal_0(c);
5376 c = abc_constructsuper(c, 0);
5378 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5380 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5391 /* Line 1464 of skeleton.m4 */
5392 #line 2206 "parser.y"
5402 /* Line 1464 of skeleton.m4 */
5403 #line 2208 "parser.y"
5405 syntaxerror("nested functions not supported yet");
5415 /* Line 1464 of skeleton.m4 */
5416 #line 2215 "parser.y"
5418 PASS1 (yyval.classinfo)=0;
5420 /* try current package */
5421 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
5422 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
5432 /* Line 1464 of skeleton.m4 */
5433 #line 2223 "parser.y"
5435 PASS1 (yyval.classinfo)=0;
5437 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5438 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5439 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5449 /* Line 1464 of skeleton.m4 */
5450 #line 2234 "parser.y"
5451 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5460 /* Line 1464 of skeleton.m4 */
5461 #line 2235 "parser.y"
5462 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5471 /* Line 1464 of skeleton.m4 */
5472 #line 2237 "parser.y"
5473 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5482 /* Line 1464 of skeleton.m4 */
5483 #line 2238 "parser.y"
5484 {(yyval.classinfo)=registry_getanytype();}
5493 /* Line 1464 of skeleton.m4 */
5494 #line 2239 "parser.y"
5495 {(yyval.classinfo)=registry_getanytype();}
5504 /* Line 1464 of skeleton.m4 */
5505 #line 2248 "parser.y"
5506 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5515 /* Line 1464 of skeleton.m4 */
5516 #line 2249 "parser.y"
5517 {(yyval.classinfo)=0;}
5526 /* Line 1464 of skeleton.m4 */
5527 #line 2253 "parser.y"
5528 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5537 /* Line 1464 of skeleton.m4 */
5538 #line 2254 "parser.y"
5539 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
5548 /* Line 1464 of skeleton.m4 */
5549 #line 2256 "parser.y"
5550 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5559 /* Line 1464 of skeleton.m4 */
5560 #line 2258 "parser.y"
5561 {(yyval.value_list).len=1;
5562 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
5572 /* Line 1464 of skeleton.m4 */
5573 #line 2261 "parser.y"
5575 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
5576 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
5586 /* Line 1464 of skeleton.m4 */
5587 #line 2266 "parser.y"
5589 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5590 (yyval.value).c = code_new();
5592 if((yyvsp[(2) - (3)].classinfo)->slot) {
5593 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5594 (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5596 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5599 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5601 if((yyvsp[(2) - (3)].classinfo)->slot)
5602 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5604 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5605 (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5615 /* Line 1464 of skeleton.m4 */
5616 #line 2290 "parser.y"
5619 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5620 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5621 (yyval.value).c = code_cutlast((yyval.value).c);
5623 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5625 (yyval.value).t = TYPE_ANY;
5626 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5627 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5628 (yyval.value).c = code_cutlast((yyval.value).c);
5629 (yyval.value).c = code_append((yyval.value).c, paramcode);
5630 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5631 multiname_destroy(name);
5632 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5633 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5634 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5635 if(t->kind!=TRAIT_METHOD) {
5636 //ok: flash allows to assign closures to members.
5638 multiname_t*name = t->name;
5639 (yyval.value).c = code_cutlast((yyval.value).c);
5640 (yyval.value).c = code_append((yyval.value).c, paramcode);
5641 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5642 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5643 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5644 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5645 (yyval.value).c = code_cutlast((yyval.value).c);
5646 (yyval.value).c = code_append((yyval.value).c, paramcode);
5647 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5648 multiname_destroy(name);
5650 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5651 (yyval.value).c = code_append((yyval.value).c, paramcode);
5652 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5657 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5658 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5660 (yyval.value).c = abc_coerce_a((yyval.value).c);
5661 (yyval.value).t = TYPE_ANY;
5673 /* Line 1464 of skeleton.m4 */
5674 #line 2338 "parser.y"
5676 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5677 if(!state->method) syntaxerror("super() not allowed outside of a function");
5678 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5680 (yyval.value).c = code_new();
5681 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5683 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5685 this is dependent on the control path, check this somewhere else
5686 if(state->method->has_super)
5687 syntaxerror("constructor may call super() only once");
5689 state->method->has_super = 1;
5690 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5691 (yyval.value).c = abc_pushundefined((yyval.value).c);
5692 (yyval.value).t = TYPE_ANY;
5702 /* Line 1464 of skeleton.m4 */
5703 #line 2358 "parser.y"
5705 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5706 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5707 (yyval.value).c = code_cutlast((yyval.value).c);
5709 multiname_t*name = 0;
5710 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5711 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5712 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5713 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5714 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5715 (yyval.value).c = code_cutlast((yyval.value).c);
5716 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5718 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5719 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5720 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5722 (yyval.value).t = TYPE_BOOLEAN;
5732 /* Line 1464 of skeleton.m4 */
5733 #line 2379 "parser.y"
5735 (yyval.code) = abc_returnvoid(0);
5745 /* Line 1464 of skeleton.m4 */
5746 #line 2382 "parser.y"
5748 (yyval.code) = (yyvsp[(2) - (2)].value).c;
5749 (yyval.code) = abc_returnvalue((yyval.code));
5759 /* Line 1464 of skeleton.m4 */
5760 #line 2389 "parser.y"
5761 {(yyval.value)=(yyvsp[(1) - (1)].value);}
5770 /* Line 1464 of skeleton.m4 */
5771 #line 2390 "parser.y"
5772 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5781 /* Line 1464 of skeleton.m4 */
5782 #line 2391 "parser.y"
5784 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5785 (yyval.value).c = cut_last_push((yyval.value).c);
5786 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5787 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5797 /* Line 1464 of skeleton.m4 */
5798 #line 2397 "parser.y"
5800 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5810 /* Line 1464 of skeleton.m4 */
5811 #line 2403 "parser.y"
5812 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5821 /* Line 1464 of skeleton.m4 */
5822 #line 2407 "parser.y"
5823 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5832 /* Line 1464 of skeleton.m4 */
5833 #line 2409 "parser.y"
5834 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5843 /* Line 1464 of skeleton.m4 */
5844 #line 2411 "parser.y"
5845 {(yyval.value) = (yyvsp[(1) - (1)].value);}
5854 /* Line 1464 of skeleton.m4 */
5855 #line 2413 "parser.y"
5857 (yyval.value).c = 0;
5858 namespace_t ns = {ACCESS_PACKAGE, ""};
5859 multiname_t m = {QNAME, &ns, 0, "RegExp"};
5860 if(!(yyvsp[(1) - (1)].regexp).options) {
5861 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5862 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5863 (yyval.value).c = abc_construct((yyval.value).c, 1);
5865 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5866 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5867 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5868 (yyval.value).c = abc_construct((yyval.value).c, 2);
5870 (yyval.value).t = TYPE_REGEXP;
5880 /* Line 1464 of skeleton.m4 */
5881 #line 2430 "parser.y"
5882 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5883 //MULTINAME(m, registry_getintclass());
5884 //$$.c = abc_coerce2($$.c, &m); // FIXME
5885 (yyval.value).t = TYPE_INT;
5895 /* Line 1464 of skeleton.m4 */
5896 #line 2435 "parser.y"
5897 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5898 (yyval.value).t = TYPE_INT;
5908 /* Line 1464 of skeleton.m4 */
5909 #line 2438 "parser.y"
5910 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5911 (yyval.value).t = TYPE_INT;
5921 /* Line 1464 of skeleton.m4 */
5922 #line 2441 "parser.y"
5923 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5924 (yyval.value).t = TYPE_UINT;
5934 /* Line 1464 of skeleton.m4 */
5935 #line 2444 "parser.y"
5936 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
5937 (yyval.value).t = TYPE_FLOAT;
5947 /* Line 1464 of skeleton.m4 */
5948 #line 2447 "parser.y"
5949 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
5950 (yyval.value).t = TYPE_STRING;
5960 /* Line 1464 of skeleton.m4 */
5961 #line 2450 "parser.y"
5962 {(yyval.value).c = abc_pushundefined(0);
5963 (yyval.value).t = TYPE_ANY;
5973 /* Line 1464 of skeleton.m4 */
5974 #line 2453 "parser.y"
5975 {(yyval.value).c = abc_pushtrue(0);
5976 (yyval.value).t = TYPE_BOOLEAN;
5986 /* Line 1464 of skeleton.m4 */
5987 #line 2456 "parser.y"
5988 {(yyval.value).c = abc_pushfalse(0);
5989 (yyval.value).t = TYPE_BOOLEAN;
5999 /* Line 1464 of skeleton.m4 */
6000 #line 2459 "parser.y"
6001 {(yyval.value).c = abc_pushnull(0);
6002 (yyval.value).t = TYPE_NULL;
6012 /* Line 1464 of skeleton.m4 */
6013 #line 2464 "parser.y"
6014 {(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);
6015 (yyval.value).t = TYPE_BOOLEAN;
6025 /* Line 1464 of skeleton.m4 */
6026 #line 2467 "parser.y"
6027 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6028 (yyval.value).t = TYPE_BOOLEAN;
6038 /* Line 1464 of skeleton.m4 */
6039 #line 2470 "parser.y"
6040 {(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);
6041 (yyval.value).t = TYPE_BOOLEAN;
6051 /* Line 1464 of skeleton.m4 */
6052 #line 2473 "parser.y"
6053 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6054 (yyval.value).t = TYPE_BOOLEAN;
6064 /* Line 1464 of skeleton.m4 */
6065 #line 2476 "parser.y"
6066 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6067 (yyval.value).t = TYPE_BOOLEAN;
6077 /* Line 1464 of skeleton.m4 */
6078 #line 2479 "parser.y"
6079 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6080 (yyval.value).t = TYPE_BOOLEAN;
6090 /* Line 1464 of skeleton.m4 */
6091 #line 2482 "parser.y"
6092 {(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);
6093 (yyval.value).t = TYPE_BOOLEAN;
6103 /* Line 1464 of skeleton.m4 */
6104 #line 2485 "parser.y"
6105 {(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);
6106 (yyval.value).t = TYPE_BOOLEAN;
6116 /* Line 1464 of skeleton.m4 */
6117 #line 2489 "parser.y"
6118 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6119 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6120 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6121 (yyval.value).c = abc_dup((yyval.value).c);
6122 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6123 (yyval.value).c = cut_last_push((yyval.value).c);
6124 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6125 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6126 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6127 jmp->branch = label;
6137 /* Line 1464 of skeleton.m4 */
6138 #line 2500 "parser.y"
6140 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6141 /*printf("%08x:\n",$1.t);
6142 code_dump($1.c, 0, 0, "", stdout);
6143 printf("%08x:\n",$3.t);
6144 code_dump($3.c, 0, 0, "", stdout);
6145 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6146 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6147 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6148 (yyval.value).c = abc_dup((yyval.value).c);
6149 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6150 (yyval.value).c = cut_last_push((yyval.value).c);
6151 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6152 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6153 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6154 jmp->branch = label;
6164 /* Line 1464 of skeleton.m4 */
6165 #line 2518 "parser.y"
6166 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6167 (yyval.value).c = abc_not((yyval.value).c);
6168 (yyval.value).t = TYPE_BOOLEAN;
6178 /* Line 1464 of skeleton.m4 */
6179 #line 2523 "parser.y"
6180 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6181 (yyval.value).c = abc_bitnot((yyval.value).c);
6182 (yyval.value).t = TYPE_INT;
6192 /* Line 1464 of skeleton.m4 */
6193 #line 2528 "parser.y"
6194 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6195 (yyval.value).c = abc_bitand((yyval.value).c);
6196 (yyval.value).t = TYPE_INT;
6206 /* Line 1464 of skeleton.m4 */
6207 #line 2533 "parser.y"
6208 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6209 (yyval.value).c = abc_bitxor((yyval.value).c);
6210 (yyval.value).t = TYPE_INT;
6220 /* Line 1464 of skeleton.m4 */
6221 #line 2538 "parser.y"
6222 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6223 (yyval.value).c = abc_bitor((yyval.value).c);
6224 (yyval.value).t = TYPE_INT;
6234 /* Line 1464 of skeleton.m4 */
6235 #line 2543 "parser.y"
6236 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6237 (yyval.value).c = abc_rshift((yyval.value).c);
6238 (yyval.value).t = TYPE_INT;
6248 /* Line 1464 of skeleton.m4 */
6249 #line 2547 "parser.y"
6250 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6251 (yyval.value).c = abc_urshift((yyval.value).c);
6252 (yyval.value).t = TYPE_INT;
6262 /* Line 1464 of skeleton.m4 */
6263 #line 2551 "parser.y"
6264 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6265 (yyval.value).c = abc_lshift((yyval.value).c);
6266 (yyval.value).t = TYPE_INT;
6276 /* Line 1464 of skeleton.m4 */
6277 #line 2556 "parser.y"
6278 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6279 (yyval.value).c = abc_divide((yyval.value).c);
6280 (yyval.value).t = TYPE_NUMBER;
6290 /* Line 1464 of skeleton.m4 */
6291 #line 2560 "parser.y"
6292 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6293 (yyval.value).c = abc_modulo((yyval.value).c);
6294 (yyval.value).t = TYPE_NUMBER;
6304 /* Line 1464 of skeleton.m4 */
6305 #line 2564 "parser.y"
6306 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6307 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6308 (yyval.value).c = abc_add_i((yyval.value).c);
6309 (yyval.value).t = TYPE_INT;
6311 (yyval.value).c = abc_add((yyval.value).c);
6312 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6323 /* Line 1464 of skeleton.m4 */
6324 #line 2573 "parser.y"
6325 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6326 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6327 (yyval.value).c = abc_subtract_i((yyval.value).c);
6328 (yyval.value).t = TYPE_INT;
6330 (yyval.value).c = abc_subtract((yyval.value).c);
6331 (yyval.value).t = TYPE_NUMBER;
6342 /* Line 1464 of skeleton.m4 */
6343 #line 2582 "parser.y"
6344 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6345 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6346 (yyval.value).c = abc_multiply_i((yyval.value).c);
6347 (yyval.value).t = TYPE_INT;
6349 (yyval.value).c = abc_multiply((yyval.value).c);
6350 (yyval.value).t = TYPE_NUMBER;
6361 /* Line 1464 of skeleton.m4 */
6362 #line 2592 "parser.y"
6363 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6364 (yyval.value).c = abc_in((yyval.value).c);
6365 (yyval.value).t = TYPE_BOOLEAN;
6375 /* Line 1464 of skeleton.m4 */
6376 #line 2597 "parser.y"
6377 {char use_astype=0; // flash player's astype works differently than astypelate
6378 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
6379 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
6380 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6381 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
6383 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6384 (yyval.value).c = abc_astypelate((yyval.value).c);
6385 (yyval.value).t = TYPE_ANY;
6396 /* Line 1464 of skeleton.m4 */
6397 #line 2610 "parser.y"
6398 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6399 (yyval.value).c = abc_instanceof((yyval.value).c);
6400 (yyval.value).t = TYPE_BOOLEAN;
6410 /* Line 1464 of skeleton.m4 */
6411 #line 2615 "parser.y"
6412 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6413 (yyval.value).c = abc_istypelate((yyval.value).c);
6414 (yyval.value).t = TYPE_BOOLEAN;
6424 /* Line 1464 of skeleton.m4 */
6425 #line 2620 "parser.y"
6427 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6428 (yyval.value).c = abc_typeof((yyval.value).c);
6429 (yyval.value).t = TYPE_STRING;
6439 /* Line 1464 of skeleton.m4 */
6440 #line 2626 "parser.y"
6442 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6443 (yyval.value).c = abc_pushundefined((yyval.value).c);
6444 (yyval.value).t = TYPE_ANY;
6454 /* Line 1464 of skeleton.m4 */
6455 #line 2632 "parser.y"
6456 { (yyval.value).c = abc_pushundefined(0);
6457 (yyval.value).t = TYPE_ANY;
6467 /* Line 1464 of skeleton.m4 */
6468 #line 2636 "parser.y"
6469 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6478 /* Line 1464 of skeleton.m4 */
6479 #line 2638 "parser.y"
6481 (yyval.value)=(yyvsp[(2) - (2)].value);
6482 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6483 (yyval.value).c=abc_negate_i((yyval.value).c);
6484 (yyval.value).t = TYPE_INT;
6486 (yyval.value).c=abc_negate((yyval.value).c);
6487 (yyval.value).t = TYPE_NUMBER;
6498 /* Line 1464 of skeleton.m4 */
6499 #line 2649 "parser.y"
6501 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6502 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6504 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6505 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6506 (yyval.value).t = 0; // array elements have unknown type
6516 /* Line 1464 of skeleton.m4 */
6517 #line 2658 "parser.y"
6519 (yyval.value).c = code_new();
6520 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6521 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
6522 (yyval.value).t = registry_getarrayclass();
6532 /* Line 1464 of skeleton.m4 */
6533 #line 2665 "parser.y"
6534 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6543 /* Line 1464 of skeleton.m4 */
6544 #line 2666 "parser.y"
6545 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6554 /* Line 1464 of skeleton.m4 */
6555 #line 2668 "parser.y"
6557 (yyval.value_list).cc = 0;
6558 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6559 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6560 (yyval.value_list).len = 2;
6570 /* Line 1464 of skeleton.m4 */
6571 #line 2674 "parser.y"
6573 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6574 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
6575 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6576 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6586 /* Line 1464 of skeleton.m4 */
6587 #line 2683 "parser.y"
6589 (yyval.value).c = code_new();
6590 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
6591 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
6592 (yyval.value).t = registry_getobjectclass();
6602 /* Line 1464 of skeleton.m4 */
6603 #line 2690 "parser.y"
6605 code_t*c = (yyvsp[(3) - (3)].value).c;
6606 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6607 c=abc_multiply_i(c);
6611 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
6612 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6613 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6623 /* Line 1464 of skeleton.m4 */
6624 #line 2702 "parser.y"
6626 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
6627 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
6628 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6629 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6639 /* Line 1464 of skeleton.m4 */
6640 #line 2708 "parser.y"
6642 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
6643 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
6644 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6645 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6655 /* Line 1464 of skeleton.m4 */
6656 #line 2714 "parser.y"
6658 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
6659 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
6660 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6661 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6671 /* Line 1464 of skeleton.m4 */
6672 #line 2720 "parser.y"
6674 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
6675 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
6676 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6677 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6687 /* Line 1464 of skeleton.m4 */
6688 #line 2726 "parser.y"
6690 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
6691 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
6692 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6693 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6703 /* Line 1464 of skeleton.m4 */
6704 #line 2732 "parser.y"
6706 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
6707 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
6708 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6709 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6719 /* Line 1464 of skeleton.m4 */
6720 #line 2738 "parser.y"
6722 code_t*c = (yyvsp[(3) - (3)].value).c;
6724 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6728 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
6731 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6732 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6742 /* Line 1464 of skeleton.m4 */
6743 #line 2751 "parser.y"
6744 { code_t*c = (yyvsp[(3) - (3)].value).c;
6745 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
6746 c=abc_subtract_i(c);
6749 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
6752 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
6753 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6763 /* Line 1464 of skeleton.m4 */
6764 #line 2762 "parser.y"
6766 c = code_append(c, (yyvsp[(3) - (3)].value).c);
6767 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
6768 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
6769 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
6779 /* Line 1464 of skeleton.m4 */
6780 #line 2769 "parser.y"
6782 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
6783 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
6784 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6785 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
6786 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6787 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
6788 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
6789 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
6790 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
6791 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
6801 /* Line 1464 of skeleton.m4 */
6802 #line 2782 "parser.y"
6804 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6805 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6806 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
6807 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
6808 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
6809 (yyval.value).c = abc_getlocal(0, nr);
6810 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
6811 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
6812 (yyval.value).c = abc_getlocal(0, nr);
6813 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
6814 } else syntaxerror("internal error");
6816 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6817 c=abc_increment_i(c);
6823 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6824 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6825 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6836 /* Line 1464 of skeleton.m4 */
6837 #line 2809 "parser.y"
6839 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
6840 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6841 c=abc_decrement_i(c);
6847 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
6848 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
6849 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
6859 /* Line 1464 of skeleton.m4 */
6860 #line 2823 "parser.y"
6862 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6863 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6864 c=abc_increment_i(c);
6870 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6871 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6872 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6882 /* Line 1464 of skeleton.m4 */
6883 #line 2837 "parser.y"
6885 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
6886 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
6887 c=abc_decrement_i(c);
6893 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
6894 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
6895 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
6905 /* Line 1464 of skeleton.m4 */
6906 #line 2852 "parser.y"
6907 { if(!state->cls->info)
6908 syntaxerror("super keyword not allowed outside a class");
6909 classinfo_t*t = state->cls->info->superclass;
6910 if(!t) t = TYPE_OBJECT;
6912 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6913 namespace_t ns = flags2namespace(f->flags, "");
6914 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6915 (yyval.value).c = 0;
6916 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6917 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6918 (yyval.value).t = memberinfo_gettype(f);
6928 /* Line 1464 of skeleton.m4 */
6929 #line 2867 "parser.y"
6930 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
6931 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
6933 if(TYPE_IS_CLASS(t) && t->cls) {
6938 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6940 if(f && !is_static != !(f->flags&FLAG_STATIC))
6942 if(f && f->slot && !noslot) {
6943 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
6945 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6946 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6948 /* determine type */
6949 (yyval.value).t = memberinfo_gettype(f);
6950 if(!(yyval.value).t)
6951 (yyval.value).c = abc_coerce_a((yyval.value).c);
6953 /* when resolving a property on an unknown type, we do know the
6954 name of the property (and don't seem to need the package), but
6955 we need to make avm2 try out all access modes */
6956 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
6957 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6958 (yyval.value).c = abc_coerce_a((yyval.value).c);
6959 (yyval.value).t = registry_getanytype();
6970 /* Line 1464 of skeleton.m4 */
6971 #line 2900 "parser.y"
6973 (yyval.value).t = 0;
6974 (yyval.value).c = 0;
6979 /* look at variables */
6980 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
6981 // $1 is a local variable
6982 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
6983 (yyval.value).t = v->type;
6987 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
6989 /* look at current class' members */
6990 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
6991 (f->flags&FLAG_STATIC) >= i_am_static) {
6992 // $1 is a function in this class
6993 int var_is_static = (f->flags&FLAG_STATIC);
6995 if(f->kind == MEMBER_METHOD) {
6996 (yyval.value).t = TYPE_FUNCTION(f);
6998 (yyval.value).t = f->type;
7000 if(var_is_static && !i_am_static) {
7001 /* access to a static member from a non-static location.
7002 do this via findpropstrict:
7003 there doesn't seem to be any non-lookup way to access
7004 static properties of a class */
7005 state->method->late_binding = 1;
7006 (yyval.value).t = f->type;
7007 namespace_t ns = {flags2access(f->flags), ""};
7008 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7009 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7010 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7012 } else if(f->slot>0) {
7013 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7014 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7017 namespace_t ns = {flags2access(f->flags), ""};
7018 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7019 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7020 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7025 /* look at actual classes, in the current package and imported */
7026 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7027 if(a->flags & FLAG_METHOD) {
7029 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7030 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7031 if(a->function->kind == MEMBER_METHOD) {
7032 (yyval.value).t = TYPE_FUNCTION(a->function);
7034 (yyval.value).t = a->function->type;
7038 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7039 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
7042 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7044 (yyval.value).t = TYPE_CLASS(a);
7049 /* unknown object, let the avm2 resolve it */
7051 if(strcmp((yyvsp[(1) - (1)].id),"trace"))
7052 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7053 state->method->late_binding = 1;
7055 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7057 (yyval.value).t = 0;
7058 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7059 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7070 /* Line 1464 of skeleton.m4 */
7071 #line 2998 "parser.y"
7081 /* Line 1464 of skeleton.m4 */
7082 #line 2999 "parser.y"
7092 /* Line 1464 of skeleton.m4 */
7093 #line 3000 "parser.y"
7103 /* Line 1464 of skeleton.m4 */
7104 #line 3002 "parser.y"
7112 /* Line 1464 of skeleton.m4 */
7113 #line 7114 "parser.tab.c"
7116 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7120 YY_STACK_PRINT (yyss, yyssp);
7124 /* Now `shift' the result of the reduction. Determine what state
7125 that goes to, based on the state we popped back to and the rule
7126 number reduced by. */
7130 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7131 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7132 yystate = yytable[yystate];
7134 yystate = yydefgoto[yyn - YYNTOKENS];
7139 /*------------------------------------.
7140 | yyerrlab -- here on detecting error |
7141 `------------------------------------*/
7143 /* If not already recovering from an error, report this error. */
7147 #if ! YYERROR_VERBOSE
7148 yyerror (YY_("syntax error"));
7151 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7152 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7154 YYSIZE_T yyalloc = 2 * yysize;
7155 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7156 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7157 if (yymsg != yymsgbuf)
7158 YYSTACK_FREE (yymsg);
7159 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7161 yymsg_alloc = yyalloc;
7165 yymsg_alloc = sizeof yymsgbuf;
7169 if (0 < yysize && yysize <= yymsg_alloc)
7171 (void) yysyntax_error (yymsg, yystate, yychar);
7176 yyerror (YY_("syntax error"));
7178 goto yyexhaustedlab;
7186 if (yyerrstatus == 3)
7188 /* If just tried and failed to reuse lookahead token after an
7189 error, discard it. */
7191 if (yychar <= YYEOF)
7193 /* Return failure if at end of input. */
7194 if (yychar == YYEOF)
7199 yydestruct ("Error: discarding",
7205 /* Else will try to reuse lookahead token after shifting the error
7210 /*---------------------------------------------------.
7211 | yyerrorlab -- error raised explicitly by YYERROR. |
7212 `---------------------------------------------------*/
7215 /* Pacify compilers like GCC when the user code never invokes
7216 YYERROR and the label yyerrorlab therefore never appears in user
7218 if (/*CONSTCOND*/ 0)
7221 /* Do not reclaim the symbols of the rule which action triggered
7225 YY_STACK_PRINT (yyss, yyssp);
7230 /*-------------------------------------------------------------.
7231 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7232 `-------------------------------------------------------------*/
7234 yyerrstatus = 3; /* Each real token shifted decrements this. */
7238 yyn = yypact[yystate];
7239 if (yyn != YYPACT_NINF)
7242 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7250 /* Pop the current state because it cannot handle the error token. */
7255 yydestruct ("Error: popping",
7256 yystos[yystate], yyvsp);
7259 YY_STACK_PRINT (yyss, yyssp);
7265 /* Shift the error token. */
7266 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7272 /*-------------------------------------.
7273 | yyacceptlab -- YYACCEPT comes here. |
7274 `-------------------------------------*/
7279 /*-----------------------------------.
7280 | yyabortlab -- YYABORT comes here. |
7281 `-----------------------------------*/
7286 #if !defined(yyoverflow) || YYERROR_VERBOSE
7287 /*-------------------------------------------------.
7288 | yyexhaustedlab -- memory exhaustion comes here. |
7289 `-------------------------------------------------*/
7291 yyerror (YY_("memory exhausted"));
7297 if (yychar != YYEMPTY)
7298 yydestruct ("Cleanup: discarding lookahead",
7300 /* Do not reclaim the symbols of the rule which action triggered
7301 this YYABORT or YYACCEPT. */
7303 YY_STACK_PRINT (yyss, yyssp);
7304 while (yyssp != yyss)
7306 yydestruct ("Cleanup: popping",
7307 yystos[*yyssp], yyvsp);
7312 YYSTACK_FREE (yyss);
7315 if (yymsg != yymsgbuf)
7316 YYSTACK_FREE (yymsg);
7318 /* Make sure YYID is used. */
7319 return YYID (yyresult);