2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse a3_parse
69 #define yyerror a3_error
70 #define yylval a3_lval
71 #define yychar a3_char
72 #define yydebug a3_debug
73 #define yynerrs a3_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
97 /* Line 198 of skeleton.m4 */
98 #line 99 "parser.tab.c"
100 /* Enabling traces. */
105 /* Enabling verbose error messages. */
106 #ifdef YYERROR_VERBOSE
107 # undef YYERROR_VERBOSE
108 # define YYERROR_VERBOSE 1
110 # define YYERROR_VERBOSE 1
113 /* Enabling the token table. */
114 #ifndef YYTOKEN_TABLE
115 # define YYTOKEN_TABLE 0
122 /* Put the tokens into the symbol table, so that GDB and other debuggers
220 below_semicolon = 353,
221 below_assignment = 354,
223 minusminus_prefix = 357,
224 plusplus_prefix = 358,
227 above_identifier = 361,
235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
237 /* Line 223 of skeleton.m4 */
242 /* Line 223 of skeleton.m4 */
245 enum yytokentype token;
247 classinfo_t*classinfo;
248 classinfo_list_t*classinfo_list;
250 slotinfo_list_t*slotinfo_list;
253 unsigned int number_uint;
257 //typedcode_list_t*value_list;
258 codeandnumber_t value_list;
264 for_start_t for_start;
265 abc_exception_t *exception;
268 namespace_decl_t* namespace_decl;
270 abc_exception_list_t *l;
276 /* Line 223 of skeleton.m4 */
277 #line 278 "parser.tab.c"
279 # define YYSTYPE_IS_TRIVIAL 1
280 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
281 # define YYSTYPE_IS_DECLARED 1
285 /* Copy the second part of user declarations. */
287 /* Line 273 of skeleton.m4 */
291 static int a3_error(char*s)
293 syntaxerror("%s", s);
294 return 0; //make gcc happy
298 static char* concat2(const char* t1, const char* t2)
302 char*text = malloc(l1+l2+1);
303 memcpy(text , t1, l1);
304 memcpy(text+l1, t2, l2);
308 static char* concat3(const char* t1, const char* t2, const char* t3)
313 char*text = malloc(l1+l2+l3+1);
314 memcpy(text , t1, l1);
315 memcpy(text+l1, t2, l2);
316 memcpy(text+l1+l2, t3, l3);
321 typedef struct _import {
325 DECLARE_LIST(import);
327 DECLARE(methodstate);
328 DECLARE_LIST(methodstate);
330 typedef struct _classstate {
336 methodstate_t*static_init;
338 //code_t*static_init;
340 char has_constructor;
343 struct _methodstate {
353 dict_t*unresolved_variables;
356 char uses_parent_function;
361 int var_index; // for inner methods
362 int slot_index; // for inner methods
363 char is_a_slot; // for inner methods
368 abc_exception_list_t*exceptions;
370 methodstate_list_t*innerfunctions;
373 typedef struct _state {
378 import_list_t*wildcard_imports;
379 dict_t*import_toplevel_packages;
381 namespace_list_t*active_namespaces;
382 namespace_decl_list_t*new_namespaces;
383 char has_own_imports;
384 char new_vars; // e.g. transition between two functions
387 methodstate_t*method;
394 typedef struct _global {
398 dict_t*file2token2info;
401 static global_t*global = 0;
402 static state_t* state = 0;
406 #define MULTINAME(m,x) \
410 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
412 #define MEMBER_MULTINAME(m,f,n) \
416 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
417 m##_ns.name = ((slotinfo_t*)(f))->package; \
422 m.namespace_set = 0; \
423 m.name = ((slotinfo_t*)(f))->name; \
425 m.type = MULTINAME; \
427 m.namespace_set = &nopackage_namespace_set; \
431 /* warning: list length of namespace set is undefined */
432 #define MULTINAME_LATE(m, access, package) \
433 namespace_t m##_ns = {access, package}; \
434 namespace_set_t m##_nsset; \
435 namespace_list_t m##_l;m##_l.next = 0; \
436 m##_nsset.namespaces = &m##_l; \
437 m##_nsset = m##_nsset; \
438 m##_l.namespace = &m##_ns; \
439 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
441 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
442 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
443 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
444 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
445 static namespace_list_t nl4 = {&ns4,0};
446 static namespace_list_t nl3 = {&ns3,&nl4};
447 static namespace_list_t nl2 = {&ns2,&nl3};
448 static namespace_list_t nl1 = {&ns1,&nl2};
449 static namespace_set_t nopackage_namespace_set = {&nl1};
451 static void new_state()
454 state_t*oldstate = state;
456 memcpy(s, state, sizeof(state_t)); //shallow copy
458 s->imports = dict_new();
460 if(!s->import_toplevel_packages) {
461 s->import_toplevel_packages = dict_new();
465 state->has_own_imports = 0;
466 state->new_namespaces = 0;
467 state->vars = dict_new();
468 state->old = oldstate;
471 static void state_has_imports()
473 state->wildcard_imports = list_clone(state->wildcard_imports);
474 state->imports = dict_clone(state->imports);
475 state->has_own_imports = 1;
477 static void import_toplevel(const char*package)
479 char* s = strdup(package);
481 dict_put(state->import_toplevel_packages, s, 0);
482 char*x = strrchr(s, '.');
490 static void state_destroy(state_t*state)
492 if(state->has_own_imports) {
493 list_free(state->wildcard_imports);
494 dict_destroy(state->imports);state->imports=0;
496 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
497 dict_destroy(state->imports);state->imports=0;
501 for(t=0;t<state->vars->hashsize;t++) {
502 dictentry_t*e =state->vars->slots[t];
504 free(e->data);e->data=0;
508 dict_destroy(state->vars);state->vars=0;
514 static void old_state()
516 if(!state || !state->old)
517 syntaxerror("invalid nesting");
518 state_t*leaving = state;
522 namespace_decl_list_t*nl=leaving->new_namespaces;
524 tokenizer_unregister_namespace(nl->namespace_decl->name);
528 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
529 free(leaving->method);
532 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
537 state_destroy(leaving);
540 static code_t* method_header(methodstate_t*m);
541 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
542 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
545 static char* internal_filename_package = 0;
546 void initialize_file(char*filename)
549 syntaxerror("invalid call to initialize_file during parsing of another file");
552 state->package = internal_filename_package = strdup(filename);
554 global->token2info = dict_lookup(global->file2token2info,
555 current_filename // use long version
557 if(!global->token2info) {
558 global->token2info = dict_new2(&ptr_type);
559 dict_put(global->file2token2info, current_filename, global->token2info);
563 state->method = rfx_calloc(sizeof(methodstate_t));
564 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
565 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
567 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
568 function_initvars(state->method, 0, 0, 1);
569 global->init = abc_initscript(global->file);
575 if(!state || state->level!=1) {
576 syntaxerror("unexpected end of file in pass %d", as3_pass);
580 code_t*header = method_header(state->method);
581 code_t*c = wrap_function(header, 0, global->init->method->body->code);
582 global->init->method->body->code = c;
583 free(state->method);state->method=0;
586 //free(state->package);state->package=0; // used in registry
587 state_destroy(state);state=0;
590 void initialize_parser()
592 global = rfx_calloc(sizeof(global_t));
593 global->file = abc_file_new();
594 global->file->flags &= ~ABCFILE_LAZY;
595 global->file2token2info = dict_new();
596 global->token2info = 0;
599 void* finish_parser()
601 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
603 global->token2info=0;
609 static void xx_scopetest()
611 /* findpropstrict doesn't just return a scope object- it
612 also makes it "active" somehow. Push local_0 on the
613 scope stack and read it back with findpropstrict, it'll
614 contain properties like "trace". Trying to find the same
615 property on a "vanilla" local_0 yields only a "undefined" */
616 //c = abc_findpropstrict(c, "[package]::trace");
618 /*c = abc_getlocal_0(c);
619 c = abc_findpropstrict(c, "[package]::trace");
621 c = abc_setlocal_1(c);
623 c = abc_pushbyte(c, 0);
624 c = abc_setlocal_2(c);
626 code_t*xx = c = abc_label(c);
627 c = abc_findpropstrict(c, "[package]::trace");
628 c = abc_pushstring(c, "prop:");
629 c = abc_hasnext2(c, 1, 2);
631 c = abc_setlocal_3(c);
632 c = abc_callpropvoid(c, "[package]::trace", 2);
633 c = abc_getlocal_3(c);
635 c = abc_iftrue(c,xx);*/
638 typedef struct _variable {
642 methodstate_t*is_inner_method;
645 static variable_t* find_variable(state_t*s, char*name)
649 v = dict_lookup(s->vars, name);
651 if(s->new_vars) break;
656 static variable_t* find_slot(state_t*s, const char*name)
658 if(s->method && s->method->slots)
659 return dict_lookup(s->method->slots, name);
663 static variable_t* find_variable_safe(state_t*s, char*name)
665 variable_t* v = find_variable(s, name);
667 syntaxerror("undefined variable: %s", name);
670 static char variable_exists(char*name)
672 return dict_contains(state->vars, name);
674 code_t*defaultvalue(code_t*c, classinfo_t*type);
676 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
679 variable_t*v = find_slot(state, name);
685 v->index = state->method->variable_count++;
690 dict_put(state->vars, name, v);
694 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
696 return new_variable2(name, type, init, maybeslot)->index;
699 #define TEMPVARNAME "__as3_temp__"
700 static int gettempvar()
702 variable_t*v = find_variable(state, TEMPVARNAME);
705 return new_variable(TEMPVARNAME, 0, 0, 0);
708 code_t* var_block(code_t*body)
714 for(t=0;t<state->vars->hashsize;t++) {
715 dictentry_t*e = state->vars->slots[t];
717 variable_t*v = (variable_t*)e->data;
718 if(v->type && v->init) {
719 c = defaultvalue(c, v->type);
720 c = abc_setlocal(c, v->index);
721 k = abc_kill(k, v->index);
731 if(x->opcode== OPCODE___BREAK__ ||
732 x->opcode== OPCODE___CONTINUE__) {
733 /* link kill code before break/continue */
734 code_t*e = code_dup(k);
735 code_t*s = code_start(e);
747 c = code_append(c, body);
748 c = code_append(c, k);
752 void unknown_variable(char*name)
754 if(!state->method->unresolved_variables)
755 state->method->unresolved_variables = dict_new();
756 if(!dict_contains(state->method->unresolved_variables, name))
757 dict_put(state->method->unresolved_variables, name, 0);
760 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
762 static void parsererror(const char*file, int line, const char*f)
764 syntaxerror("internal error in %s, %s:%d", f, file, line);
768 static code_t* add_scope_code(code_t*c, methodstate_t*m)
770 if(m->uses_slots || (m->late_binding && !m->inner)) {
771 c = abc_getlocal_0(c);
772 c = abc_pushscope(c);
775 /* FIXME: does this need to be the same activation object as
776 in the function header? */
777 c = abc_newactivation(c);
778 c = abc_pushscope(c);
783 static code_t* method_header(methodstate_t*m)
787 c = add_scope_code(c, m);
789 methodstate_list_t*l = m->innerfunctions;
791 parserassert(l->methodstate->abc);
792 if(m->uses_slots && l->methodstate->is_a_slot) {
793 c = abc_getscopeobject(c, 1);
794 c = abc_newfunction(c, l->methodstate->abc);
796 c = abc_setlocal(c, l->methodstate->var_index);
797 c = abc_setslot(c, l->methodstate->slot_index);
799 c = abc_newfunction(c, l->methodstate->abc);
800 c = abc_setlocal(c, l->methodstate->var_index);
802 free(l->methodstate);l->methodstate=0;
806 c = code_append(c, m->header);
809 if(m->is_constructor && !m->has_super) {
810 // call default constructor
811 c = abc_getlocal_0(c);
812 c = abc_constructsuper(c, 0);
814 list_free(m->innerfunctions);
815 m->innerfunctions = 0;
820 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
822 c = code_append(c, header);
823 c = code_append(c, var_block(body));
824 /* append return if necessary */
825 if(!c || (c->opcode != OPCODE_RETURNVOID &&
826 c->opcode != OPCODE_RETURNVALUE)) {
827 c = abc_returnvoid(c);
833 static void startpackage(char*name)
836 /*printf("entering package \"%s\"\n", name);*/
837 state->package = strdup(name);
839 static void endpackage()
841 /*printf("leaving package \"%s\"\n", state->package);*/
843 //used e.g. in classinfo_register:
844 //free(state->package);state->package=0;
849 #define FLAG_PUBLIC 256
850 #define FLAG_PROTECTED 512
851 #define FLAG_PRIVATE 1024
852 #define FLAG_PACKAGEINTERNAL 2048
853 #define FLAG_NAMESPACE 4096
855 static namespace_t modifiers2access(modifiers_t*mod)
860 if(mod->flags&FLAG_NAMESPACE) {
861 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
862 syntaxerror("invalid combination of access levels and namespaces");
863 ns.access = ACCESS_NAMESPACE;
865 } else if(mod->flags&FLAG_PUBLIC) {
866 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
867 syntaxerror("invalid combination of access levels");
868 ns.access = ACCESS_PACKAGE;
869 } else if(mod->flags&FLAG_PRIVATE) {
870 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
871 syntaxerror("invalid combination of access levels");
872 ns.access = ACCESS_PRIVATE;
873 } else if(mod->flags&FLAG_PROTECTED) {
874 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
875 syntaxerror("invalid combination of access levels");
876 ns.access = ACCESS_PROTECTED;
878 ns.access = ACCESS_PACKAGEINTERNAL;
882 static slotinfo_t* find_class(const char*name);
884 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
889 index = new_variable("this", 0, 0, 0);
890 else if(!m->is_global)
891 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
893 index = new_variable("globalscope", 0, 0, 0);
896 parserassert(!index);
900 /* as variables and slots share the same number, make sure
901 that those variable indices are reserved. It's up to the
902 optimizer to later shuffle the variables down to lower
904 m->variable_count = m->uses_slots;
909 for(p=params->list;p;p=p->next) {
910 new_variable(p->param->name, p->param->type, 0, 1);
915 m->scope_code = add_scope_code(m->scope_code, m);
919 methodstate_list_t*l = m->innerfunctions;
921 methodstate_t*m = l->methodstate;
923 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
924 m->var_index = v->index;
925 m->slot_index = v->index;
926 v->is_inner_method = m;
931 if(as3_pass==2 && m->slots) {
932 /* exchange unresolved identifiers with the actual objects */
933 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
934 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
935 v->type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
936 if(!v->type || v->type->kind != INFOTYPE_CLASS) {
937 syntaxerror("Couldn't find class %s", v->type->name);
945 char*as3_globalclass=0;
946 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
949 syntaxerror("inner classes now allowed");
954 classinfo_list_t*mlist=0;
956 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
957 syntaxerror("invalid modifier(s)");
959 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
960 syntaxerror("public and internal not supported at the same time.");
962 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
963 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
964 // all classes extend object
965 extends = registry_getobjectclass();
968 /* create the class name, together with the proper attributes */
972 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
973 access = ACCESS_PRIVATE; package = internal_filename_package;
974 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
975 access = ACCESS_PACKAGEINTERNAL; package = state->package;
976 } else if(state->package!=internal_filename_package) {
977 access = ACCESS_PACKAGE; package = state->package;
979 syntaxerror("public classes only allowed inside a package");
983 state->cls = rfx_calloc(sizeof(classstate_t));
984 state->cls->init = rfx_calloc(sizeof(methodstate_t));
985 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
986 /* notice: we make no effort to initialize the top variable (local0) here,
987 even though it has special meaning. We just rely on the facat
988 that pass 1 won't do anything with variables */
990 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
992 /* set current method to constructor- all code within the class-level (except
993 static variable initializations) will be executed during construction time */
994 state->method = state->cls->init;
996 if(registry_find(package, classname)) {
997 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
999 /* build info struct */
1000 int num_interfaces = (list_length(implements));
1001 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1002 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1005 classinfo_list_t*l = implements;
1006 for(l=implements;l;l=l->next) {
1007 state->cls->info->interfaces[pos++] = l->classinfo;
1012 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1014 state->method = state->cls->init;
1015 parserassert(state->cls && state->cls->info);
1017 function_initvars(state->cls->init, 0, 0, 1);
1018 function_initvars(state->cls->static_init, 0, 0, 0);
1020 if(extends && (extends->flags & FLAG_FINAL))
1021 syntaxerror("Can't extend final class '%s'", extends->name);
1024 while(state->cls->info->interfaces[pos]) {
1025 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1026 syntaxerror("'%s' is not an interface",
1027 state->cls->info->interfaces[pos]->name);
1031 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1032 state->cls->info->superclass = extends;
1034 /* generate the abc code for this class */
1035 MULTINAME(classname2,state->cls->info);
1036 multiname_t*extends2 = sig2mname(extends);
1038 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1039 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1040 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1041 if(state->cls->info->flags&FLAG_INTERFACE) {
1042 abc_class_interface(state->cls->abc);
1045 abc_class_protectedNS(state->cls->abc, classname);
1047 for(mlist=implements;mlist;mlist=mlist->next) {
1048 MULTINAME(m, mlist->classinfo);
1049 abc_class_add_interface(state->cls->abc, &m);
1052 /* write the construction code for this class to the global init
1054 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1056 abc_method_body_t*m = global->init->method->body;
1057 __ getglobalscope(m);
1058 classinfo_t*s = extends;
1063 //TODO: take a look at the current scope stack, maybe
1064 // we can re-use something
1069 multiname_t*s2 = sig2mname(s);
1071 multiname_destroy(s2);
1073 __ pushscope(m); count++;
1074 m->code = m->code->prev->prev; // invert
1076 /* continue appending after last op end */
1077 while(m->code && m->code->next) m->code = m->code->next;
1079 /* TODO: if this is one of *our* classes, we can also
1080 do a getglobalscope/getslot <nr> (which references
1081 the init function's slots) */
1083 __ getlex2(m, extends2);
1085 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1086 stack is not the superclass */
1087 __ pushscope(m);count++;
1090 /* notice: we get a verify error #1107 if the top element on the scope
1091 stack is not the global object */
1093 __ pushscope(m);count++;
1095 __ newclass(m,state->cls->abc);
1099 __ setslot(m, slotindex);
1100 multiname_destroy(extends2);
1102 /* flash.display.MovieClip handling */
1104 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1105 if(state->package && state->package[0]) {
1106 as3_globalclass = concat3(state->package, ".", classname);
1108 as3_globalclass = strdup(classname);
1114 static int slotstate_varconst = 0;
1115 static modifiers_t*slotstate_flags = 0;
1116 static void setslotstate(modifiers_t* flags, int varconst)
1118 slotstate_varconst = varconst;
1119 slotstate_flags = flags;
1121 if(flags && flags->flags&FLAG_STATIC) {
1122 state->method = state->cls->static_init;
1124 state->method = state->cls->init;
1127 parserassert(state->method);
1131 static void endclass()
1134 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1136 c = abc_getlocal_0(c);
1137 c = abc_constructsuper(c, 0);
1138 state->cls->init->header = code_append(state->cls->init->header, c);
1139 state->cls->has_constructor=1;
1141 if(state->cls->init) {
1142 if(state->cls->info->flags&FLAG_INTERFACE) {
1143 if(state->cls->init->header)
1144 syntaxerror("interface can not have class-level code");
1146 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1147 code_t*c = method_header(state->cls->init);
1148 m->body->code = wrap_function(c, 0, m->body->code);
1151 if(state->cls->static_init) {
1152 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1153 code_t*c = method_header(state->cls->static_init);
1154 m->body->code = wrap_function(c, 0, m->body->code);
1161 void check_code_for_break(code_t*c)
1164 if(c->opcode == OPCODE___BREAK__) {
1165 char*name = string_cstr(c->data[0]);
1166 syntaxerror("Unresolved \"break %s\"", name);
1168 if(c->opcode == OPCODE___CONTINUE__) {
1169 char*name = string_cstr(c->data[0]);
1170 syntaxerror("Unresolved \"continue %s\"", name);
1172 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1173 char*name = string_cstr(c->data[0]);
1174 syntaxerror("Can't reference a package (%s) as such", name);
1181 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1184 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1185 if(TYPE_IS_NUMBER(t)) {
1186 xassert(c->type == CONSTANT_FLOAT
1187 || c->type == CONSTANT_INT
1188 || c->type == CONSTANT_UINT);
1189 } else if(TYPE_IS_UINT(t)) {
1190 xassert(c->type == CONSTANT_UINT ||
1191 (c->type == CONSTANT_INT && c->i>=0));
1192 } else if(TYPE_IS_INT(t)) {
1193 xassert(c->type == CONSTANT_INT);
1194 } else if(TYPE_IS_BOOLEAN(t)) {
1195 xassert(c->type == CONSTANT_TRUE
1196 || c->type == CONSTANT_FALSE);
1200 static void check_override(memberinfo_t*m, int flags)
1204 if(m->parent == state->cls->info)
1205 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1207 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1208 if(m->access==ACCESS_PRIVATE)
1210 if(m->flags & FLAG_FINAL)
1211 syntaxerror("can't override final member %s", m->name);
1213 /* allow this. it's no issue.
1214 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1215 syntaxerror("can't override static member %s", m->name);*/
1217 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1218 syntaxerror("can't override non-static member %s with static declaration", m->name);
1220 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1221 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1222 if(m->kind == INFOTYPE_METHOD)
1223 syntaxerror("can't override without explicit 'override' declaration");
1225 syntaxerror("can't override '%s'", m->name);
1230 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1232 methodinfo_t*minfo = 0;
1233 namespace_t ns = modifiers2access(mod);
1236 minfo = methodinfo_register_global(ns.access, state->package, name);
1237 minfo->return_type = 0; // save this for pass 2
1238 } else if(getset != KW_GET && getset != KW_SET) {
1240 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1242 printf("%s.%s | %s.%s\n",
1243 m->package, m->name,
1245 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1247 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1248 minfo->return_type = 0; // save this for pass 2
1249 // getslot on a member slot only returns "undefined", so no need
1250 // to actually store these
1251 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1253 //class getter/setter
1254 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1256 if(getset == KW_GET) {
1258 } else if(params->list && params->list->param && !params->list->next) {
1259 type = params->list->param->type;
1261 syntaxerror("setter function needs to take exactly one argument");
1262 // not sure wether to look into superclasses here, too
1263 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1265 if(minfo->kind!=INFOTYPE_SLOT)
1266 syntaxerror("class already contains a method called '%s'", name);
1267 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1268 syntaxerror("class already contains a field called '%s'", name);
1269 if(minfo->subtype & gs)
1270 syntaxerror("getter/setter for '%s' already defined", name);
1271 /* make a setter or getter into a getset */
1272 minfo->subtype |= gs;
1275 FIXME: this check needs to be done in pass 2
1277 if((!minfo->return_type != !type) ||
1278 (minfo->return_type && type &&
1279 !strcmp(minfo->return_type->name, type->name))) {
1280 syntaxerror("different type in getter and setter: %s and %s",
1281 minfo->return_type?minfo->return_type->name:"*",
1282 type?type->name:"*");
1285 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1286 minfo->kind = INFOTYPE_SLOT; //hack
1287 minfo->subtype = gs;
1288 minfo->return_type = 0;
1290 /* can't assign a slot as getter and setter might have different slots */
1291 //minfo->slot = slot;
1293 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1294 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1295 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1300 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1302 //parserassert(state->method && state->method->info);
1304 methodstate_t*parent_method = state->method;
1307 return_type = 0; // not valid in pass 1
1311 state->new_vars = 1;
1314 state->method = rfx_calloc(sizeof(methodstate_t));
1315 state->method->inner = 1;
1316 state->method->variable_count = 0;
1317 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1319 NEW(methodinfo_t,minfo);
1320 minfo->kind = INFOTYPE_METHOD;
1321 minfo->access = ACCESS_PACKAGEINTERNAL;
1323 state->method->info = minfo;
1326 list_append(parent_method->innerfunctions, state->method);
1328 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1330 function_initvars(state->method, params, 0, 1);
1334 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1335 state->method->variable_count = 0;
1336 parserassert(state->method);
1338 state->method->info->return_type = return_type;
1339 function_initvars(state->method, params, 0, 1);
1343 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1344 params_t*params, classinfo_t*return_type)
1346 if(state->method && state->method->info) {
1347 syntaxerror("not able to start another method scope");
1350 state->new_vars = 1;
1353 state->method = rfx_calloc(sizeof(methodstate_t));
1354 state->method->has_super = 0;
1357 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1359 state->method->is_global = 1;
1360 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1362 if(state->method->is_constructor)
1363 name = "__as3_constructor__";
1365 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1367 function_initvars(state->method, params, mod->flags, 1);
1369 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1373 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1374 state->method->variable_count = 0;
1375 parserassert(state->method);
1378 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1379 check_override(m, mod->flags);
1383 state->cls->has_constructor |= state->method->is_constructor;
1386 state->method->info->return_type = return_type;
1387 function_initvars(state->method, params, mod->flags, 1);
1391 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1392 params_t*params, classinfo_t*return_type, code_t*body)
1394 int flags = mod?mod->flags:0;
1397 // store inner methods in variables
1398 function_initvars(state->method, 0, 0, 0);
1400 methodstate_list_t*ml = state->method->innerfunctions;
1402 dict_t*xvars = dict_new();
1405 methodstate_t*m = ml->methodstate;
1406 parserassert(m->inner);
1407 if(m->unresolved_variables) {
1408 dict_t*d = m->unresolved_variables;
1410 for(t=0;t<d->hashsize;t++) {
1411 dictentry_t*l = d->slots[t];
1413 /* check parent method's variables */
1415 if((v=find_variable(state, l->key))) {
1416 m->uses_parent_function = 1;
1417 state->method->uses_slots = 1;
1418 dict_put(xvars, l->key, 0);
1425 dict_destroy(m->unresolved_variables);
1426 m->unresolved_variables = 0;
1431 if(state->method->uses_slots) {
1432 state->method->slots = dict_new();
1434 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1435 if(!name) syntaxerror("internal error");
1436 if(v->index && dict_contains(xvars, name)) {
1439 if(v->is_inner_method) {
1440 v->is_inner_method->is_a_slot = 1;
1443 dict_put(state->method->slots, name, v);
1446 state->method->uses_slots = i;
1447 dict_destroy(state->vars);state->vars = 0;
1454 /*if(state->method->uses_parent_function){
1455 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1460 multiname_t*type2 = sig2mname(return_type);
1462 if(state->method->inner) {
1463 f = state->method->abc;
1464 abc_method_init(f, global->file, type2, 1);
1465 } else if(state->method->is_constructor) {
1466 f = abc_class_getconstructor(state->cls->abc, type2);
1467 } else if(!state->method->is_global) {
1468 namespace_t mname_ns = {state->method->info->access, ""};
1469 multiname_t mname = {QNAME, &mname_ns, 0, name};
1471 if(flags&FLAG_STATIC)
1472 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1474 f = abc_class_method(state->cls->abc, type2, &mname);
1475 slot = f->trait->slot_id;
1477 namespace_t mname_ns = {state->method->info->access, state->package};
1478 multiname_t mname = {QNAME, &mname_ns, 0, name};
1480 f = abc_method_new(global->file, type2, 1);
1481 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1482 //abc_code_t*c = global->init->method->body->code;
1484 //flash doesn't seem to allow us to access function slots
1485 //state->method->info->slot = slot;
1487 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1488 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1489 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1490 if(params->varargs) f->flags |= METHOD_NEED_REST;
1494 for(p=params->list;p;p=p->next) {
1495 if(params->varargs && !p->next) {
1496 break; //varargs: omit last parameter in function signature
1498 multiname_t*m = sig2mname(p->param->type);
1499 list_append(f->parameters, m);
1500 if(p->param->value) {
1501 check_constant_against_type(p->param->type, p->param->value);
1502 opt=1;list_append(f->optional_parameters, p->param->value);
1504 syntaxerror("non-optional parameter not allowed after optional parameters");
1507 if(state->method->slots) {
1508 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1510 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1511 multiname_t*type = sig2mname(v->type);
1512 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1513 t->slot_id = v->index;
1518 check_code_for_break(body);
1520 /* Seems this works now.
1521 if(state->method->exceptions && state->method->uses_slots) {
1522 as3_warning("try/catch and activation not supported yet within the same method");
1526 f->body->code = body;
1527 f->body->exceptions = state->method->exceptions;
1528 } else { //interface
1530 syntaxerror("interface methods can't have a method body");
1540 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1545 void breakjumpsto(code_t*c, char*name, code_t*jump)
1548 if(c->opcode == OPCODE___BREAK__) {
1549 string_t*name2 = c->data[0];
1550 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1551 c->opcode = OPCODE_JUMP;
1558 void continuejumpsto(code_t*c, char*name, code_t*jump)
1561 if(c->opcode == OPCODE___CONTINUE__) {
1562 string_t*name2 = c->data[0];
1563 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1564 c->opcode = OPCODE_JUMP;
1572 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1573 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1574 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1576 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1578 if(!type1 || !type2)
1579 return registry_getanytype();
1580 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1581 return registry_getanytype();
1584 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1593 return registry_getanytype();
1595 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1600 return abc_coerce_a(c);
1604 // cast an "any" type to a specific type. subject to
1605 // runtime exceptions
1606 return abc_coerce2(c, &m);
1609 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1610 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1611 // allow conversion between number types
1612 return abc_coerce2(c, &m);
1614 //printf("%s.%s\n", from.package, from.name);
1615 //printf("%s.%s\n", to.package, to.name);
1617 classinfo_t*supertype = from;
1619 if(supertype == to) {
1620 // target type is one of from's superclasses
1621 return abc_coerce2(c, &m);
1624 while(supertype->interfaces[t]) {
1625 if(supertype->interfaces[t]==to) {
1626 // target type is one of from's interfaces
1627 return abc_coerce2(c, &m);
1631 supertype = supertype->superclass;
1633 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1635 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1637 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1640 as3_error("can't convert type %s%s%s to %s%s%s",
1641 from->package, from->package?".":"", from->name,
1642 to->package, to->package?".":"", to->name);
1646 code_t*defaultvalue(code_t*c, classinfo_t*type)
1648 if(TYPE_IS_INT(type)) {
1649 c = abc_pushbyte(c, 0);
1650 } else if(TYPE_IS_UINT(type)) {
1651 c = abc_pushuint(c, 0);
1652 } else if(TYPE_IS_FLOAT(type)) {
1654 } else if(TYPE_IS_BOOLEAN(type)) {
1655 c = abc_pushfalse(c);
1657 //c = abc_pushundefined(c);
1659 c = abc_pushnull(c);
1661 c = abc_coerce2(c, &m);
1666 char is_pushundefined(code_t*c)
1668 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1671 static const char* get_package_from_name(const char*name)
1673 /* try explicit imports */
1674 dictentry_t* e = dict_get_slot(state->imports, name);
1676 if(!strcmp(e->key, name)) {
1677 slotinfo_t*c = (slotinfo_t*)e->data;
1678 if(c) return c->package;
1684 static namespace_list_t*get_current_imports()
1686 namespace_list_t*searchlist = 0;
1688 list_append(searchlist, namespace_new_package(state->package));
1690 import_list_t*l = state->wildcard_imports;
1692 namespace_t*ns = namespace_new_package(l->import->package);
1693 list_append(searchlist, ns);
1696 list_append(searchlist, namespace_new_package(""));
1697 list_append(searchlist, namespace_new_package(internal_filename_package));
1701 static slotinfo_t* find_class(const char*name)
1705 c = registry_find(state->package, name);
1708 /* try explicit imports */
1709 dictentry_t* e = dict_get_slot(state->imports, name);
1712 if(!strcmp(e->key, name)) {
1713 c = (slotinfo_t*)e->data;
1719 /* try package.* imports */
1720 import_list_t*l = state->wildcard_imports;
1722 //printf("does package %s contain a class %s?\n", l->import->package, name);
1723 c = registry_find(l->import->package, name);
1728 /* try global package */
1729 c = registry_find("", name);
1732 /* try local "filename" package */
1733 c = registry_find(internal_filename_package, name);
1738 typedcode_t push_class(slotinfo_t*a)
1743 if(a->access == ACCESS_PACKAGEINTERNAL &&
1744 strcmp(a->package, state->package) &&
1745 strcmp(a->package, internal_filename_package)
1747 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1748 infotypename(a), a->name, a->package, state->package);
1751 if(a->kind != INFOTYPE_CLASS) {
1753 x.c = abc_findpropstrict2(x.c, &m);
1754 x.c = abc_getproperty2(x.c, &m);
1755 if(a->kind == INFOTYPE_METHOD) {
1756 methodinfo_t*f = (methodinfo_t*)a;
1757 x.t = TYPE_FUNCTION(f);
1759 varinfo_t*v = (varinfo_t*)a;
1763 classinfo_t*c = (classinfo_t*)a;
1765 x.c = abc_getglobalscope(x.c);
1766 x.c = abc_getslot(x.c, c->slot);
1769 x.c = abc_getlex2(x.c, &m);
1771 x.t = TYPE_CLASS(c);
1776 static char is_getlocal(code_t*c)
1778 if(!c || c->prev || c->next)
1780 return(c->opcode == OPCODE_GETLOCAL
1781 || c->opcode == OPCODE_GETLOCAL_0
1782 || c->opcode == OPCODE_GETLOCAL_1
1783 || c->opcode == OPCODE_GETLOCAL_2
1784 || c->opcode == OPCODE_GETLOCAL_3);
1786 static int getlocalnr(code_t*c)
1788 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1789 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1790 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1791 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1792 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1793 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1797 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1801 [prefix code] [read instruction]
1805 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1807 if(in && in->opcode == OPCODE_COERCE_A) {
1808 in = code_cutlast(in);
1811 syntaxerror("internal error");
1813 /* chop off read instruction */
1817 prefix = r->prev;r->prev = 0;
1823 char use_temp_var = readbefore;
1825 /* generate the write instruction, and maybe append a dup to the prefix code */
1826 code_t* write = abc_nop(0);
1827 if(r->opcode == OPCODE_GETPROPERTY) {
1828 write->opcode = OPCODE_SETPROPERTY;
1829 multiname_t*m = (multiname_t*)r->data[0];
1830 write->data[0] = multiname_clone(m);
1831 if(m->type == QNAME || m->type == MULTINAME) {
1833 prefix = abc_dup(prefix); // we need the object, too
1836 } else if(m->type == MULTINAMEL) {
1838 /* dupping two values on the stack requires 5 operations and one register-
1839 couldn't adobe just have given us a dup2? */
1840 int temp = gettempvar();
1841 prefix = abc_setlocal(prefix, temp);
1842 prefix = abc_dup(prefix);
1843 prefix = abc_getlocal(prefix, temp);
1844 prefix = abc_swap(prefix);
1845 prefix = abc_getlocal(prefix, temp);
1847 prefix = abc_kill(prefix, temp);
1851 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1853 } else if(r->opcode == OPCODE_GETSLOT) {
1854 write->opcode = OPCODE_SETSLOT;
1855 write->data[0] = r->data[0];
1857 prefix = abc_dup(prefix); // we need the object, too
1860 } else if(r->opcode == OPCODE_GETLOCAL) {
1861 write->opcode = OPCODE_SETLOCAL;
1862 write->data[0] = r->data[0];
1863 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1864 write->opcode = OPCODE_SETLOCAL_0;
1865 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1866 write->opcode = OPCODE_SETLOCAL_1;
1867 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1868 write->opcode = OPCODE_SETLOCAL_2;
1869 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1870 write->opcode = OPCODE_SETLOCAL_3;
1871 } else if(r->opcode == OPCODE_GETSUPER) {
1872 write->opcode = OPCODE_SETSUPER;
1873 multiname_t*m = (multiname_t*)r->data[0];
1874 write->data[0] = multiname_clone(m);
1877 syntaxerror("illegal lvalue: can't assign a value to this expression");
1884 /* with getproperty/getslot, we have to be extra careful not
1885 to execute the read code twice, as it might have side-effects
1886 (e.g. if the property is in fact a setter/getter combination)
1888 So read the value, modify it, and write it again,
1889 using prefix only once and making sure (by using a temporary
1890 register) that the return value is what we just wrote */
1891 temp = gettempvar();
1892 c = code_append(c, prefix);
1893 c = code_append(c, r);
1896 c = abc_setlocal(c, temp);
1898 c = code_append(c, middlepart);
1901 c = abc_setlocal(c, temp);
1903 c = code_append(c, write);
1904 c = abc_getlocal(c, temp);
1905 c = abc_kill(c, temp);
1907 /* if we're allowed to execute the read code twice *and*
1908 the middlepart doesn't modify the code, things are easier.
1910 code_t* r2 = code_dup(r);
1911 //c = code_append(c, prefix);
1912 parserassert(!prefix);
1913 c = code_append(c, r);
1914 c = code_append(c, middlepart);
1915 c = code_append(c, write);
1916 c = code_append(c, r2);
1919 /* even smaller version: overwrite the value without reading
1923 c = code_append(c, prefix);
1926 c = code_append(c, middlepart);
1927 c = code_append(c, write);
1928 c = code_append(c, r);
1931 temp = gettempvar();
1933 c = code_append(c, prefix);
1935 c = code_append(c, middlepart);
1937 c = abc_setlocal(c, temp);
1938 c = code_append(c, write);
1939 c = abc_getlocal(c, temp);
1940 c = abc_kill(c, temp);
1946 char is_break_or_jump(code_t*c)
1950 if(c->opcode == OPCODE_JUMP ||
1951 c->opcode == OPCODE___BREAK__ ||
1952 c->opcode == OPCODE___CONTINUE__ ||
1953 c->opcode == OPCODE_THROW ||
1954 c->opcode == OPCODE_RETURNVOID ||
1955 c->opcode == OPCODE_RETURNVALUE) {
1962 #define IS_FINALLY_TARGET(op) \
1963 ((op) == OPCODE___CONTINUE__ || \
1964 (op) == OPCODE___BREAK__ || \
1965 (op) == OPCODE_RETURNVOID || \
1966 (op) == OPCODE_RETURNVALUE || \
1967 (op) == OPCODE___RETHROW__)
1969 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1971 #define NEED_EXTRA_STACK_ARG
1972 code_t*finally_label = abc_nop(0);
1973 NEW(lookupswitch_t, l);
1979 code_t*prev = i->prev;
1980 if(IS_FINALLY_TARGET(i->opcode)) {
1983 if(i->opcode == OPCODE___RETHROW__ ||
1984 i->opcode == OPCODE_RETURNVALUE) {
1985 if(i->opcode == OPCODE___RETHROW__)
1986 i->opcode = OPCODE_THROW;
1988 p = abc_coerce_a(p);
1989 p = abc_setlocal(p, tempvar);
1991 p = abc_pushbyte(p, count++);
1992 p = abc_jump(p, finally_label);
1993 code_t*target = p = abc_label(p);
1994 #ifdef NEED_EXTRA_STACK_ARG
1998 p = abc_getlocal(p, tempvar);
2001 p->next = i;i->prev = p;
2002 list_append(l->targets, target);
2008 c = abc_pushbyte(c, -1);
2009 c = code_append(c, finally_label);
2010 c = code_append(c, finally);
2012 #ifdef NEED_EXTRA_STACK_ARG
2015 c = abc_lookupswitch(c, l);
2016 c = l->def = abc_label(c);
2017 #ifdef NEED_EXTRA_STACK_ARG
2024 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
2028 code_t*prev = i->prev;
2029 if(IS_FINALLY_TARGET(i->opcode)) {
2030 if(i->opcode == OPCODE___RETHROW__)
2031 i->opcode = OPCODE_THROW;
2032 code_t*end = code_dup(finally);
2033 code_t*start = code_start(end);
2034 if(prev) prev->next = start;
2041 return code_append(c, finally);
2044 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
2050 int num_insertion_points=0;
2052 if(IS_FINALLY_TARGET(i->opcode))
2053 num_insertion_points++;
2060 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
2065 int simple_version_cost = (1+num_insertion_points)*code_size;
2066 int lookup_version_cost = 4*num_insertion_points + 5;
2068 if(cantdup || simple_version_cost > lookup_version_cost) {
2069 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
2070 return insert_finally_lookup(c, finally, tempvar);
2072 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
2073 return insert_finally_simple(c, finally, tempvar);
2077 #define PASS1 }} if(as3_pass == 1) {{
2078 #define PASS1END }} if(as3_pass == 2) {{
2079 #define PASS2 }} if(as3_pass == 2) {{
2080 #define PASS12 }} {{
2081 #define PASS12END }} if(as3_pass == 2) {{
2085 /* Line 273 of skeleton.m4 */
2086 #line 2087 "parser.tab.c"
2093 typedef YYTYPE_UINT8 yytype_uint8;
2095 typedef unsigned char yytype_uint8;
2099 typedef YYTYPE_INT8 yytype_int8;
2100 #elif (defined __STDC__ || defined __C99__FUNC__ \
2101 || defined __cplusplus || defined _MSC_VER)
2102 typedef signed char yytype_int8;
2104 typedef short int yytype_int8;
2107 #ifdef YYTYPE_UINT16
2108 typedef YYTYPE_UINT16 yytype_uint16;
2110 typedef unsigned short int yytype_uint16;
2114 typedef YYTYPE_INT16 yytype_int16;
2116 typedef short int yytype_int16;
2120 # ifdef __SIZE_TYPE__
2121 # define YYSIZE_T __SIZE_TYPE__
2122 # elif defined size_t
2123 # define YYSIZE_T size_t
2124 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2125 || defined __cplusplus || defined _MSC_VER)
2126 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2127 # define YYSIZE_T size_t
2129 # define YYSIZE_T unsigned int
2133 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2138 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2139 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2143 # define YY_(msgid) msgid
2147 /* Suppress unused-variable warnings by "using" E. */
2148 #if ! defined lint || defined __GNUC__
2149 # define YYUSE(e) ((void) (e))
2151 # define YYUSE(e) /* empty */
2154 /* Identity function, used to suppress warnings about constant conditions. */
2156 # define YYID(n) (n)
2158 #if (defined __STDC__ || defined __C99__FUNC__ \
2159 || defined __cplusplus || defined _MSC_VER)
2172 #if ! defined yyoverflow || YYERROR_VERBOSE
2174 /* The parser invokes alloca or malloc; define the necessary symbols. */
2176 # ifdef YYSTACK_USE_ALLOCA
2177 # if YYSTACK_USE_ALLOCA
2179 # define YYSTACK_ALLOC __builtin_alloca
2180 # elif defined __BUILTIN_VA_ARG_INCR
2181 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2183 # define YYSTACK_ALLOC __alloca
2184 # elif defined _MSC_VER
2185 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2186 # define alloca _alloca
2188 # define YYSTACK_ALLOC alloca
2189 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2190 || defined __cplusplus || defined _MSC_VER)
2191 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2193 # define _STDLIB_H 1
2200 # ifdef YYSTACK_ALLOC
2201 /* Pacify GCC's `empty if-body' warning. */
2202 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2203 # ifndef YYSTACK_ALLOC_MAXIMUM
2204 /* The OS might guarantee only one guard page at the bottom of the stack,
2205 and a page size can be as small as 4096 bytes. So we cannot safely
2206 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2207 to allow for a few compiler-allocated temporary stack slots. */
2208 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2211 # define YYSTACK_ALLOC YYMALLOC
2212 # define YYSTACK_FREE YYFREE
2213 # ifndef YYSTACK_ALLOC_MAXIMUM
2214 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2216 # if (defined __cplusplus && ! defined _STDLIB_H \
2217 && ! ((defined YYMALLOC || defined malloc) \
2218 && (defined YYFREE || defined free)))
2219 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2221 # define _STDLIB_H 1
2225 # define YYMALLOC malloc
2226 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2227 || defined __cplusplus || defined _MSC_VER)
2228 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2232 # define YYFREE free
2233 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2234 || defined __cplusplus || defined _MSC_VER)
2235 void free (void *); /* INFRINGES ON USER NAME SPACE */
2239 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2242 #if (! defined yyoverflow \
2243 && (! defined __cplusplus \
2244 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2246 /* A type that is properly aligned for any stack member. */
2249 yytype_int16 yyss_alloc;
2253 /* The size of the maximum gap between one aligned stack and the next. */
2254 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2256 /* The size of an array large to enough to hold all stacks, each with
2258 # define YYSTACK_BYTES(N) \
2259 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2260 + YYSTACK_GAP_MAXIMUM)
2262 /* Copy COUNT objects from FROM to TO. The source and destination do
2265 # if defined __GNUC__ && 1 < __GNUC__
2266 # define YYCOPY(To, From, Count) \
2267 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2269 # define YYCOPY(To, From, Count) \
2273 for (yyi = 0; yyi < (Count); yyi++) \
2274 (To)[yyi] = (From)[yyi]; \
2280 /* Relocate STACK from its old location to the new one. The
2281 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2282 elements in the stack, and YYPTR gives the new location of the
2283 stack. Advance YYPTR to a properly aligned location for the next
2285 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2288 YYSIZE_T yynewbytes; \
2289 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2290 Stack = &yyptr->Stack_alloc; \
2291 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2292 yyptr += yynewbytes / sizeof (*yyptr); \
2298 /* YYFINAL -- State number of the termination state. */
2300 /* YYLAST -- Last index in YYTABLE. */
2303 /* YYNTOKENS -- Number of terminals. */
2304 #define YYNTOKENS 134
2305 /* YYNNTS -- Number of nonterminals. */
2307 /* YYNRULES -- Number of rules. */
2308 #define YYNRULES 308
2309 /* YYNRULES -- Number of states. */
2310 #define YYNSTATES 520
2312 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2313 #define YYUNDEFTOK 2
2314 #define YYMAXUTOK 363
2316 #define YYTRANSLATE(YYX) \
2317 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2319 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2320 static const yytype_uint8 yytranslate[] =
2322 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2323 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2324 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2325 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2326 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2327 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2328 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2329 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2330 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2331 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2332 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2334 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2338 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2347 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2348 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2349 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2350 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2351 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2352 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2353 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2354 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2355 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2356 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2357 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2362 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2364 static const yytype_uint16 yyprhs[] =
2366 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2367 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2368 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2369 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2370 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2371 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2372 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2373 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2374 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2375 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2376 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2377 305, 307, 311, 313, 314, 321, 322, 328, 331, 336,
2378 337, 339, 341, 344, 346, 348, 350, 352, 354, 356,
2379 358, 360, 362, 364, 365, 368, 369, 372, 373, 376,
2380 377, 387, 388, 397, 398, 400, 402, 405, 407, 412,
2381 414, 416, 418, 419, 421, 423, 426, 428, 431, 440,
2382 442, 444, 445, 450, 452, 456, 460, 461, 464, 466,
2383 468, 470, 472, 474, 476, 478, 480, 482, 483, 485,
2384 488, 493, 497, 499, 504, 507, 509, 511, 512, 513,
2385 526, 528, 529, 530, 541, 543, 547, 549, 551, 553,
2386 557, 559, 561, 563, 566, 567, 568, 572, 573, 575,
2387 577, 579, 582, 585, 586, 591, 596, 601, 604, 606,
2388 609, 611, 613, 617, 619, 621, 623, 625, 627, 629,
2389 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2390 651, 653, 657, 661, 665, 669, 673, 677, 681, 685,
2391 689, 693, 696, 699, 703, 707, 711, 715, 719, 723,
2392 727, 731, 735, 739, 743, 747, 751, 755, 759, 764,
2393 767, 769, 773, 776, 781, 785, 786, 788, 792, 798,
2394 802, 806, 810, 814, 818, 822, 826, 830, 834, 838,
2395 842, 846, 852, 855, 858, 861, 864, 868, 871, 876,
2396 882, 886, 892, 896, 898, 901, 906, 911, 914
2399 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2400 static const yytype_int16 yyrhs[] =
2402 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2403 137, 138, -1, 186, -1, 198, -1, 196, -1, 217,
2404 -1, 207, -1, 147, -1, 148, 126, 136, 132, -1,
2405 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2406 198, -1, 196, -1, 217, -1, 207, -1, 147, -1,
2407 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2408 143, 145, -1, 145, -1, 189, -1, 159, -1, 160,
2409 -1, 161, -1, 163, -1, 171, -1, 154, -1, 183,
2410 -1, 179, -1, 239, -1, 247, -1, 246, -1, 126,
2411 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2412 150, -1, 165, -1, 166, -1, 236, -1, 181, -1,
2413 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2414 144, -1, 3, 89, 3, -1, 102, 237, -1, -1,
2415 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2416 152, -1, 3, 227, 149, -1, -1, 65, 146, -1,
2417 -1, 64, 122, 155, 238, 133, 146, 153, -1, -1,
2418 150, -1, 239, -1, 46, 3, 227, -1, 3, -1,
2419 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2420 238, 99, 239, 133, 146, -1, 158, 157, 68, 238,
2421 133, 146, -1, -1, 14, 122, 162, 238, 133, 146,
2422 -1, -1, 15, 164, 146, 14, 122, 238, 133, -1,
2423 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2424 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2425 168, 169, -1, 34, 240, 105, 142, -1, 62, 105,
2426 142, -1, -1, 16, 122, 172, 240, 133, 126, 167,
2427 132, -1, -1, 33, 122, 3, 227, 133, 174, 126,
2428 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2429 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2430 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2431 37, 238, -1, 37, -1, 39, 122, 238, 133, -1,
2432 182, 146, -1, 3, -1, 19, -1, 185, 127, 184,
2433 -1, 184, -1, -1, 19, 185, 126, 187, 139, 132,
2434 -1, -1, 19, 126, 188, 139, 132, -1, 41, 223,
2435 -1, 41, 185, 127, 115, -1, -1, 191, -1, 192,
2436 -1, 191, 192, -1, 21, -1, 22, -1, 20, -1,
2437 38, -1, 47, -1, 49, -1, 48, -1, 26, -1,
2438 24, -1, 4, -1, -1, 54, 224, -1, -1, 54,
2439 225, -1, -1, 17, 225, -1, -1, 190, 31, 3,
2440 193, 195, 126, 197, 200, 132, -1, -1, 190, 44,
2441 3, 194, 126, 199, 203, 132, -1, -1, 201, -1,
2442 202, -1, 201, 202, -1, 99, -1, 148, 126, 200,
2443 132, -1, 207, -1, 217, -1, 144, -1, -1, 204,
2444 -1, 205, -1, 204, 205, -1, 99, -1, 46, 3,
2445 -1, 190, 27, 216, 3, 122, 213, 133, 227, -1,
2446 46, -1, 32, -1, -1, 190, 206, 208, 209, -1,
2447 210, -1, 209, 100, 210, -1, 3, 227, 149, -1,
2448 -1, 102, 212, -1, 10, -1, 8, -1, 9, -1,
2449 12, -1, 5, -1, 56, -1, 55, -1, 45, -1,
2450 3, -1, -1, 214, -1, 93, 215, -1, 214, 100,
2451 93, 215, -1, 214, 100, 215, -1, 215, -1, 3,
2452 105, 226, 211, -1, 3, 211, -1, 51, -1, 35,
2453 -1, -1, -1, 190, 27, 216, 3, 122, 213, 133,
2454 227, 126, 218, 142, 132, -1, 3, -1, -1, -1,
2455 27, 219, 122, 213, 133, 227, 126, 221, 142, 132,
2456 -1, 3, -1, 185, 127, 3, -1, 223, -1, 222,
2457 -1, 224, -1, 225, 100, 224, -1, 224, -1, 115,
2458 -1, 36, -1, 105, 226, -1, -1, -1, 122, 229,
2459 133, -1, -1, 230, -1, 231, -1, 237, -1, 230,
2460 100, -1, 231, 237, -1, -1, 25, 240, 232, 228,
2461 -1, 240, 122, 229, 133, -1, 53, 122, 229, 133,
2462 -1, 63, 240, -1, 42, -1, 42, 238, -1, 240,
2463 -1, 240, -1, 238, 100, 240, -1, 238, -1, 220,
2464 -1, 241, -1, 244, -1, 233, -1, 235, -1, 234,
2465 -1, 6, -1, 10, -1, 11, -1, 8, -1, 9,
2466 -1, 12, -1, 5, -1, 29, -1, 56, -1, 55,
2467 -1, 45, -1, 240, 109, 240, -1, 240, 110, 240,
2468 -1, 240, 75, 240, -1, 240, 76, 240, -1, 240,
2469 71, 240, -1, 240, 72, 240, -1, 240, 74, 240,
2470 -1, 240, 73, 240, -1, 240, 87, 240, -1, 240,
2471 88, 240, -1, 118, 240, -1, 117, 240, -1, 240,
2472 108, 240, -1, 240, 107, 240, -1, 240, 106, 240,
2473 -1, 240, 96, 240, -1, 240, 95, 240, -1, 240,
2474 94, 240, -1, 240, 114, 240, -1, 240, 116, 240,
2475 -1, 240, 113, 240, -1, 240, 112, 240, -1, 240,
2476 115, 240, -1, 240, 68, 240, -1, 240, 69, 240,
2477 -1, 240, 40, 240, -1, 240, 67, 240, -1, 43,
2478 122, 240, 133, -1, 36, 240, -1, 36, -1, 122,
2479 238, 133, -1, 112, 240, -1, 240, 124, 240, 125,
2480 -1, 124, 229, 125, -1, -1, 243, -1, 237, 105,
2481 237, -1, 243, 100, 237, 105, 237, -1, 70, 242,
2482 132, -1, 240, 80, 240, -1, 240, 79, 240, -1,
2483 240, 85, 240, -1, 240, 84, 240, -1, 240, 86,
2484 240, -1, 240, 78, 240, -1, 240, 77, 240, -1,
2485 240, 83, 240, -1, 240, 81, 240, -1, 240, 82,
2486 240, -1, 240, 102, 240, -1, 240, 104, 240, 105,
2487 240, -1, 240, 91, -1, 240, 90, -1, 91, 240,
2488 -1, 90, 240, -1, 53, 127, 3, -1, 128, 3,
2489 -1, 240, 127, 128, 3, -1, 240, 127, 3, 89,
2490 3, -1, 240, 92, 3, -1, 240, 127, 122, 240,
2491 133, -1, 240, 127, 3, -1, 3, -1, 18, 3,
2492 -1, 18, 3, 102, 3, -1, 18, 3, 102, 5,
2493 -1, 190, 245, -1, 23, 18, 224, -1
2496 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2497 static const yytype_uint16 yyrline[] =
2499 0, 2065, 2065, 2067, 2067, 2068, 2069, 2071, 2072, 2073,
2500 2074, 2075, 2076, 2077, 2078, 2080, 2080, 2081, 2082, 2084,
2501 2085, 2086, 2087, 2088, 2089, 2090, 2092, 2093, 2095, 2096,
2502 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108,
2503 2109, 2110, 2111, 2112, 2115, 2116, 2117, 2118, 2119, 2120,
2504 2121, 2122, 2126, 2127, 2131, 2138, 2142, 2143, 2147, 2148,
2505 2150, 2151, 2153, 2214, 2215, 2218, 2218, 2237, 2238, 2239,
2506 2244, 2248, 2253, 2254, 2256, 2276, 2324, 2324, 2343, 2343,
2507 2358, 2361, 2364, 2367, 2371, 2372, 2373, 2374, 2375, 2376,
2508 2378, 2389, 2392, 2392, 2421, 2421, 2446, 2446, 2462, 2463,
2509 2464, 2465, 2473, 2482, 2482, 2531, 2535, 2546, 2558, 2575,
2510 2576, 2578, 2579, 2581, 2581, 2583, 2583, 2586, 2602, 2619,
2511 2620, 2621, 2622, 2630, 2631, 2632, 2633, 2634, 2635, 2636,
2512 2637, 2638, 2639, 2643, 2644, 2646, 2647, 2649, 2650, 2654,
2513 2652, 2660, 2658, 2667, 2668, 2669, 2670, 2671, 2672, 2673,
2514 2674, 2676, 2682, 2683, 2684, 2685, 2686, 2687, 2690, 2703,
2515 2703, 2705, 2705, 2707, 2708, 2710, 2785, 2786, 2788, 2789,
2516 2790, 2791, 2792, 2794, 2795, 2796, 2797, 2809, 2813, 2819,
2517 2825, 2833, 2838, 2844, 2852, 2860, 2861, 2862, 2865, 2864,
2518 2881, 2882, 2884, 2883, 2907, 2926, 2940, 2941, 2943, 2944,
2519 2946, 2947, 2948, 2957, 2958, 2962, 2963, 2965, 2966, 2967,
2520 2969, 2973, 2974, 2979, 2980, 3016, 3062, 3083, 3104, 3107,
2521 3114, 3115, 3116, 3122, 3128, 3130, 3132, 3134, 3136, 3138,
2522 3140, 3157, 3162, 3165, 3168, 3171, 3174, 3177, 3180, 3183,
2523 3186, 3190, 3193, 3196, 3199, 3202, 3205, 3208, 3211, 3215,
2524 3226, 3244, 3249, 3254, 3259, 3264, 3269, 3273, 3277, 3282,
2525 3286, 3290, 3299, 3308, 3318, 3323, 3335, 3341, 3346, 3352,
2526 3358, 3362, 3364, 3375, 3384, 3391, 3392, 3394, 3400, 3409,
2527 3416, 3428, 3434, 3440, 3446, 3452, 3458, 3464, 3470, 3483,
2528 3494, 3501, 3514, 3541, 3555, 3569, 3583, 3598, 3605, 3612,
2529 3619, 3626, 3637, 3687, 3792, 3799, 3806, 3813, 3820
2533 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2534 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2535 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2536 static const char *const yytname[] =
2538 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2539 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2540 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2541 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2542 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2543 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2544 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2545 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2546 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2547 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2548 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2549 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2550 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2551 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2552 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2553 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2554 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2555 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2556 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2557 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2558 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2559 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2560 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2561 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2562 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2563 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2564 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2565 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2566 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2567 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2568 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2569 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2570 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH_HEAD",
2571 "WITH", "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9",
2572 "IMPORT", "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2573 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2574 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2575 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2576 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2577 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2578 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2579 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2580 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2581 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2582 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2583 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2584 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2585 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2590 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2592 static const yytype_uint16 yytoknum[] =
2594 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2595 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2596 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2597 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2598 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2599 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2600 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2601 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2602 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2603 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2604 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2605 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2606 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2611 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2612 static const yytype_uint8 yyr1[] =
2614 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2615 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2616 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2617 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2618 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2619 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2620 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2621 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2622 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2623 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2624 178, 178, 178, 180, 179, 181, 181, 182, 183, 184,
2625 184, 185, 185, 187, 186, 188, 186, 189, 189, 190,
2626 190, 191, 191, 192, 192, 192, 192, 192, 192, 192,
2627 192, 192, 192, 193, 193, 194, 194, 195, 195, 197,
2628 196, 199, 198, 200, 200, 201, 201, 202, 202, 202,
2629 202, 202, 203, 203, 204, 204, 205, 205, 205, 206,
2630 206, 208, 207, 209, 209, 210, 211, 211, 212, 212,
2631 212, 212, 212, 212, 212, 212, 212, 213, 213, 213,
2632 213, 214, 214, 215, 215, 216, 216, 216, 218, 217,
2633 219, 219, 221, 220, 222, 223, 224, 224, 225, 225,
2634 226, 226, 226, 227, 227, 228, 228, 229, 229, 229,
2635 230, 231, 230, 232, 233, 234, 234, 235, 236, 236,
2636 237, 238, 238, 239, 240, 240, 240, 240, 240, 240,
2637 240, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2638 241, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2639 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2640 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2641 240, 240, 240, 240, 240, 242, 242, 243, 243, 240,
2642 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2643 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2644 240, 240, 240, 244, 245, 245, 245, 246, 247
2647 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2648 static const yytype_uint8 yyr2[] =
2650 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2651 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2652 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2653 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2654 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2655 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2656 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2657 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2658 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2659 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2660 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2661 1, 3, 1, 0, 6, 0, 5, 2, 4, 0,
2662 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
2663 1, 1, 1, 0, 2, 0, 2, 0, 2, 0,
2664 9, 0, 8, 0, 1, 1, 2, 1, 4, 1,
2665 1, 1, 0, 1, 1, 2, 1, 2, 8, 1,
2666 1, 0, 4, 1, 3, 3, 0, 2, 1, 1,
2667 1, 1, 1, 1, 1, 1, 1, 0, 1, 2,
2668 4, 3, 1, 4, 2, 1, 1, 0, 0, 12,
2669 1, 0, 0, 10, 1, 3, 1, 1, 1, 3,
2670 1, 1, 1, 2, 0, 0, 3, 0, 1, 1,
2671 1, 2, 2, 0, 4, 4, 4, 2, 1, 2,
2672 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
2673 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2674 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2675 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2676 3, 3, 3, 3, 3, 3, 3, 3, 4, 2,
2677 1, 3, 2, 4, 3, 0, 1, 3, 5, 3,
2678 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2679 3, 5, 2, 2, 2, 2, 3, 2, 4, 5,
2680 3, 5, 3, 1, 2, 4, 4, 2, 3
2683 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2684 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2685 means the default is an error. */
2686 static const yytype_uint16 yydefact[] =
2688 119, 303, 132, 236, 230, 233, 234, 231, 232, 235,
2689 0, 0, 78, 0, 0, 125, 123, 124, 0, 131,
2690 0, 130, 191, 237, 270, 126, 0, 0, 0, 240,
2691 127, 129, 128, 0, 0, 239, 238, 0, 0, 275,
2692 0, 0, 14, 0, 0, 0, 0, 207, 119, 0,
2693 0, 2, 119, 5, 54, 12, 0, 36, 67, 31,
2694 32, 33, 34, 35, 38, 119, 37, 7, 30, 0,
2695 120, 121, 9, 8, 11, 10, 224, 227, 229, 228,
2696 223, 39, 221, 225, 226, 41, 40, 0, 0, 72,
2697 76, 119, 92, 109, 110, 115, 112, 0, 0, 303,
2698 213, 190, 0, 269, 0, 0, 117, 0, 103, 207,
2699 0, 217, 65, 0, 220, 0, 276, 295, 294, 272,
2700 252, 251, 0, 0, 208, 209, 210, 82, 0, 106,
2701 218, 0, 80, 44, 43, 119, 45, 29, 0, 46,
2702 47, 48, 50, 0, 49, 297, 1, 6, 119, 303,
2703 0, 68, 0, 0, 69, 53, 108, 0, 187, 0,
2704 160, 0, 159, 161, 307, 122, 0, 0, 0, 0,
2705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2706 0, 0, 0, 0, 0, 0, 0, 0, 0, 293,
2707 292, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2708 0, 0, 0, 0, 0, 0, 0, 207, 0, 0,
2709 55, 73, 0, 0, 0, 119, 113, 0, 194, 0,
2710 197, 196, 308, 205, 177, 0, 0, 0, 27, 0,
2711 296, 0, 0, 279, 0, 271, 274, 211, 212, 83,
2712 204, 59, 60, 105, 219, 58, 81, 42, 28, 119,
2713 0, 204, 0, 0, 52, 304, 186, 185, 0, 133,
2714 135, 0, 222, 266, 267, 264, 265, 245, 246, 248,
2715 247, 243, 244, 286, 285, 281, 280, 288, 289, 287,
2716 283, 282, 284, 249, 250, 300, 258, 257, 256, 290,
2717 0, 255, 254, 253, 241, 242, 262, 261, 259, 263,
2718 260, 0, 0, 302, 0, 0, 0, 0, 0, 25,
2719 0, 119, 17, 23, 0, 20, 19, 22, 21, 119,
2720 111, 0, 207, 214, 166, 0, 0, 178, 182, 107,
2721 195, 118, 268, 0, 26, 216, 0, 277, 0, 0,
2722 57, 0, 119, 13, 57, 0, 0, 0, 0, 0,
2723 137, 0, 0, 204, 162, 163, 0, 215, 273, 0,
2724 0, 298, 119, 0, 0, 116, 18, 119, 0, 0,
2725 0, 0, 184, 179, 204, 0, 0, 119, 0, 202,
2726 201, 200, 203, 0, 62, 61, 51, 0, 119, 305,
2727 306, 177, 134, 0, 0, 198, 136, 141, 57, 0,
2728 291, 299, 301, 77, 0, 84, 0, 114, 206, 176,
2729 172, 169, 170, 168, 171, 175, 174, 173, 167, 166,
2730 0, 0, 181, 0, 0, 98, 102, 100, 104, 63,
2731 278, 56, 0, 75, 0, 138, 139, 0, 119, 165,
2732 164, 79, 0, 0, 0, 85, 88, 86, 24, 183,
2733 192, 180, 96, 0, 99, 101, 119, 66, 119, 204,
2734 119, 199, 0, 156, 0, 0, 119, 154, 0, 27,
2735 93, 89, 87, 27, 27, 204, 64, 74, 0, 147,
2736 151, 0, 0, 0, 119, 145, 149, 150, 157, 187,
2737 142, 155, 27, 91, 0, 0, 0, 188, 119, 140,
2738 146, 0, 90, 193, 97, 94, 27, 0, 0, 0,
2739 0, 148, 177, 27, 189, 0, 0, 204, 95, 158
2742 /* YYDEFGOTO[NTERM-NUM]. */
2743 static const yytype_int16 yydefgoto[] =
2745 -1, 50, 51, 52, 53, 310, 311, 312, 333, 334,
2746 136, 137, 156, 313, 138, 384, 139, 245, 242, 457,
2747 57, 231, 152, 153, 58, 59, 60, 61, 212, 62,
2748 91, 140, 141, 444, 445, 446, 447, 63, 214, 425,
2749 509, 426, 474, 427, 428, 64, 228, 142, 65, 66,
2750 96, 219, 67, 319, 215, 68, 143, 70, 71, 350,
2751 352, 394, 315, 460, 316, 438, 483, 484, 485, 465,
2752 466, 467, 163, 317, 261, 354, 355, 372, 418, 326,
2753 327, 328, 258, 318, 506, 102, 76, 473, 220, 221,
2754 381, 396, 382, 340, 323, 123, 124, 125, 223, 77,
2755 78, 79, 144, 126, 80, 81, 82, 83, 115, 116,
2759 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2761 #define YYPACT_NINF -388
2762 static const yytype_int16 yypact[] =
2764 1673, -42, -388, -388, -388, -388, -388, -388, -388, -388,
2765 -29, -72, -388, -47, 16, -388, -388, -388, 74, -388,
2766 2093, -388, 64, -388, 2163, -388, -24, 42, 25, -388,
2767 -388, -388, -388, -1, 5, -388, -388, 2093, 56, 2093,
2768 2093, 2093, -388, 2093, 2093, 2093, 2093, 2093, 633, 110,
2769 144, -388, 503, -388, -388, -388, 50, -388, 2023, -388,
2770 -388, -388, -388, -388, -388, 1925, -388, -388, -388, 97,
2771 233, -388, -388, -388, -388, -388, -388, -388, -388, -388,
2772 104, -388, 2568, -388, -388, -388, -388, 196, 84, -388,
2773 -388, 1925, -388, -388, -388, -388, -388, 85, 70, -388,
2774 -59, -388, 91, 237, 2093, 87, -388, 2093, -388, 2093,
2775 225, 237, -388, 130, 2568, 106, 139, 237, 237, 174,
2776 237, 237, -61, 121, 147, 2093, -388, 245, 253, 2093,
2777 2093, 253, 255, -388, -388, 763, -388, -388, 135, -388,
2778 -388, -388, -388, 249, -388, -388, -388, -388, 1023, 195,
2779 265, -388, 170, 202, -388, 173, -388, 270, 72, 271,
2780 -388, 272, -388, -388, -388, -388, 2093, 2093, 2093, 2093,
2781 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
2782 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, -388,
2783 -388, 273, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093,
2784 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 11,
2785 -388, -388, 2093, 269, 2093, 1153, -388, 42, 157, 158,
2786 -388, -388, -388, 164, 13, -57, 19, 2188, 1799, 160,
2787 -388, 2093, 2093, -388, 2093, -388, -388, -388, -388, -388,
2788 189, 197, -388, 104, 104, 197, -388, -388, -388, 1925,
2789 163, 189, 2093, 2093, -388, 198, -388, -388, 296, 251,
2790 252, 305, 2568, 301, 495, 495, 495, 2934, 2934, 2934,
2791 2934, 301, 301, 2568, 2568, 2568, 2568, 2568, 2568, 2568,
2792 2568, 2568, 2568, 2629, 2690, -388, 118, 118, 118, 2568,
2793 2385, 2751, 2812, 2873, 301, 301, 174, 174, 237, 237,
2794 237, 177, 2446, 226, 2093, 311, -56, 194, 2259, -388,
2795 185, 1283, -388, -388, 192, -388, -388, -388, -388, 1153,
2796 -388, 119, 2093, -388, 100, 320, 191, 230, -388, -388,
2797 157, -388, -388, 193, 1799, -388, -54, -388, 221, 22,
2798 229, 253, 893, -388, -28, 31, -16, 99, 210, 70,
2799 317, 70, 212, 189, 236, -388, 2093, -388, -388, 339,
2800 2322, -388, 1925, 2093, 213, -388, -388, 1153, 214, 217,
2801 54, 22, -388, -388, 189, 15, 112, 1925, 2093, -388,
2802 -388, -388, -388, 2093, -388, -388, -388, 2093, 1925, -388,
2803 -388, 13, -388, 70, 219, -388, 247, -388, 229, 305,
2804 2568, -388, -388, -388, -15, 26, 220, -388, -388, -388,
2805 -388, -388, -388, -388, -388, -388, -388, -388, -388, 261,
2806 227, 320, -388, 240, 250, -388, -388, 112, -388, 286,
2807 -388, -388, 222, -388, 242, 247, -388, 70, 203, -388,
2808 -388, -388, 2093, 274, 246, 26, -388, -388, -388, -388,
2809 -388, -388, -388, 377, -388, -388, 1925, -388, 1925, 189,
2810 1413, -388, 378, -388, 359, 256, 336, -388, 2507, 1799,
2811 -388, -388, -388, 1799, 1799, 189, -388, -388, 263, -388,
2812 -388, 264, 51, 262, 1543, -388, -388, -388, -388, 72,
2813 -388, -388, 1799, -388, 266, 267, 254, -388, 1413, -388,
2814 -388, 397, -388, -388, -388, -388, 1799, 275, 280, 278,
2815 276, -388, 13, 1799, -388, 279, 277, 189, -388, -388
2818 /* YYPGOTO[NTERM-NUM]. */
2819 static const yytype_int16 yypgoto[] =
2821 -388, -388, 257, -388, 354, -296, -388, 107, -387, -31,
2822 1, -55, -85, 29, 2, 21, 362, 293, 81, -388,
2823 -388, -388, -388, -388, -388, -388, -388, -388, -388, -388,
2824 -388, -388, -388, -388, -388, -21, -19, -388, -388, 6,
2825 -388, 7, -388, -388, -388, -388, -388, -388, -388, -388,
2826 -175, 76, -388, -388, -388, -388, 0, -388, 357, -388,
2827 -388, -388, 48, -388, 49, -388, -68, -388, -53, -388,
2828 -388, -30, -388, 3, -388, -388, 33, 18, -388, -376,
2829 -388, -305, -49, 4, -388, -388, -388, -388, -388, 412,
2830 -89, 52, 71, -239, -388, -96, -388, -388, -388, -388,
2831 -388, -388, -388, -34, -9, -50, -13, -388, -388, -388,
2832 -388, -388, -388, -388
2835 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2836 positive, shift that token. If negative, reduce the rule which
2837 number is the opposite. If zero, do what YYDEFACT says.
2838 If YYTABLE_NINF, syntax error. */
2839 #define YYTABLE_NINF -154
2840 static const yytype_int16 yytable[] =
2842 69, 54, 56, 74, 75, 113, 213, 100, 154, 222,
2843 155, 103, 344, 229, 303, 434, 324, 135, 324, 93,
2844 373, 88, 330, 368, 111, 218, 114, 117, 118, 55,
2845 119, 120, 121, 191, 114, 94, 155, 122, 94, 166,
2846 -70, 94, 320, 166, 166, 93, 166, 87, 72, 73,
2847 90, 320, 69, 54, 56, 74, 75, 409, 379, 410,
2848 442, 94, 411, 412, 413, 208, 414, 101, 209, 157,
2849 422, 406, 235, 218, 383, 92, 329, 362, 158, 377,
2850 248, 55, 493, 160, 166, 166, 494, 495, 443, 94,
2851 97, 238, 98, 89, 227, 225, 114, 162, 104, 415,
2852 72, 73, 389, 105, 390, 502, 325, 256, 421, 416,
2853 417, 301, 114, 145, 398, 157, 451, 388, 441, 510,
2854 243, 244, 330, 257, 158, 108, 516, 109, 159, 160,
2855 387, 166, 110, 304, 331, 420, 515, 380, 94, 305,
2856 423, 161, 95, 162, 146, 424, 320, 107, 69, 54,
2857 56, 74, 75, 262, 263, 264, 265, 266, 267, 268,
2858 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
2859 279, 280, 281, 282, 283, 284, 148, 55, 112, 286,
2860 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
2861 297, 298, 299, 300, 114, 302, 72, 73, 337, 210,
2862 338, 308, 370, 306, 166, 371, 211, 2, 189, 190,
2863 191, 216, 217, 224, 226, 69, 54, 314, 342, 114,
2864 478, 114, 336, 15, 16, 17, 369, 19, 230, 21,
2865 202, 203, 204, 205, 206, 232, 496, 2, 233, 234,
2866 207, 25, 208, 345, 346, 209, 236, 237, 239, 462,
2867 30, 31, 32, 15, 16, 17, 240, 19, 246, 21,
2868 392, 249, 395, -71, 189, 190, 191, 157, 251, 252,
2869 253, 25, 254, 255, 259, 260, 285, 403, 519, 248,
2870 30, 31, 32, 307, -109, 321, 322, 248, 204, 205,
2871 206, 360, 429, 335, 339, 343, 207, 341, 208, 348,
2872 347, 209, 463, 433, 395, 349, 351, 155, 353, 114,
2873 357, 69, 54, 314, 361, 359, 363, 365, 367, 69,
2874 54, 314, 155, 324, 374, 376, 378, 189, 190, 191,
2875 375, 383, 391, 155, 393, -152, 399, 432, 397, 405,
2876 2, -154, 401, 400, 430, 436, 407, 437, 461, 431,
2877 408, 456, 448, 450, 404, 458, 15, 16, 17, 207,
2878 19, 208, 21, 370, 209, 114, 452, 69, 54, 314,
2879 114, 476, 453, 477, 25, 459, -154, -154, 470, 469,
2880 475, 488, 462, 30, 31, 32, 489, 505, 490, 497,
2881 498, 189, 190, 191, 499, 192, 193, 194, 503, 504,
2882 508, 155, 512, 155, 513, 250, 147, 511, 514, 518,
2883 -154, -154, 517, 202, 203, 204, 205, 206, 366, 439,
2884 151, 241, 385, 207, 471, 208, 472, 165, 209, 468,
2885 507, 500, 440, 454, 455, 463, 491, 449, 464, 106,
2886 501, 0, 419, 0, 0, 435, 0, 0, 0, 0,
2887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2888 482, 480, 481, 486, 487, 0, 464, 0, -153, 0,
2889 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2890 0, 0, 0, 0, 482, 480, 481, 486, 487, 0,
2891 0, 0, 0, 0, 0, 0, 0, 0, 482, 480,
2892 481, 486, 487, -4, 0, 0, 1, 2, 3, 4,
2893 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2894 0, 0, 14, 15, 16, 17, 18, 19, 20, 21,
2895 0, 0, 23, 0, 0, 167, 0, 0, 0, 24,
2896 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2897 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2898 0, 0, -154, -154, -154, 0, 37, 38, 0, 0,
2899 175, 176, 0, 39, 0, 0, 0, 0, 0, 0,
2900 0, 0, 0, 0, 0, 189, 190, 191, 0, 192,
2901 193, 194, 0, 40, 41, 0, 0, 0, 0, 0,
2902 0, 0, 42, 0, 200, 201, 0, 202, 203, 204,
2903 205, 206, 0, 0, 0, 43, 0, 207, 0, 208,
2904 44, 45, 209, 0, 0, 46, 0, 47, 0, 48,
2905 0, 49, 0, 0, 0, -4, 1, 2, 3, 4,
2906 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2907 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2908 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2909 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2910 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2911 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2912 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2914 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2915 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2916 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2917 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2918 0, 49, 0, 0, 0, 134, 1, 2, 3, 4,
2919 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2920 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2921 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2922 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2923 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2924 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2925 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2927 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2928 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2929 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2930 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2931 0, 49, 0, 0, 0, 247, 1, 2, 3, 4,
2932 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2933 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2934 22, 0, 23, 127, 0, 128, 0, 0, 0, 24,
2935 129, 25, 26, 0, 27, 130, 28, 0, 29, 131,
2936 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2937 0, 0, 0, 0, 0, 0, 37, 38, 0, 132,
2938 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2939 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2940 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2941 0, 0, 133, 0, 0, 0, 0, 0, 0, 0,
2942 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2943 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2944 0, 49, 0, 0, 0, 386, 1, 2, 3, 4,
2945 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2946 0, 0, 14, 15, 16, 17, 18, 19, 20, 21,
2947 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2948 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2949 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2950 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2951 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2952 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2953 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2954 0, 0, 42, 0, 0, 0, 0, 0, 0, 0,
2955 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2956 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2957 0, 49, 0, 0, 0, -3, 1, 2, 3, 4,
2958 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2959 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2960 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2961 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2962 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2963 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2964 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2966 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2967 0, 0, 309, 0, 0, 0, 0, 0, 0, 0,
2968 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2969 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2970 0, 49, 0, 0, 0, -15, 1, 2, 3, 4,
2971 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2972 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2973 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2974 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2975 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2976 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2977 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2979 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2980 0, 0, 309, 0, 0, 0, 0, 0, 0, 0,
2981 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2982 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2983 0, 49, 0, 0, 0, -16, 1, 2, 3, 4,
2984 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2985 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2986 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
2987 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
2988 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2989 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
2990 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2992 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2993 0, 0, 479, 0, 0, 0, 0, 0, 0, 0,
2994 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2995 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2996 0, 49, 0, 0, 0, -143, 1, 2, 3, 4,
2997 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2998 0, 0, 0, 15, 16, 17, 18, 19, 20, 21,
2999 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
3000 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
3001 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3002 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
3003 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
3004 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3005 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
3006 0, 0, 479, 0, 0, 0, 0, 0, 0, 0,
3007 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
3008 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
3009 0, 49, 0, -3, 0, -144, 1, 2, 3, 4,
3010 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3011 0, 0, 14, 15, 16, 17, 18, 19, 20, 21,
3012 0, 0, 23, 0, 0, 0, 0, 0, 0, 24,
3013 0, 25, 26, 0, 27, 0, 28, 0, 29, 0,
3014 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
3015 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
3016 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
3017 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3018 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
3019 0, 0, 42, 0, 0, 0, 0, 0, 0, 0,
3020 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
3021 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
3022 0, 49, 1, 2, 3, 4, 0, 5, 6, 7,
3023 8, 9, 10, 11, 12, 13, 0, -119, 0, 15,
3024 16, 17, 18, 19, 20, 21, 22, 0, 23, 127,
3025 0, 128, 0, 0, 0, 24, 129, 25, 26, 0,
3026 27, 130, 28, 0, 29, 131, 30, 31, 32, 0,
3027 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
3028 0, 0, 37, 38, 0, 132, 0, 0, 0, 39,
3029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3030 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
3031 41, 0, 0, 0, 0, 0, 0, 0, 133, 0,
3032 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3033 0, 43, 0, 0, 0, 0, 44, 45, 0, 0,
3034 0, 46, 0, 47, 0, 48, 0, 49, 1, 2,
3035 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
3036 12, 13, 0, 0, 0, 15, 16, 17, 18, 19,
3037 20, 21, 22, 0, 23, 127, 0, 128, 0, 0,
3038 0, 24, 129, 25, 26, 0, 27, 130, 28, 0,
3039 29, 131, 30, 31, 32, 0, 0, 33, 34, 0,
3040 35, 36, 0, 0, 0, 0, 0, 0, 37, 38,
3041 0, 132, 0, 0, 0, 39, 0, 0, 0, 0,
3042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3043 0, 0, 0, 0, 0, 40, 41, 0, 0, 0,
3044 0, 0, 0, 0, 133, 0, 149, 0, 3, 4,
3045 0, 5, 6, 7, 8, 9, 0, 43, 0, 0,
3046 0, 0, 44, 45, 0, 0, 0, 46, 20, 47,
3047 22, 48, 23, 49, 0, 128, 0, 0, 0, 24,
3048 0, 0, 0, 0, 0, 0, 28, 0, 29, 150,
3049 0, 0, 0, 0, 0, 0, 34, 0, 35, 36,
3050 0, 0, 0, 0, 0, 0, 37, 0, 0, 0,
3051 0, 0, 0, 39, 0, 0, 99, 0, 3, 4,
3052 0, 5, 6, 7, 8, 9, 0, 0, 0, 0,
3053 0, 0, 0, 40, 41, 0, 0, 0, 20, 0,
3054 22, 0, 23, 0, 0, 0, 0, 0, 0, 24,
3055 0, 0, 0, 0, 0, 43, 28, 0, 29, 0,
3056 44, 45, 0, 0, 0, 46, 34, 47, 35, 36,
3057 0, 49, 0, 0, 0, 0, 37, 0, 0, 0,
3058 0, 0, 0, 39, 0, 0, 99, 0, 3, 4,
3059 0, 5, 6, 7, 8, 9, 0, 0, 0, 0,
3060 0, 0, 0, 40, 41, 0, 0, 0, 20, 0,
3061 22, 0, 23, 0, 0, 0, 0, 0, 0, 0,
3062 0, 0, 0, 0, 0, 43, 0, 0, 29, 0,
3063 44, 45, 0, 0, 0, 46, 34, 47, 35, 36,
3064 0, 49, 0, 0, 0, 0, 0, 0, 167, 0,
3065 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
3066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3067 0, 0, 0, 40, 41, 168, 169, 170, 0, 171,
3068 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3069 182, 183, 184, 185, 186, 187, 188, 0, 189, 190,
3070 191, 0, 192, 193, 194, 46, 0, 47, 0, 0,
3071 195, 49, 196, 0, 197, 198, 199, 200, 201, 167,
3072 202, 203, 204, 205, 206, 0, 0, 0, 0, 0,
3073 207, 0, 208, 0, 0, 209, 0, 0, 0, 0,
3074 0, 332, 0, 0, 0, 0, 168, 169, 170, 0,
3075 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
3076 181, 182, 183, 184, 185, 186, 187, 188, 0, 189,
3077 190, 191, 0, 192, 193, 194, 0, 0, 0, 0,
3078 0, 195, 167, 196, 0, 197, 198, 199, 200, 201,
3079 0, 202, 203, 204, 205, 206, 0, 0, 0, 0,
3080 0, 207, 0, 208, 0, 0, 209, 0, 0, 168,
3081 169, 170, 364, 171, 172, 173, 174, 175, 176, 177,
3082 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
3083 188, 0, 189, 190, 191, 0, 192, 193, 194, 0,
3084 0, 0, 0, 0, 195, 167, 196, 0, 197, 198,
3085 199, 200, 201, 0, 202, 203, 204, 205, 206, 0,
3086 0, 0, 0, 0, 207, 0, 208, 0, 0, 209,
3087 0, 0, 168, 169, 170, 402, 171, 172, 173, 174,
3088 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
3089 185, 186, 187, 188, 0, 189, 190, 191, 0, 192,
3090 193, 194, 0, 0, 0, 0, 167, 195, 0, 196,
3091 356, 197, 198, 199, 200, 201, 0, 202, 203, 204,
3092 205, 206, 0, 0, 0, 0, 0, 207, 0, 208,
3093 0, 0, 209, 168, 169, 170, 0, 171, 172, 173,
3094 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
3095 184, 185, 186, 187, 188, 0, 189, 190, 191, 0,
3096 192, 193, 194, 0, 0, 0, 0, 167, 195, 0,
3097 196, 0, 197, 198, 199, 200, 201, 0, 202, 203,
3098 204, 205, 206, 0, 0, 0, 0, 0, 207, 0,
3099 208, 358, 0, 209, 168, 169, 170, 0, 171, 172,
3100 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3101 183, 184, 185, 186, 187, 188, 0, 189, 190, 191,
3102 0, 192, 193, 194, 0, 0, 0, 0, 167, 195,
3103 0, 196, 492, 197, 198, 199, 200, 201, 0, 202,
3104 203, 204, 205, 206, 0, 0, 0, 0, 0, 207,
3105 0, 208, 0, 0, 209, 168, 169, 170, 0, 171,
3106 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3107 182, 183, 184, 185, 186, 187, 188, 0, 189, 190,
3108 191, 0, 192, 193, 194, 0, 0, 0, 0, 167,
3109 195, 0, 196, 0, 197, 198, 199, 200, 201, 0,
3110 202, 203, 204, 205, 206, 0, 0, 0, 0, 0,
3111 207, 0, 208, 0, 0, 209, 168, 169, 170, 0,
3112 171, 172, 173, 174, 175, 176, 0, 0, 0, 0,
3113 0, 0, 0, 0, 0, 0, 0, 188, 0, 189,
3114 190, 191, 0, 192, 193, 194, 0, 0, 0, 0,
3115 167, 0, 0, 0, 0, 197, 198, 199, 200, 201,
3116 0, 202, 203, 204, 205, 206, 0, 0, 0, 0,
3117 0, 207, 0, 208, 0, 0, 209, 168, 169, 170,
3118 0, 171, 172, 173, 174, 175, 176, 0, 0, 0,
3119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3120 189, 190, 191, 0, 192, 193, 194, 0, 0, 0,
3121 0, 167, 0, 0, 0, 0, 197, 198, 199, 200,
3122 201, 0, 202, 203, 204, 205, 206, 0, 0, 0,
3123 0, 0, 207, 0, 208, 0, 0, 209, 168, 169,
3124 170, 0, 171, 172, 173, 174, 175, 176, 0, 0,
3125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3126 0, 189, 190, 191, 0, 192, 193, 194, 0, 0,
3127 0, 0, 167, 0, 0, 0, 0, 0, 198, 199,
3128 200, 201, 0, 202, 203, 204, 205, 206, 0, 0,
3129 0, 0, 0, 207, 0, 208, 0, 0, 209, 168,
3130 169, 170, 0, 171, 172, 173, 174, 175, 176, 0,
3131 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3132 0, 0, 189, 190, 191, 0, 192, 193, 194, 0,
3133 0, 0, 0, 167, 0, 0, 0, 0, 0, 0,
3134 199, 200, 201, 0, 202, 203, 204, 205, 206, 0,
3135 0, 0, 0, 0, 207, 0, 208, 0, 0, 209,
3136 168, 169, 170, 0, 171, 172, 173, 174, 175, 176,
3137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3138 0, 0, 0, 189, 190, 191, 0, 192, 193, 194,
3139 0, 0, 0, 0, 167, 0, 0, 0, 0, 0,
3140 0, -154, 200, 201, 0, 202, 203, 204, 205, 206,
3141 0, 0, 0, 0, 0, 207, 0, 208, 0, 0,
3142 209, 168, 169, 170, 0, -154, -154, -154, -154, 175,
3143 176, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3144 0, 0, 0, 0, 189, 190, 191, 0, 192, 193,
3145 194, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3146 0, 0, 0, 200, 201, 0, 202, 203, 204, 205,
3147 206, 0, 0, 0, 0, 0, 207, 0, 208, 0,
3151 static const yytype_int16 yycheck[] =
3153 0, 0, 0, 0, 0, 39, 91, 20, 58, 98,
3154 65, 24, 251, 109, 3, 391, 3, 48, 3, 3,
3155 325, 50, 3, 319, 37, 3, 39, 40, 41, 0,
3156 43, 44, 45, 92, 47, 19, 91, 46, 19, 100,
3157 68, 19, 217, 100, 100, 3, 100, 89, 0, 0,
3158 122, 226, 52, 52, 52, 52, 52, 3, 36, 5,
3159 34, 19, 8, 9, 10, 124, 12, 3, 127, 18,
3160 375, 367, 133, 3, 102, 122, 133, 133, 27, 133,
3161 135, 52, 469, 32, 100, 100, 473, 474, 62, 19,
3162 14, 125, 18, 122, 107, 104, 109, 46, 122, 45,
3163 52, 52, 3, 27, 5, 492, 93, 35, 93, 55,
3164 56, 207, 125, 3, 353, 18, 421, 133, 133, 506,
3165 129, 130, 3, 51, 27, 126, 513, 122, 31, 32,
3166 99, 100, 127, 122, 115, 374, 512, 115, 19, 128,
3167 28, 44, 126, 46, 0, 33, 321, 122, 148, 148,
3168 148, 148, 148, 166, 167, 168, 169, 170, 171, 172,
3169 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3170 183, 184, 185, 186, 187, 188, 126, 148, 122, 192,
3171 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3172 203, 204, 205, 206, 207, 208, 148, 148, 232, 3,
3173 234, 214, 102, 212, 100, 105, 122, 4, 90, 91,
3174 92, 126, 127, 122, 127, 215, 215, 215, 249, 232,
3175 459, 234, 231, 20, 21, 22, 322, 24, 3, 26,
3176 112, 113, 114, 115, 116, 105, 475, 4, 132, 100,
3177 122, 38, 124, 252, 253, 127, 125, 100, 3, 46,
3178 47, 48, 49, 20, 21, 22, 3, 24, 3, 26,
3179 349, 126, 351, 68, 90, 91, 92, 18, 3, 99,
3180 68, 38, 99, 3, 3, 3, 3, 362, 517, 334,
3181 47, 48, 49, 14, 127, 127, 122, 342, 114, 115,
3182 116, 304, 377, 133, 105, 132, 122, 100, 124, 3,
3183 102, 127, 99, 388, 393, 54, 54, 362, 3, 322,
3184 133, 311, 311, 311, 3, 89, 122, 132, 126, 319,
3185 319, 319, 377, 3, 133, 132, 105, 90, 91, 92,
3186 100, 102, 122, 388, 17, 132, 100, 387, 126, 126,
3187 4, 40, 3, 356, 378, 126, 132, 100, 437, 383,
3188 133, 65, 132, 126, 363, 133, 20, 21, 22, 122,
3189 24, 124, 26, 102, 127, 378, 126, 367, 367, 367,
3190 383, 456, 122, 458, 38, 133, 75, 76, 132, 105,
3191 3, 3, 46, 47, 48, 49, 27, 133, 132, 126,
3192 126, 90, 91, 92, 132, 94, 95, 96, 132, 132,
3193 3, 456, 122, 458, 126, 148, 52, 132, 132, 132,
3194 109, 110, 133, 112, 113, 114, 115, 116, 311, 398,
3195 58, 128, 341, 122, 445, 124, 445, 70, 127, 442,
3196 498, 484, 399, 427, 427, 99, 466, 419, 438, 27,
3197 489, -1, 371, -1, -1, 393, -1, -1, -1, -1,
3198 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3199 460, 460, 460, 460, 460, -1, 466, -1, 132, -1,
3200 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3201 -1, -1, -1, -1, 484, 484, 484, 484, 484, -1,
3202 -1, -1, -1, -1, -1, -1, -1, -1, 498, 498,
3203 498, 498, 498, 0, -1, -1, 3, 4, 5, 6,
3204 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3205 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
3206 -1, -1, 29, -1, -1, 40, -1, -1, -1, 36,
3207 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3208 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3209 -1, -1, 67, 68, 69, -1, 63, 64, -1, -1,
3210 75, 76, -1, 70, -1, -1, -1, -1, -1, -1,
3211 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3212 95, 96, -1, 90, 91, -1, -1, -1, -1, -1,
3213 -1, -1, 99, -1, 109, 110, -1, 112, 113, 114,
3214 115, 116, -1, -1, -1, 112, -1, 122, -1, 124,
3215 117, 118, 127, -1, -1, 122, -1, 124, -1, 126,
3216 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3217 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3218 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3219 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3220 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3221 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3222 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3223 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3225 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3226 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3227 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3228 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3229 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3230 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3231 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3232 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3233 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3234 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3235 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3236 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3237 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3238 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3239 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3240 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3241 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3242 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3243 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3244 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3245 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3246 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3247 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3248 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3249 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3250 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3251 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3252 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3253 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3254 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3255 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3256 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3257 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
3258 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3259 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3260 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3261 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3262 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3264 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3265 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3266 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3267 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3268 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3269 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3270 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3271 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3272 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3273 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3274 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3275 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3277 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3278 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3279 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3280 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3281 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3282 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3283 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3284 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3285 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3286 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3287 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3288 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3290 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3291 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3292 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3293 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3294 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3295 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3296 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3297 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3298 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3299 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3300 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3301 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3303 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3304 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3305 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3306 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3307 -1, 128, -1, -1, -1, 132, 3, 4, 5, 6,
3308 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3309 -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
3310 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3311 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3312 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3313 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3314 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3315 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3316 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3317 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3318 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3319 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3320 -1, 128, -1, 0, -1, 132, 3, 4, 5, 6,
3321 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3322 -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
3323 -1, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3324 -1, 38, 39, -1, 41, -1, 43, -1, 45, -1,
3325 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3326 -1, -1, -1, -1, -1, -1, 63, 64, -1, -1,
3327 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3329 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3330 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3331 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3332 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3333 -1, 128, 3, 4, 5, 6, -1, 8, 9, 10,
3334 11, 12, 13, 14, 15, 16, -1, 18, -1, 20,
3335 21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
3336 -1, 32, -1, -1, -1, 36, 37, 38, 39, -1,
3337 41, 42, 43, -1, 45, 46, 47, 48, 49, -1,
3338 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3339 -1, -1, 63, 64, -1, 66, -1, -1, -1, 70,
3340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3341 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3342 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3344 -1, 112, -1, -1, -1, -1, 117, 118, -1, -1,
3345 -1, 122, -1, 124, -1, 126, -1, 128, 3, 4,
3346 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3347 15, 16, -1, -1, -1, 20, 21, 22, 23, 24,
3348 25, 26, 27, -1, 29, 30, -1, 32, -1, -1,
3349 -1, 36, 37, 38, 39, -1, 41, 42, 43, -1,
3350 45, 46, 47, 48, 49, -1, -1, 52, 53, -1,
3351 55, 56, -1, -1, -1, -1, -1, -1, 63, 64,
3352 -1, 66, -1, -1, -1, 70, -1, -1, -1, -1,
3353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3354 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3355 -1, -1, -1, -1, 99, -1, 3, -1, 5, 6,
3356 -1, 8, 9, 10, 11, 12, -1, 112, -1, -1,
3357 -1, -1, 117, 118, -1, -1, -1, 122, 25, 124,
3358 27, 126, 29, 128, -1, 32, -1, -1, -1, 36,
3359 -1, -1, -1, -1, -1, -1, 43, -1, 45, 46,
3360 -1, -1, -1, -1, -1, -1, 53, -1, 55, 56,
3361 -1, -1, -1, -1, -1, -1, 63, -1, -1, -1,
3362 -1, -1, -1, 70, -1, -1, 3, -1, 5, 6,
3363 -1, 8, 9, 10, 11, 12, -1, -1, -1, -1,
3364 -1, -1, -1, 90, 91, -1, -1, -1, 25, -1,
3365 27, -1, 29, -1, -1, -1, -1, -1, -1, 36,
3366 -1, -1, -1, -1, -1, 112, 43, -1, 45, -1,
3367 117, 118, -1, -1, -1, 122, 53, 124, 55, 56,
3368 -1, 128, -1, -1, -1, -1, 63, -1, -1, -1,
3369 -1, -1, -1, 70, -1, -1, 3, -1, 5, 6,
3370 -1, 8, 9, 10, 11, 12, -1, -1, -1, -1,
3371 -1, -1, -1, 90, 91, -1, -1, -1, 25, -1,
3372 27, -1, 29, -1, -1, -1, -1, -1, -1, -1,
3373 -1, -1, -1, -1, -1, 112, -1, -1, 45, -1,
3374 117, 118, -1, -1, -1, 122, 53, 124, 55, 56,
3375 -1, 128, -1, -1, -1, -1, -1, -1, 40, -1,
3376 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3378 -1, -1, -1, 90, 91, 67, 68, 69, -1, 71,
3379 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3380 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3381 92, -1, 94, 95, 96, 122, -1, 124, -1, -1,
3382 102, 128, 104, -1, 106, 107, 108, 109, 110, 40,
3383 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3384 122, -1, 124, -1, -1, 127, -1, -1, -1, -1,
3385 -1, 133, -1, -1, -1, -1, 67, 68, 69, -1,
3386 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3387 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3388 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3389 -1, 102, 40, 104, -1, 106, 107, 108, 109, 110,
3390 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3391 -1, 122, -1, 124, -1, -1, 127, -1, -1, 67,
3392 68, 69, 133, 71, 72, 73, 74, 75, 76, 77,
3393 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3394 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3395 -1, -1, -1, -1, 102, 40, 104, -1, 106, 107,
3396 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3397 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3398 -1, -1, 67, 68, 69, 133, 71, 72, 73, 74,
3399 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3400 85, 86, 87, 88, -1, 90, 91, 92, -1, 94,
3401 95, 96, -1, -1, -1, -1, 40, 102, -1, 104,
3402 105, 106, 107, 108, 109, 110, -1, 112, 113, 114,
3403 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3404 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3405 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3406 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3407 94, 95, 96, -1, -1, -1, -1, 40, 102, -1,
3408 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3409 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3410 124, 125, -1, 127, 67, 68, 69, -1, 71, 72,
3411 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3412 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3413 -1, 94, 95, 96, -1, -1, -1, -1, 40, 102,
3414 -1, 104, 105, 106, 107, 108, 109, 110, -1, 112,
3415 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3416 -1, 124, -1, -1, 127, 67, 68, 69, -1, 71,
3417 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3418 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3419 92, -1, 94, 95, 96, -1, -1, -1, -1, 40,
3420 102, -1, 104, -1, 106, 107, 108, 109, 110, -1,
3421 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3422 122, -1, 124, -1, -1, 127, 67, 68, 69, -1,
3423 71, 72, 73, 74, 75, 76, -1, -1, -1, -1,
3424 -1, -1, -1, -1, -1, -1, -1, 88, -1, 90,
3425 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3426 40, -1, -1, -1, -1, 106, 107, 108, 109, 110,
3427 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3428 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3429 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1,
3430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3431 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3432 -1, 40, -1, -1, -1, -1, 106, 107, 108, 109,
3433 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3434 -1, -1, 122, -1, 124, -1, -1, 127, 67, 68,
3435 69, -1, 71, 72, 73, 74, 75, 76, -1, -1,
3436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3437 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3438 -1, -1, 40, -1, -1, -1, -1, -1, 107, 108,
3439 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3440 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3441 68, 69, -1, 71, 72, 73, 74, 75, 76, -1,
3442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3443 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3444 -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
3445 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3446 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3447 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3449 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3450 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
3451 -1, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3452 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3453 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3454 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3455 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3456 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3457 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115,
3458 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3462 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3463 symbol of state STATE-NUM. */
3464 static const yytype_uint8 yystos[] =
3466 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3467 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3468 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3469 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3470 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3471 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3472 160, 161, 163, 171, 179, 182, 183, 186, 189, 190,
3473 191, 192, 196, 198, 207, 217, 220, 233, 234, 235,
3474 238, 239, 240, 241, 244, 246, 247, 89, 50, 122,
3475 122, 164, 122, 3, 19, 126, 184, 185, 18, 3,
3476 240, 3, 219, 240, 122, 185, 223, 122, 126, 122,
3477 127, 240, 122, 237, 240, 242, 243, 240, 240, 240,
3478 240, 240, 238, 229, 230, 231, 237, 30, 32, 37,
3479 42, 46, 66, 99, 132, 143, 144, 145, 148, 150,
3480 165, 166, 181, 190, 236, 3, 0, 138, 126, 3,
3481 46, 150, 156, 157, 239, 145, 146, 18, 27, 31,
3482 32, 44, 46, 206, 245, 192, 100, 40, 67, 68,
3483 69, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3484 80, 81, 82, 83, 84, 85, 86, 87, 88, 90,
3485 91, 92, 94, 95, 96, 102, 104, 106, 107, 108,
3486 109, 110, 112, 113, 114, 115, 116, 122, 124, 127,
3487 3, 122, 162, 146, 172, 188, 126, 127, 3, 185,
3488 222, 223, 224, 232, 122, 238, 127, 240, 180, 229,
3489 3, 155, 105, 132, 100, 133, 125, 100, 237, 3,
3490 3, 151, 152, 238, 238, 151, 3, 132, 145, 126,
3491 136, 3, 99, 68, 99, 3, 35, 51, 216, 3,
3492 3, 208, 240, 240, 240, 240, 240, 240, 240, 240,
3493 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3494 240, 240, 240, 240, 240, 3, 240, 240, 240, 240,
3495 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3496 240, 229, 240, 3, 122, 128, 238, 14, 240, 99,
3497 139, 140, 141, 147, 148, 196, 198, 207, 217, 187,
3498 184, 127, 122, 228, 3, 93, 213, 214, 215, 133,
3499 3, 115, 133, 142, 143, 133, 238, 237, 237, 105,
3500 227, 100, 143, 132, 227, 238, 238, 102, 3, 54,
3501 193, 54, 194, 3, 209, 210, 105, 133, 125, 89,
3502 240, 3, 133, 122, 133, 132, 141, 126, 139, 229,
3503 102, 105, 211, 215, 133, 100, 132, 133, 105, 36,
3504 115, 224, 226, 102, 149, 152, 132, 99, 133, 3,
3505 5, 122, 224, 17, 195, 224, 225, 126, 227, 100,
3506 240, 3, 133, 146, 238, 126, 139, 132, 133, 3,
3507 5, 8, 9, 10, 12, 45, 55, 56, 212, 226,
3508 227, 93, 215, 28, 33, 173, 175, 177, 178, 146,
3509 237, 237, 239, 146, 213, 225, 126, 100, 199, 149,
3510 210, 133, 34, 62, 167, 168, 169, 170, 132, 211,
3511 126, 215, 126, 122, 173, 175, 65, 153, 133, 133,
3512 197, 224, 46, 99, 190, 203, 204, 205, 240, 105,
3513 132, 169, 170, 221, 176, 3, 146, 146, 227, 99,
3514 144, 148, 190, 200, 201, 202, 207, 217, 3, 27,
3515 132, 205, 105, 142, 142, 142, 227, 126, 126, 132,
3516 202, 216, 142, 132, 132, 133, 218, 200, 3, 174,
3517 142, 132, 122, 126, 132, 213, 142, 133, 132, 227
3520 #define yyerrok (yyerrstatus = 0)
3521 #define yyclearin (yychar = YYEMPTY)
3522 #define YYEMPTY (-2)
3525 #define YYACCEPT goto yyacceptlab
3526 #define YYABORT goto yyabortlab
3527 #define YYERROR goto yyerrorlab
3530 /* Like YYERROR except do call yyerror. This remains here temporarily
3531 to ease the transition to the new meaning of YYERROR, for GCC.
3532 Once GCC version 2 has supplanted version 1, this can go. */
3534 #define YYFAIL goto yyerrlab
3536 #define YYRECOVERING() (!!yyerrstatus)
3538 #define YYBACKUP(Token, Value) \
3540 if (yychar == YYEMPTY && yylen == 1) \
3544 yytoken = YYTRANSLATE (yychar); \
3550 yyerror (YY_("syntax error: cannot back up")); \
3557 #define YYERRCODE 256
3560 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3561 If N is 0, then set CURRENT to the empty location which ends
3562 the previous symbol: RHS[0] (always defined). */
3564 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3565 #ifndef YYLLOC_DEFAULT
3566 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3570 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3571 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3572 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3573 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3577 (Current).first_line = (Current).last_line = \
3578 YYRHSLOC (Rhs, 0).last_line; \
3579 (Current).first_column = (Current).last_column = \
3580 YYRHSLOC (Rhs, 0).last_column; \
3586 /* YY_LOCATION_PRINT -- Print the location on the stream.
3587 This macro was not mandated originally: define only if we know
3588 we won't break user code: when these are the locations we know. */
3590 #ifndef YY_LOCATION_PRINT
3591 # if YYLTYPE_IS_TRIVIAL
3592 # define YY_LOCATION_PRINT(File, Loc) \
3593 fprintf (File, "%d.%d-%d.%d", \
3594 (Loc).first_line, (Loc).first_column, \
3595 (Loc).last_line, (Loc).last_column)
3597 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3602 /* YYLEX -- calling `yylex' with the right arguments. */
3605 # define YYLEX yylex (YYLEX_PARAM)
3607 # define YYLEX yylex ()
3610 /* Enable debugging if requested. */
3614 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3615 # define YYFPRINTF fprintf
3618 # define YYDPRINTF(Args) \
3624 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3628 YYFPRINTF (stderr, "%s ", Title); \
3629 yy_symbol_print (stderr, \
3631 YYFPRINTF (stderr, "\n"); \
3636 /*--------------------------------.
3637 | Print this symbol on YYOUTPUT. |
3638 `--------------------------------*/
3641 #if (defined __STDC__ || defined __C99__FUNC__ \
3642 || defined __cplusplus || defined _MSC_VER)
3644 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3647 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3650 YYSTYPE const * const yyvaluep;
3656 if (yytype < YYNTOKENS)
3657 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3669 /*--------------------------------.
3670 | Print this symbol on YYOUTPUT. |
3671 `--------------------------------*/
3673 #if (defined __STDC__ || defined __C99__FUNC__ \
3674 || defined __cplusplus || defined _MSC_VER)
3676 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3679 yy_symbol_print (yyoutput, yytype, yyvaluep)
3682 YYSTYPE const * const yyvaluep;
3685 if (yytype < YYNTOKENS)
3686 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3688 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3690 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3691 YYFPRINTF (yyoutput, ")");
3694 /*------------------------------------------------------------------.
3695 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3697 `------------------------------------------------------------------*/
3699 #if (defined __STDC__ || defined __C99__FUNC__ \
3700 || defined __cplusplus || defined _MSC_VER)
3702 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3705 yy_stack_print (yybottom, yytop)
3706 yytype_int16 *yybottom;
3707 yytype_int16 *yytop;
3710 YYFPRINTF (stderr, "Stack now");
3711 for (; yybottom <= yytop; yybottom++)
3713 int yybot = *yybottom;
3714 YYFPRINTF (stderr, " %d", yybot);
3716 YYFPRINTF (stderr, "\n");
3719 # define YY_STACK_PRINT(Bottom, Top) \
3722 yy_stack_print ((Bottom), (Top)); \
3726 /*------------------------------------------------.
3727 | Report that the YYRULE is going to be reduced. |
3728 `------------------------------------------------*/
3730 #if (defined __STDC__ || defined __C99__FUNC__ \
3731 || defined __cplusplus || defined _MSC_VER)
3733 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3736 yy_reduce_print (yyvsp, yyrule)
3741 int yynrhs = yyr2[yyrule];
3743 unsigned long int yylno = yyrline[yyrule];
3744 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3746 /* The symbols being reduced. */
3747 for (yyi = 0; yyi < yynrhs; yyi++)
3749 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3750 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3751 &(yyvsp[(yyi + 1) - (yynrhs)])
3753 YYFPRINTF (stderr, "\n");
3757 # define YY_REDUCE_PRINT(Rule) \
3760 yy_reduce_print (yyvsp, Rule); \
3763 /* Nonzero means print parse trace. It is left uninitialized so that
3764 multiple parsers can coexist. */
3766 #else /* !YYDEBUG */
3767 # define YYDPRINTF(Args)
3768 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3769 # define YY_STACK_PRINT(Bottom, Top)
3770 # define YY_REDUCE_PRINT(Rule)
3771 #endif /* !YYDEBUG */
3774 /* YYINITDEPTH -- initial size of the parser's stacks. */
3776 # define YYINITDEPTH 200
3779 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3780 if the built-in stack extension method is used).
3782 Do not make this value too large; the results are undefined if
3783 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3784 evaluated with infinite-precision integer arithmetic. */
3787 # define YYMAXDEPTH 10000
3795 # if defined __GLIBC__ && defined _STRING_H
3796 # define yystrlen strlen
3798 /* Return the length of YYSTR. */
3799 #if (defined __STDC__ || defined __C99__FUNC__ \
3800 || defined __cplusplus || defined _MSC_VER)
3802 yystrlen (const char *yystr)
3810 for (yylen = 0; yystr[yylen]; yylen++)
3818 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3819 # define yystpcpy stpcpy
3821 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3823 #if (defined __STDC__ || defined __C99__FUNC__ \
3824 || defined __cplusplus || defined _MSC_VER)
3826 yystpcpy (char *yydest, const char *yysrc)
3829 yystpcpy (yydest, yysrc)
3835 const char *yys = yysrc;
3837 while ((*yyd++ = *yys++) != '\0')
3846 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3847 quotes and backslashes, so that it's suitable for yyerror. The
3848 heuristic is that double-quoting is unnecessary unless the string
3849 contains an apostrophe, a comma, or backslash (other than
3850 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3851 null, do not copy; instead, return the length of what the result
3854 yytnamerr (char *yyres, const char *yystr)
3859 char const *yyp = yystr;
3866 goto do_not_strip_quotes;
3870 goto do_not_strip_quotes;
3883 do_not_strip_quotes: ;
3887 return yystrlen (yystr);
3889 return yystpcpy (yyres, yystr) - yyres;
3893 /* Copy into YYRESULT an error message about the unexpected token
3894 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3895 including the terminating null byte. If YYRESULT is null, do not
3896 copy anything; just return the number of bytes that would be
3897 copied. As a special case, return 0 if an ordinary "syntax error"
3898 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3899 size calculation. */
3901 yysyntax_error (char *yyresult, int yystate, int yychar)
3903 int yyn = yypact[yystate];
3905 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3909 int yytype = YYTRANSLATE (yychar);
3910 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3911 YYSIZE_T yysize = yysize0;
3913 int yysize_overflow = 0;
3914 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3915 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3919 /* This is so xgettext sees the translatable formats that are
3920 constructed on the fly. */
3921 YY_("syntax error, unexpected %s");
3922 YY_("syntax error, unexpected %s, expecting %s");
3923 YY_("syntax error, unexpected %s, expecting %s or %s");
3924 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3925 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3929 static char const yyunexpected[] = "syntax error, unexpected %s";
3930 static char const yyexpecting[] = ", expecting %s";
3931 static char const yyor[] = " or %s";
3932 char yyformat[sizeof yyunexpected
3933 + sizeof yyexpecting - 1
3934 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3935 * (sizeof yyor - 1))];
3936 char const *yyprefix = yyexpecting;
3938 /* Start YYX at -YYN if negative to avoid negative indexes in
3940 int yyxbegin = yyn < 0 ? -yyn : 0;
3942 /* Stay within bounds of both yycheck and yytname. */
3943 int yychecklim = YYLAST - yyn + 1;
3944 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3947 yyarg[0] = yytname[yytype];
3948 yyfmt = yystpcpy (yyformat, yyunexpected);
3950 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3951 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3953 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3957 yyformat[sizeof yyunexpected - 1] = '\0';
3960 yyarg[yycount++] = yytname[yyx];
3961 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3962 yysize_overflow |= (yysize1 < yysize);
3964 yyfmt = yystpcpy (yyfmt, yyprefix);
3968 yyf = YY_(yyformat);
3969 yysize1 = yysize + yystrlen (yyf);
3970 yysize_overflow |= (yysize1 < yysize);
3973 if (yysize_overflow)
3974 return YYSIZE_MAXIMUM;
3978 /* Avoid sprintf, as that infringes on the user's name space.
3979 Don't have undefined behavior even if the translation
3980 produced a string with the wrong number of "%s"s. */
3981 char *yyp = yyresult;
3983 while ((*yyp = *yyf) != '\0')
3985 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3987 yyp += yytnamerr (yyp, yyarg[yyi++]);
4000 #endif /* YYERROR_VERBOSE */
4003 /*-----------------------------------------------.
4004 | Release the memory associated to this symbol. |
4005 `-----------------------------------------------*/
4008 #if (defined __STDC__ || defined __C99__FUNC__ \
4009 || defined __cplusplus || defined _MSC_VER)
4011 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4014 yydestruct (yymsg, yytype, yyvaluep)
4024 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4034 /* Prevent warnings from -Wmissing-prototypes. */
4035 #ifdef YYPARSE_PARAM
4036 #if defined __STDC__ || defined __cplusplus
4037 int yyparse (void *YYPARSE_PARAM);
4041 #else /* ! YYPARSE_PARAM */
4042 #if defined __STDC__ || defined __cplusplus
4047 #endif /* ! YYPARSE_PARAM */
4050 /* The lookahead symbol. */
4053 /* The semantic value of the lookahead symbol. */
4056 /* Number of syntax errors so far. */
4061 /*-------------------------.
4062 | yyparse or yypush_parse. |
4063 `-------------------------*/
4065 #ifdef YYPARSE_PARAM
4066 #if (defined __STDC__ || defined __C99__FUNC__ \
4067 || defined __cplusplus || defined _MSC_VER)
4069 yyparse (void *YYPARSE_PARAM)
4072 yyparse (YYPARSE_PARAM)
4073 void *YYPARSE_PARAM;
4075 #else /* ! YYPARSE_PARAM */
4076 #if (defined __STDC__ || defined __C99__FUNC__ \
4077 || defined __cplusplus || defined _MSC_VER)
4090 /* Number of tokens to shift before error messages enabled. */
4093 /* The stacks and their tools:
4094 `yyss': related to states.
4095 `yyvs': related to semantic values.
4097 Refer to the stacks thru separate pointers, to allow yyoverflow
4098 to reallocate them elsewhere. */
4100 /* The state stack. */
4101 yytype_int16 yyssa[YYINITDEPTH];
4103 yytype_int16 *yyssp;
4105 /* The semantic value stack. */
4106 YYSTYPE yyvsa[YYINITDEPTH];
4110 YYSIZE_T yystacksize;
4114 /* Lookahead token as an internal (translated) token number. */
4116 /* The variables used to return semantic value and location from the
4121 /* Buffer for error messages, and its allocated size. */
4123 char *yymsg = yymsgbuf;
4124 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4127 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4129 /* The number of symbols on the RHS of the reduced rule.
4130 Keep to zero when no symbol should be popped. */
4136 yystacksize = YYINITDEPTH;
4138 YYDPRINTF ((stderr, "Starting parse\n"));
4143 yychar = YYEMPTY; /* Cause a token to be read. */
4145 /* Initialize stack pointers.
4146 Waste one element of value and location stack
4147 so that they stay on the same level as the state stack.
4148 The wasted elements are never initialized. */
4154 /*------------------------------------------------------------.
4155 | yynewstate -- Push a new state, which is found in yystate. |
4156 `------------------------------------------------------------*/
4158 /* In all cases, when you get here, the value and location stacks
4159 have just been pushed. So pushing a state here evens the stacks. */
4165 if (yyss + yystacksize - 1 <= yyssp)
4167 /* Get the current used size of the three stacks, in elements. */
4168 YYSIZE_T yysize = yyssp - yyss + 1;
4172 /* Give user a chance to reallocate the stack. Use copies of
4173 these so that the &'s don't force the real ones into
4175 YYSTYPE *yyvs1 = yyvs;
4176 yytype_int16 *yyss1 = yyss;
4178 /* Each stack pointer address is followed by the size of the
4179 data in use in that stack, in bytes. This used to be a
4180 conditional around just the two extra args, but that might
4181 be undefined if yyoverflow is a macro. */
4182 yyoverflow (YY_("memory exhausted"),
4183 &yyss1, yysize * sizeof (*yyssp),
4184 &yyvs1, yysize * sizeof (*yyvsp),
4190 #else /* no yyoverflow */
4191 # ifndef YYSTACK_RELOCATE
4192 goto yyexhaustedlab;
4194 /* Extend the stack our own way. */
4195 if (YYMAXDEPTH <= yystacksize)
4196 goto yyexhaustedlab;
4198 if (YYMAXDEPTH < yystacksize)
4199 yystacksize = YYMAXDEPTH;
4202 yytype_int16 *yyss1 = yyss;
4203 union yyalloc *yyptr =
4204 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4206 goto yyexhaustedlab;
4207 YYSTACK_RELOCATE (yyss_alloc, yyss);
4208 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4209 # undef YYSTACK_RELOCATE
4211 YYSTACK_FREE (yyss1);
4214 #endif /* no yyoverflow */
4216 yyssp = yyss + yysize - 1;
4217 yyvsp = yyvs + yysize - 1;
4219 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4220 (unsigned long int) yystacksize));
4222 if (yyss + yystacksize - 1 <= yyssp)
4226 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4228 if (yystate == YYFINAL)
4238 /* Do appropriate processing given the current state. Read a
4239 lookahead token if we need one and don't already have one. */
4241 /* First try to decide what to do without reference to lookahead token. */
4242 yyn = yypact[yystate];
4243 if (yyn == YYPACT_NINF)
4246 /* Not known => get a lookahead token if don't already have one. */
4248 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4249 if (yychar == YYEMPTY)
4251 YYDPRINTF ((stderr, "Reading a token: "));
4255 if (yychar <= YYEOF)
4257 yychar = yytoken = YYEOF;
4258 YYDPRINTF ((stderr, "Now at end of input.\n"));
4262 yytoken = YYTRANSLATE (yychar);
4263 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4266 /* If the proper action on seeing token YYTOKEN is to reduce or to
4267 detect an error, take that action. */
4269 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4274 if (yyn == 0 || yyn == YYTABLE_NINF)
4280 /* Count tokens shifted since error; after three, turn off error
4285 /* Shift the lookahead token. */
4286 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4288 /* Discard the shifted token. */
4297 /*-----------------------------------------------------------.
4298 | yydefault -- do the default action for the current state. |
4299 `-----------------------------------------------------------*/
4301 yyn = yydefact[yystate];
4307 /*-----------------------------.
4308 | yyreduce -- Do a reduction. |
4309 `-----------------------------*/
4311 /* yyn is the number of a rule to reduce with. */
4314 /* If YYLEN is nonzero, implement the default value of the action:
4317 Otherwise, the following line sets YYVAL to garbage.
4318 This behavior is undocumented and Bison
4319 users should not rely upon it. Assigning to YYVAL
4320 unconditionally makes the parser a bit smaller, and it avoids a
4321 GCC warning that YYVAL may be used uninitialized. */
4322 yyval = yyvsp[1-yylen];
4325 YY_REDUCE_PRINT (yyn);
4332 /* Line 1464 of skeleton.m4 */
4333 #line 2092 "parser.y"
4334 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4343 /* Line 1464 of skeleton.m4 */
4344 #line 2093 "parser.y"
4345 {(yyval.code)=code_new();}
4354 /* Line 1464 of skeleton.m4 */
4355 #line 2095 "parser.y"
4356 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4365 /* Line 1464 of skeleton.m4 */
4366 #line 2096 "parser.y"
4367 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4376 /* Line 1464 of skeleton.m4 */
4377 #line 2111 "parser.y"
4378 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4387 /* Line 1464 of skeleton.m4 */
4388 #line 2112 "parser.y"
4398 /* Line 1464 of skeleton.m4 */
4399 #line 2115 "parser.y"
4409 /* Line 1464 of skeleton.m4 */
4410 #line 2122 "parser.y"
4411 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4420 /* Line 1464 of skeleton.m4 */
4421 #line 2126 "parser.y"
4422 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4431 /* Line 1464 of skeleton.m4 */
4432 #line 2127 "parser.y"
4433 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4442 /* Line 1464 of skeleton.m4 */
4443 #line 2131 "parser.y"
4445 code_t**cc = &global->init->method->body->code;
4446 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4456 /* Line 1464 of skeleton.m4 */
4457 #line 2142 "parser.y"
4458 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4467 /* Line 1464 of skeleton.m4 */
4468 #line 2143 "parser.y"
4469 {(yyval.value).c=abc_pushundefined(0);
4470 (yyval.value).t=TYPE_ANY;
4480 /* Line 1464 of skeleton.m4 */
4481 #line 2147 "parser.y"
4482 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4491 /* Line 1464 of skeleton.m4 */
4492 #line 2148 "parser.y"
4493 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4502 /* Line 1464 of skeleton.m4 */
4503 #line 2150 "parser.y"
4504 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4513 /* Line 1464 of skeleton.m4 */
4514 #line 2151 "parser.y"
4515 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4524 /* Line 1464 of skeleton.m4 */
4525 #line 2154 "parser.y"
4528 if(variable_exists((yyvsp[(1) - (3)].id)))
4529 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4531 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4534 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4535 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4536 (yyvsp[(2) - (3)].classinfo)->name);
4541 if(state->method->uses_slots) {
4542 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4544 // this variable is stored in a slot
4546 v->type = (yyvsp[(2) - (3)].classinfo);
4552 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4555 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4557 if((yyvsp[(2) - (3)].classinfo)) {
4558 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4559 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4560 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4562 code_free((yyvsp[(3) - (3)].value).c);
4563 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4566 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4567 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4568 (yyval.code) = abc_coerce_a((yyval.code));
4570 // don't do anything
4571 code_free((yyvsp[(3) - (3)].value).c);
4572 code_free((yyval.code));
4578 (yyval.code) = abc_setslot((yyval.code), index);
4580 (yyval.code) = abc_setlocal((yyval.code), index);
4591 /* Line 1464 of skeleton.m4 */
4592 #line 2214 "parser.y"
4593 {(yyval.code) = code_new();}
4602 /* Line 1464 of skeleton.m4 */
4603 #line 2215 "parser.y"
4604 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4613 /* Line 1464 of skeleton.m4 */
4614 #line 2218 "parser.y"
4615 {PASS12 new_state();}
4624 /* Line 1464 of skeleton.m4 */
4625 #line 2218 "parser.y"
4628 (yyval.code) = code_new();
4629 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4630 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4632 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4633 if((yyvsp[(7) - (7)].code)) {
4634 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4636 myif->branch = (yyval.code) = abc_nop((yyval.code));
4637 if((yyvsp[(7) - (7)].code)) {
4638 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4639 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4641 (yyval.code) = var_block((yyval.code));
4652 /* Line 1464 of skeleton.m4 */
4653 #line 2237 "parser.y"
4654 {(yyval.code)=code_new();}
4663 /* Line 1464 of skeleton.m4 */
4664 #line 2244 "parser.y"
4666 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4667 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4677 /* Line 1464 of skeleton.m4 */
4678 #line 2248 "parser.y"
4681 (yyval.id)=(yyvsp[(1) - (1)].id);
4691 /* Line 1464 of skeleton.m4 */
4692 #line 2253 "parser.y"
4693 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4702 /* Line 1464 of skeleton.m4 */
4703 #line 2254 "parser.y"
4704 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4713 /* Line 1464 of skeleton.m4 */
4714 #line 2256 "parser.y"
4716 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4717 (yyval.code) = code_new();
4718 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4719 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4720 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4721 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4722 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4723 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4724 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4725 (yyval.code) = abc_jump((yyval.code), loopstart);
4726 code_t*out = (yyval.code) = abc_nop((yyval.code));
4727 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4728 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4731 (yyval.code) = var_block((yyval.code));
4742 /* Line 1464 of skeleton.m4 */
4743 #line 2276 "parser.y"
4745 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4747 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4750 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4751 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4752 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4753 int array = new_variable(tmp1name, 0, 0, 0);
4755 (yyval.code) = code_new();
4756 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4757 (yyval.code) = abc_coerce_a((yyval.code));
4758 (yyval.code) = abc_setlocal((yyval.code), array);
4759 (yyval.code) = abc_pushbyte((yyval.code), 0);
4760 (yyval.code) = abc_setlocal((yyval.code), it);
4762 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4764 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4765 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4766 (yyval.code) = abc_getlocal((yyval.code), array);
4767 (yyval.code) = abc_getlocal((yyval.code), it);
4768 if(!(yyvsp[(1) - (6)].for_start).each)
4769 (yyval.code) = abc_nextname((yyval.code));
4771 (yyval.code) = abc_nextvalue((yyval.code));
4772 (yyval.code) = converttype((yyval.code), 0, var->type);
4773 (yyval.code) = abc_setlocal((yyval.code), var->index);
4775 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4776 (yyval.code) = abc_jump((yyval.code), loopstart);
4778 code_t*out = (yyval.code) = abc_nop((yyval.code));
4779 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4780 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4784 (yyval.code) = var_block((yyval.code));
4799 /* Line 1464 of skeleton.m4 */
4800 #line 2324 "parser.y"
4801 {PASS12 new_state();}
4810 /* Line 1464 of skeleton.m4 */
4811 #line 2324 "parser.y"
4814 (yyval.code) = code_new();
4816 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4817 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4818 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4819 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4820 myjmp->branch = cont;
4821 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4822 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4823 code_t*out = (yyval.code) = abc_nop((yyval.code));
4824 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4825 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4827 (yyval.code) = var_block((yyval.code));
4838 /* Line 1464 of skeleton.m4 */
4839 #line 2343 "parser.y"
4840 {PASS12 new_state();}
4849 /* Line 1464 of skeleton.m4 */
4850 #line 2343 "parser.y"
4852 (yyval.code) = code_new();
4853 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4854 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4855 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4856 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4857 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4858 code_t*out = (yyval.code) = abc_nop((yyval.code));
4859 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4860 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4862 (yyval.code) = var_block((yyval.code));
4873 /* Line 1464 of skeleton.m4 */
4874 #line 2358 "parser.y"
4876 (yyval.code) = abc___break__(0, "");
4886 /* Line 1464 of skeleton.m4 */
4887 #line 2361 "parser.y"
4889 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4899 /* Line 1464 of skeleton.m4 */
4900 #line 2364 "parser.y"
4902 (yyval.code) = abc___continue__(0, "");
4912 /* Line 1464 of skeleton.m4 */
4913 #line 2367 "parser.y"
4915 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4925 /* Line 1464 of skeleton.m4 */
4926 #line 2371 "parser.y"
4936 /* Line 1464 of skeleton.m4 */
4937 #line 2372 "parser.y"
4938 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4947 /* Line 1464 of skeleton.m4 */
4948 #line 2373 "parser.y"
4949 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4958 /* Line 1464 of skeleton.m4 */
4959 #line 2374 "parser.y"
4960 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4969 /* Line 1464 of skeleton.m4 */
4970 #line 2375 "parser.y"
4971 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4980 /* Line 1464 of skeleton.m4 */
4981 #line 2376 "parser.y"
4982 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4991 /* Line 1464 of skeleton.m4 */
4992 #line 2378 "parser.y"
4994 (yyval.code) = abc_dup(0);
4995 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4996 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4997 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4998 if((yyval.code)->opcode != OPCODE___BREAK__) {
4999 (yyval.code) = abc___fallthrough__((yyval.code), "");
5001 code_t*e = (yyval.code) = abc_nop((yyval.code));
5012 /* Line 1464 of skeleton.m4 */
5013 #line 2389 "parser.y"
5015 (yyval.code) = (yyvsp[(3) - (3)].code);
5025 /* Line 1464 of skeleton.m4 */
5026 #line 2392 "parser.y"
5027 {PASS12 new_state();}
5036 /* Line 1464 of skeleton.m4 */
5037 #line 2392 "parser.y"
5039 (yyval.code)=(yyvsp[(4) - (8)].value).c;
5040 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5041 code_t*out = (yyval.code) = abc_pop((yyval.code));
5042 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5044 code_t*c = (yyval.code),*lastblock=0;
5046 if(c->opcode == OPCODE_IFNE) {
5047 if(!c->next) syntaxerror("internal error in fallthrough handling");
5049 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5051 c->opcode = OPCODE_JUMP;
5052 c->branch = lastblock;
5054 /* fall through end of switch */
5055 c->opcode = OPCODE_NOP;
5061 (yyval.code) = var_block((yyval.code));
5072 /* Line 1464 of skeleton.m4 */
5073 #line 2421 "parser.y"
5074 {PASS12 new_state();
5075 state->exception_name=(yyvsp[(3) - (5)].id);
5076 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5077 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5087 /* Line 1464 of skeleton.m4 */
5088 #line 2426 "parser.y"
5090 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5091 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5093 NEW(abc_exception_t, e)
5094 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5095 e->var_name = multiname_clone(&name);
5096 (yyval.exception) = e;
5099 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5100 e->target = c = abc_nop(0);
5101 c = abc_setlocal(c, i);
5102 c = code_append(c, code_dup(state->method->scope_code));
5103 c = code_append(c, (yyvsp[(8) - (9)].code));
5117 /* Line 1464 of skeleton.m4 */
5118 #line 2446 "parser.y"
5119 {PASS12 new_state();state->exception_name=0;}
5128 /* Line 1464 of skeleton.m4 */
5129 #line 2446 "parser.y"
5131 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5132 if(!(yyvsp[(4) - (5)].code)) {
5133 (yyval.exception)=0;
5135 NEW(abc_exception_t, e)
5136 e->exc_type = 0; //all exceptions
5137 e->var_name = 0; //no name
5140 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5141 (yyval.exception) = e;
5153 /* Line 1464 of skeleton.m4 */
5154 #line 2462 "parser.y"
5155 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5164 /* Line 1464 of skeleton.m4 */
5165 #line 2463 "parser.y"
5166 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5175 /* Line 1464 of skeleton.m4 */
5176 #line 2464 "parser.y"
5177 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5186 /* Line 1464 of skeleton.m4 */
5187 #line 2465 "parser.y"
5189 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5190 (yyval.catch_list).finally = 0;
5191 if((yyvsp[(2) - (2)].exception)) {
5192 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5193 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5204 /* Line 1464 of skeleton.m4 */
5205 #line 2473 "parser.y"
5207 (yyval.catch_list).l=list_new();
5208 (yyval.catch_list).finally = 0;
5209 if((yyvsp[(1) - (1)].exception)) {
5210 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5211 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5222 /* Line 1464 of skeleton.m4 */
5223 #line 2482 "parser.y"
5224 {PASS12 new_state();
5225 state->method->has_exceptions=1;
5226 state->method->late_binding=1;//for invariant scope_code
5236 /* Line 1464 of skeleton.m4 */
5237 #line 2485 "parser.y"
5239 code_t*out = abc_nop(0);
5241 code_t*start = abc_nop(0);
5242 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5243 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5244 (yyval.code) = abc_jump((yyval.code), out);
5246 code_t*end = (yyval.code) = abc_nop((yyval.code));
5249 if((yyvsp[(6) - (6)].catch_list).finally)
5250 tmp = new_variable("__finally__", 0, 0, 0);
5252 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5255 abc_exception_t*e = l->abc_exception;
5257 (yyval.code) = code_append((yyval.code), e->target);
5258 (yyval.code) = abc_jump((yyval.code), out);
5260 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5262 e->target = (yyval.code) = abc_nop((yyval.code));
5263 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5264 (yyval.code) = abc___rethrow__((yyval.code));
5272 (yyval.code) = code_append((yyval.code), out);
5274 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5276 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5278 (yyval.code) = var_block((yyval.code));
5289 /* Line 1464 of skeleton.m4 */
5290 #line 2531 "parser.y"
5292 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5293 (yyval.code)=abc_throw((yyval.code));
5303 /* Line 1464 of skeleton.m4 */
5304 #line 2535 "parser.y"
5306 if(!state->exception_name)
5307 syntaxerror("re-throw only possible within a catch block");
5308 variable_t*v = find_variable(state, state->exception_name);
5309 (yyval.code)=code_new();
5310 (yyval.code)=abc_getlocal((yyval.code), v->index);
5311 (yyval.code)=abc_throw((yyval.code));
5321 /* Line 1464 of skeleton.m4 */
5322 #line 2546 "parser.y"
5325 if(state->method->has_exceptions) {
5327 sprintf(var, "#with#_%d", as3_tokencount);
5328 int v = new_variable(var,(yyvsp[(3) - (4)].value).t,0,0);
5329 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5330 state->method->scope_code = abc_pushwith(state->method->scope_code);
5331 (yyval.value_list).number = v;
5333 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5343 /* Line 1464 of skeleton.m4 */
5344 #line 2558 "parser.y"
5346 /* remove getlocal;pushwith from scope code again */
5347 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5349 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5350 if(state->method->has_exceptions) {
5351 (yyval.code) = abc_dup((yyval.code));
5352 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5354 (yyval.code) = abc_pushwith((yyval.code));
5355 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5356 (yyval.code) = abc_popscope((yyval.code));
5367 /* Line 1464 of skeleton.m4 */
5368 #line 2576 "parser.y"
5369 {PASS12 (yyval.id)="package";}
5378 /* Line 1464 of skeleton.m4 */
5379 #line 2578 "parser.y"
5380 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5389 /* Line 1464 of skeleton.m4 */
5390 #line 2579 "parser.y"
5391 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5400 /* Line 1464 of skeleton.m4 */
5401 #line 2581 "parser.y"
5402 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5411 /* Line 1464 of skeleton.m4 */
5412 #line 2582 "parser.y"
5413 {PASS12 endpackage();(yyval.code)=0;}
5422 /* Line 1464 of skeleton.m4 */
5423 #line 2583 "parser.y"
5424 {PASS12 startpackage("");}
5433 /* Line 1464 of skeleton.m4 */
5434 #line 2584 "parser.y"
5435 {PASS12 endpackage();(yyval.code)=0;}
5444 /* Line 1464 of skeleton.m4 */
5445 #line 2586 "parser.y"
5448 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5449 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5450 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5454 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5456 syntaxerror("Couldn't import class\n");
5457 state_has_imports();
5458 dict_put(state->imports, c->name, c);
5459 import_toplevel(c->package);
5470 /* Line 1464 of skeleton.m4 */
5471 #line 2602 "parser.y"
5474 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5475 as3_schedule_package((yyvsp[(2) - (4)].id));
5480 i->package = (yyvsp[(2) - (4)].id);
5481 state_has_imports();
5482 list_append(state->wildcard_imports, i);
5483 import_toplevel(i->package);
5494 /* Line 1464 of skeleton.m4 */
5495 #line 2619 "parser.y"
5496 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5505 /* Line 1464 of skeleton.m4 */
5506 #line 2620 "parser.y"
5507 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5516 /* Line 1464 of skeleton.m4 */
5517 #line 2621 "parser.y"
5518 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5527 /* Line 1464 of skeleton.m4 */
5528 #line 2622 "parser.y"
5531 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5532 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5533 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5544 /* Line 1464 of skeleton.m4 */
5545 #line 2630 "parser.y"
5546 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5555 /* Line 1464 of skeleton.m4 */
5556 #line 2631 "parser.y"
5557 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5566 /* Line 1464 of skeleton.m4 */
5567 #line 2632 "parser.y"
5568 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5577 /* Line 1464 of skeleton.m4 */
5578 #line 2633 "parser.y"
5579 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5588 /* Line 1464 of skeleton.m4 */
5589 #line 2634 "parser.y"
5590 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5599 /* Line 1464 of skeleton.m4 */
5600 #line 2635 "parser.y"
5601 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5610 /* Line 1464 of skeleton.m4 */
5611 #line 2636 "parser.y"
5612 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5621 /* Line 1464 of skeleton.m4 */
5622 #line 2637 "parser.y"
5623 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5632 /* Line 1464 of skeleton.m4 */
5633 #line 2638 "parser.y"
5634 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5643 /* Line 1464 of skeleton.m4 */
5644 #line 2639 "parser.y"
5645 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5646 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5656 /* Line 1464 of skeleton.m4 */
5657 #line 2643 "parser.y"
5658 {PASS12 (yyval.classinfo)=0;}
5667 /* Line 1464 of skeleton.m4 */
5668 #line 2644 "parser.y"
5669 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5678 /* Line 1464 of skeleton.m4 */
5679 #line 2646 "parser.y"
5680 {PASS12 (yyval.classinfo_list)=list_new();}
5689 /* Line 1464 of skeleton.m4 */
5690 #line 2647 "parser.y"
5691 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5700 /* Line 1464 of skeleton.m4 */
5701 #line 2649 "parser.y"
5702 {PASS12 (yyval.classinfo_list)=list_new();}
5711 /* Line 1464 of skeleton.m4 */
5712 #line 2650 "parser.y"
5713 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5722 /* Line 1464 of skeleton.m4 */
5723 #line 2654 "parser.y"
5724 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5733 /* Line 1464 of skeleton.m4 */
5734 #line 2656 "parser.y"
5735 {PASS12 endclass();(yyval.code)=0;}
5744 /* Line 1464 of skeleton.m4 */
5745 #line 2660 "parser.y"
5746 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5747 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5756 /* Line 1464 of skeleton.m4 */
5757 #line 2663 "parser.y"
5758 {PASS12 endclass();(yyval.code)=0;}
5767 /* Line 1464 of skeleton.m4 */
5768 #line 2676 "parser.y"
5770 code_t*c = state->cls->static_init->header;
5771 c = code_append(c, (yyvsp[(1) - (1)].code));
5772 state->cls->static_init->header = c;
5782 /* Line 1464 of skeleton.m4 */
5783 #line 2687 "parser.y"
5785 syntaxerror("variable declarations not allowed in interfaces");
5795 /* Line 1464 of skeleton.m4 */
5796 #line 2690 "parser.y"
5799 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5800 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5801 syntaxerror("invalid method modifiers: interface methods always need to be public");
5803 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5804 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5805 list_deep_free((yyvsp[(6) - (8)].params).list);
5815 /* Line 1464 of skeleton.m4 */
5816 #line 2705 "parser.y"
5817 {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5826 /* Line 1464 of skeleton.m4 */
5827 #line 2705 "parser.y"
5828 {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5837 /* Line 1464 of skeleton.m4 */
5838 #line 2707 "parser.y"
5839 {(yyval.code) = (yyvsp[(1) - (1)].code);}
5848 /* Line 1464 of skeleton.m4 */
5849 #line 2708 "parser.y"
5850 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
5859 /* Line 1464 of skeleton.m4 */
5860 #line 2711 "parser.y"
5862 int flags = slotstate_flags->flags;
5863 namespace_t ns = modifiers2access(slotstate_flags);
5865 varinfo_t* info = 0;
5867 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5869 check_override(i, flags);
5871 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5873 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5875 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5877 if(ns.name && ns.name[0]) {
5878 syntaxerror("namespaces not allowed on package-level variables");
5880 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5883 info->type = (yyvsp[(2) - (3)].classinfo);
5884 info->flags = flags;
5887 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5889 trait_list_t**traits;
5893 ns.name = state->package;
5894 traits = &global->init->traits;
5895 code = &global->init->method->body->code;
5896 } else if(flags&FLAG_STATIC) {
5898 traits = &state->cls->abc->static_traits;
5899 code = &state->cls->static_init->header;
5901 // instance variable
5902 traits = &state->cls->abc->traits;
5903 code = &state->cls->init->header;
5907 if((yyvsp[(2) - (3)].classinfo)) {
5908 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5909 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5911 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5913 info->slot = t->slot_id;
5915 /* initalization code (if needed) */
5917 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5918 c = abc_getlocal_0(c);
5919 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5920 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5921 c = abc_setslot(c, t->slot_id);
5924 *code = code_append(*code, c);
5926 if(slotstate_varconst==KW_CONST) {
5927 t->kind= TRAIT_CONST;
5940 /* Line 1464 of skeleton.m4 */
5941 #line 2785 "parser.y"
5942 {(yyval.constant)=0;}
5951 /* Line 1464 of skeleton.m4 */
5952 #line 2786 "parser.y"
5953 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5962 /* Line 1464 of skeleton.m4 */
5963 #line 2788 "parser.y"
5964 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5973 /* Line 1464 of skeleton.m4 */
5974 #line 2789 "parser.y"
5975 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5984 /* Line 1464 of skeleton.m4 */
5985 #line 2790 "parser.y"
5986 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5995 /* Line 1464 of skeleton.m4 */
5996 #line 2791 "parser.y"
5997 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6006 /* Line 1464 of skeleton.m4 */
6007 #line 2792 "parser.y"
6008 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6017 /* Line 1464 of skeleton.m4 */
6018 #line 2794 "parser.y"
6019 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6028 /* Line 1464 of skeleton.m4 */
6029 #line 2795 "parser.y"
6030 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6039 /* Line 1464 of skeleton.m4 */
6040 #line 2796 "parser.y"
6041 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6050 /* Line 1464 of skeleton.m4 */
6051 #line 2797 "parser.y"
6053 if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
6054 (yyval.constant) = constant_new_float(__builtin_nan(""));
6056 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
6057 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
6068 /* Line 1464 of skeleton.m4 */
6069 #line 2809 "parser.y"
6072 memset(&(yyval.params),0,sizeof((yyval.params)));
6082 /* Line 1464 of skeleton.m4 */
6083 #line 2813 "parser.y"
6086 (yyval.params)=(yyvsp[(1) - (1)].params);
6096 /* Line 1464 of skeleton.m4 */
6097 #line 2819 "parser.y"
6100 memset(&(yyval.params),0,sizeof((yyval.params)));
6101 (yyval.params).varargs=1;
6102 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6112 /* Line 1464 of skeleton.m4 */
6113 #line 2825 "parser.y"
6116 (yyval.params) =(yyvsp[(1) - (4)].params);
6117 (yyval.params).varargs=1;
6118 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6128 /* Line 1464 of skeleton.m4 */
6129 #line 2833 "parser.y"
6132 (yyval.params) = (yyvsp[(1) - (3)].params);
6133 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6143 /* Line 1464 of skeleton.m4 */
6144 #line 2838 "parser.y"
6147 memset(&(yyval.params),0,sizeof((yyval.params)));
6148 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6158 /* Line 1464 of skeleton.m4 */
6159 #line 2844 "parser.y"
6162 (yyval.param) = rfx_calloc(sizeof(param_t));
6163 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6164 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6166 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6176 /* Line 1464 of skeleton.m4 */
6177 #line 2852 "parser.y"
6180 (yyval.param) = rfx_calloc(sizeof(param_t));
6181 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6182 (yyval.param)->type = TYPE_ANY;
6184 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6194 /* Line 1464 of skeleton.m4 */
6195 #line 2862 "parser.y"
6196 {PASS12 (yyval.token)=0;}
6205 /* Line 1464 of skeleton.m4 */
6206 #line 2865 "parser.y"
6207 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6216 /* Line 1464 of skeleton.m4 */
6217 #line 2866 "parser.y"
6220 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6222 if(!state->method->info) syntaxerror("internal error");
6224 code_t*c = method_header(state->method);
6225 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6227 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6229 list_deep_free((yyvsp[(6) - (12)].params).list);
6240 /* Line 1464 of skeleton.m4 */
6241 #line 2882 "parser.y"
6242 {PASS12 (yyval.id)=0;}
6251 /* Line 1464 of skeleton.m4 */
6252 #line 2884 "parser.y"
6253 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6262 /* Line 1464 of skeleton.m4 */
6263 #line 2885 "parser.y"
6266 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6268 methodinfo_t*f = state->method->info;
6269 if(!f || !f->kind) syntaxerror("internal error");
6271 code_t*c = method_header(state->method);
6272 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6274 int index = state->method->var_index;
6275 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6277 (yyval.value).c = abc_getlocal(0, index);
6278 (yyval.value).t = TYPE_FUNCTION(f);
6280 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6290 /* Line 1464 of skeleton.m4 */
6291 #line 2907 "parser.y"
6293 PASS1 NEW(unresolvedinfo_t,c);
6294 memset(c, 0, sizeof(*c));
6295 c->kind = INFOTYPE_UNRESOLVED;
6296 c->name = (yyvsp[(1) - (1)].id);
6297 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6299 c->nsset = get_current_imports();
6300 /* make the compiler look for this class in the current directory,
6302 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6304 (yyval.classinfo) = (classinfo_t*)c;
6306 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6307 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6308 (yyval.classinfo) = (classinfo_t*)s;
6318 /* Line 1464 of skeleton.m4 */
6319 #line 2926 "parser.y"
6321 PASS1 NEW(unresolvedinfo_t,c);
6322 memset(c, 0, sizeof(*c));
6323 c->kind = INFOTYPE_UNRESOLVED;
6324 c->package = (yyvsp[(1) - (3)].id);
6325 c->name = (yyvsp[(3) - (3)].id);
6326 (yyval.classinfo) = (classinfo_t*)c;
6328 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6329 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6330 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6331 (yyval.classinfo) = (classinfo_t*)s;
6341 /* Line 1464 of skeleton.m4 */
6342 #line 2943 "parser.y"
6343 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6352 /* Line 1464 of skeleton.m4 */
6353 #line 2944 "parser.y"
6354 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6363 /* Line 1464 of skeleton.m4 */
6364 #line 2946 "parser.y"
6365 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6374 /* Line 1464 of skeleton.m4 */
6375 #line 2947 "parser.y"
6376 {PASS12 (yyval.classinfo)=registry_getanytype();}
6385 /* Line 1464 of skeleton.m4 */
6386 #line 2948 "parser.y"
6387 {PASS12 (yyval.classinfo)=registry_getanytype();}
6396 /* Line 1464 of skeleton.m4 */
6397 #line 2957 "parser.y"
6398 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6407 /* Line 1464 of skeleton.m4 */
6408 #line 2958 "parser.y"
6409 {PASS12 (yyval.classinfo)=0;}
6418 /* Line 1464 of skeleton.m4 */
6419 #line 2962 "parser.y"
6420 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6429 /* Line 1464 of skeleton.m4 */
6430 #line 2963 "parser.y"
6431 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6440 /* Line 1464 of skeleton.m4 */
6441 #line 2965 "parser.y"
6442 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6451 /* Line 1464 of skeleton.m4 */
6452 #line 2969 "parser.y"
6453 {(yyval.value_list).number=1;
6454 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6464 /* Line 1464 of skeleton.m4 */
6465 #line 2973 "parser.y"
6466 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6475 /* Line 1464 of skeleton.m4 */
6476 #line 2974 "parser.y"
6478 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6479 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6489 /* Line 1464 of skeleton.m4 */
6490 #line 2980 "parser.y"
6492 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6493 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6495 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6496 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6497 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6498 (yyval.value).c = code_cutlast((yyval.value).c);
6499 (yyval.value).c = code_append((yyval.value).c, paramcode);
6500 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6501 multiname_destroy(name);
6502 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6503 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6504 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6505 multiname_t*name = t->name;
6506 (yyval.value).c = code_cutlast((yyval.value).c);
6507 (yyval.value).c = code_append((yyval.value).c, paramcode);
6508 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6510 (yyval.value).c = code_append((yyval.value).c, paramcode);
6511 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6514 (yyval.value).t = TYPE_ANY;
6515 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6516 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6518 (yyval.value).c = abc_coerce_a((yyval.value).c);
6519 (yyval.value).t = TYPE_ANY;
6530 /* Line 1464 of skeleton.m4 */
6531 #line 3016 "parser.y"
6534 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6535 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6536 (yyval.value).c = code_cutlast((yyval.value).c);
6538 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6540 (yyval.value).t = TYPE_ANY;
6541 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6542 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6543 (yyval.value).c = code_cutlast((yyval.value).c);
6544 (yyval.value).c = code_append((yyval.value).c, paramcode);
6545 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6546 multiname_destroy(name);
6547 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6548 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6549 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6550 if(t->kind!=TRAIT_METHOD) {
6551 //ok: flash allows to assign closures to members.
6553 multiname_t*name = t->name;
6554 (yyval.value).c = code_cutlast((yyval.value).c);
6555 (yyval.value).c = code_append((yyval.value).c, paramcode);
6556 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6557 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6558 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6559 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6560 (yyval.value).c = code_cutlast((yyval.value).c);
6561 (yyval.value).c = code_append((yyval.value).c, paramcode);
6562 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6563 multiname_destroy(name);
6565 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6566 (yyval.value).c = code_append((yyval.value).c, paramcode);
6567 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6570 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6571 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6573 (yyval.value).c = abc_coerce_a((yyval.value).c);
6574 (yyval.value).t = TYPE_ANY;
6585 /* Line 1464 of skeleton.m4 */
6586 #line 3062 "parser.y"
6588 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6589 if(!state->method) syntaxerror("super() not allowed outside of a function");
6590 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6592 (yyval.value).c = code_new();
6593 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6595 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6597 this is dependent on the control path, check this somewhere else
6598 if(state->method->has_super)
6599 syntaxerror("constructor may call super() only once");
6601 state->method->has_super = 1;
6603 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6604 (yyval.value).c = abc_pushundefined((yyval.value).c);
6605 (yyval.value).t = TYPE_ANY;
6615 /* Line 1464 of skeleton.m4 */
6616 #line 3083 "parser.y"
6618 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6619 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6620 (yyval.value).c = code_cutlast((yyval.value).c);
6622 multiname_t*name = 0;
6623 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6624 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6625 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6626 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6627 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6628 (yyval.value).c = code_cutlast((yyval.value).c);
6629 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6631 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6632 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6633 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6635 (yyval.value).t = TYPE_BOOLEAN;
6645 /* Line 1464 of skeleton.m4 */
6646 #line 3104 "parser.y"
6648 (yyval.code) = abc_returnvoid(0);
6658 /* Line 1464 of skeleton.m4 */
6659 #line 3107 "parser.y"
6661 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6662 (yyval.code) = abc_returnvalue((yyval.code));
6672 /* Line 1464 of skeleton.m4 */
6673 #line 3114 "parser.y"
6674 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6683 /* Line 1464 of skeleton.m4 */
6684 #line 3115 "parser.y"
6685 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6694 /* Line 1464 of skeleton.m4 */
6695 #line 3116 "parser.y"
6697 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6698 (yyval.value).c = cut_last_push((yyval.value).c);
6699 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6700 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6710 /* Line 1464 of skeleton.m4 */
6711 #line 3122 "parser.y"
6713 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6723 /* Line 1464 of skeleton.m4 */
6724 #line 3128 "parser.y"
6725 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6734 /* Line 1464 of skeleton.m4 */
6735 #line 3132 "parser.y"
6736 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6745 /* Line 1464 of skeleton.m4 */
6746 #line 3134 "parser.y"
6747 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6756 /* Line 1464 of skeleton.m4 */
6757 #line 3136 "parser.y"
6758 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6767 /* Line 1464 of skeleton.m4 */
6768 #line 3140 "parser.y"
6770 (yyval.value).c = 0;
6771 namespace_t ns = {ACCESS_PACKAGE, ""};
6772 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6773 if(!(yyvsp[(1) - (1)].regexp).options) {
6774 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6775 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6776 (yyval.value).c = abc_construct((yyval.value).c, 1);
6778 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6779 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6780 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6781 (yyval.value).c = abc_construct((yyval.value).c, 2);
6783 (yyval.value).t = TYPE_REGEXP;
6793 /* Line 1464 of skeleton.m4 */
6794 #line 3157 "parser.y"
6795 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6796 //MULTINAME(m, registry_getintclass());
6797 //$$.c = abc_coerce2($$.c, &m); // FIXME
6798 (yyval.value).t = TYPE_INT;
6808 /* Line 1464 of skeleton.m4 */
6809 #line 3162 "parser.y"
6810 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6811 (yyval.value).t = TYPE_INT;
6821 /* Line 1464 of skeleton.m4 */
6822 #line 3165 "parser.y"
6823 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6824 (yyval.value).t = TYPE_INT;
6834 /* Line 1464 of skeleton.m4 */
6835 #line 3168 "parser.y"
6836 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6837 (yyval.value).t = TYPE_UINT;
6847 /* Line 1464 of skeleton.m4 */
6848 #line 3171 "parser.y"
6849 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6850 (yyval.value).t = TYPE_FLOAT;
6860 /* Line 1464 of skeleton.m4 */
6861 #line 3174 "parser.y"
6862 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6863 (yyval.value).t = TYPE_STRING;
6873 /* Line 1464 of skeleton.m4 */
6874 #line 3177 "parser.y"
6875 {(yyval.value).c = abc_pushundefined(0);
6876 (yyval.value).t = TYPE_ANY;
6886 /* Line 1464 of skeleton.m4 */
6887 #line 3180 "parser.y"
6888 {(yyval.value).c = abc_pushtrue(0);
6889 (yyval.value).t = TYPE_BOOLEAN;
6899 /* Line 1464 of skeleton.m4 */
6900 #line 3183 "parser.y"
6901 {(yyval.value).c = abc_pushfalse(0);
6902 (yyval.value).t = TYPE_BOOLEAN;
6912 /* Line 1464 of skeleton.m4 */
6913 #line 3186 "parser.y"
6914 {(yyval.value).c = abc_pushnull(0);
6915 (yyval.value).t = TYPE_NULL;
6925 /* Line 1464 of skeleton.m4 */
6926 #line 3190 "parser.y"
6927 {(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);
6928 (yyval.value).t = TYPE_BOOLEAN;
6938 /* Line 1464 of skeleton.m4 */
6939 #line 3193 "parser.y"
6940 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6941 (yyval.value).t = TYPE_BOOLEAN;
6951 /* Line 1464 of skeleton.m4 */
6952 #line 3196 "parser.y"
6953 {(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);
6954 (yyval.value).t = TYPE_BOOLEAN;
6964 /* Line 1464 of skeleton.m4 */
6965 #line 3199 "parser.y"
6966 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6967 (yyval.value).t = TYPE_BOOLEAN;
6977 /* Line 1464 of skeleton.m4 */
6978 #line 3202 "parser.y"
6979 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6980 (yyval.value).t = TYPE_BOOLEAN;
6990 /* Line 1464 of skeleton.m4 */
6991 #line 3205 "parser.y"
6992 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6993 (yyval.value).t = TYPE_BOOLEAN;
7003 /* Line 1464 of skeleton.m4 */
7004 #line 3208 "parser.y"
7005 {(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);
7006 (yyval.value).t = TYPE_BOOLEAN;
7016 /* Line 1464 of skeleton.m4 */
7017 #line 3211 "parser.y"
7018 {(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);
7019 (yyval.value).t = TYPE_BOOLEAN;
7029 /* Line 1464 of skeleton.m4 */
7030 #line 3215 "parser.y"
7031 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
7032 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7033 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7034 (yyval.value).c = abc_dup((yyval.value).c);
7035 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
7036 (yyval.value).c = cut_last_push((yyval.value).c);
7037 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7038 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7039 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7040 jmp->branch = label;
7050 /* Line 1464 of skeleton.m4 */
7051 #line 3226 "parser.y"
7053 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
7054 /*printf("%08x:\n",$1.t);
7055 code_dump($1.c, 0, 0, "", stdout);
7056 printf("%08x:\n",$3.t);
7057 code_dump($3.c, 0, 0, "", stdout);
7058 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
7059 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7060 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7061 (yyval.value).c = abc_dup((yyval.value).c);
7062 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7063 (yyval.value).c = cut_last_push((yyval.value).c);
7064 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7065 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7066 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7067 jmp->branch = label;
7077 /* Line 1464 of skeleton.m4 */
7078 #line 3244 "parser.y"
7079 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7080 (yyval.value).c = abc_not((yyval.value).c);
7081 (yyval.value).t = TYPE_BOOLEAN;
7091 /* Line 1464 of skeleton.m4 */
7092 #line 3249 "parser.y"
7093 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7094 (yyval.value).c = abc_bitnot((yyval.value).c);
7095 (yyval.value).t = TYPE_INT;
7105 /* Line 1464 of skeleton.m4 */
7106 #line 3254 "parser.y"
7107 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7108 (yyval.value).c = abc_bitand((yyval.value).c);
7109 (yyval.value).t = TYPE_INT;
7119 /* Line 1464 of skeleton.m4 */
7120 #line 3259 "parser.y"
7121 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7122 (yyval.value).c = abc_bitxor((yyval.value).c);
7123 (yyval.value).t = TYPE_INT;
7133 /* Line 1464 of skeleton.m4 */
7134 #line 3264 "parser.y"
7135 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7136 (yyval.value).c = abc_bitor((yyval.value).c);
7137 (yyval.value).t = TYPE_INT;
7147 /* Line 1464 of skeleton.m4 */
7148 #line 3269 "parser.y"
7149 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7150 (yyval.value).c = abc_rshift((yyval.value).c);
7151 (yyval.value).t = TYPE_INT;
7161 /* Line 1464 of skeleton.m4 */
7162 #line 3273 "parser.y"
7163 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7164 (yyval.value).c = abc_urshift((yyval.value).c);
7165 (yyval.value).t = TYPE_INT;
7175 /* Line 1464 of skeleton.m4 */
7176 #line 3277 "parser.y"
7177 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7178 (yyval.value).c = abc_lshift((yyval.value).c);
7179 (yyval.value).t = TYPE_INT;
7189 /* Line 1464 of skeleton.m4 */
7190 #line 3282 "parser.y"
7191 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7192 (yyval.value).c = abc_divide((yyval.value).c);
7193 (yyval.value).t = TYPE_NUMBER;
7203 /* Line 1464 of skeleton.m4 */
7204 #line 3286 "parser.y"
7205 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7206 (yyval.value).c = abc_modulo((yyval.value).c);
7207 (yyval.value).t = TYPE_NUMBER;
7217 /* Line 1464 of skeleton.m4 */
7218 #line 3290 "parser.y"
7219 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7220 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7221 (yyval.value).c = abc_add_i((yyval.value).c);
7222 (yyval.value).t = TYPE_INT;
7224 (yyval.value).c = abc_add((yyval.value).c);
7225 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7236 /* Line 1464 of skeleton.m4 */
7237 #line 3299 "parser.y"
7238 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7239 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7240 (yyval.value).c = abc_subtract_i((yyval.value).c);
7241 (yyval.value).t = TYPE_INT;
7243 (yyval.value).c = abc_subtract((yyval.value).c);
7244 (yyval.value).t = TYPE_NUMBER;
7255 /* Line 1464 of skeleton.m4 */
7256 #line 3308 "parser.y"
7257 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7258 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7259 (yyval.value).c = abc_multiply_i((yyval.value).c);
7260 (yyval.value).t = TYPE_INT;
7262 (yyval.value).c = abc_multiply((yyval.value).c);
7263 (yyval.value).t = TYPE_NUMBER;
7274 /* Line 1464 of skeleton.m4 */
7275 #line 3318 "parser.y"
7276 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7277 (yyval.value).c = abc_in((yyval.value).c);
7278 (yyval.value).t = TYPE_BOOLEAN;
7288 /* Line 1464 of skeleton.m4 */
7289 #line 3323 "parser.y"
7290 {char use_astype=0; // flash player's astype works differently than astypelate
7291 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7292 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7293 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7294 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7296 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7297 (yyval.value).c = abc_astypelate((yyval.value).c);
7298 (yyval.value).t = TYPE_ANY;
7309 /* Line 1464 of skeleton.m4 */
7310 #line 3336 "parser.y"
7311 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7312 (yyval.value).c = abc_instanceof((yyval.value).c);
7313 (yyval.value).t = TYPE_BOOLEAN;
7323 /* Line 1464 of skeleton.m4 */
7324 #line 3341 "parser.y"
7325 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7326 (yyval.value).c = abc_istypelate((yyval.value).c);
7327 (yyval.value).t = TYPE_BOOLEAN;
7337 /* Line 1464 of skeleton.m4 */
7338 #line 3346 "parser.y"
7340 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7341 (yyval.value).c = abc_typeof((yyval.value).c);
7342 (yyval.value).t = TYPE_STRING;
7352 /* Line 1464 of skeleton.m4 */
7353 #line 3352 "parser.y"
7355 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7356 (yyval.value).c = abc_pushundefined((yyval.value).c);
7357 (yyval.value).t = TYPE_ANY;
7367 /* Line 1464 of skeleton.m4 */
7368 #line 3358 "parser.y"
7369 { (yyval.value).c = abc_pushundefined(0);
7370 (yyval.value).t = TYPE_ANY;
7380 /* Line 1464 of skeleton.m4 */
7381 #line 3362 "parser.y"
7382 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7391 /* Line 1464 of skeleton.m4 */
7392 #line 3364 "parser.y"
7394 (yyval.value)=(yyvsp[(2) - (2)].value);
7395 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7396 (yyval.value).c=abc_negate_i((yyval.value).c);
7397 (yyval.value).t = TYPE_INT;
7399 (yyval.value).c=abc_negate((yyval.value).c);
7400 (yyval.value).t = TYPE_NUMBER;
7411 /* Line 1464 of skeleton.m4 */
7412 #line 3375 "parser.y"
7414 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7415 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7417 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7418 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7419 (yyval.value).t = 0; // array elements have unknown type
7429 /* Line 1464 of skeleton.m4 */
7430 #line 3384 "parser.y"
7432 (yyval.value).c = code_new();
7433 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7434 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).number);
7435 (yyval.value).t = registry_getarrayclass();
7445 /* Line 1464 of skeleton.m4 */
7446 #line 3391 "parser.y"
7447 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7456 /* Line 1464 of skeleton.m4 */
7457 #line 3392 "parser.y"
7458 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7467 /* Line 1464 of skeleton.m4 */
7468 #line 3394 "parser.y"
7470 (yyval.value_list).cc = 0;
7471 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7472 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7473 (yyval.value_list).number = 2;
7483 /* Line 1464 of skeleton.m4 */
7484 #line 3400 "parser.y"
7486 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7487 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7488 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7489 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7499 /* Line 1464 of skeleton.m4 */
7500 #line 3409 "parser.y"
7502 (yyval.value).c = code_new();
7503 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7504 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).number/2);
7505 (yyval.value).t = registry_getobjectclass();
7515 /* Line 1464 of skeleton.m4 */
7516 #line 3416 "parser.y"
7518 code_t*c = (yyvsp[(3) - (3)].value).c;
7519 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7520 c=abc_multiply_i(c);
7524 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7525 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7526 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7536 /* Line 1464 of skeleton.m4 */
7537 #line 3428 "parser.y"
7539 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7540 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7541 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7542 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7552 /* Line 1464 of skeleton.m4 */
7553 #line 3434 "parser.y"
7555 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7556 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7557 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7558 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7568 /* Line 1464 of skeleton.m4 */
7569 #line 3440 "parser.y"
7571 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7572 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7573 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7574 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7584 /* Line 1464 of skeleton.m4 */
7585 #line 3446 "parser.y"
7587 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7588 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7589 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7590 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7600 /* Line 1464 of skeleton.m4 */
7601 #line 3452 "parser.y"
7603 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7604 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7605 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7606 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7616 /* Line 1464 of skeleton.m4 */
7617 #line 3458 "parser.y"
7619 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7620 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7621 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7622 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7632 /* Line 1464 of skeleton.m4 */
7633 #line 3464 "parser.y"
7635 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7636 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7637 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7638 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7648 /* Line 1464 of skeleton.m4 */
7649 #line 3470 "parser.y"
7651 code_t*c = (yyvsp[(3) - (3)].value).c;
7653 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7657 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7660 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7661 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7671 /* Line 1464 of skeleton.m4 */
7672 #line 3483 "parser.y"
7673 { code_t*c = (yyvsp[(3) - (3)].value).c;
7674 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7675 c=abc_subtract_i(c);
7678 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7681 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7682 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7692 /* Line 1464 of skeleton.m4 */
7693 #line 3494 "parser.y"
7695 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7696 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7697 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7698 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7708 /* Line 1464 of skeleton.m4 */
7709 #line 3501 "parser.y"
7711 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7712 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7713 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7714 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7715 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7716 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7717 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7718 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7719 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7720 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7730 /* Line 1464 of skeleton.m4 */
7731 #line 3514 "parser.y"
7733 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7734 if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) {
7735 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7736 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7737 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7738 (yyval.value).c = abc_getlocal(0, nr);
7739 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7740 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7741 (yyval.value).c = abc_getlocal(0, nr);
7742 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7743 } else syntaxerror("internal error");
7745 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7746 c=abc_increment_i(c);
7752 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7753 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7754 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7765 /* Line 1464 of skeleton.m4 */
7766 #line 3541 "parser.y"
7768 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7769 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7770 c=abc_decrement_i(c);
7776 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7777 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7778 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7788 /* Line 1464 of skeleton.m4 */
7789 #line 3555 "parser.y"
7791 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7792 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7793 c=abc_increment_i(c);
7799 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7800 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7801 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7811 /* Line 1464 of skeleton.m4 */
7812 #line 3569 "parser.y"
7814 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7815 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7816 c=abc_decrement_i(c);
7822 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7823 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7824 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7834 /* Line 1464 of skeleton.m4 */
7835 #line 3584 "parser.y"
7836 { if(!state->cls->info)
7837 syntaxerror("super keyword not allowed outside a class");
7838 classinfo_t*t = state->cls->info->superclass;
7839 if(!t) t = TYPE_OBJECT;
7841 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7843 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7844 (yyval.value).c = 0;
7845 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7846 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7847 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7857 /* Line 1464 of skeleton.m4 */
7858 #line 3598 "parser.y"
7861 (yyval.value).c = abc_pushundefined(0);
7862 (yyval.value).t = 0;
7863 as3_warning("ignored @ operator");
7873 /* Line 1464 of skeleton.m4 */
7874 #line 3605 "parser.y"
7876 // child attribute TODO
7877 (yyval.value).c = abc_pushundefined(0);
7878 (yyval.value).t = 0;
7879 as3_warning("ignored .@ operator");
7889 /* Line 1464 of skeleton.m4 */
7890 #line 3612 "parser.y"
7892 // namespace declaration TODO
7893 (yyval.value).c = abc_pushundefined(0);
7894 (yyval.value).t = 0;
7895 as3_warning("ignored :: operator");
7905 /* Line 1464 of skeleton.m4 */
7906 #line 3619 "parser.y"
7909 (yyval.value).c = abc_pushundefined(0);
7910 (yyval.value).t = 0;
7911 as3_warning("ignored .. operator");
7921 /* Line 1464 of skeleton.m4 */
7922 #line 3626 "parser.y"
7925 (yyval.value).c = abc_pushundefined(0);
7926 (yyval.value).t = 0;
7927 as3_warning("ignored .() operator");
7937 /* Line 1464 of skeleton.m4 */
7938 #line 3637 "parser.y"
7940 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7941 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7943 if(TYPE_IS_CLASS(t) && t->data) {
7948 if(t->subtype==INFOTYPE_UNRESOLVED) {
7949 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7951 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7953 if(f && !is_static != !(f->flags&FLAG_STATIC))
7955 if(f && f->slot && !noslot) {
7956 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7958 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7959 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7961 /* determine type */
7962 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7963 if(!(yyval.value).t)
7964 (yyval.value).c = abc_coerce_a((yyval.value).c);
7965 } else if((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
7966 string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
7967 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7968 if(dict_contains(state->import_toplevel_packages, package2)) {
7969 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7970 (yyval.value).c->data[0] = string_new4(package2);
7971 (yyval.value).t = 0;
7973 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7975 syntaxerror("couldn't resolve %s", package2);
7976 (yyval.value) = push_class(a);
7979 /* when resolving a property on an unknown type, we do know the
7980 name of the property (and don't seem to need the package), but
7981 we need to make avm2 try out all access modes */
7982 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7983 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7984 (yyval.value).c = abc_coerce_a((yyval.value).c);
7985 (yyval.value).t = registry_getanytype();
7996 /* Line 1464 of skeleton.m4 */
7997 #line 3687 "parser.y"
8000 /* Queue unresolved identifiers for checking against the parent
8001 function's variables.
8002 We consider everything which is not a local variable "unresolved".
8003 This encompasses class names, members of the surrounding class
8004 etc. which is *correct* because local variables of the parent function
8007 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
8008 unknown_variable((yyvsp[(1) - (1)].id));
8011 /* let the compiler know that it might check the current directory/package
8012 for this identifier- maybe there's a file $1.as defining $1. */
8013 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8016 (yyval.value).t = 0;
8017 (yyval.value).c = 0;
8022 /* look at variables */
8023 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
8024 // $1 is a local variable
8025 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
8026 (yyval.value).t = v->type;
8029 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
8030 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
8031 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
8032 (yyval.value).t = v->type;
8036 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
8038 /* look at current class' members */
8039 if(state->cls && (f = registry_findmember_nsset(state->cls->info, state->active_namespaces, (yyvsp[(1) - (1)].id), 1)) &&
8040 (f->flags&FLAG_STATIC) >= i_am_static) {
8041 // $1 is a function in this class
8042 int var_is_static = (f->flags&FLAG_STATIC);
8044 if(f->kind == INFOTYPE_METHOD) {
8045 (yyval.value).t = TYPE_FUNCTION(f);
8047 (yyval.value).t = f->type;
8049 if(var_is_static && !i_am_static) {
8050 /* access to a static member from a non-static location.
8051 do this via findpropstrict:
8052 there doesn't seem to be any non-lookup way to access
8053 static properties of a class */
8054 state->method->late_binding = 1;
8055 (yyval.value).t = f->type;
8056 namespace_t ns = {f->access, ""};
8057 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8058 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8059 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8061 } else if(f->slot>0) {
8062 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8063 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8066 namespace_t ns = {f->access, ""};
8067 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8068 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8069 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8074 /* look at actual classes, in the current package and imported */
8075 if((a = find_class((yyvsp[(1) - (1)].id)))) {
8076 (yyval.value) = push_class(a);
8080 /* look through package prefixes */
8081 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id))) {
8082 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
8083 (yyval.value).t = 0;
8087 /* unknown object, let the avm2 resolve it */
8089 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
8090 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
8091 state->method->late_binding = 1;
8093 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
8095 (yyval.value).t = 0;
8096 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8097 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8108 /* Line 1464 of skeleton.m4 */
8109 #line 3792 "parser.y"
8112 NEW(namespace_decl_t,n);
8113 n->name = (yyvsp[(2) - (2)].id);
8115 (yyval.namespace_decl)=n;
8125 /* Line 1464 of skeleton.m4 */
8126 #line 3799 "parser.y"
8129 NEW(namespace_decl_t,n);
8130 n->name = (yyvsp[(2) - (4)].id);
8131 n->url = (yyvsp[(4) - (4)].id);
8132 (yyval.namespace_decl)=n;
8142 /* Line 1464 of skeleton.m4 */
8143 #line 3806 "parser.y"
8146 NEW(namespace_decl_t,n);
8147 n->name = (yyvsp[(2) - (4)].id);
8148 n->url = (yyvsp[(4) - (4)].str).str;
8149 (yyval.namespace_decl)=n;
8159 /* Line 1464 of skeleton.m4 */
8160 #line 3813 "parser.y"
8163 list_append(state->new_namespaces, (yyvsp[(2) - (2)].namespace_decl));
8164 tokenizer_register_namespace((yyvsp[(2) - (2)].namespace_decl)->name);
8175 /* Line 1464 of skeleton.m4 */
8176 #line 3820 "parser.y"
8179 NEW(namespace_decl_t,n);
8180 n->name = (yyvsp[(3) - (3)].classinfo)->name;
8182 /* FIXME: for pass2, we should now try to figure out what the URL of
8184 list_append(state->new_namespaces, n);
8185 tokenizer_register_namespace((yyvsp[(3) - (3)].classinfo)->name);
8194 /* Line 1464 of skeleton.m4 */
8195 #line 8196 "parser.tab.c"
8198 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8202 YY_STACK_PRINT (yyss, yyssp);
8206 /* Now `shift' the result of the reduction. Determine what state
8207 that goes to, based on the state we popped back to and the rule
8208 number reduced by. */
8212 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8213 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8214 yystate = yytable[yystate];
8216 yystate = yydefgoto[yyn - YYNTOKENS];
8221 /*------------------------------------.
8222 | yyerrlab -- here on detecting error |
8223 `------------------------------------*/
8225 /* If not already recovering from an error, report this error. */
8229 #if ! YYERROR_VERBOSE
8230 yyerror (YY_("syntax error"));
8233 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8234 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8236 YYSIZE_T yyalloc = 2 * yysize;
8237 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8238 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8239 if (yymsg != yymsgbuf)
8240 YYSTACK_FREE (yymsg);
8241 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8243 yymsg_alloc = yyalloc;
8247 yymsg_alloc = sizeof yymsgbuf;
8251 if (0 < yysize && yysize <= yymsg_alloc)
8253 (void) yysyntax_error (yymsg, yystate, yychar);
8258 yyerror (YY_("syntax error"));
8260 goto yyexhaustedlab;
8268 if (yyerrstatus == 3)
8270 /* If just tried and failed to reuse lookahead token after an
8271 error, discard it. */
8273 if (yychar <= YYEOF)
8275 /* Return failure if at end of input. */
8276 if (yychar == YYEOF)
8281 yydestruct ("Error: discarding",
8287 /* Else will try to reuse lookahead token after shifting the error
8292 /*---------------------------------------------------.
8293 | yyerrorlab -- error raised explicitly by YYERROR. |
8294 `---------------------------------------------------*/
8297 /* Pacify compilers like GCC when the user code never invokes
8298 YYERROR and the label yyerrorlab therefore never appears in user
8300 if (/*CONSTCOND*/ 0)
8303 /* Do not reclaim the symbols of the rule which action triggered
8307 YY_STACK_PRINT (yyss, yyssp);
8312 /*-------------------------------------------------------------.
8313 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8314 `-------------------------------------------------------------*/
8316 yyerrstatus = 3; /* Each real token shifted decrements this. */
8320 yyn = yypact[yystate];
8321 if (yyn != YYPACT_NINF)
8324 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8332 /* Pop the current state because it cannot handle the error token. */
8337 yydestruct ("Error: popping",
8338 yystos[yystate], yyvsp);
8341 YY_STACK_PRINT (yyss, yyssp);
8347 /* Shift the error token. */
8348 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8354 /*-------------------------------------.
8355 | yyacceptlab -- YYACCEPT comes here. |
8356 `-------------------------------------*/
8361 /*-----------------------------------.
8362 | yyabortlab -- YYABORT comes here. |
8363 `-----------------------------------*/
8368 #if !defined(yyoverflow) || YYERROR_VERBOSE
8369 /*-------------------------------------------------.
8370 | yyexhaustedlab -- memory exhaustion comes here. |
8371 `-------------------------------------------------*/
8373 yyerror (YY_("memory exhausted"));
8379 if (yychar != YYEMPTY)
8380 yydestruct ("Cleanup: discarding lookahead",
8382 /* Do not reclaim the symbols of the rule which action triggered
8383 this YYABORT or YYACCEPT. */
8385 YY_STACK_PRINT (yyss, yyssp);
8386 while (yyssp != yyss)
8388 yydestruct ("Cleanup: popping",
8389 yystos[*yyssp], yyvsp);
8394 YYSTACK_FREE (yyss);
8397 if (yymsg != yymsgbuf)
8398 YYSTACK_FREE (yymsg);
8400 /* Make sure YYID is used. */
8401 return YYID (yyresult);