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, 1553, 1554, 1558, 1559, 1561, 1562, 1564, 1605,
1918 1606, 1609, 1609, 1628, 1629, 1630, 1633, 1636, 1640, 1641,
1919 1643, 1663, 1706, 1706, 1725, 1725, 1740, 1743, 1746, 1749,
1920 1753, 1754, 1755, 1756, 1757, 1758, 1760, 1771, 1774, 1774,
1921 1803, 1803, 1823, 1823, 1840, 1841, 1842, 1843, 1851, 1860,
1922 1860, 1905, 1909, 1920, 1929, 1930, 1932, 1933, 1935, 1935,
1923 1936, 1936, 1938, 1946, 1956, 1957, 1958, 1959, 1961, 1962,
1924 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1971, 1972, 1974,
1925 1975, 1977, 1978, 1982, 1980, 1988, 1986, 1994, 1995, 1996,
1926 1997, 1998, 1999, 2000, 2002, 2008, 2009, 2010, 2011, 2012,
1927 2013, 2016, 2027, 2027, 2029, 2087, 2088, 2090, 2091, 2092,
1928 2093, 2094, 2096, 2097, 2098, 2103, 2106, 2111, 2116, 2123,
1929 2127, 2132, 2138, 2144, 2145, 2146, 2149, 2148, 2166, 2167,
1930 2168, 2176, 2183, 2189, 2190, 2192, 2193, 2195, 2196, 2197,
1931 2206, 2207, 2211, 2212, 2214, 2215, 2216, 2219, 2224, 2248,
1932 2296, 2316, 2337, 2340, 2347, 2348, 2349, 2355, 2361, 2363,
1933 2365, 2367, 2369, 2371, 2388, 2393, 2396, 2399, 2402, 2405,
1934 2408, 2411, 2414, 2417, 2421, 2422, 2425, 2428, 2431, 2434,
1935 2437, 2440, 2443, 2447, 2458, 2476, 2481, 2486, 2491, 2496,
1936 2501, 2505, 2509, 2514, 2518, 2522, 2531, 2540, 2550, 2555,
1937 2567, 2573, 2578, 2584, 2590, 2594, 2596, 2607, 2616, 2623,
1938 2624, 2626, 2632, 2641, 2648, 2660, 2666, 2672, 2678, 2684,
1939 2690, 2696, 2709, 2720, 2727, 2740, 2767, 2781, 2795, 2809,
1940 2824, 2858, 2945, 2946, 2947, 2949
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 code_t**cc = &global->init->method->body->code;
3680 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
3686 /* Line 1455 of yacc.c */
3687 #line 1553 "parser.y"
3688 {(yyval.value)=(yyvsp[(2) - (2)].value);;}
3693 /* Line 1455 of yacc.c */
3694 #line 1554 "parser.y"
3695 {(yyval.value).c=abc_pushundefined(0);
3696 (yyval.value).t=TYPE_ANY;
3702 /* Line 1455 of yacc.c */
3703 #line 1558 "parser.y"
3704 {(yyval.code)=(yyvsp[(2) - (2)].code);;}
3709 /* Line 1455 of yacc.c */
3710 #line 1559 "parser.y"
3711 {(yyval.code)=(yyvsp[(2) - (2)].code);;}
3716 /* Line 1455 of yacc.c */
3717 #line 1561 "parser.y"
3718 {(yyval.code) = (yyvsp[(1) - (1)].code);;}
3723 /* Line 1455 of yacc.c */
3724 #line 1562 "parser.y"
3725 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));;}
3730 /* Line 1455 of yacc.c */
3731 #line 1565 "parser.y"
3733 if(variable_exists((yyvsp[(1) - (3)].id)))
3734 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
3736 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
3737 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
3738 (yyvsp[(2) - (3)].classinfo)->name);
3741 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
3743 if((yyvsp[(2) - (3)].classinfo)) {
3744 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3745 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3746 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
3747 (yyval.code) = abc_setlocal((yyval.code), index);
3749 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
3750 (yyval.code) = abc_setlocal((yyval.code), index);
3753 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
3754 (yyval.code) = (yyvsp[(3) - (3)].value).c;
3755 (yyval.code) = abc_coerce_a((yyval.code));
3756 (yyval.code) = abc_setlocal((yyval.code), index);
3758 (yyval.code) = code_new();
3762 /* that's the default for a local register, anyway
3764 state->method->initcode = abc_pushundefined(state->method->initcode);
3765 state->method->initcode = abc_setlocal(state->method->initcode, index);
3767 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
3773 /* Line 1455 of yacc.c */
3774 #line 1605 "parser.y"
3775 {(yyval.code) = code_new();;}
3780 /* Line 1455 of yacc.c */
3781 #line 1606 "parser.y"
3782 {(yyval.code)=(yyvsp[(2) - (2)].code);;}
3787 /* Line 1455 of yacc.c */
3788 #line 1609 "parser.y"
3794 /* Line 1455 of yacc.c */
3795 #line 1609 "parser.y"
3798 (yyval.code) = code_new();
3799 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
3800 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3802 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
3803 if((yyvsp[(7) - (7)].code)) {
3804 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3806 myif->branch = (yyval.code) = abc_nop((yyval.code));
3807 if((yyvsp[(7) - (7)].code)) {
3808 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
3809 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
3811 (yyval.code) = var_block((yyval.code));
3818 /* Line 1455 of yacc.c */
3819 #line 1628 "parser.y"
3820 {(yyval.code)=code_new();;}
3825 /* Line 1455 of yacc.c */
3826 #line 1633 "parser.y"
3828 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
3834 /* Line 1455 of yacc.c */
3835 #line 1636 "parser.y"
3837 (yyval.id)=(yyvsp[(1) - (1)].id);
3843 /* Line 1455 of yacc.c */
3844 #line 1640 "parser.y"
3845 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;;}
3850 /* Line 1455 of yacc.c */
3851 #line 1641 "parser.y"
3852 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;;}
3857 /* Line 1455 of yacc.c */
3858 #line 1643 "parser.y"
3860 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
3861 (yyval.code) = code_new();
3862 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
3863 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3864 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
3865 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3866 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
3867 code_t*cont = (yyval.code) = abc_nop((yyval.code));
3868 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
3869 (yyval.code) = abc_jump((yyval.code), loopstart);
3870 code_t*out = (yyval.code) = abc_nop((yyval.code));
3871 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
3872 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
3875 (yyval.code) = var_block((yyval.code));
3882 /* Line 1455 of yacc.c */
3883 #line 1663 "parser.y"
3885 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
3886 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
3887 int it = new_variable(tmp1name, TYPE_INT, 0);
3888 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
3889 int array = new_variable(tmp1name, 0, 0);
3891 (yyval.code) = code_new();
3892 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
3893 (yyval.code) = abc_coerce_a((yyval.code));
3894 (yyval.code) = abc_setlocal((yyval.code), array);
3895 (yyval.code) = abc_pushbyte((yyval.code), 0);
3896 (yyval.code) = abc_setlocal((yyval.code), it);
3898 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3900 (yyval.code) = abc_hasnext2((yyval.code), array, it);
3901 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
3902 (yyval.code) = abc_getlocal((yyval.code), array);
3903 (yyval.code) = abc_getlocal((yyval.code), it);
3904 if(!(yyvsp[(1) - (6)].for_start).each)
3905 (yyval.code) = abc_nextname((yyval.code));
3907 (yyval.code) = abc_nextvalue((yyval.code));
3908 (yyval.code) = converttype((yyval.code), 0, var->type);
3909 (yyval.code) = abc_setlocal((yyval.code), var->index);
3911 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
3912 (yyval.code) = abc_jump((yyval.code), loopstart);
3914 code_t*out = (yyval.code) = abc_nop((yyval.code));
3915 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
3916 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
3920 (yyval.code) = var_block((yyval.code));
3930 /* Line 1455 of yacc.c */
3931 #line 1706 "parser.y"
3937 /* Line 1455 of yacc.c */
3938 #line 1706 "parser.y"
3941 (yyval.code) = code_new();
3943 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
3944 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3945 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
3946 code_t*cont = (yyval.code) = abc_nop((yyval.code));
3947 myjmp->branch = cont;
3948 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
3949 (yyval.code) = abc_iftrue((yyval.code), loopstart);
3950 code_t*out = (yyval.code) = abc_nop((yyval.code));
3951 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
3952 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
3954 (yyval.code) = var_block((yyval.code));
3961 /* Line 1455 of yacc.c */
3962 #line 1725 "parser.y"
3968 /* Line 1455 of yacc.c */
3969 #line 1725 "parser.y"
3971 (yyval.code) = code_new();
3972 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
3973 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
3974 code_t*cont = (yyval.code) = abc_nop((yyval.code));
3975 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
3976 (yyval.code) = abc_iftrue((yyval.code), loopstart);
3977 code_t*out = (yyval.code) = abc_nop((yyval.code));
3978 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
3979 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
3981 (yyval.code) = var_block((yyval.code));
3988 /* Line 1455 of yacc.c */
3989 #line 1740 "parser.y"
3991 (yyval.code) = abc___break__(0, "");
3997 /* Line 1455 of yacc.c */
3998 #line 1743 "parser.y"
4000 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4006 /* Line 1455 of yacc.c */
4007 #line 1746 "parser.y"
4009 (yyval.code) = abc___continue__(0, "");
4015 /* Line 1455 of yacc.c */
4016 #line 1749 "parser.y"
4018 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4024 /* Line 1455 of yacc.c */
4025 #line 1753 "parser.y"
4031 /* Line 1455 of yacc.c */
4032 #line 1754 "parser.y"
4033 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
4038 /* Line 1455 of yacc.c */
4039 #line 1755 "parser.y"
4040 {(yyval.code)=(yyvsp[(1) - (1)].code);;}
4045 /* Line 1455 of yacc.c */
4046 #line 1756 "parser.y"
4047 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));;}
4052 /* Line 1455 of yacc.c */
4053 #line 1757 "parser.y"
4054 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4059 /* Line 1455 of yacc.c */
4060 #line 1758 "parser.y"
4061 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));;}
4066 /* Line 1455 of yacc.c */
4067 #line 1760 "parser.y"
4069 (yyval.code) = abc_dup(0);
4070 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4071 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4072 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4073 if((yyval.code)->opcode != OPCODE___BREAK__) {
4074 (yyval.code) = abc___fallthrough__((yyval.code), "");
4076 code_t*e = (yyval.code) = abc_nop((yyval.code));
4083 /* Line 1455 of yacc.c */
4084 #line 1771 "parser.y"
4086 (yyval.code) = (yyvsp[(3) - (3)].code);
4092 /* Line 1455 of yacc.c */
4093 #line 1774 "parser.y"
4099 /* Line 1455 of yacc.c */
4100 #line 1774 "parser.y"
4102 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4103 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4104 code_t*out = (yyval.code) = abc_pop((yyval.code));
4105 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4107 code_t*c = (yyval.code),*lastblock=0;
4109 if(c->opcode == OPCODE_IFNE) {
4110 if(!c->next) syntaxerror("internal error in fallthrough handling");
4112 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4114 c->opcode = OPCODE_JUMP;
4115 c->branch = lastblock;
4117 /* fall through end of switch */
4118 c->opcode = OPCODE_NOP;
4124 (yyval.code) = var_block((yyval.code));
4131 /* Line 1455 of yacc.c */
4132 #line 1803 "parser.y"
4133 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);;}
4138 /* Line 1455 of yacc.c */
4139 #line 1804 "parser.y"
4141 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4142 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4144 NEW(abc_exception_t, e)
4145 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4146 e->var_name = multiname_clone(&name);
4147 (yyval.exception) = e;
4150 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4151 e->target = c = abc_nop(0);
4152 c = abc_setlocal(c, i);
4153 c = code_append(c, (yyvsp[(8) - (9)].code));
4163 /* Line 1455 of yacc.c */
4164 #line 1823 "parser.y"
4165 {new_state();state->exception_name=0;;}
4170 /* Line 1455 of yacc.c */
4171 #line 1823 "parser.y"
4173 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4174 if(!(yyvsp[(4) - (5)].code)) {
4175 (yyval.exception)=0;
4178 NEW(abc_exception_t, e)
4179 e->exc_type = 0; //all exceptions
4180 e->var_name = 0; //no name
4183 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4185 (yyval.exception) = e;
4192 /* Line 1455 of yacc.c */
4193 #line 1840 "parser.y"
4194 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));;}
4199 /* Line 1455 of yacc.c */
4200 #line 1841 "parser.y"
4201 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));;}
4206 /* Line 1455 of yacc.c */
4207 #line 1842 "parser.y"
4208 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4213 /* Line 1455 of yacc.c */
4214 #line 1843 "parser.y"
4216 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4217 (yyval.catch_list).finally = 0;
4218 if((yyvsp[(2) - (2)].exception)) {
4219 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4220 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4227 /* Line 1455 of yacc.c */
4228 #line 1851 "parser.y"
4230 (yyval.catch_list).l=list_new();
4231 (yyval.catch_list).finally = 0;
4232 if((yyvsp[(1) - (1)].exception)) {
4233 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4234 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4241 /* Line 1455 of yacc.c */
4242 #line 1860 "parser.y"
4248 /* Line 1455 of yacc.c */
4249 #line 1860 "parser.y"
4251 code_t*out = abc_nop(0);
4253 code_t*start = abc_nop(0);
4254 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4255 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4256 (yyval.code) = abc_jump((yyval.code), out);
4258 code_t*end = (yyval.code) = abc_nop((yyval.code));
4261 if((yyvsp[(6) - (6)].catch_list).finally)
4262 tmp = new_variable("__finally__", 0, 0);
4264 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4267 abc_exception_t*e = l->abc_exception;
4269 (yyval.code) = code_append((yyval.code), e->target);
4270 (yyval.code) = abc_jump((yyval.code), out);
4272 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4274 e->target = (yyval.code) = abc_nop((yyval.code));
4275 (yyval.code) = abc___rethrow__((yyval.code));
4283 (yyval.code) = code_append((yyval.code), out);
4285 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4287 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4289 (yyval.code) = var_block((yyval.code));
4296 /* Line 1455 of yacc.c */
4297 #line 1905 "parser.y"
4299 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4300 (yyval.code)=abc_throw((yyval.code));
4306 /* Line 1455 of yacc.c */
4307 #line 1909 "parser.y"
4309 if(!state->exception_name)
4310 syntaxerror("re-throw only possible within a catch block");
4311 variable_t*v = find_variable(state->exception_name);
4312 (yyval.code)=code_new();
4313 (yyval.code)=abc_getlocal((yyval.code), v->index);
4314 (yyval.code)=abc_throw((yyval.code));
4320 /* Line 1455 of yacc.c */
4321 #line 1920 "parser.y"
4323 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4324 (yyval.code) = abc_pushscope((yyval.code));
4325 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4326 (yyval.code) = abc_popscope((yyval.code));
4332 /* Line 1455 of yacc.c */
4333 #line 1930 "parser.y"
4334 {(yyval.id)="package";;}
4339 /* Line 1455 of yacc.c */
4340 #line 1932 "parser.y"
4341 {(yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;;}
4346 /* Line 1455 of yacc.c */
4347 #line 1933 "parser.y"
4348 {(yyval.id)=strdup((yyvsp[(1) - (1)].id));;}
4353 /* Line 1455 of yacc.c */
4354 #line 1935 "parser.y"
4355 {startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;;}
4360 /* Line 1455 of yacc.c */
4361 #line 1935 "parser.y"
4362 {endpackage();(yyval.code)=0;;}
4367 /* Line 1455 of yacc.c */
4368 #line 1936 "parser.y"
4374 /* Line 1455 of yacc.c */
4375 #line 1936 "parser.y"
4376 {endpackage();(yyval.code)=0;;}
4381 /* Line 1455 of yacc.c */
4382 #line 1938 "parser.y"
4384 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
4386 syntaxerror("Couldn't import class\n");
4387 state_has_imports();
4388 dict_put(state->imports, c->name, c);
4395 /* Line 1455 of yacc.c */
4396 #line 1946 "parser.y"
4399 i->package = (yyvsp[(2) - (4)].id);
4400 state_has_imports();
4401 list_append(state->wildcard_imports, i);
4408 /* Line 1455 of yacc.c */
4409 #line 1956 "parser.y"
4415 /* Line 1455 of yacc.c */
4416 #line 1957 "parser.y"
4417 {(yyval.flags)=(yyvsp[(1) - (1)].flags);}
4422 /* Line 1455 of yacc.c */
4423 #line 1958 "parser.y"
4424 {(yyval.flags)=(yyvsp[(1) - (1)].token);;}
4429 /* Line 1455 of yacc.c */
4430 #line 1959 "parser.y"
4431 {(yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);;}
4436 /* Line 1455 of yacc.c */
4437 #line 1961 "parser.y"
4438 {(yyval.token)=FLAG_PUBLIC;;}
4443 /* Line 1455 of yacc.c */
4444 #line 1962 "parser.y"
4445 {(yyval.token)=FLAG_PRIVATE;;}
4450 /* Line 1455 of yacc.c */
4451 #line 1963 "parser.y"
4452 {(yyval.token)=FLAG_PROTECTED;;}
4457 /* Line 1455 of yacc.c */
4458 #line 1964 "parser.y"
4459 {(yyval.token)=FLAG_STATIC;;}
4464 /* Line 1455 of yacc.c */
4465 #line 1965 "parser.y"
4466 {(yyval.token)=FLAG_DYNAMIC;;}
4471 /* Line 1455 of yacc.c */
4472 #line 1966 "parser.y"
4473 {(yyval.token)=FLAG_FINAL;;}
4478 /* Line 1455 of yacc.c */
4479 #line 1967 "parser.y"
4480 {(yyval.token)=FLAG_OVERRIDE;;}
4485 /* Line 1455 of yacc.c */
4486 #line 1968 "parser.y"
4487 {(yyval.token)=FLAG_NATIVE;;}
4492 /* Line 1455 of yacc.c */
4493 #line 1969 "parser.y"
4494 {(yyval.token)=FLAG_PACKAGEINTERNAL;;}
4499 /* Line 1455 of yacc.c */
4500 #line 1971 "parser.y"
4501 {(yyval.classinfo)=registry_getobjectclass();;}
4506 /* Line 1455 of yacc.c */
4507 #line 1972 "parser.y"
4508 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);;}
4513 /* Line 1455 of yacc.c */
4514 #line 1974 "parser.y"
4515 {(yyval.classinfo_list)=list_new();;}
4520 /* Line 1455 of yacc.c */
4521 #line 1975 "parser.y"
4522 {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);;}
4527 /* Line 1455 of yacc.c */
4528 #line 1977 "parser.y"
4529 {(yyval.classinfo_list)=list_new();;}
4534 /* Line 1455 of yacc.c */
4535 #line 1978 "parser.y"
4536 {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);;}
4541 /* Line 1455 of yacc.c */
4542 #line 1982 "parser.y"
4543 {startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);;}
4548 /* Line 1455 of yacc.c */
4549 #line 1984 "parser.y"
4550 {endclass();(yyval.code)=0;;}
4555 /* Line 1455 of yacc.c */
4556 #line 1988 "parser.y"
4557 {startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);;}
4562 /* Line 1455 of yacc.c */
4563 #line 1990 "parser.y"
4564 {endclass();(yyval.code)=0;;}
4569 /* Line 1455 of yacc.c */
4570 #line 2002 "parser.y"
4572 code_t*c = state->cls->static_init;
4573 c = code_append(c, (yyvsp[(1) - (1)].code));
4574 state->cls->static_init = c;
4580 /* Line 1455 of yacc.c */
4581 #line 2013 "parser.y"
4583 syntaxerror("variable declarations not allowed in interfaces");
4589 /* Line 1455 of yacc.c */
4590 #line 2016 "parser.y"
4592 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
4593 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
4594 syntaxerror("invalid method modifiers: interface methods always need to be public");
4596 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
4597 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
4603 /* Line 1455 of yacc.c */
4604 #line 2029 "parser.y"
4606 int flags = (yyvsp[(1) - (5)].flags);
4607 memberinfo_t* info = state->cls?
4608 memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
4609 memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
4611 info->type = (yyvsp[(4) - (5)].classinfo);
4612 info->flags = flags;
4615 namespace_t mname_ns = {flags2access(flags), ""};
4616 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
4618 trait_list_t**traits;
4622 traits = &global->init->traits;
4623 code = &global->init->method->body->code;
4624 } else if(flags&FLAG_STATIC) {
4626 traits = &state->cls->abc->static_traits;
4627 code = &state->cls->static_init;
4629 // instance variable
4630 traits = &state->cls->abc->traits;
4631 code = &state->cls->init;
4635 if((yyvsp[(4) - (5)].classinfo)) {
4636 MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
4637 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
4639 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
4641 info->slot = t->slot_id;
4643 /* initalization code (if needed) */
4645 if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
4646 c = abc_getlocal_0(c);
4647 c = code_append(c, (yyvsp[(5) - (5)].value).c);
4648 c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
4649 c = abc_setslot(c, t->slot_id);
4652 *code = code_append(*code, c);
4654 if((yyvsp[(2) - (5)].token)==KW_CONST) {
4655 t->kind= TRAIT_CONST;
4664 /* Line 1455 of yacc.c */
4665 #line 2087 "parser.y"
4666 {(yyval.constant)=0;;}
4671 /* Line 1455 of yacc.c */
4672 #line 2088 "parser.y"
4673 {(yyval.constant)=(yyvsp[(2) - (2)].constant);;}
4678 /* Line 1455 of yacc.c */
4679 #line 2090 "parser.y"
4680 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));;}
4685 /* Line 1455 of yacc.c */
4686 #line 2091 "parser.y"
4687 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));;}
4692 /* Line 1455 of yacc.c */
4693 #line 2092 "parser.y"
4694 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));;}
4699 /* Line 1455 of yacc.c */
4700 #line 2093 "parser.y"
4701 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));;}
4706 /* Line 1455 of yacc.c */
4707 #line 2094 "parser.y"
4708 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);;}
4713 /* Line 1455 of yacc.c */
4714 #line 2096 "parser.y"
4715 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));;}
4720 /* Line 1455 of yacc.c */
4721 #line 2097 "parser.y"
4722 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));;}
4727 /* Line 1455 of yacc.c */
4728 #line 2098 "parser.y"
4729 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));;}
4734 /* Line 1455 of yacc.c */
4735 #line 2103 "parser.y"
4737 memset(&(yyval.params),0,sizeof((yyval.params)));
4743 /* Line 1455 of yacc.c */
4744 #line 2106 "parser.y"
4746 (yyval.params)=(yyvsp[(1) - (1)].params);
4752 /* Line 1455 of yacc.c */
4753 #line 2111 "parser.y"
4755 memset(&(yyval.params),0,sizeof((yyval.params)));
4756 (yyval.params).varargs=1;
4757 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
4763 /* Line 1455 of yacc.c */
4764 #line 2116 "parser.y"
4766 (yyval.params) =(yyvsp[(1) - (4)].params);
4767 (yyval.params).varargs=1;
4768 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
4774 /* Line 1455 of yacc.c */
4775 #line 2123 "parser.y"
4777 (yyval.params) = (yyvsp[(1) - (3)].params);
4778 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
4784 /* Line 1455 of yacc.c */
4785 #line 2127 "parser.y"
4787 memset(&(yyval.params),0,sizeof((yyval.params)));
4788 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
4794 /* Line 1455 of yacc.c */
4795 #line 2132 "parser.y"
4797 (yyval.param) = malloc(sizeof(param_t));
4798 (yyval.param)->name=(yyvsp[(1) - (4)].id);
4799 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
4800 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
4806 /* Line 1455 of yacc.c */
4807 #line 2138 "parser.y"
4809 (yyval.param) = malloc(sizeof(param_t));
4810 (yyval.param)->name=(yyvsp[(1) - (2)].id);
4811 (yyval.param)->type = TYPE_ANY;
4812 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
4818 /* Line 1455 of yacc.c */
4819 #line 2144 "parser.y"
4820 {(yyval.token)=(yyvsp[(1) - (1)].token);;}
4825 /* Line 1455 of yacc.c */
4826 #line 2145 "parser.y"
4827 {(yyval.token)=(yyvsp[(1) - (1)].token);;}
4832 /* Line 1455 of yacc.c */
4833 #line 2146 "parser.y"
4839 /* Line 1455 of yacc.c */
4840 #line 2149 "parser.y"
4841 {startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
4846 /* Line 1455 of yacc.c */
4847 #line 2150 "parser.y"
4850 if(state->method->late_binding) {
4851 c = abc_getlocal_0(c);
4852 c = abc_pushscope(c);
4854 if(state->method->is_constructor && !state->method->has_super) {
4855 // call default constructor
4856 c = abc_getlocal_0(c);
4857 c = abc_constructsuper(c, 0);
4859 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
4860 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
4867 /* Line 1455 of yacc.c */
4868 #line 2167 "parser.y"
4874 /* Line 1455 of yacc.c */
4875 #line 2169 "parser.y"
4877 syntaxerror("nested functions not supported yet");
4883 /* Line 1455 of yacc.c */
4884 #line 2176 "parser.y"
4887 /* try current package */
4888 (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
4889 if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
4895 /* Line 1455 of yacc.c */
4896 #line 2183 "parser.y"
4898 (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
4899 if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
4900 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
4906 /* Line 1455 of yacc.c */
4907 #line 2192 "parser.y"
4908 {(yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));;}
4913 /* Line 1455 of yacc.c */
4914 #line 2193 "parser.y"
4915 {(yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));;}
4920 /* Line 1455 of yacc.c */
4921 #line 2195 "parser.y"
4922 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);;}
4927 /* Line 1455 of yacc.c */
4928 #line 2196 "parser.y"
4929 {(yyval.classinfo)=registry_getanytype();;}
4934 /* Line 1455 of yacc.c */
4935 #line 2197 "parser.y"
4936 {(yyval.classinfo)=registry_getanytype();;}
4941 /* Line 1455 of yacc.c */
4942 #line 2206 "parser.y"
4943 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);;}
4948 /* Line 1455 of yacc.c */
4949 #line 2207 "parser.y"
4950 {(yyval.classinfo)=0;;}
4955 /* Line 1455 of yacc.c */
4956 #line 2211 "parser.y"
4957 {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
4962 /* Line 1455 of yacc.c */
4963 #line 2212 "parser.y"
4964 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
4969 /* Line 1455 of yacc.c */
4970 #line 2214 "parser.y"
4971 {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
4976 /* Line 1455 of yacc.c */
4977 #line 2216 "parser.y"
4978 {(yyval.value_list).len=1;
4979 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
4985 /* Line 1455 of yacc.c */
4986 #line 2219 "parser.y"
4988 (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
4989 (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
4995 /* Line 1455 of yacc.c */
4996 #line 2224 "parser.y"
4998 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
4999 (yyval.value).c = code_new();
5001 if((yyvsp[(2) - (3)].classinfo)->slot) {
5002 (yyval.value).c = abc_getglobalscope((yyval.value).c);
5003 (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
5005 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
5008 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
5010 if((yyvsp[(2) - (3)].classinfo)->slot)
5011 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
5013 (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
5014 (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
5020 /* Line 1455 of yacc.c */
5021 #line 2248 "parser.y"
5024 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5025 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5026 (yyval.value).c = code_cutlast((yyval.value).c);
5028 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
5030 (yyval.value).t = TYPE_ANY;
5031 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5032 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5033 (yyval.value).c = code_cutlast((yyval.value).c);
5034 (yyval.value).c = code_append((yyval.value).c, paramcode);
5035 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5036 multiname_destroy(name);
5037 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5038 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5039 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
5040 if(t->kind!=TRAIT_METHOD) {
5041 //ok: flash allows to assign closures to members.
5043 multiname_t*name = t->name;
5044 (yyval.value).c = code_cutlast((yyval.value).c);
5045 (yyval.value).c = code_append((yyval.value).c, paramcode);
5046 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
5047 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5048 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
5049 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
5050 (yyval.value).c = code_cutlast((yyval.value).c);
5051 (yyval.value).c = code_append((yyval.value).c, paramcode);
5052 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
5053 multiname_destroy(name);
5055 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5056 (yyval.value).c = code_append((yyval.value).c, paramcode);
5057 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5062 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
5063 (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
5065 (yyval.value).c = abc_coerce_a((yyval.value).c);
5066 (yyval.value).t = TYPE_ANY;
5074 /* Line 1455 of yacc.c */
5075 #line 2296 "parser.y"
5077 if(!state->cls) syntaxerror("super() not allowed outside of a class");
5078 if(!state->method) syntaxerror("super() not allowed outside of a function");
5079 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
5081 (yyval.value).c = code_new();
5082 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5084 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
5086 this is dependent on the control path, check this somewhere else
5087 if(state->method->has_super)
5088 syntaxerror("constructor may call super() only once");
5090 state->method->has_super = 1;
5091 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
5092 (yyval.value).c = abc_pushundefined((yyval.value).c);
5093 (yyval.value).t = TYPE_ANY;
5099 /* Line 1455 of yacc.c */
5100 #line 2316 "parser.y"
5102 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
5103 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
5104 (yyval.value).c = code_cutlast((yyval.value).c);
5106 multiname_t*name = 0;
5107 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
5108 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
5109 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
5110 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
5111 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
5112 (yyval.value).c = code_cutlast((yyval.value).c);
5113 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
5115 (yyval.value).c = abc_getlocal_0((yyval.value).c);
5116 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
5117 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
5119 (yyval.value).t = TYPE_BOOLEAN;
5125 /* Line 1455 of yacc.c */
5126 #line 2337 "parser.y"
5128 (yyval.code) = abc_returnvoid(0);
5134 /* Line 1455 of yacc.c */
5135 #line 2340 "parser.y"
5137 (yyval.code) = (yyvsp[(2) - (2)].value).c;
5138 (yyval.code) = abc_returnvalue((yyval.code));
5144 /* Line 1455 of yacc.c */
5145 #line 2347 "parser.y"
5146 {(yyval.value)=(yyvsp[(1) - (1)].value);;}
5151 /* Line 1455 of yacc.c */
5152 #line 2348 "parser.y"
5153 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5158 /* Line 1455 of yacc.c */
5159 #line 2349 "parser.y"
5161 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5162 (yyval.value).c = cut_last_push((yyval.value).c);
5163 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5164 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
5170 /* Line 1455 of yacc.c */
5171 #line 2355 "parser.y"
5173 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
5179 /* Line 1455 of yacc.c */
5180 #line 2361 "parser.y"
5181 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5186 /* Line 1455 of yacc.c */
5187 #line 2365 "parser.y"
5188 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5193 /* Line 1455 of yacc.c */
5194 #line 2367 "parser.y"
5195 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5200 /* Line 1455 of yacc.c */
5201 #line 2369 "parser.y"
5202 {(yyval.value) = (yyvsp[(1) - (1)].value);;}
5207 /* Line 1455 of yacc.c */
5208 #line 2371 "parser.y"
5210 (yyval.value).c = 0;
5211 namespace_t ns = {ACCESS_PACKAGE, ""};
5212 multiname_t m = {QNAME, &ns, 0, "RegExp"};
5213 if(!(yyvsp[(1) - (1)].regexp).options) {
5214 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5215 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5216 (yyval.value).c = abc_construct((yyval.value).c, 1);
5218 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
5219 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
5220 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
5221 (yyval.value).c = abc_construct((yyval.value).c, 2);
5223 (yyval.value).t = TYPE_REGEXP;
5229 /* Line 1455 of yacc.c */
5230 #line 2388 "parser.y"
5231 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
5232 //MULTINAME(m, registry_getintclass());
5233 //$$.c = abc_coerce2($$.c, &m); // FIXME
5234 (yyval.value).t = TYPE_INT;
5240 /* Line 1455 of yacc.c */
5241 #line 2393 "parser.y"
5242 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
5243 (yyval.value).t = TYPE_INT;
5249 /* Line 1455 of yacc.c */
5250 #line 2396 "parser.y"
5251 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
5252 (yyval.value).t = TYPE_INT;
5258 /* Line 1455 of yacc.c */
5259 #line 2399 "parser.y"
5260 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
5261 (yyval.value).t = TYPE_UINT;
5267 /* Line 1455 of yacc.c */
5268 #line 2402 "parser.y"
5269 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
5270 (yyval.value).t = TYPE_FLOAT;
5276 /* Line 1455 of yacc.c */
5277 #line 2405 "parser.y"
5278 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
5279 (yyval.value).t = TYPE_STRING;
5285 /* Line 1455 of yacc.c */
5286 #line 2408 "parser.y"
5287 {(yyval.value).c = abc_pushundefined(0);
5288 (yyval.value).t = TYPE_ANY;
5294 /* Line 1455 of yacc.c */
5295 #line 2411 "parser.y"
5296 {(yyval.value).c = abc_pushtrue(0);
5297 (yyval.value).t = TYPE_BOOLEAN;
5303 /* Line 1455 of yacc.c */
5304 #line 2414 "parser.y"
5305 {(yyval.value).c = abc_pushfalse(0);
5306 (yyval.value).t = TYPE_BOOLEAN;
5312 /* Line 1455 of yacc.c */
5313 #line 2417 "parser.y"
5314 {(yyval.value).c = abc_pushnull(0);
5315 (yyval.value).t = TYPE_NULL;
5321 /* Line 1455 of yacc.c */
5322 #line 2422 "parser.y"
5323 {(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);
5324 (yyval.value).t = TYPE_BOOLEAN;
5330 /* Line 1455 of yacc.c */
5331 #line 2425 "parser.y"
5332 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
5333 (yyval.value).t = TYPE_BOOLEAN;
5339 /* Line 1455 of yacc.c */
5340 #line 2428 "parser.y"
5341 {(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);
5342 (yyval.value).t = TYPE_BOOLEAN;
5348 /* Line 1455 of yacc.c */
5349 #line 2431 "parser.y"
5350 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
5351 (yyval.value).t = TYPE_BOOLEAN;
5357 /* Line 1455 of yacc.c */
5358 #line 2434 "parser.y"
5359 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
5360 (yyval.value).t = TYPE_BOOLEAN;
5366 /* Line 1455 of yacc.c */
5367 #line 2437 "parser.y"
5368 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
5369 (yyval.value).t = TYPE_BOOLEAN;
5375 /* Line 1455 of yacc.c */
5376 #line 2440 "parser.y"
5377 {(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);
5378 (yyval.value).t = TYPE_BOOLEAN;
5384 /* Line 1455 of yacc.c */
5385 #line 2443 "parser.y"
5386 {(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);
5387 (yyval.value).t = TYPE_BOOLEAN;
5393 /* Line 1455 of yacc.c */
5394 #line 2447 "parser.y"
5395 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
5396 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5397 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
5398 (yyval.value).c = abc_dup((yyval.value).c);
5399 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
5400 (yyval.value).c = cut_last_push((yyval.value).c);
5401 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5402 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
5403 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
5404 jmp->branch = label;
5410 /* Line 1455 of yacc.c */
5411 #line 2458 "parser.y"
5413 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
5414 /*printf("%08x:\n",$1.t);
5415 code_dump($1.c, 0, 0, "", stdout);
5416 printf("%08x:\n",$3.t);
5417 code_dump($3.c, 0, 0, "", stdout);
5418 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
5419 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
5420 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
5421 (yyval.value).c = abc_dup((yyval.value).c);
5422 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
5423 (yyval.value).c = cut_last_push((yyval.value).c);
5424 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
5425 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
5426 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
5427 jmp->branch = label;
5433 /* Line 1455 of yacc.c */
5434 #line 2476 "parser.y"
5435 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
5436 (yyval.value).c = abc_not((yyval.value).c);
5437 (yyval.value).t = TYPE_BOOLEAN;
5443 /* Line 1455 of yacc.c */
5444 #line 2481 "parser.y"
5445 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
5446 (yyval.value).c = abc_bitnot((yyval.value).c);
5447 (yyval.value).t = TYPE_INT;
5453 /* Line 1455 of yacc.c */
5454 #line 2486 "parser.y"
5455 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5456 (yyval.value).c = abc_bitand((yyval.value).c);
5457 (yyval.value).t = TYPE_INT;
5463 /* Line 1455 of yacc.c */
5464 #line 2491 "parser.y"
5465 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5466 (yyval.value).c = abc_bitxor((yyval.value).c);
5467 (yyval.value).t = TYPE_INT;
5473 /* Line 1455 of yacc.c */
5474 #line 2496 "parser.y"
5475 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5476 (yyval.value).c = abc_bitor((yyval.value).c);
5477 (yyval.value).t = TYPE_INT;
5483 /* Line 1455 of yacc.c */
5484 #line 2501 "parser.y"
5485 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5486 (yyval.value).c = abc_rshift((yyval.value).c);
5487 (yyval.value).t = TYPE_INT;
5493 /* Line 1455 of yacc.c */
5494 #line 2505 "parser.y"
5495 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5496 (yyval.value).c = abc_urshift((yyval.value).c);
5497 (yyval.value).t = TYPE_INT;
5503 /* Line 1455 of yacc.c */
5504 #line 2509 "parser.y"
5505 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5506 (yyval.value).c = abc_lshift((yyval.value).c);
5507 (yyval.value).t = TYPE_INT;
5513 /* Line 1455 of yacc.c */
5514 #line 2514 "parser.y"
5515 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5516 (yyval.value).c = abc_divide((yyval.value).c);
5517 (yyval.value).t = TYPE_NUMBER;
5523 /* Line 1455 of yacc.c */
5524 #line 2518 "parser.y"
5525 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5526 (yyval.value).c = abc_modulo((yyval.value).c);
5527 (yyval.value).t = TYPE_NUMBER;
5533 /* Line 1455 of yacc.c */
5534 #line 2522 "parser.y"
5535 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5536 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
5537 (yyval.value).c = abc_add_i((yyval.value).c);
5538 (yyval.value).t = TYPE_INT;
5540 (yyval.value).c = abc_add((yyval.value).c);
5541 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
5548 /* Line 1455 of yacc.c */
5549 #line 2531 "parser.y"
5550 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5551 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
5552 (yyval.value).c = abc_subtract_i((yyval.value).c);
5553 (yyval.value).t = TYPE_INT;
5555 (yyval.value).c = abc_subtract((yyval.value).c);
5556 (yyval.value).t = TYPE_NUMBER;
5563 /* Line 1455 of yacc.c */
5564 #line 2540 "parser.y"
5565 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5566 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
5567 (yyval.value).c = abc_multiply_i((yyval.value).c);
5568 (yyval.value).t = TYPE_INT;
5570 (yyval.value).c = abc_multiply((yyval.value).c);
5571 (yyval.value).t = TYPE_NUMBER;
5578 /* Line 1455 of yacc.c */
5579 #line 2550 "parser.y"
5580 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
5581 (yyval.value).c = abc_in((yyval.value).c);
5582 (yyval.value).t = TYPE_BOOLEAN;
5588 /* Line 1455 of yacc.c */
5589 #line 2555 "parser.y"
5590 {char use_astype=0; // flash player's astype works differently than astypelate
5591 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
5592 MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
5593 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
5594 (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
5596 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
5597 (yyval.value).c = abc_astypelate((yyval.value).c);
5598 (yyval.value).t = TYPE_ANY;
5605 /* Line 1455 of yacc.c */
5606 #line 2568 "parser.y"
5607 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
5608 (yyval.value).c = abc_instanceof((yyval.value).c);
5609 (yyval.value).t = TYPE_BOOLEAN;
5615 /* Line 1455 of yacc.c */
5616 #line 2573 "parser.y"
5617 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
5618 (yyval.value).c = abc_istypelate((yyval.value).c);
5619 (yyval.value).t = TYPE_BOOLEAN;
5625 /* Line 1455 of yacc.c */
5626 #line 2578 "parser.y"
5628 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
5629 (yyval.value).c = abc_typeof((yyval.value).c);
5630 (yyval.value).t = TYPE_STRING;
5636 /* Line 1455 of yacc.c */
5637 #line 2584 "parser.y"
5639 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
5640 (yyval.value).c = abc_pushundefined((yyval.value).c);
5641 (yyval.value).t = TYPE_ANY;
5647 /* Line 1455 of yacc.c */
5648 #line 2590 "parser.y"
5649 { (yyval.value).c = abc_pushundefined(0);
5650 (yyval.value).t = TYPE_ANY;
5656 /* Line 1455 of yacc.c */
5657 #line 2594 "parser.y"
5658 {(yyval.value)=(yyvsp[(2) - (3)].value);;}
5663 /* Line 1455 of yacc.c */
5664 #line 2596 "parser.y"
5666 (yyval.value)=(yyvsp[(2) - (2)].value);
5667 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
5668 (yyval.value).c=abc_negate_i((yyval.value).c);
5669 (yyval.value).t = TYPE_INT;
5671 (yyval.value).c=abc_negate((yyval.value).c);
5672 (yyval.value).t = TYPE_NUMBER;
5679 /* Line 1455 of yacc.c */
5680 #line 2607 "parser.y"
5682 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
5683 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
5685 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
5686 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
5687 (yyval.value).t = 0; // array elements have unknown type
5693 /* Line 1455 of yacc.c */
5694 #line 2616 "parser.y"
5696 (yyval.value).c = code_new();
5697 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
5698 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
5699 (yyval.value).t = registry_getarrayclass();
5705 /* Line 1455 of yacc.c */
5706 #line 2623 "parser.y"
5707 {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
5712 /* Line 1455 of yacc.c */
5713 #line 2624 "parser.y"
5714 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
5719 /* Line 1455 of yacc.c */
5720 #line 2626 "parser.y"
5722 (yyval.value_list).cc = 0;
5723 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
5724 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
5725 (yyval.value_list).len = 2;
5731 /* Line 1455 of yacc.c */
5732 #line 2632 "parser.y"
5734 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
5735 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
5736 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
5737 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
5743 /* Line 1455 of yacc.c */
5744 #line 2641 "parser.y"
5746 (yyval.value).c = code_new();
5747 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
5748 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
5749 (yyval.value).t = registry_getobjectclass();
5755 /* Line 1455 of yacc.c */
5756 #line 2648 "parser.y"
5758 code_t*c = (yyvsp[(3) - (3)].value).c;
5759 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
5760 c=abc_multiply_i(c);
5764 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
5765 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5766 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5772 /* Line 1455 of yacc.c */
5773 #line 2660 "parser.y"
5775 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
5776 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
5777 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5778 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5784 /* Line 1455 of yacc.c */
5785 #line 2666 "parser.y"
5787 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
5788 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
5789 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5790 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5796 /* Line 1455 of yacc.c */
5797 #line 2672 "parser.y"
5799 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
5800 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
5801 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5802 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5808 /* Line 1455 of yacc.c */
5809 #line 2678 "parser.y"
5811 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
5812 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
5813 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5814 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5820 /* Line 1455 of yacc.c */
5821 #line 2684 "parser.y"
5823 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
5824 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
5825 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5826 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5832 /* Line 1455 of yacc.c */
5833 #line 2690 "parser.y"
5835 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
5836 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
5837 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5838 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5844 /* Line 1455 of yacc.c */
5845 #line 2696 "parser.y"
5847 code_t*c = (yyvsp[(3) - (3)].value).c;
5849 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
5853 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
5856 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5857 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5863 /* Line 1455 of yacc.c */
5864 #line 2709 "parser.y"
5865 { code_t*c = (yyvsp[(3) - (3)].value).c;
5866 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
5867 c=abc_subtract_i(c);
5870 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
5873 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
5874 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5880 /* Line 1455 of yacc.c */
5881 #line 2720 "parser.y"
5883 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5884 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
5885 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
5886 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
5892 /* Line 1455 of yacc.c */
5893 #line 2727 "parser.y"
5895 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
5896 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
5897 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
5898 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
5899 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
5900 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
5901 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
5902 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
5903 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
5904 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
5910 /* Line 1455 of yacc.c */
5911 #line 2740 "parser.y"
5913 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
5914 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
5915 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
5916 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
5917 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
5918 (yyval.value).c = abc_getlocal(0, nr);
5919 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
5920 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
5921 (yyval.value).c = abc_getlocal(0, nr);
5922 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
5923 } else syntaxerror("internal error");
5925 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5926 c=abc_increment_i(c);
5932 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
5933 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
5934 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
5941 /* Line 1455 of yacc.c */
5942 #line 2767 "parser.y"
5944 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
5945 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5946 c=abc_decrement_i(c);
5952 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
5953 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
5954 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
5960 /* Line 1455 of yacc.c */
5961 #line 2781 "parser.y"
5963 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
5964 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5965 c=abc_increment_i(c);
5971 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
5972 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
5973 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
5979 /* Line 1455 of yacc.c */
5980 #line 2795 "parser.y"
5982 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
5983 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
5984 c=abc_decrement_i(c);
5990 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
5991 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
5992 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
5998 /* Line 1455 of yacc.c */
5999 #line 2810 "parser.y"
6000 { if(!state->cls->info)
6001 syntaxerror("super keyword not allowed outside a class");
6002 classinfo_t*t = state->cls->info->superclass;
6003 if(!t) t = TYPE_OBJECT;
6005 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6006 namespace_t ns = flags2namespace(f->flags, "");
6007 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6008 (yyval.value).c = 0;
6009 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6010 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
6011 (yyval.value).t = memberinfo_gettype(f);
6017 /* Line 1455 of yacc.c */
6018 #line 2825 "parser.y"
6019 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
6020 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
6022 if(TYPE_IS_CLASS(t) && t->cls) {
6027 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
6029 if(f && !is_static != !(f->flags&FLAG_STATIC))
6031 if(f && f->slot && !noslot) {
6032 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
6034 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
6035 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6037 /* determine type */
6038 (yyval.value).t = memberinfo_gettype(f);
6039 if(!(yyval.value).t)
6040 (yyval.value).c = abc_coerce_a((yyval.value).c);
6042 /* when resolving a property on an unknown type, we do know the
6043 name of the property (and don't seem to need the package), but
6044 we need to make avm2 try out all access modes */
6045 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
6046 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6047 (yyval.value).c = abc_coerce_a((yyval.value).c);
6048 (yyval.value).t = registry_getanytype();
6055 /* Line 1455 of yacc.c */
6056 #line 2858 "parser.y"
6058 (yyval.value).t = 0;
6059 (yyval.value).c = 0;
6064 /* look at variables */
6065 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
6066 // $1 is a local variable
6067 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
6068 (yyval.value).t = v->type;
6070 /* look at current class' members */
6071 } else if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1))) {
6072 // $1 is a function in this class
6073 int var_is_static = (f->flags&FLAG_STATIC);
6074 int i_am_static = ((state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC);
6075 if(var_is_static != i_am_static) {
6076 /* there doesn't seem to be any "static" way to access
6077 static properties of a class */
6078 state->method->late_binding = 1;
6079 (yyval.value).t = f->type;
6080 namespace_t ns = {flags2access(f->flags), ""};
6081 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
6082 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
6083 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6086 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6087 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
6089 namespace_t ns = {flags2access(f->flags), ""};
6090 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
6091 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6092 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6095 if(f->kind == MEMBER_METHOD) {
6096 (yyval.value).t = TYPE_FUNCTION(f);
6098 (yyval.value).t = f->type;
6101 /* look at actual classes, in the current package and imported */
6102 } else if((a = find_class((yyvsp[(1) - (1)].id)))) {
6103 if(a->flags & FLAG_METHOD) {
6105 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
6106 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6107 if(a->function->kind == MEMBER_METHOD) {
6108 (yyval.value).t = TYPE_FUNCTION(a->function);
6110 (yyval.value).t = a->function->type;
6114 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6115 (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
6118 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6120 (yyval.value).t = TYPE_CLASS(a);
6123 /* unknown object, let the avm2 resolve it */
6125 if(strcmp((yyvsp[(1) - (1)].id),"trace"))
6126 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
6127 state->method->late_binding = 1;
6129 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
6131 (yyval.value).t = 0;
6132 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
6133 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6140 /* Line 1455 of yacc.c */
6141 #line 2945 "parser.y"
6147 /* Line 1455 of yacc.c */
6148 #line 2946 "parser.y"
6154 /* Line 1455 of yacc.c */
6155 #line 2947 "parser.y"
6161 /* Line 1455 of yacc.c */
6162 #line 2949 "parser.y"
6168 /* Line 1455 of yacc.c */
6169 #line 6170 "parser.tab.c"
6172 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
6176 YY_STACK_PRINT (yyss, yyssp);
6180 /* Now `shift' the result of the reduction. Determine what state
6181 that goes to, based on the state we popped back to and the rule
6182 number reduced by. */
6186 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
6187 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
6188 yystate = yytable[yystate];
6190 yystate = yydefgoto[yyn - YYNTOKENS];
6195 /*------------------------------------.
6196 | yyerrlab -- here on detecting error |
6197 `------------------------------------*/
6199 /* If not already recovering from an error, report this error. */
6203 #if ! YYERROR_VERBOSE
6204 yyerror (YY_("syntax error"));
6207 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
6208 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
6210 YYSIZE_T yyalloc = 2 * yysize;
6211 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
6212 yyalloc = YYSTACK_ALLOC_MAXIMUM;
6213 if (yymsg != yymsgbuf)
6214 YYSTACK_FREE (yymsg);
6215 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
6217 yymsg_alloc = yyalloc;
6221 yymsg_alloc = sizeof yymsgbuf;
6225 if (0 < yysize && yysize <= yymsg_alloc)
6227 (void) yysyntax_error (yymsg, yystate, yychar);
6232 yyerror (YY_("syntax error"));
6234 goto yyexhaustedlab;
6242 if (yyerrstatus == 3)
6244 /* If just tried and failed to reuse lookahead token after an
6245 error, discard it. */
6247 if (yychar <= YYEOF)
6249 /* Return failure if at end of input. */
6250 if (yychar == YYEOF)
6255 yydestruct ("Error: discarding",
6261 /* Else will try to reuse lookahead token after shifting the error
6266 /*---------------------------------------------------.
6267 | yyerrorlab -- error raised explicitly by YYERROR. |
6268 `---------------------------------------------------*/
6271 /* Pacify compilers like GCC when the user code never invokes
6272 YYERROR and the label yyerrorlab therefore never appears in user
6274 if (/*CONSTCOND*/ 0)
6277 /* Do not reclaim the symbols of the rule which action triggered
6281 YY_STACK_PRINT (yyss, yyssp);
6286 /*-------------------------------------------------------------.
6287 | yyerrlab1 -- common code for both syntax error and YYERROR. |
6288 `-------------------------------------------------------------*/
6290 yyerrstatus = 3; /* Each real token shifted decrements this. */
6294 yyn = yypact[yystate];
6295 if (yyn != YYPACT_NINF)
6298 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
6306 /* Pop the current state because it cannot handle the error token. */
6311 yydestruct ("Error: popping",
6312 yystos[yystate], yyvsp);
6315 YY_STACK_PRINT (yyss, yyssp);
6321 /* Shift the error token. */
6322 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
6328 /*-------------------------------------.
6329 | yyacceptlab -- YYACCEPT comes here. |
6330 `-------------------------------------*/
6335 /*-----------------------------------.
6336 | yyabortlab -- YYABORT comes here. |
6337 `-----------------------------------*/
6342 #if !defined(yyoverflow) || YYERROR_VERBOSE
6343 /*-------------------------------------------------.
6344 | yyexhaustedlab -- memory exhaustion comes here. |
6345 `-------------------------------------------------*/
6347 yyerror (YY_("memory exhausted"));
6353 if (yychar != YYEMPTY)
6354 yydestruct ("Cleanup: discarding lookahead",
6356 /* Do not reclaim the symbols of the rule which action triggered
6357 this YYABORT or YYACCEPT. */
6359 YY_STACK_PRINT (yyss, yyssp);
6360 while (yyssp != yyss)
6362 yydestruct ("Cleanup: popping",
6363 yystos[*yyssp], yyvsp);
6368 YYSTACK_FREE (yyss);
6371 if (yymsg != yymsgbuf)
6372 YYSTACK_FREE (yymsg);
6374 /* Make sure YYID is used. */
6375 return YYID (yyresult);