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 "yacc.c"
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 189 of yacc.c */
87 #include "tokenizer.h"
94 /* Line 189 of yacc.c */
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 214 of yacc.c */
235 /* Line 214 of yacc.c */
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 214 of yacc.c */
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 264 of yacc.c */
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;
458 state_destroy(leaving);
461 void initialize_parser()
463 global = rfx_calloc(sizeof(global_t));
464 global->file = abc_file_new();
465 global->file->flags &= ~ABCFILE_LAZY;
466 global->variable_count = 1;
467 global->init = abc_initscript(global->file);
468 code_t*c = global->init->method->body->code;
469 c = abc_getlocal_0(c);
470 c = abc_pushscope(c);
471 /*c = abc_findpropstrict(c, "[package]::trace");
472 c = abc_pushstring(c, "[entering global init function]");
473 c = abc_callpropvoid(c, "[package]::trace", 1);*/
474 global->init->method->body->code = c;
477 void initialize_file(char*filename)
480 state->package = filename;
481 // needed for state->method->late_binding:
482 state->method = rfx_calloc(sizeof(methodstate_t));
486 if(!state || state->level!=1) {
487 syntaxerror("unexpected end of file");
489 state_destroy(state);state=0;
492 void* finish_parser()
494 code_t*c = global->init->method->body->code;
495 /*c = abc_findpropstrict(c, "[package]::trace");
496 c = abc_pushstring(c, "[leaving global init function]");
497 c = abc_callpropvoid(c, "[package]::trace", 1);*/
498 c = abc_returnvoid(c);
499 global->init->method->body->code = c;
504 static void xx_scopetest()
506 /* findpropstrict doesn't just return a scope object- it
507 also makes it "active" somehow. Push local_0 on the
508 scope stack and read it back with findpropstrict, it'll
509 contain properties like "trace". Trying to find the same
510 property on a "vanilla" local_0 yields only a "undefined" */
511 //c = abc_findpropstrict(c, "[package]::trace");
513 /*c = abc_getlocal_0(c);
514 c = abc_findpropstrict(c, "[package]::trace");
516 c = abc_setlocal_1(c);
518 c = abc_pushbyte(c, 0);
519 c = abc_setlocal_2(c);
521 code_t*xx = c = abc_label(c);
522 c = abc_findpropstrict(c, "[package]::trace");
523 c = abc_pushstring(c, "prop:");
524 c = abc_hasnext2(c, 1, 2);
526 c = abc_setlocal_3(c);
527 c = abc_callpropvoid(c, "[package]::trace", 2);
528 c = abc_getlocal_3(c);
530 c = abc_iftrue(c,xx);*/
534 typedef struct _variable {
540 static variable_t* find_variable(char*name)
546 v = dict_lookup(s->vars, name);
554 static variable_t* find_variable_safe(char*name)
556 variable_t* v = find_variable(name);
558 syntaxerror("undefined variable: %s", name);
561 static char variable_exists(char*name)
563 return dict_lookup(state->vars, name)!=0;
565 code_t*defaultvalue(code_t*c, classinfo_t*type);
566 static int new_variable(char*name, classinfo_t*type, char init)
569 v->index = global->variable_count;
573 dict_put(state->vars, name, v);
575 return global->variable_count++;
577 #define TEMPVARNAME "__as3_temp__"
578 static int gettempvar()
580 variable_t*v = find_variable(TEMPVARNAME);
583 return new_variable(TEMPVARNAME, 0, 0);
586 code_t* var_block(code_t*body)
592 for(t=0;t<state->vars->hashsize;t++) {
593 dictentry_t*e = state->vars->slots[t];
595 variable_t*v = (variable_t*)e->data;
596 if(v->type && v->init) {
597 c = defaultvalue(c, v->type);
598 c = abc_setlocal(c, v->index);
599 k = abc_kill(k, v->index);
609 if(x->opcode== OPCODE___BREAK__ ||
610 x->opcode== OPCODE___CONTINUE__) {
611 /* link kill code before break/continue */
612 code_t*e = code_dup(k);
613 code_t*s = code_start(e);
625 c = code_append(c, body);
626 c = code_append(c, k);
630 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
632 c = code_append(c, header);
633 c = code_append(c, var_block(body));
634 /* append return if necessary */
635 if(!c || (c->opcode != OPCODE_RETURNVOID &&
636 c->opcode != OPCODE_RETURNVALUE)) {
637 c = abc_returnvoid(c);
643 static void startpackage(char*name)
646 /*printf("entering package \"%s\"\n", name);*/
647 state->package = strdup(name);
648 global->variable_count = 1;
650 static void endpackage()
652 /*printf("leaving package \"%s\"\n", state->package);*/
654 //used e.g. in classinfo_register:
655 //free(state->package);state->package=0;
660 char*as3_globalclass=0;
661 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
664 syntaxerror("inner classes now allowed");
667 global->variable_count = 1;
668 state->cls = rfx_calloc(sizeof(classstate_t));
669 state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
672 classinfo_list_t*mlist=0;
674 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
675 syntaxerror("invalid modifier(s)");
677 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
678 syntaxerror("public and internal not supported at the same time.");
680 /* create the class name, together with the proper attributes */
684 if(!(flags&FLAG_PUBLIC) && !state->package) {
685 access = ACCESS_PRIVATE; package = current_filename;
686 } else if(!(flags&FLAG_PUBLIC) && state->package) {
687 access = ACCESS_PACKAGEINTERNAL; package = state->package;
688 } else if(state->package) {
689 access = ACCESS_PACKAGE; package = state->package;
691 syntaxerror("public classes only allowed inside a package");
694 if(registry_findclass(package, classname)) {
695 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
699 /* build info struct */
700 int num_interfaces = (list_length(implements));
701 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
702 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
704 classinfo_list_t*l = implements;
705 for(l=implements;l;l=l->next) {
706 state->cls->info->interfaces[pos++] = l->classinfo;
709 multiname_t*extends2 = sig2mname(extends);
711 MULTINAME(classname2,state->cls->info);
714 state->cls_init = abc_getlocal_0(state->cls_init);
715 state->cls_init = abc_constructsuper(state->cls_init, 0);
718 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
719 if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
720 if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
722 state->cls->info->flags |= CLASS_INTERFACE;
723 abc_class_interface(state->cls->abc);
726 abc_class_protectedNS(state->cls->abc, classname);
728 for(mlist=implements;mlist;mlist=mlist->next) {
729 MULTINAME(m, mlist->classinfo);
730 abc_class_add_interface(state->cls->abc, &m);
733 /* now write the construction code for this class */
734 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
736 abc_method_body_t*m = global->init->method->body;
737 __ getglobalscope(m);
738 classinfo_t*s = extends;
743 //TODO: take a look at the current scope stack, maybe
744 // we can re-use something
749 multiname_t*s2 = sig2mname(s);
751 multiname_destroy(s2);
753 __ pushscope(m); count++;
754 m->code = m->code->prev->prev; // invert
756 /* continue appending after last op end */
757 while(m->code && m->code->next) m->code = m->code->next;
759 /* TODO: if this is one of *our* classes, we can also
760 do a getglobalscope/getslot <nr> (which references
761 the init function's slots) */
763 __ getlex2(m, extends2);
765 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
766 stack is not the superclass */
767 __ pushscope(m);count++;
770 /* notice: we get a verify error #1107 if the top element on the scope
771 stack is not the global object */
773 __ pushscope(m);count++;
775 __ newclass(m,state->cls->abc);
779 __ setslot(m, slotindex);
781 /* flash.display.MovieClip handling */
782 if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
783 if(state->package && state->package[0]) {
784 as3_globalclass = concat3(state->package, ".", classname);
786 as3_globalclass = strdup(classname);
789 multiname_destroy(extends2);
792 static void endclass()
794 if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
796 c = abc_getlocal_0(c);
797 c = abc_constructsuper(c, 0);
798 state->cls->init = code_append(state->cls->init, c);
800 if(!state->method->late_binding) {
801 // class initialization code uses late binding
803 c = abc_getlocal_0(c);
804 c = abc_pushscope(c);
805 state->cls->static_init = code_append(c, state->cls->static_init);
808 if(state->cls->init) {
809 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
810 m->body->code = wrap_function(0, state->cls->init, m->body->code);
812 if(state->cls->static_init) {
813 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
814 m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
817 free(state->cls);state->cls=0;
818 free(state->method);state->method=0;
822 void check_code_for_break(code_t*c)
825 if(c->opcode == OPCODE___BREAK__) {
826 char*name = string_cstr(c->data[0]);
827 syntaxerror("Unresolved \"break %s\"", name);
829 if(c->opcode == OPCODE___CONTINUE__) {
830 char*name = string_cstr(c->data[0]);
831 syntaxerror("Unresolved \"continue %s\"", name);
838 static void check_constant_against_type(classinfo_t*t, constant_t*c)
840 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
841 if(TYPE_IS_NUMBER(t)) {
842 xassert(c->type == CONSTANT_FLOAT
843 || c->type == CONSTANT_INT
844 || c->type == CONSTANT_UINT);
845 } else if(TYPE_IS_UINT(t)) {
846 xassert(c->type == CONSTANT_UINT ||
847 (c->type == CONSTANT_INT && c->i>0));
848 } else if(TYPE_IS_INT(t)) {
849 xassert(c->type == CONSTANT_INT);
850 } else if(TYPE_IS_BOOLEAN(t)) {
851 xassert(c->type == CONSTANT_TRUE
852 || c->type == CONSTANT_FALSE);
857 static int flags2access(int flags)
860 if(flags&FLAG_PUBLIC) {
861 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
862 syntaxerror("invalid combination of access levels");
863 access = ACCESS_PACKAGE;
864 } else if(flags&FLAG_PRIVATE) {
865 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
866 syntaxerror("invalid combination of access levels");
867 access = ACCESS_PRIVATE;
868 } else if(flags&FLAG_PROTECTED) {
869 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
870 syntaxerror("invalid combination of access levels");
871 access = ACCESS_PROTECTED;
873 access = ACCESS_PACKAGEINTERNAL;
879 static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
881 memberinfo_t*minfo = 0;
884 minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
885 minfo->return_type = return_type;
886 } else if(getset != KW_GET && getset != KW_SET) {
888 if((minfo = registry_findmember(state->cls->info, name, 0))) {
889 if(minfo->parent == state->cls->info) {
890 syntaxerror("class already contains a member/method called '%s'", name);
891 } else if(!minfo->parent) {
892 syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
894 if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
895 syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
898 minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
899 minfo->return_type = return_type;
900 // getslot on a member slot only returns "undefined", so no need
901 // to actually store these
902 //state->minfo->slot = state->method->abc->method->trait->slot_id;
904 //class getter/setter
905 int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
909 else if(params->list)
910 type = params->list->param->type;
911 // not sure wether to look into superclasses here, too
912 if((minfo=registry_findmember(state->cls->info, name, 0))) {
913 if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
914 syntaxerror("class already contains a member or method called '%s'", name);
916 syntaxerror("getter/setter for '%s' already defined", name);
917 /* make a setter or getter into a getset */
922 if(type && minfo->type != type)
923 syntaxerror("different type in getter and setter");
925 minfo = memberinfo_register(state->cls->info, name, gs);
928 /* can't assign a slot as getter and setter might have different slots */
929 //minfo->slot = slot;
931 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
932 if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
933 if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
934 if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
935 if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
936 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
940 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
941 params_t*params, classinfo_t*return_type)
943 if(state->method && state->method->info) {
944 syntaxerror("not able to start another method scope");
947 global->variable_count = 0;
948 state->method = rfx_calloc(sizeof(methodstate_t));
949 state->method->has_super = 0;
952 state->method->is_constructor = !strcmp(state->cls->info->name,name);
953 state->cls->has_constructor |= state->method->is_constructor;
955 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
957 state->method->is_global = 1;
958 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
960 new_variable("globalscope", 0, 0);
963 /* state->vars is initialized by state_new */
966 for(p=params->list;p;p=p->next) {
967 new_variable(p->param->name, p->param->type, 0);
969 if(state->method->is_constructor)
970 name = "__as3_constructor__";
971 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
974 static void endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
975 params_t*params, classinfo_t*return_type, code_t*body)
979 multiname_t*type2 = sig2mname(return_type);
981 if(state->method->is_constructor) {
982 f = abc_class_getconstructor(state->cls->abc, type2);
983 } else if(!state->method->is_global) {
984 namespace_t mname_ns = flags2namespace(flags, "");
985 multiname_t mname = {QNAME, &mname_ns, 0, name};
987 if(flags&FLAG_STATIC)
988 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
990 f = abc_class_method(state->cls->abc, type2, &mname);
991 slot = f->trait->slot_id;
993 namespace_t mname_ns = flags2namespace(flags, state->package);
994 multiname_t mname = {QNAME, &mname_ns, 0, name};
996 f = abc_method_new(global->file, type2, 1);
997 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
998 //abc_code_t*c = global->init->method->body->code;
1000 //flash doesn't seem to allow us to access function slots
1001 //state->method->info->slot = slot;
1003 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1004 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1005 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1006 if(params->varargs) f->flags |= METHOD_NEED_REST;
1010 for(p=params->list;p;p=p->next) {
1011 if(params->varargs && !p->next) {
1012 break; //varargs: omit last parameter in function signature
1014 multiname_t*m = sig2mname(p->param->type);
1015 list_append(f->parameters, m);
1016 if(p->param->value) {
1017 check_constant_against_type(p->param->type, p->param->value);
1018 opt=1;list_append(f->optional_parameters, p->param->value);
1020 syntaxerror("non-optional parameter not allowed after optional parameters");
1023 check_code_for_break(body);
1026 f->body->code = body;
1027 f->body->exceptions = state->method->exceptions;
1028 } else { //interface
1030 syntaxerror("interface methods can't have a method body");
1033 free(state->method);state->method=0;
1039 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1044 void breakjumpsto(code_t*c, char*name, code_t*jump)
1047 if(c->opcode == OPCODE___BREAK__) {
1048 string_t*name2 = c->data[0];
1049 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1050 c->opcode = OPCODE_JUMP;
1057 void continuejumpsto(code_t*c, char*name, code_t*jump)
1060 if(c->opcode == OPCODE___CONTINUE__) {
1061 string_t*name2 = c->data[0];
1062 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1063 c->opcode = OPCODE_JUMP;
1071 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1072 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1073 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1075 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1077 if(!type1 || !type2)
1078 return registry_getanytype();
1079 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1080 return registry_getanytype();
1083 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1092 return registry_getanytype();
1094 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1099 return abc_coerce_a(c);
1103 // cast an "any" type to a specific type. subject to
1104 // runtime exceptions
1105 return abc_coerce2(c, &m);
1108 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1109 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1110 // allow conversion between number types
1111 return abc_coerce2(c, &m);
1113 //printf("%s.%s\n", from.package, from.name);
1114 //printf("%s.%s\n", to.package, to.name);
1116 classinfo_t*supertype = from;
1118 if(supertype == to) {
1119 // target type is one of from's superclasses
1120 return abc_coerce2(c, &m);
1123 while(supertype->interfaces[t]) {
1124 if(supertype->interfaces[t]==to) {
1125 // target type is one of from's interfaces
1126 return abc_coerce2(c, &m);
1130 supertype = supertype->superclass;
1132 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1134 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1136 syntaxerror("can't convert type %s to %s", from->name, to->name);
1137 return 0; // make gcc happy
1140 code_t*defaultvalue(code_t*c, classinfo_t*type)
1142 if(TYPE_IS_INT(type)) {
1143 c = abc_pushbyte(c, 0);
1144 } else if(TYPE_IS_UINT(type)) {
1145 c = abc_pushuint(c, 0);
1146 } else if(TYPE_IS_FLOAT(type)) {
1148 } else if(TYPE_IS_BOOLEAN(type)) {
1149 c = abc_pushfalse(c);
1151 //c = abc_pushundefined(c);
1153 c = abc_pushnull(c);
1155 c = abc_coerce2(c, &m);
1160 char is_pushundefined(code_t*c)
1162 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1165 void parserassert(int b)
1167 if(!b) syntaxerror("internal error: assertion failed");
1170 static classinfo_t* find_class(char*name)
1174 c = registry_findclass(state->package, name);
1177 /* try explicit imports */
1178 dictentry_t* e = dict_get_slot(state->imports, name);
1181 if(!strcmp(e->key, name)) {
1182 c = (classinfo_t*)e->data;
1188 /* try package.* imports */
1189 import_list_t*l = state->wildcard_imports;
1191 //printf("does package %s contain a class %s?\n", l->import->package, name);
1192 c = registry_findclass(l->import->package, name);
1197 /* try global package */
1198 c = registry_findclass("", name);
1201 /* try local "filename" package */
1202 c = registry_findclass(current_filename, name);
1208 static char is_getlocal(code_t*c)
1210 if(!c || c->prev || c->next)
1212 return(c->opcode == OPCODE_GETLOCAL
1213 || c->opcode == OPCODE_GETLOCAL_0
1214 || c->opcode == OPCODE_GETLOCAL_1
1215 || c->opcode == OPCODE_GETLOCAL_2
1216 || c->opcode == OPCODE_GETLOCAL_3);
1218 static int getlocalnr(code_t*c)
1220 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1221 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1222 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1223 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1224 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1225 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1229 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1233 [prefix code] [read instruction]
1237 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1240 if(in && in->opcode == OPCODE_COERCE_A) {
1241 in = code_cutlast(in);
1244 syntaxerror("internal error");
1246 /* chop off read instruction */
1250 prefix = r->prev;r->prev = 0;
1256 char use_temp_var = readbefore;
1258 /* generate the write instruction, and maybe append a dup to the prefix code */
1259 code_t* write = abc_nop(0);
1260 if(r->opcode == OPCODE_GETPROPERTY) {
1261 write->opcode = OPCODE_SETPROPERTY;
1262 multiname_t*m = (multiname_t*)r->data[0];
1263 write->data[0] = multiname_clone(m);
1264 if(m->type == QNAME || m->type == MULTINAME) {
1266 prefix = abc_dup(prefix); // we need the object, too
1269 } else if(m->type == MULTINAMEL) {
1271 /* dupping two values on the stack requires 5 operations and one register-
1272 couldn't adobe just have given us a dup2? */
1273 int temp = gettempvar();
1274 prefix = abc_setlocal(prefix, temp);
1275 prefix = abc_dup(prefix);
1276 prefix = abc_getlocal(prefix, temp);
1277 prefix = abc_swap(prefix);
1278 prefix = abc_getlocal(prefix, temp);
1280 prefix = abc_kill(prefix, temp);
1284 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1286 } else if(r->opcode == OPCODE_GETSLOT) {
1287 write->opcode = OPCODE_SETSLOT;
1288 write->data[0] = r->data[0];
1290 prefix = abc_dup(prefix); // we need the object, too
1293 } else if(r->opcode == OPCODE_GETLOCAL) {
1294 write->opcode = OPCODE_SETLOCAL;
1295 write->data[0] = r->data[0];
1296 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1297 write->opcode = OPCODE_SETLOCAL_0;
1298 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1299 write->opcode = OPCODE_SETLOCAL_1;
1300 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1301 write->opcode = OPCODE_SETLOCAL_2;
1302 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1303 write->opcode = OPCODE_SETLOCAL_3;
1306 syntaxerror("illegal lvalue: can't assign a value to this expression");
1313 /* with getproperty/getslot, we have to be extra careful not
1314 to execute the read code twice, as it might have side-effects
1315 (e.g. if the property is in fact a setter/getter combination)
1317 So read the value, modify it, and write it again,
1318 using prefix only once and making sure (by using a temporary
1319 register) that the return value is what we just wrote */
1320 temp = gettempvar();
1321 c = code_append(c, prefix);
1322 c = code_append(c, r);
1325 c = abc_setlocal(c, temp);
1327 c = code_append(c, middlepart);
1330 c = abc_setlocal(c, temp);
1332 c = code_append(c, write);
1333 c = abc_getlocal(c, temp);
1334 c = abc_kill(c, temp);
1336 /* if we're allowed to execute the read code twice *and*
1337 the middlepart doesn't modify the code, things are easier.
1339 code_t* r2 = code_dup(r);
1340 //c = code_append(c, prefix);
1341 parserassert(!prefix);
1342 c = code_append(c, r);
1343 c = code_append(c, middlepart);
1344 c = code_append(c, write);
1345 c = code_append(c, r2);
1348 /* even smaller version: overwrite the value without reading
1352 c = code_append(c, prefix);
1355 c = code_append(c, middlepart);
1356 c = code_append(c, write);
1357 c = code_append(c, r);
1359 temp = gettempvar();
1361 c = code_append(c, prefix);
1363 c = code_append(c, middlepart);
1365 c = abc_setlocal(c, temp);
1366 c = code_append(c, write);
1367 c = abc_getlocal(c, temp);
1368 c = abc_kill(c, temp);
1374 char is_break_or_jump(code_t*c)
1378 if(c->opcode == OPCODE_JUMP ||
1379 c->opcode == OPCODE___BREAK__ ||
1380 c->opcode == OPCODE___CONTINUE__ ||
1381 c->opcode == OPCODE_THROW ||
1382 c->opcode == OPCODE_RETURNVOID ||
1383 c->opcode == OPCODE_RETURNVALUE) {
1390 #define IS_FINALLY_TARGET(op) \
1391 ((op) == OPCODE___CONTINUE__ || \
1392 (op) == OPCODE___BREAK__ || \
1393 (op) == OPCODE_RETURNVOID || \
1394 (op) == OPCODE_RETURNVALUE || \
1395 (op) == OPCODE___RETHROW__)
1397 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1399 #define NEED_EXTRA_STACK_ARG
1400 code_t*finally_label = abc_nop(0);
1401 NEW(lookupswitch_t, l);
1407 code_t*prev = i->prev;
1408 if(IS_FINALLY_TARGET(i->opcode)) {
1411 if(i->opcode == OPCODE___RETHROW__ ||
1412 i->opcode == OPCODE_RETURNVALUE) {
1413 if(i->opcode == OPCODE___RETHROW__)
1414 i->opcode = OPCODE_THROW;
1416 p = abc_coerce_a(p);
1417 p = abc_setlocal(p, tempvar);
1419 p = abc_pushbyte(p, count++);
1420 p = abc_jump(p, finally_label);
1421 code_t*target = p = abc_label(p);
1422 #ifdef NEED_EXTRA_STACK_ARG
1426 p = abc_getlocal(p, tempvar);
1429 p->next = i;i->prev = p;
1430 list_append(l->targets, target);
1436 c = abc_pushbyte(c, -1);
1437 c = code_append(c, finally_label);
1438 c = code_append(c, finally);
1440 #ifdef NEED_EXTRA_STACK_ARG
1443 c = abc_lookupswitch(c, l);
1444 c = l->def = abc_label(c);
1445 #ifdef NEED_EXTRA_STACK_ARG
1452 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1456 code_t*prev = i->prev;
1457 if(IS_FINALLY_TARGET(i->opcode)) {
1458 if(i->opcode == OPCODE___RETHROW__)
1459 i->opcode = OPCODE_THROW;
1460 code_t*end = code_dup(finally);
1461 code_t*start = code_start(end);
1462 if(prev) prev->next = start;
1469 return code_append(c, finally);
1472 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1478 int num_insertion_points=0;
1480 if(IS_FINALLY_TARGET(i->opcode))
1481 num_insertion_points++;
1488 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1493 int simple_version_cost = (1+num_insertion_points)*code_size;
1494 int lookup_version_cost = 4*num_insertion_points + 5;
1496 if(cantdup || simple_version_cost > lookup_version_cost) {
1497 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1498 return insert_finally_lookup(c, finally, tempvar);
1500 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1501 return insert_finally_simple(c, finally, tempvar);
1507 /* Line 264 of yacc.c */
1508 #line 1509 "parser.tab.c"
1515 typedef YYTYPE_UINT8 yytype_uint8;
1517 typedef unsigned char yytype_uint8;
1521 typedef YYTYPE_INT8 yytype_int8;
1522 #elif (defined __STDC__ || defined __C99__FUNC__ \
1523 || defined __cplusplus || defined _MSC_VER)
1524 typedef signed char yytype_int8;
1526 typedef short int yytype_int8;
1529 #ifdef YYTYPE_UINT16
1530 typedef YYTYPE_UINT16 yytype_uint16;
1532 typedef unsigned short int yytype_uint16;
1536 typedef YYTYPE_INT16 yytype_int16;
1538 typedef short int yytype_int16;
1542 # ifdef __SIZE_TYPE__
1543 # define YYSIZE_T __SIZE_TYPE__
1544 # elif defined size_t
1545 # define YYSIZE_T size_t
1546 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1547 || defined __cplusplus || defined _MSC_VER)
1548 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1549 # define YYSIZE_T size_t
1551 # define YYSIZE_T unsigned int
1555 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1560 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1561 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1565 # define YY_(msgid) msgid
1569 /* Suppress unused-variable warnings by "using" E. */
1570 #if ! defined lint || defined __GNUC__
1571 # define YYUSE(e) ((void) (e))
1573 # define YYUSE(e) /* empty */
1576 /* Identity function, used to suppress warnings about constant conditions. */
1578 # define YYID(n) (n)
1580 #if (defined __STDC__ || defined __C99__FUNC__ \
1581 || defined __cplusplus || defined _MSC_VER)
1594 #if ! defined yyoverflow || YYERROR_VERBOSE
1596 /* The parser invokes alloca or malloc; define the necessary symbols. */
1598 # ifdef YYSTACK_USE_ALLOCA
1599 # if YYSTACK_USE_ALLOCA
1601 # define YYSTACK_ALLOC __builtin_alloca
1602 # elif defined __BUILTIN_VA_ARG_INCR
1603 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1605 # define YYSTACK_ALLOC __alloca
1606 # elif defined _MSC_VER
1607 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1608 # define alloca _alloca
1610 # define YYSTACK_ALLOC alloca
1611 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1612 || defined __cplusplus || defined _MSC_VER)
1613 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1615 # define _STDLIB_H 1
1622 # ifdef YYSTACK_ALLOC
1623 /* Pacify GCC's `empty if-body' warning. */
1624 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1625 # ifndef YYSTACK_ALLOC_MAXIMUM
1626 /* The OS might guarantee only one guard page at the bottom of the stack,
1627 and a page size can be as small as 4096 bytes. So we cannot safely
1628 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1629 to allow for a few compiler-allocated temporary stack slots. */
1630 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1633 # define YYSTACK_ALLOC YYMALLOC
1634 # define YYSTACK_FREE YYFREE
1635 # ifndef YYSTACK_ALLOC_MAXIMUM
1636 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1638 # if (defined __cplusplus && ! defined _STDLIB_H \
1639 && ! ((defined YYMALLOC || defined malloc) \
1640 && (defined YYFREE || defined free)))
1641 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1643 # define _STDLIB_H 1
1647 # define YYMALLOC malloc
1648 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1649 || defined __cplusplus || defined _MSC_VER)
1650 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1654 # define YYFREE free
1655 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1656 || defined __cplusplus || defined _MSC_VER)
1657 void free (void *); /* INFRINGES ON USER NAME SPACE */
1661 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1664 #if (! defined yyoverflow \
1665 && (! defined __cplusplus \
1666 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1668 /* A type that is properly aligned for any stack member. */
1671 yytype_int16 yyss_alloc;
1675 /* The size of the maximum gap between one aligned stack and the next. */
1676 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1678 /* The size of an array large to enough to hold all stacks, each with
1680 # define YYSTACK_BYTES(N) \
1681 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1682 + YYSTACK_GAP_MAXIMUM)
1684 /* Copy COUNT objects from FROM to TO. The source and destination do
1687 # if defined __GNUC__ && 1 < __GNUC__
1688 # define YYCOPY(To, From, Count) \
1689 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1691 # define YYCOPY(To, From, Count) \
1695 for (yyi = 0; yyi < (Count); yyi++) \
1696 (To)[yyi] = (From)[yyi]; \
1702 /* Relocate STACK from its old location to the new one. The
1703 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1704 elements in the stack, and YYPTR gives the new location of the
1705 stack. Advance YYPTR to a properly aligned location for the next
1707 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1710 YYSIZE_T yynewbytes; \
1711 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1712 Stack = &yyptr->Stack_alloc; \
1713 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1714 yyptr += yynewbytes / sizeof (*yyptr); \
1720 /* YYFINAL -- State number of the termination state. */
1722 /* YYLAST -- Last index in YYTABLE. */
1725 /* YYNTOKENS -- Number of terminals. */
1726 #define YYNTOKENS 130
1727 /* YYNNTS -- Number of nonterminals. */
1729 /* YYNRULES -- Number of rules. */
1730 #define YYNRULES 285
1731 /* YYNRULES -- Number of states. */
1732 #define YYNSTATES 478
1734 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1735 #define YYUNDEFTOK 2
1736 #define YYMAXUTOK 360
1738 #define YYTRANSLATE(YYX) \
1739 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1741 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1742 static const yytype_uint8 yytranslate[] =
1744 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1745 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1746 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1747 2, 2, 2, 116, 2, 2, 2, 114, 106, 2,
1748 126, 129, 113, 111, 97, 110, 123, 112, 2, 2,
1749 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
1750 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
1751 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1752 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1753 2, 120, 2, 121, 105, 2, 2, 2, 2, 2,
1754 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1755 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1756 2, 2, 2, 122, 104, 128, 115, 2, 2, 2,
1757 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1758 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1759 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1760 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1761 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1762 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1763 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1764 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1765 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1766 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1767 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1768 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1769 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1770 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1771 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1772 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1773 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1774 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1775 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1776 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1777 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1778 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1779 95, 98, 100, 101, 109, 117, 118, 119, 124, 125,
1784 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1786 static const yytype_uint16 yyprhs[] =
1788 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
1789 19, 21, 23, 25, 27, 28, 30, 32, 35, 37,
1790 39, 41, 43, 45, 47, 49, 50, 53, 55, 57,
1791 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
1792 79, 81, 83, 85, 87, 89, 91, 93, 97, 100,
1793 103, 105, 107, 110, 111, 114, 117, 119, 123, 127,
1794 128, 131, 132, 140, 141, 143, 145, 149, 151, 154,
1795 158, 167, 174, 175, 182, 183, 191, 193, 196, 198,
1796 201, 202, 204, 206, 209, 211, 214, 219, 223, 224,
1797 233, 234, 244, 245, 251, 253, 256, 258, 261, 263,
1798 264, 271, 274, 276, 282, 284, 286, 290, 292, 293,
1799 300, 301, 307, 310, 315, 316, 318, 320, 323, 325,
1800 327, 329, 331, 333, 335, 337, 339, 341, 342, 345,
1801 346, 349, 350, 353, 354, 364, 365, 374, 375, 377,
1802 379, 382, 384, 386, 388, 390, 391, 393, 395, 398,
1803 400, 403, 412, 414, 416, 422, 423, 426, 428, 430,
1804 432, 434, 436, 438, 440, 442, 443, 445, 448, 453,
1805 457, 459, 464, 467, 469, 471, 472, 473, 486, 488,
1806 489, 499, 501, 505, 507, 509, 511, 515, 517, 519,
1807 521, 524, 525, 526, 530, 531, 533, 535, 539, 543,
1808 548, 553, 556, 558, 561, 563, 565, 569, 571, 573,
1809 575, 577, 579, 581, 583, 585, 587, 589, 591, 593,
1810 595, 597, 599, 601, 603, 605, 609, 613, 617, 621,
1811 625, 629, 633, 637, 641, 645, 648, 651, 655, 659,
1812 663, 667, 671, 675, 679, 683, 687, 691, 695, 699,
1813 703, 707, 711, 716, 719, 721, 725, 728, 733, 737,
1814 738, 740, 744, 750, 754, 758, 762, 766, 770, 774,
1815 778, 782, 786, 790, 794, 800, 803, 806, 809, 812,
1816 816, 820, 822, 826, 832, 838
1819 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1820 static const yytype_int16 yyrhs[] =
1822 131, 0, -1, 132, -1, -1, 133, -1, 134, -1,
1823 133, 134, -1, 180, -1, 192, -1, 190, -1, 208,
1824 -1, 201, -1, 143, -1, 96, -1, -1, 136, -1,
1825 137, -1, 136, 137, -1, 192, -1, 190, -1, 208,
1826 -1, 201, -1, 143, -1, 96, -1, 139, -1, -1,
1827 139, 141, -1, 141, -1, 183, -1, 154, -1, 155,
1828 -1, 156, -1, 158, -1, 166, -1, 149, -1, 177,
1829 -1, 174, -1, 227, -1, 96, -1, 140, -1, 145,
1830 -1, 160, -1, 161, -1, 224, -1, 176, -1, 233,
1831 -1, 234, -1, 122, 139, 128, -1, 122, 128, -1,
1832 141, 96, -1, 141, -1, 140, -1, 99, 225, -1,
1833 -1, 45, 146, -1, 31, 146, -1, 147, -1, 146,
1834 97, 147, -1, 3, 217, 144, -1, -1, 64, 142,
1835 -1, -1, 63, 126, 150, 226, 129, 142, 148, -1,
1836 -1, 145, -1, 227, -1, 45, 3, 217, -1, 3,
1837 -1, 12, 126, -1, 12, 49, 126, -1, 153, 151,
1838 96, 226, 96, 227, 129, 142, -1, 153, 152, 67,
1839 226, 129, 142, -1, -1, 13, 126, 157, 226, 129,
1840 142, -1, -1, 14, 159, 142, 13, 126, 226, 129,
1841 -1, 65, -1, 65, 3, -1, 29, -1, 29, 3,
1842 -1, -1, 163, -1, 165, -1, 163, 165, -1, 164,
1843 -1, 163, 164, -1, 33, 228, 103, 138, -1, 61,
1844 103, 138, -1, -1, 15, 126, 167, 228, 129, 122,
1845 162, 128, -1, -1, 32, 126, 3, 217, 129, 169,
1846 122, 138, 128, -1, -1, 27, 122, 171, 138, 128,
1847 -1, 168, -1, 172, 168, -1, 172, -1, 172, 170,
1848 -1, 170, -1, -1, 51, 122, 175, 138, 128, 173,
1849 -1, 36, 226, -1, 36, -1, 38, 126, 226, 129,
1850 142, -1, 3, -1, 18, -1, 179, 123, 178, -1,
1851 178, -1, -1, 18, 179, 122, 181, 135, 128, -1,
1852 -1, 18, 122, 182, 135, 128, -1, 40, 214, -1,
1853 40, 179, 123, 113, -1, -1, 185, -1, 186, -1,
1854 185, 186, -1, 20, -1, 21, -1, 19, -1, 37,
1855 -1, 46, -1, 48, -1, 47, -1, 25, -1, 23,
1856 -1, -1, 53, 214, -1, -1, 53, 215, -1, -1,
1857 16, 215, -1, -1, 184, 30, 3, 187, 189, 122,
1858 191, 194, 128, -1, -1, 184, 43, 3, 188, 122,
1859 193, 197, 128, -1, -1, 195, -1, 196, -1, 195,
1860 196, -1, 96, -1, 201, -1, 208, -1, 140, -1,
1861 -1, 198, -1, 199, -1, 198, 199, -1, 96, -1,
1862 45, 3, -1, 184, 26, 207, 3, 126, 204, 129,
1863 217, -1, 45, -1, 31, -1, 184, 200, 3, 217,
1864 144, -1, -1, 99, 203, -1, 9, -1, 7, -1,
1865 8, -1, 11, -1, 4, -1, 55, -1, 54, -1,
1866 44, -1, -1, 205, -1, 90, 206, -1, 205, 97,
1867 90, 206, -1, 205, 97, 206, -1, 206, -1, 3,
1868 103, 216, 202, -1, 3, 202, -1, 50, -1, 34,
1869 -1, -1, -1, 184, 26, 207, 3, 126, 204, 129,
1870 217, 122, 209, 138, 128, -1, 3, -1, -1, 26,
1871 210, 126, 204, 129, 217, 122, 138, 128, -1, 3,
1872 -1, 179, 123, 3, -1, 213, -1, 212, -1, 214,
1873 -1, 215, 97, 214, -1, 214, -1, 113, -1, 35,
1874 -1, 103, 216, -1, -1, -1, 126, 219, 129, -1,
1875 -1, 220, -1, 225, -1, 220, 97, 225, -1, 24,
1876 212, 218, -1, 228, 126, 219, 129, -1, 52, 126,
1877 219, 129, -1, 62, 228, -1, 41, -1, 41, 226,
1878 -1, 228, -1, 228, -1, 226, 97, 228, -1, 226,
1879 -1, 211, -1, 229, -1, 232, -1, 221, -1, 223,
1880 -1, 5, -1, 9, -1, 10, -1, 7, -1, 8,
1881 -1, 11, -1, 4, -1, 28, -1, 55, -1, 54,
1882 -1, 44, -1, 222, -1, 228, 107, 228, -1, 228,
1883 108, 228, -1, 228, 73, 228, -1, 228, 74, 228,
1884 -1, 228, 69, 228, -1, 228, 70, 228, -1, 228,
1885 72, 228, -1, 228, 71, 228, -1, 228, 84, 228,
1886 -1, 228, 85, 228, -1, 116, 228, -1, 115, 228,
1887 -1, 228, 106, 228, -1, 228, 105, 228, -1, 228,
1888 104, 228, -1, 228, 93, 228, -1, 228, 92, 228,
1889 -1, 228, 91, 228, -1, 228, 112, 228, -1, 228,
1890 114, 228, -1, 228, 111, 228, -1, 228, 110, 228,
1891 -1, 228, 113, 228, -1, 228, 67, 228, -1, 228,
1892 68, 228, -1, 228, 39, 228, -1, 228, 66, 228,
1893 -1, 42, 126, 228, 129, -1, 35, 228, -1, 35,
1894 -1, 126, 226, 129, -1, 110, 228, -1, 228, 120,
1895 228, 121, -1, 120, 219, 121, -1, -1, 231, -1,
1896 225, 103, 225, -1, 231, 97, 225, 103, 225, -1,
1897 122, 230, 128, -1, 228, 78, 228, -1, 228, 77,
1898 228, -1, 228, 82, 228, -1, 228, 81, 228, -1,
1899 228, 83, 228, -1, 228, 76, 228, -1, 228, 75,
1900 228, -1, 228, 79, 228, -1, 228, 80, 228, -1,
1901 228, 99, 228, -1, 228, 102, 228, 103, 228, -1,
1902 228, 88, -1, 228, 87, -1, 88, 228, -1, 87,
1903 228, -1, 52, 123, 3, -1, 228, 123, 3, -1,
1904 3, -1, 184, 17, 3, -1, 184, 17, 3, 99,
1905 3, -1, 184, 17, 3, 99, 4, -1, 22, 17,
1909 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1910 static const yytype_uint16 yyrline[] =
1912 0, 1484, 1484, 1486, 1486, 1487, 1488, 1490, 1491, 1492,
1913 1493, 1494, 1495, 1496, 1498, 1498, 1499, 1500, 1502, 1503,
1914 1504, 1505, 1506, 1507, 1509, 1510, 1512, 1513, 1516, 1517,
1915 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1528, 1529,
1916 1530, 1531, 1532, 1533, 1534, 1536, 1537, 1539, 1540, 1541,
1917 1542, 1546, 1552, 1553, 1557, 1558, 1560, 1561, 1563, 1604,
1918 1605, 1608, 1608, 1627, 1628, 1629, 1632, 1635, 1639, 1640,
1919 1642, 1662, 1705, 1705, 1724, 1724, 1739, 1742, 1745, 1748,
1920 1752, 1753, 1754, 1755, 1756, 1757, 1759, 1770, 1773, 1773,
1921 1802, 1802, 1822, 1822, 1839, 1840, 1841, 1842, 1850, 1859,
1922 1859, 1904, 1908, 1919, 1928, 1929, 1931, 1932, 1934, 1934,
1923 1935, 1935, 1937, 1945, 1955, 1956, 1957, 1958, 1960, 1961,
1924 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1970, 1971, 1973,
1925 1974, 1976, 1977, 1981, 1979, 1987, 1985, 1993, 1994, 1995,
1926 1996, 1997, 1998, 1999, 2001, 2007, 2008, 2009, 2010, 2011,
1927 2012, 2015, 2026, 2026, 2028, 2086, 2087, 2089, 2090, 2091,
1928 2092, 2093, 2095, 2096, 2097, 2102, 2105, 2110, 2115, 2122,
1929 2126, 2131, 2137, 2143, 2144, 2145, 2148, 2147, 2165, 2166,
1930 2167, 2175, 2182, 2188, 2189, 2191, 2192, 2194, 2195, 2196,
1931 2205, 2206, 2210, 2211, 2213, 2214, 2215, 2218, 2223, 2247,
1932 2295, 2315, 2336, 2339, 2346, 2347, 2348, 2354, 2360, 2362,
1933 2364, 2366, 2368, 2370, 2387, 2392, 2395, 2398, 2401, 2404,
1934 2407, 2410, 2413, 2416, 2420, 2421, 2424, 2427, 2430, 2433,
1935 2436, 2439, 2442, 2446, 2457, 2475, 2480, 2485, 2490, 2495,
1936 2500, 2504, 2508, 2513, 2517, 2521, 2530, 2539, 2549, 2554,
1937 2566, 2572, 2577, 2583, 2589, 2593, 2595, 2606, 2615, 2622,
1938 2623, 2625, 2631, 2640, 2647, 2659, 2665, 2671, 2677, 2683,
1939 2689, 2695, 2708, 2719, 2726, 2739, 2766, 2780, 2794, 2808,
1940 2823, 2857, 2944, 2945, 2946, 2948
1944 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1945 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1946 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1947 static const char *const yytname[] =
1949 "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
1950 "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
1951 "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
1952 "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
1953 "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
1954 "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
1955 "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
1956 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
1957 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
1958 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
1959 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
1960 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
1961 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
1962 "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
1963 "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
1964 "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
1965 "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
1966 "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
1967 "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
1968 "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
1969 "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
1970 "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
1971 "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
1972 "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
1973 "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
1974 "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
1975 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
1976 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
1977 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
1978 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
1979 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
1980 "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
1981 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
1982 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
1983 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
1984 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
1985 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
1986 "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
1987 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
1988 "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
1989 "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE", "MAYBETYPE",
1990 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST", "NEW",
1991 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
1992 "VOIDEXPRESSION", "E", "CONSTANT", "MAYBE_EXPRPAIR_LIST",
1993 "EXPRPAIR_LIST", "VAR_READ", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
1998 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2000 static const yytype_uint16 yytoknum[] =
2002 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2003 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2004 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2005 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2006 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2007 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2008 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2009 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2010 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2011 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
2012 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
2013 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
2014 91, 93, 123, 46, 358, 359, 40, 360, 125, 41
2018 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2019 static const yytype_uint8 yyr1[] =
2021 0, 130, 131, 132, 132, 133, 133, 134, 134, 134,
2022 134, 134, 134, 134, 135, 135, 136, 136, 137, 137,
2023 137, 137, 137, 137, 138, 138, 139, 139, 140, 140,
2024 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
2025 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
2026 142, 143, 144, 144, 145, 145, 146, 146, 147, 148,
2027 148, 150, 149, 151, 151, 151, 152, 152, 153, 153,
2028 154, 155, 157, 156, 159, 158, 160, 160, 161, 161,
2029 162, 162, 162, 162, 163, 163, 164, 165, 167, 166,
2030 169, 168, 171, 170, 172, 172, 173, 173, 173, 175,
2031 174, 176, 176, 177, 178, 178, 179, 179, 181, 180,
2032 182, 180, 183, 183, 184, 184, 185, 185, 186, 186,
2033 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
2034 188, 189, 189, 191, 190, 193, 192, 194, 194, 195,
2035 195, 196, 196, 196, 196, 197, 197, 198, 198, 199,
2036 199, 199, 200, 200, 201, 202, 202, 203, 203, 203,
2037 203, 203, 203, 203, 203, 204, 204, 204, 204, 205,
2038 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
2039 211, 212, 213, 214, 214, 215, 215, 216, 216, 216,
2040 217, 217, 218, 218, 219, 219, 220, 220, 221, 222,
2041 222, 223, 224, 224, 225, 226, 226, 227, 228, 228,
2042 228, 228, 228, 228, 229, 229, 229, 229, 229, 229,
2043 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
2044 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2045 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2046 228, 228, 228, 228, 228, 228, 228, 228, 228, 230,
2047 230, 231, 231, 228, 228, 228, 228, 228, 228, 228,
2048 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2049 228, 232, 233, 233, 233, 234
2052 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2053 static const yytype_uint8 yyr2[] =
2055 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2056 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
2057 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
2058 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2059 1, 1, 1, 1, 1, 1, 1, 3, 2, 2,
2060 1, 1, 2, 0, 2, 2, 1, 3, 3, 0,
2061 2, 0, 7, 0, 1, 1, 3, 1, 2, 3,
2062 8, 6, 0, 6, 0, 7, 1, 2, 1, 2,
2063 0, 1, 1, 2, 1, 2, 4, 3, 0, 8,
2064 0, 9, 0, 5, 1, 2, 1, 2, 1, 0,
2065 6, 2, 1, 5, 1, 1, 3, 1, 0, 6,
2066 0, 5, 2, 4, 0, 1, 1, 2, 1, 1,
2067 1, 1, 1, 1, 1, 1, 1, 0, 2, 0,
2068 2, 0, 2, 0, 9, 0, 8, 0, 1, 1,
2069 2, 1, 1, 1, 1, 0, 1, 1, 2, 1,
2070 2, 8, 1, 1, 5, 0, 2, 1, 1, 1,
2071 1, 1, 1, 1, 1, 0, 1, 2, 4, 3,
2072 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
2073 9, 1, 3, 1, 1, 1, 3, 1, 1, 1,
2074 2, 0, 0, 3, 0, 1, 1, 3, 3, 4,
2075 4, 2, 1, 2, 1, 1, 3, 1, 1, 1,
2076 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2077 1, 1, 1, 1, 1, 3, 3, 3, 3, 3,
2078 3, 3, 3, 3, 3, 2, 2, 3, 3, 3,
2079 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2080 3, 3, 4, 2, 1, 3, 2, 4, 3, 0,
2081 1, 3, 5, 3, 3, 3, 3, 3, 3, 3,
2082 3, 3, 3, 3, 5, 2, 2, 2, 2, 3,
2086 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2087 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2088 means the default is an error. */
2089 static const yytype_uint16 yydefact[] =
2091 114, 281, 219, 213, 216, 217, 214, 215, 218, 0,
2092 0, 74, 0, 0, 120, 118, 119, 126, 0, 125,
2093 179, 220, 254, 121, 0, 0, 0, 223, 122, 124,
2094 123, 0, 0, 222, 221, 0, 0, 0, 0, 13,
2095 0, 0, 0, 194, 259, 0, 0, 2, 114, 5,
2096 51, 12, 34, 63, 29, 30, 31, 32, 33, 36,
2097 35, 7, 28, 0, 115, 116, 9, 8, 11, 10,
2098 208, 211, 224, 212, 207, 37, 205, 209, 210, 0,
2099 68, 72, 114, 88, 104, 105, 110, 107, 0, 181,
2100 192, 178, 0, 253, 0, 181, 0, 184, 183, 112,
2101 0, 99, 0, 194, 201, 61, 278, 277, 256, 236,
2102 235, 0, 195, 196, 204, 0, 0, 260, 0, 1,
2103 6, 281, 0, 0, 64, 0, 0, 65, 175, 0,
2104 153, 0, 152, 0, 117, 0, 0, 0, 0, 0,
2105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2106 0, 0, 0, 0, 0, 0, 0, 276, 275, 0,
2107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2108 0, 0, 0, 0, 0, 0, 194, 69, 0, 0,
2109 78, 102, 202, 0, 76, 38, 114, 39, 50, 0,
2110 40, 41, 42, 44, 0, 43, 45, 46, 0, 114,
2111 108, 0, 194, 198, 165, 0, 0, 0, 25, 279,
2112 0, 0, 258, 0, 0, 263, 0, 255, 191, 55,
2113 56, 191, 54, 0, 0, 174, 173, 0, 127, 129,
2114 191, 206, 250, 251, 248, 249, 229, 230, 232, 231,
2115 227, 228, 270, 269, 265, 264, 271, 272, 267, 266,
2116 268, 233, 234, 242, 241, 240, 273, 0, 239, 238,
2117 237, 225, 226, 246, 245, 243, 247, 244, 0, 280,
2118 0, 0, 0, 79, 101, 203, 77, 48, 114, 27,
2119 205, 49, 0, 0, 0, 23, 0, 114, 16, 22,
2120 19, 18, 21, 20, 114, 106, 0, 155, 0, 0,
2121 166, 170, 114, 182, 113, 252, 0, 24, 200, 0,
2122 197, 261, 0, 0, 53, 0, 53, 0, 0, 0,
2123 0, 131, 0, 0, 53, 0, 257, 199, 114, 285,
2124 47, 26, 0, 282, 0, 111, 17, 0, 193, 0,
2125 0, 172, 167, 191, 0, 103, 0, 114, 0, 189,
2126 188, 0, 187, 190, 0, 58, 57, 0, 114, 165,
2127 128, 0, 0, 185, 130, 135, 154, 274, 73, 0,
2128 0, 80, 109, 161, 158, 159, 157, 160, 164, 163,
2129 162, 156, 155, 0, 0, 169, 0, 0, 94, 98,
2130 96, 100, 59, 262, 0, 52, 0, 71, 0, 132,
2131 133, 0, 114, 75, 283, 284, 0, 0, 0, 81,
2132 84, 82, 171, 25, 168, 92, 0, 95, 97, 114,
2133 62, 114, 191, 114, 186, 0, 149, 0, 0, 114,
2134 147, 0, 25, 89, 85, 83, 0, 25, 191, 60,
2135 70, 0, 141, 144, 0, 0, 114, 139, 142, 143,
2136 150, 175, 136, 148, 25, 87, 180, 0, 0, 176,
2137 134, 140, 0, 86, 93, 90, 25, 0, 0, 0,
2138 165, 25, 177, 0, 0, 191, 91, 151
2141 /* YYDEFGOTO[NTERM-NUM]. */
2142 static const yytype_int16 yydefgoto[] =
2144 -1, 46, 47, 48, 49, 286, 287, 288, 306, 307,
2145 187, 279, 189, 289, 355, 190, 222, 220, 420, 52,
2146 211, 125, 126, 53, 54, 55, 56, 178, 57, 82,
2147 191, 192, 408, 409, 410, 411, 58, 198, 388, 468,
2148 389, 437, 390, 391, 59, 208, 193, 60, 87, 351,
2149 61, 294, 199, 62, 194, 64, 65, 321, 323, 362,
2150 290, 423, 291, 402, 445, 446, 447, 428, 429, 430,
2151 133, 292, 341, 381, 299, 300, 301, 227, 293, 466,
2152 92, 70, 97, 98, 352, 364, 353, 314, 203, 111,
2153 112, 71, 72, 73, 195, 113, 74, 75, 76, 77,
2154 116, 117, 78, 196, 197
2157 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2159 #define YYPACT_NINF -308
2160 static const yytype_int16 yypact[] =
2162 349, -308, -308, -308, -308, -308, -308, -308, -308, -38,
2163 -86, -308, -72, 35, -308, -308, -308, -308, 30, -308,
2164 97, -308, 52, -308, -14, 18, 36, -308, -308, -308,
2165 -308, 57, 44, -308, -308, 1538, 40, 1538, 1538, -308,
2166 1538, 1538, 1538, 1538, 1538, 1538, 102, -308, 473, -308,
2167 -308, -308, -308, 211, -308, -308, -308, -308, -308, -308,
2168 -308, -308, -308, 275, 640, -308, -308, -308, -308, -308,
2169 -308, -308, -308, -308, 96, -308, 1971, -308, -308, 82,
2170 -308, -308, 1469, -308, -308, -308, -308, -308, -32, -308,
2171 83, -308, 84, 104, 1538, 88, 89, -308, -308, -308,
2172 1538, -308, 186, 1538, 104, -308, 104, 104, 163, 104,
2173 104, 108, 116, -308, 1971, 114, 105, 128, -88, -308,
2174 -308, 165, 231, 233, -308, 144, 174, -308, -5, 240,
2175 -308, 241, -308, 244, -308, 1538, 1538, 1538, 1538, 1538,
2176 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2177 1538, 1538, 1538, 1538, 1538, 1538, 1538, -308, -308, 1538,
2178 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
2179 1538, 1538, 1538, 1538, 1538, 245, 1538, -308, 1538, 232,
2180 255, 1538, 1538, 231, 256, -308, 593, -308, 164, 248,
2181 -308, -308, -308, -308, 247, -308, -308, -308, 1538, 845,
2182 -308, 90, 1538, -308, 9, -82, 68, 1599, 1349, -308,
2183 138, 1538, -308, 1538, 1538, -308, 1538, -308, 166, 171,
2184 -308, 166, 171, 1538, 1538, -308, -308, 267, 219, 221,
2185 166, 1971, 962, 836, 836, 836, 2337, 2337, 2337, 2337,
2186 962, 962, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
2187 1971, 2032, 2093, 340, 340, 340, 1971, 1727, 2154, 2215,
2188 2276, 962, 962, 163, 163, 104, 104, 104, 1788, -308,
2189 149, -62, 276, -308, 96, 96, -308, -308, 719, -308,
2190 1849, -308, 154, 278, 1663, -308, 156, 971, -308, -308,
2191 -308, -308, -308, -308, 845, -308, 161, -69, 282, 167,
2192 195, -308, 1469, 88, -308, -308, 169, 1349, -308, -55,
2193 -308, -308, 190, 63, 204, 231, -24, 86, 74, 178,
2194 18, 292, 18, 187, 204, 1538, -308, -308, 1469, -308,
2195 -308, -308, 1538, 213, 188, -308, -308, 185, -308, 61,
2196 63, -308, -308, 166, 11, -308, 62, 1469, 1538, -308,
2197 -308, 191, -308, -308, 1538, -308, -308, 1538, 1469, 9,
2198 -308, 18, 194, -308, 220, -308, -308, 1971, -308, 76,
2199 182, 136, -308, -308, -308, -308, -308, -308, -308, -308,
2200 -308, -308, 224, 197, 282, -308, 202, 199, -308, -308,
2201 62, -308, 265, -308, 92, -308, 203, -308, 205, 220,
2202 -308, 18, 394, -308, -308, -308, 1538, 235, 207, 136,
2203 -308, -308, -308, 1349, -308, -308, 336, -308, -308, 1469,
2204 -308, 1469, 166, 1097, -308, 337, -308, 316, 216, 529,
2205 -308, 1910, 1349, -308, -308, -308, 218, 1349, 166, -308,
2206 -308, 225, -308, -308, 66, 222, 1223, -308, -308, -308,
2207 -308, -5, -308, -308, 1349, -308, -308, 223, 226, -308,
2208 -308, -308, 345, -308, -308, -308, 1349, 239, 249, 238,
2209 9, 1349, -308, 246, 250, 166, -308, -308
2212 /* YYPGOTO[NTERM-NUM]. */
2213 static const yytype_int16 yypgoto[] =
2215 -308, -308, -308, -308, 328, 85, -308, 93, -209, 196,
2216 1, -76, -244, 16, 59, 332, 268, 77, -308, -308,
2217 -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
2218 -308, -308, -308, -308, -15, -11, -308, -308, 15, -308,
2219 17, -308, -308, -308, -308, -308, -308, -308, -193, 19,
2220 -308, -308, -308, -308, 0, -308, 335, -308, -308, -308,
2221 31, -308, 39, -308, -308, -308, -40, -308, -308, -21,
2222 -308, 2, 27, -308, -307, -308, -271, -41, 3, -308,
2223 -308, -308, 398, -308, -20, 60, 78, -184, -308, -93,
2224 -308, -308, -308, -308, -308, -26, -17, -46, -18, -308,
2225 -308, -308, -308, -308, -308
2228 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2229 positive, shift that token. If negative, reduce the rule which
2230 number is the opposite. If zero, do what YYDEFACT says.
2231 If YYTABLE_NINF, syntax error. */
2232 #define YYTABLE_NINF -205
2233 static const yytype_int16 yytable[] =
2235 63, 50, 68, 69, 93, 99, 188, 127, 295, 135,
2236 210, 79, 297, 295, 297, 135, 51, 104, 115, 106,
2237 107, 95, 108, 109, 110, 114, 114, 342, 118, 225,
2238 339, 66, 88, 89, 340, 135, 85, 316, 84, 67,
2239 81, 217, 135, -66, 96, 226, 324, 302, 63, 50,
2240 68, 69, 398, 85, 83, 1, 2, 3, 345, 4,
2241 5, 6, 7, 8, 51, 373, 95, 328, 374, 375,
2242 376, 303, 377, 385, 347, 354, 18, 205, 20, 66,
2243 21, 85, 207, 270, 368, 114, 85, 67, 80, 386,
2244 200, 201, 128, 84, 387, 303, 27, 130, 349, 298,
2245 91, 384, 119, 392, 32, 378, 33, 34, 85, 296,
2246 85, 132, 94, 414, 397, 379, 380, 231, 232, 233,
2247 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
2248 244, 245, 246, 247, 248, 249, 250, 251, 252, 37,
2249 38, 253, 254, 255, 256, 257, 258, 259, 260, 261,
2250 262, 263, 264, 265, 266, 267, 268, 86, 114, 383,
2251 115, 271, 100, 473, 274, 275, 105, 102, 280, 406,
2252 103, 135, 43, 135, 44, 439, 350, 440, 45, 101,
2253 284, 304, 357, 135, 114, 404, 405, 310, 311, 209,
2254 312, 157, 158, 135, 309, 114, 114, 407, 114, 63,
2255 50, 295, 331, 358, 436, 403, 317, 318, 177, 202,
2256 204, -104, 206, 213, 121, 2, 3, 214, 4, 5,
2257 6, 7, 8, 455, 174, 216, 188, 175, 457, 212,
2258 176, 331, -67, 215, 218, 18, 221, 20, 441, 21,
2259 223, 224, 122, 228, 229, 463, 22, 230, 269, 272,
2260 157, 158, 188, 26, 458, 27, 123, 469, 273, 276,
2261 281, 282, 474, 32, 283, 33, 34, 308, 315, 313,
2262 319, 188, 320, 35, 322, 171, 172, 173, 327, 329,
2263 332, 333, 188, 174, 335, 297, 175, 63, 50, 176,
2264 338, 477, 344, 348, 63, 50, 343, 346, 37, 38,
2265 360, 128, 363, 354, 359, 129, 130, 367, 361, 365,
2266 371, 396, 370, 372, 394, 369, 400, 401, 131, 413,
2267 132, 40, 393, 339, 415, 416, 41, 42, 395, 419,
2268 114, 43, 421, 44, 422, 433, 114, 45, 432, 438,
2269 450, 363, 451, 188, 452, 188, 456, 459, 467, -3,
2270 460, 464, 1, 2, 3, 465, 4, 5, 6, 7,
2271 8, 9, 10, 11, 12, 470, 472, 13, 14, 15,
2272 16, 471, 17, 18, 19, 475, 120, 21, 476, 337,
2273 336, 424, 278, 366, 22, 124, 23, 24, 431, 25,
2274 219, 26, 356, 27, 434, 28, 29, 30, 435, 134,
2275 31, 32, 427, 33, 34, 417, 461, 418, 453, 412,
2276 462, 35, 36, 14, 15, 16, 90, 17, 382, 19,
2277 0, 399, 0, 444, 443, 448, 449, 157, 158, 427,
2278 0, 23, 0, 0, 0, 0, 37, 38, 0, 425,
2279 28, 29, 30, 0, 0, 39, 444, 443, 448, 449,
2280 169, 170, 171, 172, 173, 0, 0, 0, 0, 40,
2281 174, 0, 0, 175, 41, 42, 176, 0, 0, 43,
2282 0, 44, 0, -4, 0, 45, 1, 2, 3, 0,
2283 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2284 426, 13, 14, 15, 16, 0, 17, 18, 19, 0,
2285 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2286 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2287 29, 30, -145, 0, 31, 32, 0, 33, 34, 0,
2288 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2289 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
2290 16, 0, 17, 0, 19, 0, 0, 0, 0, 0,
2291 37, 38, 0, 0, 0, 0, 23, 0, 0, 39,
2292 0, 0, 0, 0, 425, 28, 29, 30, 0, 0,
2293 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2294 0, 0, 0, 43, 0, 44, 1, 2, 3, 45,
2295 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2296 0, 0, 14, 15, 16, 179, 17, 18, 19, 20,
2297 0, 21, 180, 0, 122, 426, 0, 0, 22, 181,
2298 23, 24, 0, 25, 182, 26, 0, 27, 183, 28,
2299 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2300 0, 0, 0, 0, 0, 35, 36, -146, 184, 14,
2301 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
2302 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
2303 37, 38, 0, 0, 0, 0, 28, 29, 30, 185,
2304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2305 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2306 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2307 0, 277, 1, 2, 3, 0, 4, 5, 6, 7,
2308 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2309 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2310 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2311 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2312 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2313 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2315 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2316 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2317 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2318 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2319 0, 44, 0, 0, 0, 45, 0, 330, 1, 2,
2320 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
2321 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
2322 19, 0, 0, 21, 0, 136, 0, 0, 0, 0,
2323 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
2324 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
2325 34, 0, -205, -205, -205, 0, 0, 35, 36, 144,
2326 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2327 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2328 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
2329 0, 285, 0, 167, 168, 0, 169, 170, 171, 172,
2330 173, 0, 0, 0, 0, 40, 174, 0, 0, 175,
2331 41, 42, 176, 0, 0, 43, 0, 44, 0, 0,
2332 0, 45, 0, -14, 1, 2, 3, 0, 4, 5,
2333 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
2334 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
2335 0, -205, 0, 0, 0, 0, 22, 0, 23, 24,
2336 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
2337 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
2338 0, 0, 0, 35, 36, -205, -205, 0, 0, 0,
2339 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
2340 158, 0, 0, 159, 160, 161, 0, 0, 37, 38,
2341 0, 0, 0, 0, 0, 0, 0, 285, 0, -205,
2342 -205, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2343 0, 40, 174, 0, 0, 175, 41, 42, 176, 0,
2344 0, 43, 0, 44, 0, 0, 0, 45, 0, -15,
2345 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
2346 10, 11, 12, 0, 0, 0, 14, 15, 16, 0,
2347 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
2348 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
2349 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
2350 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
2351 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2353 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
2354 0, 0, 0, 442, 0, 0, 0, 0, 0, 0,
2355 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
2356 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
2357 0, 0, 0, 45, 0, -137, 1, 2, 3, 0,
2358 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
2359 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
2360 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
2361 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
2362 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
2363 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
2364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2366 37, 38, 0, 0, 0, 0, 0, 0, 0, 442,
2367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2368 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
2369 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
2370 0, -138, 1, 2, 3, 0, 4, 5, 6, 7,
2371 8, 9, 10, 11, 12, 0, -114, 0, 14, 15,
2372 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2373 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2374 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2375 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2376 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2377 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2378 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2379 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
2380 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2381 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
2382 0, 44, 1, 2, 3, 45, 4, 5, 6, 7,
2383 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
2384 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
2385 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
2386 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
2387 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
2388 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
2389 0, 1, 2, 3, 0, 4, 5, 6, 7, 8,
2390 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2391 0, 0, 18, 0, 20, 185, 21, 0, 0, 0,
2392 0, 0, 0, 22, 0, 0, 0, 0, 0, 40,
2393 26, 0, 27, 0, 41, 42, 0, 0, 0, 43,
2394 32, 186, 33, 34, 0, 45, 0, 0, 0, 0,
2395 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2397 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
2398 0, 0, 0, 0, 0, 0, 0, 0, 136, 0,
2399 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
2400 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
2401 44, 0, 0, 0, 45, 137, 138, 139, 140, 141,
2402 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2403 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2404 159, 160, 161, 0, 0, 0, 0, 0, 162, 0,
2405 0, 163, 136, 164, 165, 166, 167, 168, 0, 169,
2406 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2407 0, 0, 175, 0, 0, 176, 0, 0, 305, 137,
2408 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2409 148, 149, 150, 151, 152, 153, 154, 155, 156, 0,
2410 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2411 0, 0, 162, 0, 0, 163, 136, 164, 165, 166,
2412 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2413 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2414 0, 0, 334, 137, 138, 139, 140, 141, 142, 143,
2415 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
2416 154, 155, 156, 0, 157, 158, 0, 0, 159, 160,
2417 161, 0, 0, 0, 0, 0, 162, 136, 0, 163,
2418 325, 164, 165, 166, 167, 168, 0, 169, 170, 171,
2419 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2420 175, 0, 0, 176, 137, 138, 139, 140, 141, 142,
2421 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
2422 153, 154, 155, 156, 0, 157, 158, 0, 0, 159,
2423 160, 161, 0, 0, 0, 0, 0, 162, 136, 0,
2424 163, 0, 164, 165, 166, 167, 168, 0, 169, 170,
2425 171, 172, 173, 0, 0, 0, 0, 0, 174, 326,
2426 0, 175, 0, 0, 176, 137, 138, 139, 140, 141,
2427 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
2428 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
2429 159, 160, 161, 0, 0, 0, 0, 0, 162, 136,
2430 0, 163, -204, 164, 165, 166, 167, 168, 0, 169,
2431 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
2432 0, 0, 175, 0, 0, 176, 137, 138, 139, 140,
2433 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
2434 151, 152, 153, 154, 155, 156, 0, 157, 158, 0,
2435 0, 159, 160, 161, 0, 0, 0, 0, 0, 162,
2436 136, 0, 163, 454, 164, 165, 166, 167, 168, 0,
2437 169, 170, 171, 172, 173, 0, 0, 0, 0, 0,
2438 174, 0, 0, 175, 0, 0, 176, 137, 138, 139,
2439 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
2440 150, 151, 152, 153, 154, 155, 156, 0, 157, 158,
2441 0, 0, 159, 160, 161, 0, 0, 0, 0, 0,
2442 162, 136, 0, 163, 0, 164, 165, 166, 167, 168,
2443 0, 169, 170, 171, 172, 173, 0, 0, 0, 0,
2444 0, 174, 0, 0, 175, 0, 0, 176, 137, 138,
2445 139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
2446 0, 0, 0, 0, 0, 0, 0, 156, 0, 157,
2447 158, 0, 0, 159, 160, 161, 0, 0, 0, 0,
2448 0, 0, 136, 0, 0, 0, 164, 165, 166, 167,
2449 168, 0, 169, 170, 171, 172, 173, 0, 0, 0,
2450 0, 0, 174, 0, 0, 175, 0, 0, 176, 137,
2451 138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
2452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2453 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
2454 0, 0, 0, 136, 0, 0, 0, 164, 165, 166,
2455 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
2456 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
2457 137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
2458 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2459 0, 157, 158, 0, 0, 159, 160, 161, 0, 0,
2460 0, 0, 0, 0, 136, 0, 0, 0, 0, 165,
2461 166, 167, 168, 0, 169, 170, 171, 172, 173, 0,
2462 0, 0, 0, 0, 174, 0, 0, 175, 0, 0,
2463 176, 137, 138, 139, 140, 141, 142, 143, 144, 145,
2464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2465 0, 0, 157, 158, 0, 0, 159, 160, 161, 0,
2466 0, 0, 0, 0, 0, 136, 0, 0, 0, 0,
2467 0, 166, 167, 168, 0, 169, 170, 171, 172, 173,
2468 0, 0, 0, 0, 0, 174, 0, 0, 175, 0,
2469 0, 176, 137, 138, 139, 140, 141, 142, 143, 144,
2470 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2471 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
2472 0, 0, 0, 0, 0, 0, 136, 0, 0, 0,
2473 0, 0, -205, 167, 168, 0, 169, 170, 171, 172,
2474 173, 0, 0, 0, 0, 0, 174, 0, 0, 175,
2475 0, 0, 176, 137, 138, 139, -205, -205, -205, -205,
2476 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
2477 0, 0, 0, 0, 157, 158, 0, 0, 159, 160,
2478 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2479 0, 0, 0, 0, 167, 168, 0, 169, 170, 171,
2480 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
2484 static const yytype_int16 yycheck[] =
2486 0, 0, 0, 0, 22, 25, 82, 53, 201, 97,
2487 103, 49, 3, 206, 3, 97, 0, 35, 44, 37,
2488 38, 3, 40, 41, 42, 43, 44, 298, 45, 34,
2489 99, 0, 13, 3, 103, 97, 18, 221, 3, 0,
2490 126, 129, 97, 67, 25, 50, 230, 129, 48, 48,
2491 48, 48, 359, 18, 126, 3, 4, 5, 302, 7,
2492 8, 9, 10, 11, 48, 4, 3, 129, 7, 8,
2493 9, 3, 11, 344, 129, 99, 24, 94, 26, 48,
2494 28, 18, 100, 176, 328, 103, 18, 48, 126, 27,
2495 122, 123, 26, 3, 32, 3, 44, 31, 35, 90,
2496 3, 90, 0, 347, 52, 44, 54, 55, 18, 202,
2497 18, 45, 126, 384, 358, 54, 55, 135, 136, 137,
2498 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2499 148, 149, 150, 151, 152, 153, 154, 155, 156, 87,
2500 88, 159, 160, 161, 162, 163, 164, 165, 166, 167,
2501 168, 169, 170, 171, 172, 173, 174, 122, 176, 343,
2502 186, 178, 126, 470, 181, 182, 126, 123, 186, 33,
2503 126, 97, 120, 97, 122, 419, 113, 421, 126, 122,
2504 198, 113, 96, 97, 202, 3, 4, 213, 214, 3,
2505 216, 87, 88, 97, 211, 213, 214, 61, 216, 199,
2506 199, 394, 278, 129, 413, 129, 223, 224, 126, 126,
2507 126, 123, 123, 97, 3, 4, 5, 103, 7, 8,
2508 9, 10, 11, 432, 120, 97, 302, 123, 437, 121,
2509 126, 307, 67, 128, 3, 24, 3, 26, 422, 28,
2510 96, 67, 31, 3, 3, 454, 35, 3, 3, 17,
2511 87, 88, 328, 42, 438, 44, 45, 466, 3, 3,
2512 96, 13, 471, 52, 17, 54, 55, 129, 97, 103,
2513 3, 347, 53, 62, 53, 112, 113, 114, 129, 3,
2514 126, 3, 358, 120, 128, 3, 123, 287, 287, 126,
2515 129, 475, 97, 103, 294, 294, 129, 128, 87, 88,
2516 320, 26, 322, 99, 126, 30, 31, 325, 16, 122,
2517 122, 357, 99, 128, 123, 332, 122, 97, 43, 122,
2518 45, 110, 348, 99, 122, 126, 115, 116, 354, 64,
2519 348, 120, 129, 122, 129, 128, 354, 126, 103, 3,
2520 3, 361, 26, 419, 128, 421, 128, 122, 3, 0,
2521 128, 128, 3, 4, 5, 129, 7, 8, 9, 10,
2522 11, 12, 13, 14, 15, 126, 128, 18, 19, 20,
2523 21, 122, 23, 24, 25, 129, 48, 28, 128, 294,
2524 287, 401, 186, 324, 35, 53, 37, 38, 406, 40,
2525 122, 42, 315, 44, 409, 46, 47, 48, 409, 64,
2526 51, 52, 402, 54, 55, 390, 446, 390, 429, 382,
2527 451, 62, 63, 19, 20, 21, 18, 23, 340, 25,
2528 -1, 361, -1, 423, 423, 423, 423, 87, 88, 429,
2529 -1, 37, -1, -1, -1, -1, 87, 88, -1, 45,
2530 46, 47, 48, -1, -1, 96, 446, 446, 446, 446,
2531 110, 111, 112, 113, 114, -1, -1, -1, -1, 110,
2532 120, -1, -1, 123, 115, 116, 126, -1, -1, 120,
2533 -1, 122, -1, 0, -1, 126, 3, 4, 5, -1,
2534 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2535 96, 18, 19, 20, 21, -1, 23, 24, 25, -1,
2536 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2537 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2538 47, 48, 128, -1, 51, 52, -1, 54, 55, -1,
2539 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2540 -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
2541 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
2542 87, 88, -1, -1, -1, -1, 37, -1, -1, 96,
2543 -1, -1, -1, -1, 45, 46, 47, 48, -1, -1,
2544 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2545 -1, -1, -1, 120, -1, 122, 3, 4, 5, 126,
2546 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2547 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
2548 -1, 28, 29, -1, 31, 96, -1, -1, 35, 36,
2549 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
2550 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2551 -1, -1, -1, -1, -1, 62, 63, 128, 65, 19,
2552 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
2553 -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
2554 87, 88, -1, -1, -1, -1, 46, 47, 48, 96,
2555 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2556 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2557 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2558 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2559 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2560 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2561 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2562 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2563 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2564 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2566 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2567 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2568 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2569 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2570 -1, 122, -1, -1, -1, 126, -1, 128, 3, 4,
2571 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
2572 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
2573 25, -1, -1, 28, -1, 39, -1, -1, -1, -1,
2574 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
2575 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
2576 55, -1, 66, 67, 68, -1, -1, 62, 63, 73,
2577 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2578 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2579 -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
2580 -1, 96, -1, 107, 108, -1, 110, 111, 112, 113,
2581 114, -1, -1, -1, -1, 110, 120, -1, -1, 123,
2582 115, 116, 126, -1, -1, 120, -1, 122, -1, -1,
2583 -1, 126, -1, 128, 3, 4, 5, -1, 7, 8,
2584 9, 10, 11, 12, 13, 14, 15, -1, -1, -1,
2585 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
2586 -1, 39, -1, -1, -1, -1, 35, -1, 37, 38,
2587 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
2588 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
2589 -1, -1, -1, 62, 63, 73, 74, -1, -1, -1,
2590 -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
2591 88, -1, -1, 91, 92, 93, -1, -1, 87, 88,
2592 -1, -1, -1, -1, -1, -1, -1, 96, -1, 107,
2593 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2594 -1, 110, 120, -1, -1, 123, 115, 116, 126, -1,
2595 -1, 120, -1, 122, -1, -1, -1, 126, -1, 128,
2596 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
2597 13, 14, 15, -1, -1, -1, 19, 20, 21, -1,
2598 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
2599 -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
2600 -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
2601 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
2602 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2603 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2604 -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
2605 -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
2606 -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
2607 -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
2608 -1, -1, -1, 126, -1, 128, 3, 4, 5, -1,
2609 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
2610 -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
2611 -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
2612 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
2613 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
2614 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
2615 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2616 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2617 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
2618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2619 -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
2620 -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
2621 -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
2622 11, 12, 13, 14, 15, -1, 17, -1, 19, 20,
2623 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2624 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2625 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2626 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2627 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2629 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2630 -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
2631 -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
2632 -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
2633 -1, 122, 3, 4, 5, 126, 7, 8, 9, 10,
2634 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
2635 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
2636 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
2637 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
2638 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
2639 -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
2640 -1, 3, 4, 5, -1, 7, 8, 9, 10, 11,
2641 -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
2642 -1, -1, 24, -1, 26, 96, 28, -1, -1, -1,
2643 -1, -1, -1, 35, -1, -1, -1, -1, -1, 110,
2644 42, -1, 44, -1, 115, 116, -1, -1, -1, 120,
2645 52, 122, 54, 55, -1, 126, -1, -1, -1, -1,
2646 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2648 -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
2649 -1, -1, -1, -1, -1, -1, -1, -1, 39, -1,
2650 -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
2651 -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
2652 122, -1, -1, -1, 126, 66, 67, 68, 69, 70,
2653 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2654 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2655 91, 92, 93, -1, -1, -1, -1, -1, 99, -1,
2656 -1, 102, 39, 104, 105, 106, 107, 108, -1, 110,
2657 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2658 -1, -1, 123, -1, -1, 126, -1, -1, 129, 66,
2659 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
2660 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
2661 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2662 -1, -1, 99, -1, -1, 102, 39, 104, 105, 106,
2663 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2664 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2665 -1, -1, 129, 66, 67, 68, 69, 70, 71, 72,
2666 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
2667 83, 84, 85, -1, 87, 88, -1, -1, 91, 92,
2668 93, -1, -1, -1, -1, -1, 99, 39, -1, 102,
2669 103, 104, 105, 106, 107, 108, -1, 110, 111, 112,
2670 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2671 123, -1, -1, 126, 66, 67, 68, 69, 70, 71,
2672 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
2673 82, 83, 84, 85, -1, 87, 88, -1, -1, 91,
2674 92, 93, -1, -1, -1, -1, -1, 99, 39, -1,
2675 102, -1, 104, 105, 106, 107, 108, -1, 110, 111,
2676 112, 113, 114, -1, -1, -1, -1, -1, 120, 121,
2677 -1, 123, -1, -1, 126, 66, 67, 68, 69, 70,
2678 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
2679 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
2680 91, 92, 93, -1, -1, -1, -1, -1, 99, 39,
2681 -1, 102, 103, 104, 105, 106, 107, 108, -1, 110,
2682 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
2683 -1, -1, 123, -1, -1, 126, 66, 67, 68, 69,
2684 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2685 80, 81, 82, 83, 84, 85, -1, 87, 88, -1,
2686 -1, 91, 92, 93, -1, -1, -1, -1, -1, 99,
2687 39, -1, 102, 103, 104, 105, 106, 107, 108, -1,
2688 110, 111, 112, 113, 114, -1, -1, -1, -1, -1,
2689 120, -1, -1, 123, -1, -1, 126, 66, 67, 68,
2690 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2691 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
2692 -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
2693 99, 39, -1, 102, -1, 104, 105, 106, 107, 108,
2694 -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
2695 -1, 120, -1, -1, 123, -1, -1, 126, 66, 67,
2696 68, 69, 70, 71, 72, 73, 74, -1, -1, -1,
2697 -1, -1, -1, -1, -1, -1, -1, 85, -1, 87,
2698 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
2699 -1, -1, 39, -1, -1, -1, 104, 105, 106, 107,
2700 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
2701 -1, -1, 120, -1, -1, 123, -1, -1, 126, 66,
2702 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
2703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2704 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
2705 -1, -1, -1, 39, -1, -1, -1, 104, 105, 106,
2706 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
2707 -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
2708 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
2709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2710 -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
2711 -1, -1, -1, -1, 39, -1, -1, -1, -1, 105,
2712 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
2713 -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
2714 126, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2715 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2716 -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
2717 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
2718 -1, 106, 107, 108, -1, 110, 111, 112, 113, 114,
2719 -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
2720 -1, 126, 66, 67, 68, 69, 70, 71, 72, 73,
2721 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2722 -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
2723 -1, -1, -1, -1, -1, -1, 39, -1, -1, -1,
2724 -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
2725 114, -1, -1, -1, -1, -1, 120, -1, -1, 123,
2726 -1, -1, 126, 66, 67, 68, 69, 70, 71, 72,
2727 73, 74, -1, -1, -1, -1, -1, -1, -1, -1,
2728 -1, -1, -1, -1, 87, 88, -1, -1, 91, 92,
2729 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2730 -1, -1, -1, -1, 107, 108, -1, 110, 111, 112,
2731 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
2735 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2736 symbol of state STATE-NUM. */
2737 static const yytype_uint8 yystos[] =
2739 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
2740 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
2741 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
2742 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
2743 110, 115, 116, 120, 122, 126, 131, 132, 133, 134,
2744 140, 143, 149, 153, 154, 155, 156, 158, 166, 174,
2745 177, 180, 183, 184, 185, 186, 190, 192, 201, 208,
2746 211, 221, 222, 223, 226, 227, 228, 229, 232, 49,
2747 126, 126, 159, 126, 3, 18, 122, 178, 179, 3,
2748 212, 3, 210, 228, 126, 3, 179, 212, 213, 214,
2749 126, 122, 123, 126, 228, 126, 228, 228, 228, 228,
2750 228, 219, 220, 225, 228, 225, 230, 231, 226, 0,
2751 134, 3, 31, 45, 145, 151, 152, 227, 26, 30,
2752 31, 43, 45, 200, 186, 97, 39, 66, 67, 68,
2753 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
2754 79, 80, 81, 82, 83, 84, 85, 87, 88, 91,
2755 92, 93, 99, 102, 104, 105, 106, 107, 108, 110,
2756 111, 112, 113, 114, 120, 123, 126, 126, 157, 22,
2757 29, 36, 41, 45, 65, 96, 122, 140, 141, 142,
2758 145, 160, 161, 176, 184, 224, 233, 234, 167, 182,
2759 122, 123, 126, 218, 126, 226, 123, 228, 175, 3,
2760 219, 150, 121, 97, 103, 128, 97, 129, 3, 146,
2761 147, 3, 146, 96, 67, 34, 50, 207, 3, 3,
2762 3, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2763 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2764 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
2765 228, 228, 228, 228, 228, 228, 228, 228, 228, 3,
2766 219, 226, 17, 3, 226, 226, 3, 128, 139, 141,
2767 228, 96, 13, 17, 228, 96, 135, 136, 137, 143,
2768 190, 192, 201, 208, 181, 178, 219, 3, 90, 204,
2769 205, 206, 129, 3, 113, 129, 138, 139, 129, 226,
2770 225, 225, 225, 103, 217, 97, 217, 226, 226, 3,
2771 53, 187, 53, 188, 217, 103, 121, 129, 129, 3,
2772 128, 141, 126, 3, 129, 128, 137, 135, 129, 99,
2773 103, 202, 206, 129, 97, 142, 128, 129, 103, 35,
2774 113, 179, 214, 216, 99, 144, 147, 96, 129, 126,
2775 214, 16, 189, 214, 215, 122, 144, 228, 142, 226,
2776 99, 122, 128, 4, 7, 8, 9, 11, 44, 54,
2777 55, 203, 216, 217, 90, 206, 27, 32, 168, 170,
2778 172, 173, 142, 225, 123, 225, 227, 142, 204, 215,
2779 122, 97, 193, 129, 3, 4, 33, 61, 162, 163,
2780 164, 165, 202, 122, 206, 122, 126, 168, 170, 64,
2781 148, 129, 129, 191, 214, 45, 96, 184, 197, 198,
2782 199, 228, 103, 128, 164, 165, 138, 171, 3, 142,
2783 142, 217, 96, 140, 184, 194, 195, 196, 201, 208,
2784 3, 26, 128, 199, 103, 138, 128, 138, 217, 122,
2785 128, 196, 207, 138, 128, 129, 209, 3, 169, 138,
2786 126, 122, 128, 204, 138, 129, 128, 217
2789 #define yyerrok (yyerrstatus = 0)
2790 #define yyclearin (yychar = YYEMPTY)
2791 #define YYEMPTY (-2)
2794 #define YYACCEPT goto yyacceptlab
2795 #define YYABORT goto yyabortlab
2796 #define YYERROR goto yyerrorlab
2799 /* Like YYERROR except do call yyerror. This remains here temporarily
2800 to ease the transition to the new meaning of YYERROR, for GCC.
2801 Once GCC version 2 has supplanted version 1, this can go. */
2803 #define YYFAIL goto yyerrlab
2805 #define YYRECOVERING() (!!yyerrstatus)
2807 #define YYBACKUP(Token, Value) \
2809 if (yychar == YYEMPTY && yylen == 1) \
2813 yytoken = YYTRANSLATE (yychar); \
2819 yyerror (YY_("syntax error: cannot back up")); \
2826 #define YYERRCODE 256
2829 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2830 If N is 0, then set CURRENT to the empty location which ends
2831 the previous symbol: RHS[0] (always defined). */
2833 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2834 #ifndef YYLLOC_DEFAULT
2835 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2839 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2840 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2841 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2842 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2846 (Current).first_line = (Current).last_line = \
2847 YYRHSLOC (Rhs, 0).last_line; \
2848 (Current).first_column = (Current).last_column = \
2849 YYRHSLOC (Rhs, 0).last_column; \
2855 /* YY_LOCATION_PRINT -- Print the location on the stream.
2856 This macro was not mandated originally: define only if we know
2857 we won't break user code: when these are the locations we know. */
2859 #ifndef YY_LOCATION_PRINT
2860 # if YYLTYPE_IS_TRIVIAL
2861 # define YY_LOCATION_PRINT(File, Loc) \
2862 fprintf (File, "%d.%d-%d.%d", \
2863 (Loc).first_line, (Loc).first_column, \
2864 (Loc).last_line, (Loc).last_column)
2866 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2871 /* YYLEX -- calling `yylex' with the right arguments. */
2874 # define YYLEX yylex (YYLEX_PARAM)
2876 # define YYLEX yylex ()
2879 /* Enable debugging if requested. */
2883 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2884 # define YYFPRINTF fprintf
2887 # define YYDPRINTF(Args) \
2893 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2897 YYFPRINTF (stderr, "%s ", Title); \
2898 yy_symbol_print (stderr, \
2900 YYFPRINTF (stderr, "\n"); \
2905 /*--------------------------------.
2906 | Print this symbol on YYOUTPUT. |
2907 `--------------------------------*/
2910 #if (defined __STDC__ || defined __C99__FUNC__ \
2911 || defined __cplusplus || defined _MSC_VER)
2913 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2916 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
2919 YYSTYPE const * const yyvaluep;
2925 if (yytype < YYNTOKENS)
2926 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2938 /*--------------------------------.
2939 | Print this symbol on YYOUTPUT. |
2940 `--------------------------------*/
2942 #if (defined __STDC__ || defined __C99__FUNC__ \
2943 || defined __cplusplus || defined _MSC_VER)
2945 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2948 yy_symbol_print (yyoutput, yytype, yyvaluep)
2951 YYSTYPE const * const yyvaluep;
2954 if (yytype < YYNTOKENS)
2955 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2957 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2959 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
2960 YYFPRINTF (yyoutput, ")");
2963 /*------------------------------------------------------------------.
2964 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2966 `------------------------------------------------------------------*/
2968 #if (defined __STDC__ || defined __C99__FUNC__ \
2969 || defined __cplusplus || defined _MSC_VER)
2971 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
2974 yy_stack_print (yybottom, yytop)
2975 yytype_int16 *yybottom;
2976 yytype_int16 *yytop;
2979 YYFPRINTF (stderr, "Stack now");
2980 for (; yybottom <= yytop; yybottom++)
2982 int yybot = *yybottom;
2983 YYFPRINTF (stderr, " %d", yybot);
2985 YYFPRINTF (stderr, "\n");
2988 # define YY_STACK_PRINT(Bottom, Top) \
2991 yy_stack_print ((Bottom), (Top)); \
2995 /*------------------------------------------------.
2996 | Report that the YYRULE is going to be reduced. |
2997 `------------------------------------------------*/
2999 #if (defined __STDC__ || defined __C99__FUNC__ \
3000 || defined __cplusplus || defined _MSC_VER)
3002 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3005 yy_reduce_print (yyvsp, yyrule)
3010 int yynrhs = yyr2[yyrule];
3012 unsigned long int yylno = yyrline[yyrule];
3013 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3015 /* The symbols being reduced. */
3016 for (yyi = 0; yyi < yynrhs; yyi++)
3018 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3019 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3020 &(yyvsp[(yyi + 1) - (yynrhs)])
3022 YYFPRINTF (stderr, "\n");
3026 # define YY_REDUCE_PRINT(Rule) \
3029 yy_reduce_print (yyvsp, Rule); \
3032 /* Nonzero means print parse trace. It is left uninitialized so that
3033 multiple parsers can coexist. */
3035 #else /* !YYDEBUG */
3036 # define YYDPRINTF(Args)
3037 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3038 # define YY_STACK_PRINT(Bottom, Top)
3039 # define YY_REDUCE_PRINT(Rule)
3040 #endif /* !YYDEBUG */
3043 /* YYINITDEPTH -- initial size of the parser's stacks. */
3045 # define YYINITDEPTH 200
3048 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3049 if the built-in stack extension method is used).
3051 Do not make this value too large; the results are undefined if
3052 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3053 evaluated with infinite-precision integer arithmetic. */
3056 # define YYMAXDEPTH 10000
3064 # if defined __GLIBC__ && defined _STRING_H
3065 # define yystrlen strlen
3067 /* Return the length of YYSTR. */
3068 #if (defined __STDC__ || defined __C99__FUNC__ \
3069 || defined __cplusplus || defined _MSC_VER)
3071 yystrlen (const char *yystr)
3079 for (yylen = 0; yystr[yylen]; yylen++)
3087 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3088 # define yystpcpy stpcpy
3090 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3092 #if (defined __STDC__ || defined __C99__FUNC__ \
3093 || defined __cplusplus || defined _MSC_VER)
3095 yystpcpy (char *yydest, const char *yysrc)
3098 yystpcpy (yydest, yysrc)
3104 const char *yys = yysrc;
3106 while ((*yyd++ = *yys++) != '\0')
3115 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3116 quotes and backslashes, so that it's suitable for yyerror. The
3117 heuristic is that double-quoting is unnecessary unless the string
3118 contains an apostrophe, a comma, or backslash (other than
3119 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3120 null, do not copy; instead, return the length of what the result
3123 yytnamerr (char *yyres, const char *yystr)
3128 char const *yyp = yystr;
3135 goto do_not_strip_quotes;
3139 goto do_not_strip_quotes;
3152 do_not_strip_quotes: ;
3156 return yystrlen (yystr);
3158 return yystpcpy (yyres, yystr) - yyres;
3162 /* Copy into YYRESULT an error message about the unexpected token
3163 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3164 including the terminating null byte. If YYRESULT is null, do not
3165 copy anything; just return the number of bytes that would be
3166 copied. As a special case, return 0 if an ordinary "syntax error"
3167 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3168 size calculation. */
3170 yysyntax_error (char *yyresult, int yystate, int yychar)
3172 int yyn = yypact[yystate];
3174 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3178 int yytype = YYTRANSLATE (yychar);
3179 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3180 YYSIZE_T yysize = yysize0;
3182 int yysize_overflow = 0;
3183 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3184 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3188 /* This is so xgettext sees the translatable formats that are
3189 constructed on the fly. */
3190 YY_("syntax error, unexpected %s");
3191 YY_("syntax error, unexpected %s, expecting %s");
3192 YY_("syntax error, unexpected %s, expecting %s or %s");
3193 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3194 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3198 static char const yyunexpected[] = "syntax error, unexpected %s";
3199 static char const yyexpecting[] = ", expecting %s";
3200 static char const yyor[] = " or %s";
3201 char yyformat[sizeof yyunexpected
3202 + sizeof yyexpecting - 1
3203 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3204 * (sizeof yyor - 1))];
3205 char const *yyprefix = yyexpecting;
3207 /* Start YYX at -YYN if negative to avoid negative indexes in
3209 int yyxbegin = yyn < 0 ? -yyn : 0;
3211 /* Stay within bounds of both yycheck and yytname. */
3212 int yychecklim = YYLAST - yyn + 1;
3213 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3216 yyarg[0] = yytname[yytype];
3217 yyfmt = yystpcpy (yyformat, yyunexpected);
3219 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3220 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3222 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3226 yyformat[sizeof yyunexpected - 1] = '\0';
3229 yyarg[yycount++] = yytname[yyx];
3230 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3231 yysize_overflow |= (yysize1 < yysize);
3233 yyfmt = yystpcpy (yyfmt, yyprefix);
3237 yyf = YY_(yyformat);
3238 yysize1 = yysize + yystrlen (yyf);
3239 yysize_overflow |= (yysize1 < yysize);
3242 if (yysize_overflow)
3243 return YYSIZE_MAXIMUM;
3247 /* Avoid sprintf, as that infringes on the user's name space.
3248 Don't have undefined behavior even if the translation
3249 produced a string with the wrong number of "%s"s. */
3250 char *yyp = yyresult;
3252 while ((*yyp = *yyf) != '\0')
3254 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3256 yyp += yytnamerr (yyp, yyarg[yyi++]);
3269 #endif /* YYERROR_VERBOSE */
3272 /*-----------------------------------------------.
3273 | Release the memory associated to this symbol. |
3274 `-----------------------------------------------*/
3277 #if (defined __STDC__ || defined __C99__FUNC__ \
3278 || defined __cplusplus || defined _MSC_VER)
3280 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3283 yydestruct (yymsg, yytype, yyvaluep)
3293 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3303 /* Prevent warnings from -Wmissing-prototypes. */
3304 #ifdef YYPARSE_PARAM
3305 #if defined __STDC__ || defined __cplusplus
3306 int yyparse (void *YYPARSE_PARAM);
3310 #else /* ! YYPARSE_PARAM */
3311 #if defined __STDC__ || defined __cplusplus
3316 #endif /* ! YYPARSE_PARAM */
3319 /* The lookahead symbol. */
3322 /* The semantic value of the lookahead symbol. */
3325 /* Number of syntax errors so far. */
3330 /*-------------------------.
3331 | yyparse or yypush_parse. |
3332 `-------------------------*/
3334 #ifdef YYPARSE_PARAM
3335 #if (defined __STDC__ || defined __C99__FUNC__ \
3336 || defined __cplusplus || defined _MSC_VER)
3338 yyparse (void *YYPARSE_PARAM)
3341 yyparse (YYPARSE_PARAM)
3342 void *YYPARSE_PARAM;
3344 #else /* ! YYPARSE_PARAM */
3345 #if (defined __STDC__ || defined __C99__FUNC__ \
3346 || defined __cplusplus || defined _MSC_VER)
3359 /* Number of tokens to shift before error messages enabled. */
3362 /* The stacks and their tools:
3363 `yyss': related to states.
3364 `yyvs': related to semantic values.
3366 Refer to the stacks thru separate pointers, to allow yyoverflow
3367 to reallocate them elsewhere. */
3369 /* The state stack. */
3370 yytype_int16 yyssa[YYINITDEPTH];
3372 yytype_int16 *yyssp;
3374 /* The semantic value stack. */
3375 YYSTYPE yyvsa[YYINITDEPTH];
3379 YYSIZE_T yystacksize;
3383 /* Lookahead token as an internal (translated) token number. */
3385 /* The variables used to return semantic value and location from the
3390 /* Buffer for error messages, and its allocated size. */
3392 char *yymsg = yymsgbuf;
3393 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3396 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3398 /* The number of symbols on the RHS of the reduced rule.
3399 Keep to zero when no symbol should be popped. */
3405 yystacksize = YYINITDEPTH;
3407 YYDPRINTF ((stderr, "Starting parse\n"));
3412 yychar = YYEMPTY; /* Cause a token to be read. */
3414 /* Initialize stack pointers.
3415 Waste one element of value and location stack
3416 so that they stay on the same level as the state stack.
3417 The wasted elements are never initialized. */
3423 /*------------------------------------------------------------.
3424 | yynewstate -- Push a new state, which is found in yystate. |
3425 `------------------------------------------------------------*/
3427 /* In all cases, when you get here, the value and location stacks
3428 have just been pushed. So pushing a state here evens the stacks. */
3434 if (yyss + yystacksize - 1 <= yyssp)
3436 /* Get the current used size of the three stacks, in elements. */
3437 YYSIZE_T yysize = yyssp - yyss + 1;
3441 /* Give user a chance to reallocate the stack. Use copies of
3442 these so that the &'s don't force the real ones into
3444 YYSTYPE *yyvs1 = yyvs;
3445 yytype_int16 *yyss1 = yyss;
3447 /* Each stack pointer address is followed by the size of the
3448 data in use in that stack, in bytes. This used to be a
3449 conditional around just the two extra args, but that might
3450 be undefined if yyoverflow is a macro. */
3451 yyoverflow (YY_("memory exhausted"),
3452 &yyss1, yysize * sizeof (*yyssp),
3453 &yyvs1, yysize * sizeof (*yyvsp),
3459 #else /* no yyoverflow */
3460 # ifndef YYSTACK_RELOCATE
3461 goto yyexhaustedlab;
3463 /* Extend the stack our own way. */
3464 if (YYMAXDEPTH <= yystacksize)
3465 goto yyexhaustedlab;
3467 if (YYMAXDEPTH < yystacksize)
3468 yystacksize = YYMAXDEPTH;
3471 yytype_int16 *yyss1 = yyss;
3472 union yyalloc *yyptr =
3473 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3475 goto yyexhaustedlab;
3476 YYSTACK_RELOCATE (yyss_alloc, yyss);
3477 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3478 # undef YYSTACK_RELOCATE
3480 YYSTACK_FREE (yyss1);
3483 #endif /* no yyoverflow */
3485 yyssp = yyss + yysize - 1;
3486 yyvsp = yyvs + yysize - 1;
3488 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3489 (unsigned long int) yystacksize));
3491 if (yyss + yystacksize - 1 <= yyssp)
3495 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3497 if (yystate == YYFINAL)
3507 /* Do appropriate processing given the current state. Read a
3508 lookahead token if we need one and don't already have one. */
3510 /* First try to decide what to do without reference to lookahead token. */
3511 yyn = yypact[yystate];
3512 if (yyn == YYPACT_NINF)
3515 /* Not known => get a lookahead token if don't already have one. */
3517 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3518 if (yychar == YYEMPTY)
3520 YYDPRINTF ((stderr, "Reading a token: "));
3524 if (yychar <= YYEOF)
3526 yychar = yytoken = YYEOF;
3527 YYDPRINTF ((stderr, "Now at end of input.\n"));
3531 yytoken = YYTRANSLATE (yychar);
3532 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3535 /* If the proper action on seeing token YYTOKEN is to reduce or to
3536 detect an error, take that action. */
3538 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3543 if (yyn == 0 || yyn == YYTABLE_NINF)
3549 /* Count tokens shifted since error; after three, turn off error
3554 /* Shift the lookahead token. */
3555 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3557 /* Discard the shifted token. */
3566 /*-----------------------------------------------------------.
3567 | yydefault -- do the default action for the current state. |
3568 `-----------------------------------------------------------*/
3570 yyn = yydefact[yystate];
3576 /*-----------------------------.
3577 | yyreduce -- Do a reduction. |
3578 `-----------------------------*/
3580 /* yyn is the number of a rule to reduce with. */
3583 /* If YYLEN is nonzero, implement the default value of the action:
3586 Otherwise, the following line sets YYVAL to garbage.
3587 This behavior is undocumented and Bison
3588 users should not rely upon it. Assigning to YYVAL
3589 unconditionally makes the parser a bit smaller, and it avoids a
3590 GCC warning that YYVAL may be used uninitialized. */
3591 yyval = yyvsp[1-yylen];
3594 YY_REDUCE_PRINT (yyn);
3599 /* Line 1455 of yacc.c */
3600 #line 1509 "parser.y"
3601 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
3606 /* Line 1455 of yacc.c */
3607 #line 1510 "parser.y"
3608 {(yyval.code)=code_new();;}
3613 /* Line 1455 of yacc.c */
3614 #line 1512 "parser.y"
3615 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));;}
3620 /* Line 1455 of yacc.c */
3621 #line 1513 "parser.y"
3622 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
3627 /* Line 1455 of yacc.c */
3628 #line 1528 "parser.y"
3634 /* Line 1455 of yacc.c */
3635 #line 1536 "parser.y"
3636 {/*TODO*/(yyval.code)=0;;}
3641 /* Line 1455 of yacc.c */
3642 #line 1537 "parser.y"
3643 {/*TODO*/(yyval.code)=0;;}
3648 /* Line 1455 of yacc.c */
3649 #line 1539 "parser.y"
3650 {(yyval.code)=(yyvsp[(2) - (3)].code);;}
3655 /* Line 1455 of yacc.c */
3656 #line 1540 "parser.y"
3662 /* Line 1455 of yacc.c */
3663 #line 1541 "parser.y"
3664 {(yyval.code)=(yyvsp[(1) - (2)].code);;}
3669 /* Line 1455 of yacc.c */
3670 #line 1542 "parser.y"
3671 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
3676 /* Line 1455 of yacc.c */
3677 #line 1546 "parser.y"
3679 if((yyvsp[(1) - (1)].code)) as3_warning("code ignored");
3685 /* Line 1455 of yacc.c */
3686 #line 1552 "parser.y"
3687 {(yyval.value)=(yyvsp[(2) - (2)].value);;}
3692 /* Line 1455 of yacc.c */
3693 #line 1553 "parser.y"
3694 {(yyval.value).c=abc_pushundefined(0);
3695 (yyval.value).t=TYPE_ANY;
3701 /* Line 1455 of yacc.c */
3702 #line 1557 "parser.y"
3703 {(yyval.code)=(yyvsp[(2) - (2)].code);;}
3708 /* Line 1455 of yacc.c */
3709 #line 1558 "parser.y"
3710 {(yyval.code)=(yyvsp[(2) - (2)].code);;}
3715 /* Line 1455 of yacc.c */
3716 #line 1560 "parser.y"
3717 {(yyval.code) = (yyvsp[(1) - (1)].code);;}
3722 /* Line 1455 of yacc.c */
3723 #line 1561 "parser.y"
3724 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));;}
3729 /* Line 1455 of yacc.c */
3730 #line 1564 "parser.y"
3732 if(variable_exists((yyvsp[(1) - (3)].id)))
3733 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3735 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3736 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
3737 (yyvsp[(2) - (3)].classinfo)->name);
3740 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3742 if((yyvsp[(2) - (3)].classinfo)) {
3743 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3744 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3745 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3746 (yyval.code) = abc_setlocal((yyval.code), index);
3748 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3749 (yyval.code) = abc_setlocal((yyval.code), index);
3752 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3753 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3754 (yyval.code) = abc_coerce_a((yyval.code));
3755 (yyval.code) = abc_setlocal((yyval.code), index);
3757 (yyval.code) = code_new();
3761 /* that's the default for a local register, anyway
3763 state->method->initcode = abc_pushundefined(state->method->initcode);
3764 state->method->initcode = abc_setlocal(state->method->initcode, index);
3766 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3772 /* Line 1455 of yacc.c */
3773 #line 1604 "parser.y"
3774 {(yyval.code) = code_new();;}
3779 /* Line 1455 of yacc.c */
3780 #line 1605 "parser.y"
3781 {(yyval.code)=(yyvsp[(2) - (2)].code);;}
3786 /* Line 1455 of yacc.c */
3787 #line 1608 "parser.y"
3793 /* Line 1455 of yacc.c */
3794 #line 1608 "parser.y"
3797 (yyval.code) = code_new();
3798 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3799 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3801 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3802 if((yyvsp[(7) - (7)].code)) {
3803 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3805 myif->branch = (yyval.code) = abc_nop((yyval.code));
3806 if((yyvsp[(7) - (7)].code)) {
3807 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3808 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3810 (yyval.code) = var_block((yyval.code));
3817 /* Line 1455 of yacc.c */
3818 #line 1627 "parser.y"
3819 {(yyval.code)=code_new();;}
3824 /* Line 1455 of yacc.c */
3825 #line 1632 "parser.y"
3827 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
3833 /* Line 1455 of yacc.c */
3834 #line 1635 "parser.y"
3836 (yyval.id)=(yyvsp[(1) - (1)].id);
3842 /* Line 1455 of yacc.c */
3843 #line 1639 "parser.y"
3844 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;;}
3849 /* Line 1455 of yacc.c */
3850 #line 1640 "parser.y"
3851 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;;}
3856 /* Line 1455 of yacc.c */
3857 #line 1642 "parser.y"
3859 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
3860 (yyval.code) = code_new();
3861 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
3862 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3863 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
3864 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3865 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
3866 code_t*cont = (yyval.code) = abc_nop((yyval.code));
3867 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
3868 (yyval.code) = abc_jump((yyval.code), loopstart);
3869 code_t*out = (yyval.code) = abc_nop((yyval.code));
3870 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
3871 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
3874 (yyval.code) = var_block((yyval.code));
3881 /* Line 1455 of yacc.c */
3882 #line 1662 "parser.y"
3884 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
3885 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
3886 int it = new_variable(tmp1name, TYPE_INT, 0);
3887 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
3888 int array = new_variable(tmp1name, 0, 0);
3890 (yyval.code) = code_new();
3891 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
3892 (yyval.code) = abc_coerce_a((yyval.code));
3893 (yyval.code) = abc_setlocal((yyval.code), array);
3894 (yyval.code) = abc_pushbyte((yyval.code), 0);
3895 (yyval.code) = abc_setlocal((yyval.code), it);
3897 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3899 (yyval.code) = abc_hasnext2((yyval.code), array, it);
3900 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3901 (yyval.code) = abc_getlocal((yyval.code), array);
3902 (yyval.code) = abc_getlocal((yyval.code), it);
3903 if(!(yyvsp[(1) - (6)].for_start).each)
3904 (yyval.code) = abc_nextname((yyval.code));
3906 (yyval.code) = abc_nextvalue((yyval.code));
3907 (yyval.code) = converttype((yyval.code), 0, var->type);
3908 (yyval.code) = abc_setlocal((yyval.code), var->index);
3910 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
3911 (yyval.code) = abc_jump((yyval.code), loopstart);
3913 code_t*out = (yyval.code) = abc_nop((yyval.code));
3914 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
3915 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
3919 (yyval.code) = var_block((yyval.code));
3929 /* Line 1455 of yacc.c */
3930 #line 1705 "parser.y"
3936 /* Line 1455 of yacc.c */
3937 #line 1705 "parser.y"
3940 (yyval.code) = code_new();
3942 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3943 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3944 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
3945 code_t*cont = (yyval.code) = abc_nop((yyval.code));
3946 myjmp->branch = cont;
3947 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
3948 (yyval.code) = abc_iftrue((yyval.code), loopstart);
3949 code_t*out = (yyval.code) = abc_nop((yyval.code));
3950 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
3951 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
3953 (yyval.code) = var_block((yyval.code));
3960 /* Line 1455 of yacc.c */
3961 #line 1724 "parser.y"
3967 /* Line 1455 of yacc.c */
3968 #line 1724 "parser.y"
3970 (yyval.code) = code_new();
3971 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3972 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
3973 code_t*cont = (yyval.code) = abc_nop((yyval.code));
3974 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
3975 (yyval.code) = abc_iftrue((yyval.code), loopstart);
3976 code_t*out = (yyval.code) = abc_nop((yyval.code));
3977 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
3978 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
3980 (yyval.code) = var_block((yyval.code));
3987 /* Line 1455 of yacc.c */
3988 #line 1739 "parser.y"
3990 (yyval.code) = abc___break__(0, "");
3996 /* Line 1455 of yacc.c */
3997 #line 1742 "parser.y"
3999 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4005 /* Line 1455 of yacc.c */
4006 #line 1745 "parser.y"
4008 (yyval.code) = abc___continue__(0, "");
4014 /* Line 1455 of yacc.c */
4015 #line 1748 "parser.y"
4017 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4023 /* Line 1455 of yacc.c */
4024 #line 1752 "parser.y"
4030 /* Line 1455 of yacc.c */
4031 #line 1753 "parser.y"
4032 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
4037 /* Line 1455 of yacc.c */
4038 #line 1754 "parser.y"
4039 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
4044 /* Line 1455 of yacc.c */
4045 #line 1755 "parser.y"
4046 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));;}
4051 /* Line 1455 of yacc.c */
4052 #line 1756 "parser.y"
4053 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4058 /* Line 1455 of yacc.c */
4059 #line 1757 "parser.y"
4060 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));;}
4065 /* Line 1455 of yacc.c */
4066 #line 1759 "parser.y"
4068 (yyval.code) = abc_dup(0);
4069 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4070 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4071 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4072 if((yyval.code)->opcode != OPCODE___BREAK__) {
4073 (yyval.code) = abc___fallthrough__((yyval.code), "");
4075 code_t*e = (yyval.code) = abc_nop((yyval.code));
4082 /* Line 1455 of yacc.c */
4083 #line 1770 "parser.y"
4085 (yyval.code) = (yyvsp[(3) - (3)].code);
4091 /* Line 1455 of yacc.c */
4092 #line 1773 "parser.y"
4098 /* Line 1455 of yacc.c */
4099 #line 1773 "parser.y"
4101 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4102 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4103 code_t*out = (yyval.code) = abc_pop((yyval.code));
4104 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4106 code_t*c = (yyval.code),*lastblock=0;
4108 if(c->opcode == OPCODE_IFNE) {
4109 if(!c->next) syntaxerror("internal error in fallthrough handling");
4111 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4113 c->opcode = OPCODE_JUMP;
4114 c->branch = lastblock;
4116 /* fall through end of switch */
4117 c->opcode = OPCODE_NOP;
4123 (yyval.code) = var_block((yyval.code));
4130 /* Line 1455 of yacc.c */
4131 #line 1802 "parser.y"
4132 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);;}
4137 /* Line 1455 of yacc.c */
4138 #line 1803 "parser.y"
4140 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4141 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4143 NEW(abc_exception_t, e)
4144 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4145 e->var_name = multiname_clone(&name);
4146 (yyval.exception) = e;
4149 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4150 e->target = c = abc_nop(0);
4151 c = abc_setlocal(c, i);
4152 c = code_append(c, (yyvsp[(8) - (9)].code));
4162 /* Line 1455 of yacc.c */
4163 #line 1822 "parser.y"
4164 {new_state();state->exception_name=0;;}
4169 /* Line 1455 of yacc.c */
4170 #line 1822 "parser.y"
4172 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4173 if(!(yyvsp[(4) - (5)].code)) {
4174 (yyval.exception)=0;
4177 NEW(abc_exception_t, e)
4178 e->exc_type = 0; //all exceptions
4179 e->var_name = 0; //no name
4182 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4184 (yyval.exception) = e;
4191 /* Line 1455 of yacc.c */
4192 #line 1839 "parser.y"
4193 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));;}
4198 /* Line 1455 of yacc.c */
4199 #line 1840 "parser.y"
4200 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));;}
4205 /* Line 1455 of yacc.c */
4206 #line 1841 "parser.y"
4207 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4212 /* Line 1455 of yacc.c */
4213 #line 1842 "parser.y"
4215 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4216 (yyval.catch_list).finally = 0;
4217 if((yyvsp[(2) - (2)].exception)) {
4218 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4219 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4226 /* Line 1455 of yacc.c */
4227 #line 1850 "parser.y"
4229 (yyval.catch_list).l=list_new();
4230 (yyval.catch_list).finally = 0;
4231 if((yyvsp[(1) - (1)].exception)) {
4232 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4233 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4240 /* Line 1455 of yacc.c */
4241 #line 1859 "parser.y"
4247 /* Line 1455 of yacc.c */
4248 #line 1859 "parser.y"
4250 code_t*out = abc_nop(0);
4252 code_t*start = abc_nop(0);
4253 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4254 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4255 (yyval.code) = abc_jump((yyval.code), out);
4257 code_t*end = (yyval.code) = abc_nop((yyval.code));
4260 if((yyvsp[(6) - (6)].catch_list).finally)
4261 tmp = new_variable("__finally__", 0, 0);
4263 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4266 abc_exception_t*e = l->abc_exception;
4268 (yyval.code) = code_append((yyval.code), e->target);
4269 (yyval.code) = abc_jump((yyval.code), out);
4271 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4273 e->target = (yyval.code) = abc_nop((yyval.code));
4274 (yyval.code) = abc___rethrow__((yyval.code));
4282 (yyval.code) = code_append((yyval.code), out);
4284 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4286 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4288 (yyval.code) = var_block((yyval.code));
4295 /* Line 1455 of yacc.c */
4296 #line 1904 "parser.y"
4298 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4299 (yyval.code)=abc_throw((yyval.code));
4305 /* Line 1455 of yacc.c */
4306 #line 1908 "parser.y"
4308 if(!state->exception_name)
4309 syntaxerror("re-throw only possible within a catch block");
4310 variable_t*v = find_variable(state->exception_name);
4311 (yyval.code)=code_new();
4312 (yyval.code)=abc_getlocal((yyval.code), v->index);
4313 (yyval.code)=abc_throw((yyval.code));
4319 /* Line 1455 of yacc.c */
4320 #line 1919 "parser.y"
4322 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4323 (yyval.code) = abc_pushscope((yyval.code));
4324 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4325 (yyval.code) = abc_popscope((yyval.code));
4331 /* Line 1455 of yacc.c */
4332 #line 1929 "parser.y"
4333 {(yyval.id)="package";;}
4338 /* Line 1455 of yacc.c */
4339 #line 1931 "parser.y"
4340 {(yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;;}
4345 /* Line 1455 of yacc.c */
4346 #line 1932 "parser.y"
4347 {(yyval.id)=strdup((yyvsp[(1) - (1)].id));;}
4352 /* Line 1455 of yacc.c */
4353 #line 1934 "parser.y"
4354 {startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;;}
4359 /* Line 1455 of yacc.c */
4360 #line 1934 "parser.y"
4361 {endpackage();(yyval.code)=0;;}
4366 /* Line 1455 of yacc.c */
4367 #line 1935 "parser.y"
4373 /* Line 1455 of yacc.c */
4374 #line 1935 "parser.y"
4375 {endpackage();(yyval.code)=0;;}
4380 /* Line 1455 of yacc.c */
4381 #line 1937 "parser.y"
4383 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4385 syntaxerror("Couldn't import class\n");
4386 state_has_imports();
4387 dict_put(state->imports, c->name, c);
4394 /* Line 1455 of yacc.c */
4395 #line 1945 "parser.y"
4398 i->package = (yyvsp[(2) - (4)].id);
4399 state_has_imports();
4400 list_append(state->wildcard_imports, i);
4407 /* Line 1455 of yacc.c */
4408 #line 1955 "parser.y"
4414 /* Line 1455 of yacc.c */
4415 #line 1956 "parser.y"
4416 {(yyval.flags)=(yyvsp[(1) - (1)].flags);}
4421 /* Line 1455 of yacc.c */
4422 #line 1957 "parser.y"
4423 {(yyval.flags)=(yyvsp[(1) - (1)].token);;}
4428 /* Line 1455 of yacc.c */
4429 #line 1958 "parser.y"
4430 {(yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);;}
4435 /* Line 1455 of yacc.c */
4436 #line 1960 "parser.y"
4437 {(yyval.token)=FLAG_PUBLIC;;}
4442 /* Line 1455 of yacc.c */
4443 #line 1961 "parser.y"
4444 {(yyval.token)=FLAG_PRIVATE;;}
4449 /* Line 1455 of yacc.c */
4450 #line 1962 "parser.y"
4451 {(yyval.token)=FLAG_PROTECTED;;}
4456 /* Line 1455 of yacc.c */
4457 #line 1963 "parser.y"
4458 {(yyval.token)=FLAG_STATIC;;}
4463 /* Line 1455 of yacc.c */
4464 #line 1964 "parser.y"
4465 {(yyval.token)=FLAG_DYNAMIC;;}
4470 /* Line 1455 of yacc.c */
4471 #line 1965 "parser.y"
4472 {(yyval.token)=FLAG_FINAL;;}
4477 /* Line 1455 of yacc.c */
4478 #line 1966 "parser.y"
4479 {(yyval.token)=FLAG_OVERRIDE;;}
4484 /* Line 1455 of yacc.c */
4485 #line 1967 "parser.y"
4486 {(yyval.token)=FLAG_NATIVE;;}
4491 /* Line 1455 of yacc.c */
4492 #line 1968 "parser.y"
4493 {(yyval.token)=FLAG_PACKAGEINTERNAL;;}
4498 /* Line 1455 of yacc.c */
4499 #line 1970 "parser.y"
4500 {(yyval.classinfo)=registry_getobjectclass();;}
4505 /* Line 1455 of yacc.c */
4506 #line 1971 "parser.y"
4507 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);;}
4512 /* Line 1455 of yacc.c */
4513 #line 1973 "parser.y"
4514 {(yyval.classinfo_list)=list_new();;}
4519 /* Line 1455 of yacc.c */
4520 #line 1974 "parser.y"
4521 {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);;}
4526 /* Line 1455 of yacc.c */
4527 #line 1976 "parser.y"
4528 {(yyval.classinfo_list)=list_new();;}
4533 /* Line 1455 of yacc.c */
4534 #line 1977 "parser.y"
4535 {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);;}
4540 /* Line 1455 of yacc.c */
4541 #line 1981 "parser.y"
4542 {startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);;}
4547 /* Line 1455 of yacc.c */
4548 #line 1983 "parser.y"
4549 {endclass();(yyval.code)=0;;}
4554 /* Line 1455 of yacc.c */
4555 #line 1987 "parser.y"
4556 {startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);;}
4561 /* Line 1455 of yacc.c */
4562 #line 1989 "parser.y"
4563 {endclass();(yyval.code)=0;;}
4568 /* Line 1455 of yacc.c */
4569 #line 2001 "parser.y"
4571 code_t*c = state->cls->static_init;
4572 c = code_append(c, (yyvsp[(1) - (1)].code));
4573 state->cls->static_init = c;
4579 /* Line 1455 of yacc.c */
4580 #line 2012 "parser.y"
4582 syntaxerror("variable declarations not allowed in interfaces");
4588 /* Line 1455 of yacc.c */
4589 #line 2015 "parser.y"
4591 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
4592 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
4593 syntaxerror("invalid method modifiers: interface methods always need to be public");
4595 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
4596 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
4602 /* Line 1455 of yacc.c */
4603 #line 2028 "parser.y"
4605 int flags = (yyvsp[(1) - (5)].flags);
4606 memberinfo_t* info = state->cls?
4607 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
4608 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
4610 info->type = (yyvsp[(4) - (5)].classinfo);
4611 info->flags = flags;
4614 namespace_t mname_ns = {flags2access(flags), ""};
4615 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
4617 trait_list_t**traits;
4621 traits = &global->init->traits;
4622 code = &global->init->method->body->code;
4623 } else if(flags&FLAG_STATIC) {
4625 traits = &state->cls->abc->static_traits;
4626 code = &state->cls->static_init;
4628 // instance variable
4629 traits = &state->cls->abc->traits;
4630 code = &state->cls->init;
4634 if((yyvsp[(4) - (5)].classinfo)) {
4635 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
4636 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
4638 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
4640 info->slot = t->slot_id;
4642 /* initalization code (if needed) */
4644 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
4645 c = abc_getlocal_0(c);
4646 c = code_append(c, (yyvsp[(5) - (5)].value).c);
4647 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
4648 c = abc_setslot(c, t->slot_id);
4651 *code = code_append(*code, c);
4653 if((yyvsp[(2) - (5)].token)==KW_CONST) {
4654 t->kind= TRAIT_CONST;
4663 /* Line 1455 of yacc.c */
4664 #line 2086 "parser.y"
4665 {(yyval.constant)=0;;}
4670 /* Line 1455 of yacc.c */
4671 #line 2087 "parser.y"
4672 {(yyval.constant)=(yyvsp[(2) - (2)].constant);;}
4677 /* Line 1455 of yacc.c */
4678 #line 2089 "parser.y"
4679 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));;}
4684 /* Line 1455 of yacc.c */
4685 #line 2090 "parser.y"
4686 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));;}
4691 /* Line 1455 of yacc.c */
4692 #line 2091 "parser.y"
4693 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));;}
4698 /* Line 1455 of yacc.c */
4699 #line 2092 "parser.y"
4700 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));;}
4705 /* Line 1455 of yacc.c */
4706 #line 2093 "parser.y"
4707 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);;}
4712 /* Line 1455 of yacc.c */
4713 #line 2095 "parser.y"
4714 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));;}
4719 /* Line 1455 of yacc.c */
4720 #line 2096 "parser.y"
4721 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));;}
4726 /* Line 1455 of yacc.c */
4727 #line 2097 "parser.y"
4728 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));;}
4733 /* Line 1455 of yacc.c */
4734 #line 2102 "parser.y"
4736 memset(&(yyval.params),0,sizeof((yyval.params)));
4742 /* Line 1455 of yacc.c */
4743 #line 2105 "parser.y"
4745 (yyval.params)=(yyvsp[(1) - (1)].params);
4751 /* Line 1455 of yacc.c */
4752 #line 2110 "parser.y"
4754 memset(&(yyval.params),0,sizeof((yyval.params)));
4755 (yyval.params).varargs=1;
4756 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
4762 /* Line 1455 of yacc.c */
4763 #line 2115 "parser.y"
4765 (yyval.params) =(yyvsp[(1) - (4)].params);
4766 (yyval.params).varargs=1;
4767 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
4773 /* Line 1455 of yacc.c */
4774 #line 2122 "parser.y"
4776 (yyval.params) = (yyvsp[(1) - (3)].params);
4777 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
4783 /* Line 1455 of yacc.c */
4784 #line 2126 "parser.y"
4786 memset(&(yyval.params),0,sizeof((yyval.params)));
4787 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
4793 /* Line 1455 of yacc.c */
4794 #line 2131 "parser.y"
4796 (yyval.param) = malloc(sizeof(param_t));
4797 (yyval.param)->name=(yyvsp[(1) - (4)].id);
4798 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
4799 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
4805 /* Line 1455 of yacc.c */
4806 #line 2137 "parser.y"
4808 (yyval.param) = malloc(sizeof(param_t));
4809 (yyval.param)->name=(yyvsp[(1) - (2)].id);
4810 (yyval.param)->type = TYPE_ANY;
4811 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
4817 /* Line 1455 of yacc.c */
4818 #line 2143 "parser.y"
4819 {(yyval.token)=(yyvsp[(1) - (1)].token);;}
4824 /* Line 1455 of yacc.c */
4825 #line 2144 "parser.y"
4826 {(yyval.token)=(yyvsp[(1) - (1)].token);;}
4831 /* Line 1455 of yacc.c */
4832 #line 2145 "parser.y"
4838 /* Line 1455 of yacc.c */
4839 #line 2148 "parser.y"
4840 {startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
4845 /* Line 1455 of yacc.c */
4846 #line 2149 "parser.y"
4849 if(state->method->late_binding) {
4850 c = abc_getlocal_0(c);
4851 c = abc_pushscope(c);
4853 if(state->method->is_constructor && !state->method->has_super) {
4854 // call default constructor
4855 c = abc_getlocal_0(c);
4856 c = abc_constructsuper(c, 0);
4858 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
4859 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
4866 /* Line 1455 of yacc.c */
4867 #line 2166 "parser.y"
4873 /* Line 1455 of yacc.c */
4874 #line 2168 "parser.y"
4876 syntaxerror("nested functions not supported yet");
4882 /* Line 1455 of yacc.c */
4883 #line 2175 "parser.y"
4886 /* try current package */
4887 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
4888 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
4894 /* Line 1455 of yacc.c */
4895 #line 2182 "parser.y"
4897 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
4898 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
4899 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
4905 /* Line 1455 of yacc.c */
4906 #line 2191 "parser.y"
4907 {(yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));;}
4912 /* Line 1455 of yacc.c */
4913 #line 2192 "parser.y"
4914 {(yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));;}
4919 /* Line 1455 of yacc.c */
4920 #line 2194 "parser.y"
4921 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);;}
4926 /* Line 1455 of yacc.c */
4927 #line 2195 "parser.y"
4928 {(yyval.classinfo)=registry_getanytype();;}
4933 /* Line 1455 of yacc.c */
4934 #line 2196 "parser.y"
4935 {(yyval.classinfo)=registry_getanytype();;}
4940 /* Line 1455 of yacc.c */
4941 #line 2205 "parser.y"
4942 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);;}
4947 /* Line 1455 of yacc.c */
4948 #line 2206 "parser.y"
4949 {(yyval.classinfo)=0;;}
4954 /* Line 1455 of yacc.c */
4955 #line 2210 "parser.y"
4956 {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
4961 /* Line 1455 of yacc.c */
4962 #line 2211 "parser.y"
4963 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
4968 /* Line 1455 of yacc.c */
4969 #line 2213 "parser.y"
4970 {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
4975 /* Line 1455 of yacc.c */
4976 #line 2215 "parser.y"
4977 {(yyval.value_list).len=1;
4978 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
4984 /* Line 1455 of yacc.c */
4985 #line 2218 "parser.y"
4987 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
4988 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
4994 /* Line 1455 of yacc.c */
4995 #line 2223 "parser.y"
4997 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
4998 (yyval.value).c = code_new();
5000 if((yyvsp[(2) - (3)].classinfo)->slot) {
5001 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5002 (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5004 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5007 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5009 if((yyvsp[(2) - (3)].classinfo)->slot)
5010 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5012 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5013 (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5019 /* Line 1455 of yacc.c */
5020 #line 2247 "parser.y"
5023 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5024 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5025 (yyval.value).c = code_cutlast((yyval.value).c);
5027 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5029 (yyval.value).t = TYPE_ANY;
5030 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5031 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5032 (yyval.value).c = code_cutlast((yyval.value).c);
5033 (yyval.value).c = code_append((yyval.value).c, paramcode);
5034 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5035 multiname_destroy(name);
5036 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5037 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5038 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5039 if(t->kind!=TRAIT_METHOD) {
5040 //ok: flash allows to assign closures to members.
5042 multiname_t*name = t->name;
5043 (yyval.value).c = code_cutlast((yyval.value).c);
5044 (yyval.value).c = code_append((yyval.value).c, paramcode);
5045 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5046 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5047 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5048 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5049 (yyval.value).c = code_cutlast((yyval.value).c);
5050 (yyval.value).c = code_append((yyval.value).c, paramcode);
5051 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5052 multiname_destroy(name);
5054 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5055 (yyval.value).c = code_append((yyval.value).c, paramcode);
5056 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5061 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5062 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5064 (yyval.value).c = abc_coerce_a((yyval.value).c);
5065 (yyval.value).t = TYPE_ANY;
5073 /* Line 1455 of yacc.c */
5074 #line 2295 "parser.y"
5076 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5077 if(!state->method) syntaxerror("super() not allowed outside of a function");
5078 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5080 (yyval.value).c = code_new();
5081 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5083 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5085 this is dependent on the control path, check this somewhere else
5086 if(state->method->has_super)
5087 syntaxerror("constructor may call super() only once");
5089 state->method->has_super = 1;
5090 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5091 (yyval.value).c = abc_pushundefined((yyval.value).c);
5092 (yyval.value).t = TYPE_ANY;
5098 /* Line 1455 of yacc.c */
5099 #line 2315 "parser.y"
5101 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5102 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5103 (yyval.value).c = code_cutlast((yyval.value).c);
5105 multiname_t*name = 0;
5106 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5107 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5108 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5109 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5110 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5111 (yyval.value).c = code_cutlast((yyval.value).c);
5112 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5114 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5115 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5116 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5118 (yyval.value).t = TYPE_BOOLEAN;
5124 /* Line 1455 of yacc.c */
5125 #line 2336 "parser.y"
5127 (yyval.code) = abc_returnvoid(0);
5133 /* Line 1455 of yacc.c */
5134 #line 2339 "parser.y"
5136 (yyval.code) = (yyvsp[(2) - (2)].value).c;
5137 (yyval.code) = abc_returnvalue((yyval.code));
5143 /* Line 1455 of yacc.c */
5144 #line 2346 "parser.y"
5145 {(yyval.value)=(yyvsp[(1) - (1)].value);;}
5150 /* Line 1455 of yacc.c */
5151 #line 2347 "parser.y"
5152 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5157 /* Line 1455 of yacc.c */
5158 #line 2348 "parser.y"
5160 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5161 (yyval.value).c = cut_last_push((yyval.value).c);
5162 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5163 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5169 /* Line 1455 of yacc.c */
5170 #line 2354 "parser.y"
5172 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5178 /* Line 1455 of yacc.c */
5179 #line 2360 "parser.y"
5180 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5185 /* Line 1455 of yacc.c */
5186 #line 2364 "parser.y"
5187 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5192 /* Line 1455 of yacc.c */
5193 #line 2366 "parser.y"
5194 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5199 /* Line 1455 of yacc.c */
5200 #line 2368 "parser.y"
5201 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5206 /* Line 1455 of yacc.c */
5207 #line 2370 "parser.y"
5209 (yyval.value).c = 0;
5210 namespace_t ns = {ACCESS_PACKAGE, ""};
5211 multiname_t m = {QNAME, &ns, 0, "RegExp"};
5212 if(!(yyvsp[(1) - (1)].regexp).options) {
5213 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5214 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5215 (yyval.value).c = abc_construct((yyval.value).c, 1);
5217 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5218 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5219 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5220 (yyval.value).c = abc_construct((yyval.value).c, 2);
5222 (yyval.value).t = TYPE_REGEXP;
5228 /* Line 1455 of yacc.c */
5229 #line 2387 "parser.y"
5230 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5231 //MULTINAME(m, registry_getintclass());
5232 //$$.c = abc_coerce2($$.c, &m); // FIXME
5233 (yyval.value).t = TYPE_INT;
5239 /* Line 1455 of yacc.c */
5240 #line 2392 "parser.y"
5241 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5242 (yyval.value).t = TYPE_INT;
5248 /* Line 1455 of yacc.c */
5249 #line 2395 "parser.y"
5250 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5251 (yyval.value).t = TYPE_INT;
5257 /* Line 1455 of yacc.c */
5258 #line 2398 "parser.y"
5259 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5260 (yyval.value).t = TYPE_UINT;
5266 /* Line 1455 of yacc.c */
5267 #line 2401 "parser.y"
5268 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
5269 (yyval.value).t = TYPE_FLOAT;
5275 /* Line 1455 of yacc.c */
5276 #line 2404 "parser.y"
5277 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
5278 (yyval.value).t = TYPE_STRING;
5284 /* Line 1455 of yacc.c */
5285 #line 2407 "parser.y"
5286 {(yyval.value).c = abc_pushundefined(0);
5287 (yyval.value).t = TYPE_ANY;
5293 /* Line 1455 of yacc.c */
5294 #line 2410 "parser.y"
5295 {(yyval.value).c = abc_pushtrue(0);
5296 (yyval.value).t = TYPE_BOOLEAN;
5302 /* Line 1455 of yacc.c */
5303 #line 2413 "parser.y"
5304 {(yyval.value).c = abc_pushfalse(0);
5305 (yyval.value).t = TYPE_BOOLEAN;
5311 /* Line 1455 of yacc.c */
5312 #line 2416 "parser.y"
5313 {(yyval.value).c = abc_pushnull(0);
5314 (yyval.value).t = TYPE_NULL;
5320 /* Line 1455 of yacc.c */
5321 #line 2421 "parser.y"
5322 {(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);
5323 (yyval.value).t = TYPE_BOOLEAN;
5329 /* Line 1455 of yacc.c */
5330 #line 2424 "parser.y"
5331 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
5332 (yyval.value).t = TYPE_BOOLEAN;
5338 /* Line 1455 of yacc.c */
5339 #line 2427 "parser.y"
5340 {(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);
5341 (yyval.value).t = TYPE_BOOLEAN;
5347 /* Line 1455 of yacc.c */
5348 #line 2430 "parser.y"
5349 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
5350 (yyval.value).t = TYPE_BOOLEAN;
5356 /* Line 1455 of yacc.c */
5357 #line 2433 "parser.y"
5358 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
5359 (yyval.value).t = TYPE_BOOLEAN;
5365 /* Line 1455 of yacc.c */
5366 #line 2436 "parser.y"
5367 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
5368 (yyval.value).t = TYPE_BOOLEAN;
5374 /* Line 1455 of yacc.c */
5375 #line 2439 "parser.y"
5376 {(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);
5377 (yyval.value).t = TYPE_BOOLEAN;
5383 /* Line 1455 of yacc.c */
5384 #line 2442 "parser.y"
5385 {(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);
5386 (yyval.value).t = TYPE_BOOLEAN;
5392 /* Line 1455 of yacc.c */
5393 #line 2446 "parser.y"
5394 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
5395 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5396 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
5397 (yyval.value).c = abc_dup((yyval.value).c);
5398 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
5399 (yyval.value).c = cut_last_push((yyval.value).c);
5400 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5401 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
5402 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
5403 jmp->branch = label;
5409 /* Line 1455 of yacc.c */
5410 #line 2457 "parser.y"
5412 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
5413 /*printf("%08x:\n",$1.t);
5414 code_dump($1.c, 0, 0, "", stdout);
5415 printf("%08x:\n",$3.t);
5416 code_dump($3.c, 0, 0, "", stdout);
5417 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
5418 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5419 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
5420 (yyval.value).c = abc_dup((yyval.value).c);
5421 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
5422 (yyval.value).c = cut_last_push((yyval.value).c);
5423 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5424 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
5425 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
5426 jmp->branch = label;
5432 /* Line 1455 of yacc.c */
5433 #line 2475 "parser.y"
5434 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
5435 (yyval.value).c = abc_not((yyval.value).c);
5436 (yyval.value).t = TYPE_BOOLEAN;
5442 /* Line 1455 of yacc.c */
5443 #line 2480 "parser.y"
5444 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
5445 (yyval.value).c = abc_bitnot((yyval.value).c);
5446 (yyval.value).t = TYPE_INT;
5452 /* Line 1455 of yacc.c */
5453 #line 2485 "parser.y"
5454 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5455 (yyval.value).c = abc_bitand((yyval.value).c);
5456 (yyval.value).t = TYPE_INT;
5462 /* Line 1455 of yacc.c */
5463 #line 2490 "parser.y"
5464 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5465 (yyval.value).c = abc_bitxor((yyval.value).c);
5466 (yyval.value).t = TYPE_INT;
5472 /* Line 1455 of yacc.c */
5473 #line 2495 "parser.y"
5474 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5475 (yyval.value).c = abc_bitor((yyval.value).c);
5476 (yyval.value).t = TYPE_INT;
5482 /* Line 1455 of yacc.c */
5483 #line 2500 "parser.y"
5484 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5485 (yyval.value).c = abc_rshift((yyval.value).c);
5486 (yyval.value).t = TYPE_INT;
5492 /* Line 1455 of yacc.c */
5493 #line 2504 "parser.y"
5494 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5495 (yyval.value).c = abc_urshift((yyval.value).c);
5496 (yyval.value).t = TYPE_INT;
5502 /* Line 1455 of yacc.c */
5503 #line 2508 "parser.y"
5504 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5505 (yyval.value).c = abc_lshift((yyval.value).c);
5506 (yyval.value).t = TYPE_INT;
5512 /* Line 1455 of yacc.c */
5513 #line 2513 "parser.y"
5514 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5515 (yyval.value).c = abc_divide((yyval.value).c);
5516 (yyval.value).t = TYPE_NUMBER;
5522 /* Line 1455 of yacc.c */
5523 #line 2517 "parser.y"
5524 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5525 (yyval.value).c = abc_modulo((yyval.value).c);
5526 (yyval.value).t = TYPE_NUMBER;
5532 /* Line 1455 of yacc.c */
5533 #line 2521 "parser.y"
5534 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5535 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
5536 (yyval.value).c = abc_add_i((yyval.value).c);
5537 (yyval.value).t = TYPE_INT;
5539 (yyval.value).c = abc_add((yyval.value).c);
5540 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
5547 /* Line 1455 of yacc.c */
5548 #line 2530 "parser.y"
5549 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5550 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
5551 (yyval.value).c = abc_subtract_i((yyval.value).c);
5552 (yyval.value).t = TYPE_INT;
5554 (yyval.value).c = abc_subtract((yyval.value).c);
5555 (yyval.value).t = TYPE_NUMBER;
5562 /* Line 1455 of yacc.c */
5563 #line 2539 "parser.y"
5564 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5565 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
5566 (yyval.value).c = abc_multiply_i((yyval.value).c);
5567 (yyval.value).t = TYPE_INT;
5569 (yyval.value).c = abc_multiply((yyval.value).c);
5570 (yyval.value).t = TYPE_NUMBER;
5577 /* Line 1455 of yacc.c */
5578 #line 2549 "parser.y"
5579 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5580 (yyval.value).c = abc_in((yyval.value).c);
5581 (yyval.value).t = TYPE_BOOLEAN;
5587 /* Line 1455 of yacc.c */
5588 #line 2554 "parser.y"
5589 {char use_astype=0; // flash player's astype works differently than astypelate
5590 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
5591 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
5592 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
5593 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
5595 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
5596 (yyval.value).c = abc_astypelate((yyval.value).c);
5597 (yyval.value).t = TYPE_ANY;
5604 /* Line 1455 of yacc.c */
5605 #line 2567 "parser.y"
5606 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
5607 (yyval.value).c = abc_instanceof((yyval.value).c);
5608 (yyval.value).t = TYPE_BOOLEAN;
5614 /* Line 1455 of yacc.c */
5615 #line 2572 "parser.y"
5616 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
5617 (yyval.value).c = abc_istypelate((yyval.value).c);
5618 (yyval.value).t = TYPE_BOOLEAN;
5624 /* Line 1455 of yacc.c */
5625 #line 2577 "parser.y"
5627 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
5628 (yyval.value).c = abc_typeof((yyval.value).c);
5629 (yyval.value).t = TYPE_STRING;
5635 /* Line 1455 of yacc.c */
5636 #line 2583 "parser.y"
5638 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
5639 (yyval.value).c = abc_pushundefined((yyval.value).c);
5640 (yyval.value).t = TYPE_ANY;
5646 /* Line 1455 of yacc.c */
5647 #line 2589 "parser.y"
5648 { (yyval.value).c = abc_pushundefined(0);
5649 (yyval.value).t = TYPE_ANY;
5655 /* Line 1455 of yacc.c */
5656 #line 2593 "parser.y"
5657 {(yyval.value)=(yyvsp[(2) - (3)].value);;}
5662 /* Line 1455 of yacc.c */
5663 #line 2595 "parser.y"
5665 (yyval.value)=(yyvsp[(2) - (2)].value);
5666 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
5667 (yyval.value).c=abc_negate_i((yyval.value).c);
5668 (yyval.value).t = TYPE_INT;
5670 (yyval.value).c=abc_negate((yyval.value).c);
5671 (yyval.value).t = TYPE_NUMBER;
5678 /* Line 1455 of yacc.c */
5679 #line 2606 "parser.y"
5681 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5682 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
5684 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
5685 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
5686 (yyval.value).t = 0; // array elements have unknown type
5692 /* Line 1455 of yacc.c */
5693 #line 2615 "parser.y"
5695 (yyval.value).c = code_new();
5696 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
5697 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
5698 (yyval.value).t = registry_getarrayclass();
5704 /* Line 1455 of yacc.c */
5705 #line 2622 "parser.y"
5706 {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
5711 /* Line 1455 of yacc.c */
5712 #line 2623 "parser.y"
5713 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
5718 /* Line 1455 of yacc.c */
5719 #line 2625 "parser.y"
5721 (yyval.value_list).cc = 0;
5722 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
5723 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
5724 (yyval.value_list).len = 2;
5730 /* Line 1455 of yacc.c */
5731 #line 2631 "parser.y"
5733 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
5734 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
5735 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
5736 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
5742 /* Line 1455 of yacc.c */
5743 #line 2640 "parser.y"
5745 (yyval.value).c = code_new();
5746 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
5747 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
5748 (yyval.value).t = registry_getobjectclass();
5754 /* Line 1455 of yacc.c */
5755 #line 2647 "parser.y"
5757 code_t*c = (yyvsp[(3) - (3)].value).c;
5758 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
5759 c=abc_multiply_i(c);
5763 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
5764 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5765 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5771 /* Line 1455 of yacc.c */
5772 #line 2659 "parser.y"
5774 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
5775 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
5776 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5777 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5783 /* Line 1455 of yacc.c */
5784 #line 2665 "parser.y"
5786 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
5787 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
5788 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5789 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5795 /* Line 1455 of yacc.c */
5796 #line 2671 "parser.y"
5798 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
5799 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
5800 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5801 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5807 /* Line 1455 of yacc.c */
5808 #line 2677 "parser.y"
5810 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
5811 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
5812 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5813 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5819 /* Line 1455 of yacc.c */
5820 #line 2683 "parser.y"
5822 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
5823 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
5824 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5825 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5831 /* Line 1455 of yacc.c */
5832 #line 2689 "parser.y"
5834 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
5835 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
5836 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5837 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5843 /* Line 1455 of yacc.c */
5844 #line 2695 "parser.y"
5846 code_t*c = (yyvsp[(3) - (3)].value).c;
5848 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
5852 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
5855 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5856 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5862 /* Line 1455 of yacc.c */
5863 #line 2708 "parser.y"
5864 { code_t*c = (yyvsp[(3) - (3)].value).c;
5865 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
5866 c=abc_subtract_i(c);
5869 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
5872 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5873 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5879 /* Line 1455 of yacc.c */
5880 #line 2719 "parser.y"
5882 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5883 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
5884 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
5885 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5891 /* Line 1455 of yacc.c */
5892 #line 2726 "parser.y"
5894 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
5895 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
5896 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
5897 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
5898 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
5899 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
5900 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
5901 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
5902 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
5903 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
5909 /* Line 1455 of yacc.c */
5910 #line 2739 "parser.y"
5912 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
5913 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
5914 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
5915 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
5916 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
5917 (yyval.value).c = abc_getlocal(0, nr);
5918 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
5919 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
5920 (yyval.value).c = abc_getlocal(0, nr);
5921 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
5922 } else syntaxerror("internal error");
5924 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5925 c=abc_increment_i(c);
5931 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
5932 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
5933 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
5940 /* Line 1455 of yacc.c */
5941 #line 2766 "parser.y"
5943 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
5944 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5945 c=abc_decrement_i(c);
5951 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
5952 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
5953 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
5959 /* Line 1455 of yacc.c */
5960 #line 2780 "parser.y"
5962 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
5963 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5964 c=abc_increment_i(c);
5970 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
5971 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
5972 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
5978 /* Line 1455 of yacc.c */
5979 #line 2794 "parser.y"
5981 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
5982 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5983 c=abc_decrement_i(c);
5989 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
5990 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
5991 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
5997 /* Line 1455 of yacc.c */
5998 #line 2809 "parser.y"
5999 { if(!state->cls->info)
6000 syntaxerror("super keyword not allowed outside a class");
6001 classinfo_t*t = state->cls->info->superclass;
6002 if(!t) t = TYPE_OBJECT;
6004 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6005 namespace_t ns = flags2namespace(f->flags, "");
6006 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6007 (yyval.value).c = 0;
6008 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6009 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6010 (yyval.value).t = memberinfo_gettype(f);
6016 /* Line 1455 of yacc.c */
6017 #line 2824 "parser.y"
6018 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
6019 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
6021 if(TYPE_IS_CLASS(t) && t->cls) {
6026 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6028 if(f && !is_static != !(f->flags&FLAG_STATIC))
6030 if(f && f->slot && !noslot) {
6031 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
6033 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6034 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6036 /* determine type */
6037 (yyval.value).t = memberinfo_gettype(f);
6038 if(!(yyval.value).t)
6039 (yyval.value).c = abc_coerce_a((yyval.value).c);
6041 /* when resolving a property on an unknown type, we do know the
6042 name of the property (and don't seem to need the package), but
6043 we need to make avm2 try out all access modes */
6044 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
6045 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6046 (yyval.value).c = abc_coerce_a((yyval.value).c);
6047 (yyval.value).t = registry_getanytype();
6054 /* Line 1455 of yacc.c */
6055 #line 2857 "parser.y"
6057 (yyval.value).t = 0;
6058 (yyval.value).c = 0;
6063 /* look at variables */
6064 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
6065 // $1 is a local variable
6066 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
6067 (yyval.value).t = v->type;
6069 /* look at current class' members */
6070 } else if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1))) {
6071 // $1 is a function in this class
6072 int var_is_static = (f->flags&FLAG_STATIC);
6073 int i_am_static = ((state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC);
6074 if(var_is_static != i_am_static) {
6075 /* there doesn't seem to be any "static" way to access
6076 static properties of a class */
6077 state->method->late_binding = 1;
6078 (yyval.value).t = f->type;
6079 namespace_t ns = {flags2access(f->flags), ""};
6080 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
6081 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
6082 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6085 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6086 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
6088 namespace_t ns = {flags2access(f->flags), ""};
6089 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
6090 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6091 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6094 if(f->kind == MEMBER_METHOD) {
6095 (yyval.value).t = TYPE_FUNCTION(f);
6097 (yyval.value).t = f->type;
6100 /* look at actual classes, in the current package and imported */
6101 } else if((a = find_class((yyvsp[(1) - (1)].id)))) {
6102 if(a->flags & FLAG_METHOD) {
6104 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
6105 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6106 if(a->function->kind == MEMBER_METHOD) {
6107 (yyval.value).t = TYPE_FUNCTION(a->function);
6109 (yyval.value).t = a->function->type;
6113 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6114 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
6117 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6119 (yyval.value).t = TYPE_CLASS(a);
6122 /* unknown object, let the avm2 resolve it */
6124 if(strcmp((yyvsp[(1) - (1)].id),"trace"))
6125 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
6126 state->method->late_binding = 1;
6128 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
6130 (yyval.value).t = 0;
6131 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
6132 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6139 /* Line 1455 of yacc.c */
6140 #line 2944 "parser.y"
6146 /* Line 1455 of yacc.c */
6147 #line 2945 "parser.y"
6153 /* Line 1455 of yacc.c */
6154 #line 2946 "parser.y"
6160 /* Line 1455 of yacc.c */
6161 #line 2948 "parser.y"
6167 /* Line 1455 of yacc.c */
6168 #line 6169 "parser.tab.c"
6171 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
6175 YY_STACK_PRINT (yyss, yyssp);
6179 /* Now `shift' the result of the reduction. Determine what state
6180 that goes to, based on the state we popped back to and the rule
6181 number reduced by. */
6185 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
6186 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
6187 yystate = yytable[yystate];
6189 yystate = yydefgoto[yyn - YYNTOKENS];
6194 /*------------------------------------.
6195 | yyerrlab -- here on detecting error |
6196 `------------------------------------*/
6198 /* If not already recovering from an error, report this error. */
6202 #if ! YYERROR_VERBOSE
6203 yyerror (YY_("syntax error"));
6206 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
6207 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
6209 YYSIZE_T yyalloc = 2 * yysize;
6210 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
6211 yyalloc = YYSTACK_ALLOC_MAXIMUM;
6212 if (yymsg != yymsgbuf)
6213 YYSTACK_FREE (yymsg);
6214 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
6216 yymsg_alloc = yyalloc;
6220 yymsg_alloc = sizeof yymsgbuf;
6224 if (0 < yysize && yysize <= yymsg_alloc)
6226 (void) yysyntax_error (yymsg, yystate, yychar);
6231 yyerror (YY_("syntax error"));
6233 goto yyexhaustedlab;
6241 if (yyerrstatus == 3)
6243 /* If just tried and failed to reuse lookahead token after an
6244 error, discard it. */
6246 if (yychar <= YYEOF)
6248 /* Return failure if at end of input. */
6249 if (yychar == YYEOF)
6254 yydestruct ("Error: discarding",
6260 /* Else will try to reuse lookahead token after shifting the error
6265 /*---------------------------------------------------.
6266 | yyerrorlab -- error raised explicitly by YYERROR. |
6267 `---------------------------------------------------*/
6270 /* Pacify compilers like GCC when the user code never invokes
6271 YYERROR and the label yyerrorlab therefore never appears in user
6273 if (/*CONSTCOND*/ 0)
6276 /* Do not reclaim the symbols of the rule which action triggered
6280 YY_STACK_PRINT (yyss, yyssp);
6285 /*-------------------------------------------------------------.
6286 | yyerrlab1 -- common code for both syntax error and YYERROR. |
6287 `-------------------------------------------------------------*/
6289 yyerrstatus = 3; /* Each real token shifted decrements this. */
6293 yyn = yypact[yystate];
6294 if (yyn != YYPACT_NINF)
6297 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
6305 /* Pop the current state because it cannot handle the error token. */
6310 yydestruct ("Error: popping",
6311 yystos[yystate], yyvsp);
6314 YY_STACK_PRINT (yyss, yyssp);
6320 /* Shift the error token. */
6321 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
6327 /*-------------------------------------.
6328 | yyacceptlab -- YYACCEPT comes here. |
6329 `-------------------------------------*/
6334 /*-----------------------------------.
6335 | yyabortlab -- YYABORT comes here. |
6336 `-----------------------------------*/
6341 #if !defined(yyoverflow) || YYERROR_VERBOSE
6342 /*-------------------------------------------------.
6343 | yyexhaustedlab -- memory exhaustion comes here. |
6344 `-------------------------------------------------*/
6346 yyerror (YY_("memory exhausted"));
6352 if (yychar != YYEMPTY)
6353 yydestruct ("Cleanup: discarding lookahead",
6355 /* Do not reclaim the symbols of the rule which action triggered
6356 this YYABORT or YYACCEPT. */
6358 YY_STACK_PRINT (yyss, yyssp);
6359 while (yyssp != yyss)
6361 yydestruct ("Cleanup: popping",
6362 yystos[*yyssp], yyvsp);
6367 YYSTACK_FREE (yyss);
6370 if (yymsg != yymsgbuf)
6371 YYSTACK_FREE (yymsg);
6373 /* Make sure YYID is used. */
6374 return YYID (yyresult);