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 dict_t*namespace2url;
384 char has_own_imports;
385 char new_vars; // e.g. transition between two functions
388 methodstate_t*method;
397 typedef struct _global {
401 dict_t*file2token2info;
404 static global_t*global = 0;
405 static state_t* state = 0;
409 #define MULTINAME(m,x) \
413 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
415 #define MEMBER_MULTINAME(m,f,n) \
419 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
420 m##_ns.name = ((slotinfo_t*)(f))->package; \
425 m.namespace_set = 0; \
426 m.name = ((slotinfo_t*)(f))->name; \
428 m.type = MULTINAME; \
430 m.namespace_set = &nopackage_namespace_set; \
434 /* warning: list length of namespace set is undefined */
435 #define MULTINAME_LATE(m, access, package) \
436 namespace_t m##_ns = {access, package}; \
437 namespace_set_t m##_nsset; \
438 namespace_list_t m##_l;m##_l.next = 0; \
439 m##_nsset.namespaces = &m##_l; \
440 m##_nsset = m##_nsset; \
441 m##_l.namespace = &m##_ns; \
442 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
444 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
445 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
446 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
447 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
448 static namespace_list_t nl4 = {&ns4,0};
449 static namespace_list_t nl3 = {&ns3,&nl4};
450 static namespace_list_t nl2 = {&ns2,&nl3};
451 static namespace_list_t nl1 = {&ns1,&nl2};
452 static namespace_set_t nopackage_namespace_set = {&nl1};
454 static void new_state()
457 state_t*oldstate = state;
459 memcpy(s, state, sizeof(state_t)); //shallow copy
461 s->imports = dict_new();
463 if(!s->import_toplevel_packages) {
464 s->import_toplevel_packages = dict_new();
468 state->has_own_imports = 0;
469 state->new_namespaces = 0;
470 state->vars = dict_new();
471 state->old = oldstate;
473 state->namespace2url = 0;
475 static void state_has_imports()
477 state->wildcard_imports = list_clone(state->wildcard_imports);
478 state->imports = dict_clone(state->imports);
479 state->has_own_imports = 1;
481 static void import_toplevel(const char*package)
483 char* s = strdup(package);
485 dict_put(state->import_toplevel_packages, s, 0);
486 char*x = strrchr(s, '.');
494 static void state_destroy(state_t*state)
496 if(state->has_own_imports) {
497 list_free(state->wildcard_imports);
498 dict_destroy(state->imports);state->imports=0;
500 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
501 dict_destroy(state->imports);state->imports=0;
505 for(t=0;t<state->vars->hashsize;t++) {
506 dictentry_t*e =state->vars->slots[t];
508 free(e->data);e->data=0;
512 dict_destroy(state->vars);state->vars=0;
518 static void old_state()
520 if(!state || !state->old)
521 syntaxerror("invalid nesting");
522 state_t*leaving = state;
526 namespace_decl_list_t*nl=leaving->new_namespaces;
528 tokenizer_unregister_namespace(nl->namespace_decl->name);
531 if(leaving->namespace2url)
532 dict_destroy(leaving->namespace2url);
534 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
535 free(leaving->method);
538 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
543 state_destroy(leaving);
546 static code_t* method_header(methodstate_t*m);
547 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
548 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
551 static char* internal_filename_package = 0;
552 void initialize_file(char*filename)
555 syntaxerror("invalid call to initialize_file during parsing of another file");
558 state->package = internal_filename_package = strdup(filename);
560 global->token2info = dict_lookup(global->file2token2info,
561 current_filename // use long version
563 if(!global->token2info) {
564 global->token2info = dict_new2(&ptr_type);
565 dict_put(global->file2token2info, current_filename, global->token2info);
569 state->method = rfx_calloc(sizeof(methodstate_t));
570 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
571 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
573 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
574 function_initvars(state->method, 0, 0, 1);
575 global->init = abc_initscript(global->file);
581 if(!state || state->level!=1) {
582 syntaxerror("unexpected end of file in pass %d", as3_pass);
586 code_t*header = method_header(state->method);
587 code_t*c = wrap_function(header, 0, global->init->method->body->code);
588 global->init->method->body->code = c;
589 free(state->method);state->method=0;
592 //free(state->package);state->package=0; // used in registry
593 state_destroy(state);state=0;
596 void initialize_parser()
598 global = rfx_calloc(sizeof(global_t));
599 global->file = abc_file_new();
600 global->file->flags &= ~ABCFILE_LAZY;
601 global->file2token2info = dict_new();
602 global->token2info = 0;
605 void* finish_parser()
607 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
609 global->token2info=0;
615 static void xx_scopetest()
617 /* findpropstrict doesn't just return a scope object- it
618 also makes it "active" somehow. Push local_0 on the
619 scope stack and read it back with findpropstrict, it'll
620 contain properties like "trace". Trying to find the same
621 property on a "vanilla" local_0 yields only a "undefined" */
622 //c = abc_findpropstrict(c, "[package]::trace");
624 /*c = abc_getlocal_0(c);
625 c = abc_findpropstrict(c, "[package]::trace");
627 c = abc_setlocal_1(c);
629 c = abc_pushbyte(c, 0);
630 c = abc_setlocal_2(c);
632 code_t*xx = c = abc_label(c);
633 c = abc_findpropstrict(c, "[package]::trace");
634 c = abc_pushstring(c, "prop:");
635 c = abc_hasnext2(c, 1, 2);
637 c = abc_setlocal_3(c);
638 c = abc_callpropvoid(c, "[package]::trace", 2);
639 c = abc_getlocal_3(c);
641 c = abc_iftrue(c,xx);*/
644 typedef struct _variable {
648 methodstate_t*is_inner_method;
651 static variable_t* find_variable(state_t*s, char*name)
655 v = dict_lookup(s->vars, name);
657 if(s->new_vars) break;
662 static variable_t* find_slot(state_t*s, const char*name)
664 if(s->method && s->method->slots)
665 return dict_lookup(s->method->slots, name);
669 static variable_t* find_variable_safe(state_t*s, char*name)
671 variable_t* v = find_variable(s, name);
673 syntaxerror("undefined variable: %s", name);
676 static char variable_exists(char*name)
678 return dict_contains(state->vars, name);
680 code_t*defaultvalue(code_t*c, classinfo_t*type);
682 static int alloc_local()
684 return state->method->variable_count++;
687 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
690 variable_t*v = find_slot(state, name);
696 v->index = alloc_local();
701 dict_put(state->vars, name, v);
705 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
707 return new_variable2(name, type, init, maybeslot)->index;
710 #define TEMPVARNAME "__as3_temp__"
711 static int gettempvar()
713 variable_t*v = find_variable(state, TEMPVARNAME);
716 return new_variable(TEMPVARNAME, 0, 0, 0);
719 code_t* var_block(code_t*body)
725 for(t=0;t<state->vars->hashsize;t++) {
726 dictentry_t*e = state->vars->slots[t];
728 variable_t*v = (variable_t*)e->data;
729 if(v->type && v->init) {
730 c = defaultvalue(c, v->type);
731 c = abc_setlocal(c, v->index);
732 k = abc_kill(k, v->index);
742 if(x->opcode== OPCODE___BREAK__ ||
743 x->opcode== OPCODE___CONTINUE__) {
744 /* link kill code before break/continue */
745 code_t*e = code_dup(k);
746 code_t*s = code_start(e);
758 c = code_append(c, body);
759 c = code_append(c, k);
763 void unknown_variable(char*name)
765 if(!state->method->unresolved_variables)
766 state->method->unresolved_variables = dict_new();
767 if(!dict_contains(state->method->unresolved_variables, name))
768 dict_put(state->method->unresolved_variables, name, 0);
771 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
773 static void parsererror(const char*file, int line, const char*f)
775 syntaxerror("internal error in %s, %s:%d", f, file, line);
779 static code_t* add_scope_code(code_t*c, methodstate_t*m)
781 if(m->uses_slots || (m->late_binding && !m->inner)) {
782 c = abc_getlocal_0(c);
783 c = abc_pushscope(c);
786 /* FIXME: does this need to be the same activation object as
787 in the function header? */
788 c = abc_newactivation(c);
789 c = abc_pushscope(c);
794 static code_t* method_header(methodstate_t*m)
798 c = add_scope_code(c, m);
800 methodstate_list_t*l = m->innerfunctions;
802 parserassert(l->methodstate->abc);
803 if(m->uses_slots && l->methodstate->is_a_slot) {
804 c = abc_getscopeobject(c, 1);
805 c = abc_newfunction(c, l->methodstate->abc);
807 c = abc_setlocal(c, l->methodstate->var_index);
808 c = abc_setslot(c, l->methodstate->slot_index);
810 c = abc_newfunction(c, l->methodstate->abc);
811 c = abc_setlocal(c, l->methodstate->var_index);
813 free(l->methodstate);l->methodstate=0;
817 c = code_append(c, m->header);
820 if(m->is_constructor && !m->has_super) {
821 // call default constructor
822 c = abc_getlocal_0(c);
823 c = abc_constructsuper(c, 0);
825 list_free(m->innerfunctions);
826 m->innerfunctions = 0;
831 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
833 c = code_append(c, header);
834 c = code_append(c, var_block(body));
835 /* append return if necessary */
836 if(!c || (c->opcode != OPCODE_RETURNVOID &&
837 c->opcode != OPCODE_RETURNVALUE)) {
838 c = abc_returnvoid(c);
844 static void startpackage(char*name)
847 /*printf("entering package \"%s\"\n", name);*/
848 state->package = strdup(name);
850 static void endpackage()
852 /*printf("leaving package \"%s\"\n", state->package);*/
854 //used e.g. in classinfo_register:
855 //free(state->package);state->package=0;
860 #define FLAG_PUBLIC 256
861 #define FLAG_PROTECTED 512
862 #define FLAG_PRIVATE 1024
863 #define FLAG_PACKAGEINTERNAL 2048
864 #define FLAG_NAMESPACE 4096
866 static namespace_t modifiers2access(modifiers_t*mod)
871 if(mod->flags&FLAG_NAMESPACE) {
872 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
873 syntaxerror("invalid combination of access levels and namespaces");
874 ns.access = ACCESS_NAMESPACE;
876 const char*url = (const char*)dict_lookup(state->namespace2url, mod->ns);
878 /* shouldn't happen- the tokenizer only reports something as a namespace
879 if it was already registered */
880 syntaxerror("unknown namespace: %s", mod->ns);
883 } else if(mod->flags&FLAG_PUBLIC) {
884 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
885 syntaxerror("invalid combination of access levels");
886 ns.access = ACCESS_PACKAGE;
887 } else if(mod->flags&FLAG_PRIVATE) {
888 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
889 syntaxerror("invalid combination of access levels");
890 ns.access = ACCESS_PRIVATE;
891 } else if(mod->flags&FLAG_PROTECTED) {
892 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
893 syntaxerror("invalid combination of access levels");
894 ns.access = ACCESS_PROTECTED;
896 ns.access = ACCESS_PACKAGEINTERNAL;
900 static slotinfo_t* find_class(const char*name);
902 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
907 index = new_variable("this", 0, 0, 0);
908 else if(!m->is_global)
909 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
911 index = new_variable("globalscope", 0, 0, 0);
914 parserassert(!index);
918 /* as variables and slots share the same number, make sure
919 that those variable indices are reserved. It's up to the
920 optimizer to later shuffle the variables down to lower
922 m->variable_count = m->uses_slots;
927 for(p=params->list;p;p=p->next) {
928 new_variable(p->param->name, p->param->type, 0, 1);
933 m->scope_code = add_scope_code(m->scope_code, m);
937 methodstate_list_t*l = m->innerfunctions;
939 methodstate_t*m = l->methodstate;
941 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
942 m->var_index = v->index;
943 m->slot_index = v->index;
944 v->is_inner_method = m;
949 if(as3_pass==2 && m->slots) {
950 /* exchange unresolved identifiers with the actual objects */
951 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
952 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
953 v->type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
954 if(!v->type || v->type->kind != INFOTYPE_CLASS) {
955 syntaxerror("Couldn't find class %s", v->type->name);
963 char*as3_globalclass=0;
964 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
967 syntaxerror("inner classes now allowed");
972 classinfo_list_t*mlist=0;
974 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
975 syntaxerror("invalid modifier(s)");
977 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
978 syntaxerror("public and internal not supported at the same time.");
980 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
981 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
982 // all classes extend object
983 extends = registry_getobjectclass();
986 /* create the class name, together with the proper attributes */
990 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
991 access = ACCESS_PRIVATE; package = internal_filename_package;
992 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
993 access = ACCESS_PACKAGEINTERNAL; package = state->package;
994 } else if(state->package!=internal_filename_package) {
995 access = ACCESS_PACKAGE; package = state->package;
997 syntaxerror("public classes only allowed inside a package");
1001 state->cls = rfx_calloc(sizeof(classstate_t));
1002 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1003 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1004 /* notice: we make no effort to initialize the top variable (local0) here,
1005 even though it has special meaning. We just rely on the facat
1006 that pass 1 won't do anything with variables */
1008 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1010 /* set current method to constructor- all code within the class-level (except
1011 static variable initializations) will be executed during construction time */
1012 state->method = state->cls->init;
1014 if(registry_find(package, classname)) {
1015 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1017 /* build info struct */
1018 int num_interfaces = (list_length(implements));
1019 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1020 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1023 classinfo_list_t*l = implements;
1024 for(l=implements;l;l=l->next) {
1025 state->cls->info->interfaces[pos++] = l->classinfo;
1030 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1032 state->method = state->cls->init;
1033 parserassert(state->cls && state->cls->info);
1035 function_initvars(state->cls->init, 0, 0, 1);
1036 function_initvars(state->cls->static_init, 0, 0, 0);
1038 if(extends && (extends->flags & FLAG_FINAL))
1039 syntaxerror("Can't extend final class '%s'", extends->name);
1042 while(state->cls->info->interfaces[pos]) {
1043 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1044 syntaxerror("'%s' is not an interface",
1045 state->cls->info->interfaces[pos]->name);
1049 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1050 state->cls->info->superclass = extends;
1052 /* generate the abc code for this class */
1053 MULTINAME(classname2,state->cls->info);
1054 multiname_t*extends2 = sig2mname(extends);
1056 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1057 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1058 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1059 if(state->cls->info->flags&FLAG_INTERFACE) {
1060 abc_class_interface(state->cls->abc);
1063 abc_class_protectedNS(state->cls->abc, classname);
1065 for(mlist=implements;mlist;mlist=mlist->next) {
1066 MULTINAME(m, mlist->classinfo);
1067 abc_class_add_interface(state->cls->abc, &m);
1070 /* write the construction code for this class to the global init
1072 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1074 abc_method_body_t*m = global->init->method->body;
1075 __ getglobalscope(m);
1076 classinfo_t*s = extends;
1081 //TODO: take a look at the current scope stack, maybe
1082 // we can re-use something
1087 multiname_t*s2 = sig2mname(s);
1089 multiname_destroy(s2);
1091 __ pushscope(m); count++;
1092 m->code = m->code->prev->prev; // invert
1094 /* continue appending after last op end */
1095 while(m->code && m->code->next) m->code = m->code->next;
1097 /* TODO: if this is one of *our* classes, we can also
1098 do a getglobalscope/getslot <nr> (which references
1099 the init function's slots) */
1101 __ getlex2(m, extends2);
1103 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1104 stack is not the superclass */
1105 __ pushscope(m);count++;
1108 /* notice: we get a verify error #1107 if the top element on the scope
1109 stack is not the global object */
1111 __ pushscope(m);count++;
1113 __ newclass(m,state->cls->abc);
1117 __ setslot(m, slotindex);
1118 multiname_destroy(extends2);
1120 /* flash.display.MovieClip handling */
1122 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1123 if(state->package && state->package[0]) {
1124 as3_globalclass = concat3(state->package, ".", classname);
1126 as3_globalclass = strdup(classname);
1132 static int slotstate_varconst = 0;
1133 static modifiers_t*slotstate_flags = 0;
1134 static void setslotstate(modifiers_t* flags, int varconst)
1136 slotstate_varconst = varconst;
1137 slotstate_flags = flags;
1139 if(flags && flags->flags&FLAG_STATIC) {
1140 state->method = state->cls->static_init;
1142 state->method = state->cls->init;
1145 parserassert(state->method);
1149 static void endclass()
1152 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1154 c = abc_getlocal_0(c);
1155 c = abc_constructsuper(c, 0);
1156 state->cls->init->header = code_append(state->cls->init->header, c);
1157 state->cls->has_constructor=1;
1159 if(state->cls->init) {
1160 if(state->cls->info->flags&FLAG_INTERFACE) {
1161 if(state->cls->init->header)
1162 syntaxerror("interface can not have class-level code");
1164 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1165 code_t*c = method_header(state->cls->init);
1166 m->body->code = wrap_function(c, 0, m->body->code);
1169 if(state->cls->static_init) {
1170 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1171 code_t*c = method_header(state->cls->static_init);
1172 m->body->code = wrap_function(c, 0, m->body->code);
1179 void check_code_for_break(code_t*c)
1182 if(c->opcode == OPCODE___BREAK__) {
1183 char*name = string_cstr(c->data[0]);
1184 syntaxerror("Unresolved \"break %s\"", name);
1186 if(c->opcode == OPCODE___CONTINUE__) {
1187 char*name = string_cstr(c->data[0]);
1188 syntaxerror("Unresolved \"continue %s\"", name);
1190 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1191 char*name = string_cstr(c->data[0]);
1192 syntaxerror("Can't reference a package (%s) as such", name);
1199 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1202 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1203 if(TYPE_IS_NUMBER(t)) {
1204 xassert(c->type == CONSTANT_FLOAT
1205 || c->type == CONSTANT_INT
1206 || c->type == CONSTANT_UINT);
1207 } else if(TYPE_IS_UINT(t)) {
1208 xassert(c->type == CONSTANT_UINT ||
1209 (c->type == CONSTANT_INT && c->i>=0));
1210 } else if(TYPE_IS_INT(t)) {
1211 xassert(c->type == CONSTANT_INT);
1212 } else if(TYPE_IS_BOOLEAN(t)) {
1213 xassert(c->type == CONSTANT_TRUE
1214 || c->type == CONSTANT_FALSE);
1218 static void check_override(memberinfo_t*m, int flags)
1222 if(m->parent == state->cls->info)
1223 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1225 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1226 if(m->access==ACCESS_PRIVATE)
1228 if(m->flags & FLAG_FINAL)
1229 syntaxerror("can't override final member %s", m->name);
1231 /* allow this. it's no issue.
1232 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1233 syntaxerror("can't override static member %s", m->name);*/
1235 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1236 syntaxerror("can't override non-static member %s with static declaration", m->name);
1238 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1239 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1240 if(m->kind == INFOTYPE_METHOD)
1241 syntaxerror("can't override without explicit 'override' declaration");
1243 syntaxerror("can't override '%s'", m->name);
1248 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1250 methodinfo_t*minfo = 0;
1251 namespace_t ns = modifiers2access(mod);
1254 minfo = methodinfo_register_global(ns.access, state->package, name);
1255 minfo->return_type = 0; // save this for pass 2
1256 } else if(getset != KW_GET && getset != KW_SET) {
1258 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1260 printf("%s.%s | %s.%s\n",
1261 m->package, m->name,
1263 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1265 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1266 minfo->return_type = 0; // save this for pass 2
1267 // getslot on a member slot only returns "undefined", so no need
1268 // to actually store these
1269 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1271 //class getter/setter
1272 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1274 if(getset == KW_GET) {
1276 } else if(params->list && params->list->param && !params->list->next) {
1277 type = params->list->param->type;
1279 syntaxerror("setter function needs to take exactly one argument");
1280 // not sure wether to look into superclasses here, too
1281 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1283 if(minfo->kind!=INFOTYPE_SLOT)
1284 syntaxerror("class already contains a method called '%s'", name);
1285 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1286 syntaxerror("class already contains a field called '%s'", name);
1287 if(minfo->subtype & gs)
1288 syntaxerror("getter/setter for '%s' already defined", name);
1289 /* make a setter or getter into a getset */
1290 minfo->subtype |= gs;
1293 FIXME: this check needs to be done in pass 2
1295 if((!minfo->return_type != !type) ||
1296 (minfo->return_type && type &&
1297 !strcmp(minfo->return_type->name, type->name))) {
1298 syntaxerror("different type in getter and setter: %s and %s",
1299 minfo->return_type?minfo->return_type->name:"*",
1300 type?type->name:"*");
1303 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1304 minfo->kind = INFOTYPE_SLOT; //hack
1305 minfo->subtype = gs;
1306 minfo->return_type = 0;
1308 /* can't assign a slot as getter and setter might have different slots */
1309 //minfo->slot = slot;
1311 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1312 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1313 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1318 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1320 //parserassert(state->method && state->method->info);
1322 methodstate_t*parent_method = state->method;
1325 return_type = 0; // not valid in pass 1
1329 state->new_vars = 1;
1332 state->method = rfx_calloc(sizeof(methodstate_t));
1333 state->method->inner = 1;
1334 state->method->variable_count = 0;
1335 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1337 NEW(methodinfo_t,minfo);
1338 minfo->kind = INFOTYPE_METHOD;
1339 minfo->access = ACCESS_PACKAGEINTERNAL;
1341 state->method->info = minfo;
1344 list_append(parent_method->innerfunctions, state->method);
1346 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1348 function_initvars(state->method, params, 0, 1);
1352 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1353 state->method->variable_count = 0;
1354 parserassert(state->method);
1356 state->method->info->return_type = return_type;
1357 function_initvars(state->method, params, 0, 1);
1361 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1362 params_t*params, classinfo_t*return_type)
1364 if(state->method && state->method->info) {
1365 syntaxerror("not able to start another method scope");
1368 state->new_vars = 1;
1371 state->method = rfx_calloc(sizeof(methodstate_t));
1372 state->method->has_super = 0;
1375 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1377 state->method->is_global = 1;
1378 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1380 if(state->method->is_constructor)
1381 name = "__as3_constructor__";
1383 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1385 function_initvars(state->method, params, mod->flags, 1);
1387 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1391 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1392 state->method->variable_count = 0;
1393 parserassert(state->method);
1396 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1397 check_override(m, mod->flags);
1401 state->cls->has_constructor |= state->method->is_constructor;
1404 state->method->info->return_type = return_type;
1405 function_initvars(state->method, params, mod->flags, 1);
1409 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1410 params_t*params, classinfo_t*return_type, code_t*body)
1413 // store inner methods in variables
1414 function_initvars(state->method, 0, 0, 0);
1416 methodstate_list_t*ml = state->method->innerfunctions;
1418 dict_t*xvars = dict_new();
1421 methodstate_t*m = ml->methodstate;
1422 parserassert(m->inner);
1423 if(m->unresolved_variables) {
1424 dict_t*d = m->unresolved_variables;
1426 for(t=0;t<d->hashsize;t++) {
1427 dictentry_t*l = d->slots[t];
1429 /* check parent method's variables */
1431 if((v=find_variable(state, l->key))) {
1432 m->uses_parent_function = 1;
1433 state->method->uses_slots = 1;
1434 dict_put(xvars, l->key, 0);
1441 dict_destroy(m->unresolved_variables);
1442 m->unresolved_variables = 0;
1447 if(state->method->uses_slots) {
1448 state->method->slots = dict_new();
1450 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1451 if(!name) syntaxerror("internal error");
1452 if(v->index && dict_contains(xvars, name)) {
1455 if(v->is_inner_method) {
1456 v->is_inner_method->is_a_slot = 1;
1459 dict_put(state->method->slots, name, v);
1462 state->method->uses_slots = i;
1463 dict_destroy(state->vars);state->vars = 0;
1470 /*if(state->method->uses_parent_function){
1471 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1476 multiname_t*type2 = sig2mname(return_type);
1478 if(state->method->inner) {
1479 f = state->method->abc;
1480 abc_method_init(f, global->file, type2, 1);
1481 } else if(state->method->is_constructor) {
1482 f = abc_class_getconstructor(state->cls->abc, type2);
1483 } else if(!state->method->is_global) {
1484 namespace_t mname_ns = modifiers2access(mod);
1485 multiname_t mname = {QNAME, &mname_ns, 0, name};
1487 if(mod->flags&FLAG_STATIC)
1488 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1490 f = abc_class_method(state->cls->abc, type2, &mname);
1491 slot = f->trait->slot_id;
1493 namespace_t mname_ns = {state->method->info->access, state->package};
1494 multiname_t mname = {QNAME, &mname_ns, 0, name};
1496 f = abc_method_new(global->file, type2, 1);
1497 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1498 //abc_code_t*c = global->init->method->body->code;
1500 //flash doesn't seem to allow us to access function slots
1501 //state->method->info->slot = slot;
1503 if(mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1504 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1505 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1506 if(params->varargs) f->flags |= METHOD_NEED_REST;
1510 for(p=params->list;p;p=p->next) {
1511 if(params->varargs && !p->next) {
1512 break; //varargs: omit last parameter in function signature
1514 multiname_t*m = sig2mname(p->param->type);
1515 list_append(f->parameters, m);
1516 if(p->param->value) {
1517 check_constant_against_type(p->param->type, p->param->value);
1518 opt=1;list_append(f->optional_parameters, p->param->value);
1520 syntaxerror("non-optional parameter not allowed after optional parameters");
1523 if(state->method->slots) {
1524 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1526 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1527 multiname_t*type = sig2mname(v->type);
1528 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1529 t->slot_id = v->index;
1534 check_code_for_break(body);
1536 /* Seems this works now.
1537 if(state->method->exceptions && state->method->uses_slots) {
1538 as3_warning("try/catch and activation not supported yet within the same method");
1542 f->body->code = body;
1543 f->body->exceptions = state->method->exceptions;
1544 } else { //interface
1546 syntaxerror("interface methods can't have a method body");
1556 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1561 void breakjumpsto(code_t*c, char*name, code_t*jump)
1564 if(c->opcode == OPCODE___BREAK__) {
1565 string_t*name2 = c->data[0];
1566 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1567 c->opcode = OPCODE_JUMP;
1574 void continuejumpsto(code_t*c, char*name, code_t*jump)
1577 if(c->opcode == OPCODE___CONTINUE__) {
1578 string_t*name2 = c->data[0];
1579 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1580 c->opcode = OPCODE_JUMP;
1588 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1589 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1590 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1592 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1594 if(!type1 || !type2)
1595 return registry_getanytype();
1596 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1597 return registry_getanytype();
1600 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1609 return registry_getanytype();
1611 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1616 return abc_coerce_a(c);
1620 // cast an "any" type to a specific type. subject to
1621 // runtime exceptions
1622 return abc_coerce2(c, &m);
1625 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1626 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1627 // allow conversion between number types
1628 return abc_coerce2(c, &m);
1630 //printf("%s.%s\n", from.package, from.name);
1631 //printf("%s.%s\n", to.package, to.name);
1633 classinfo_t*supertype = from;
1635 if(supertype == to) {
1636 // target type is one of from's superclasses
1637 return abc_coerce2(c, &m);
1640 while(supertype->interfaces[t]) {
1641 if(supertype->interfaces[t]==to) {
1642 // target type is one of from's interfaces
1643 return abc_coerce2(c, &m);
1647 supertype = supertype->superclass;
1649 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1651 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1653 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1656 as3_error("can't convert type %s%s%s to %s%s%s",
1657 from->package, from->package?".":"", from->name,
1658 to->package, to->package?".":"", to->name);
1662 code_t*defaultvalue(code_t*c, classinfo_t*type)
1664 if(TYPE_IS_INT(type)) {
1665 c = abc_pushbyte(c, 0);
1666 } else if(TYPE_IS_UINT(type)) {
1667 c = abc_pushuint(c, 0);
1668 } else if(TYPE_IS_FLOAT(type)) {
1670 } else if(TYPE_IS_BOOLEAN(type)) {
1671 c = abc_pushfalse(c);
1673 //c = abc_pushundefined(c);
1675 c = abc_pushnull(c);
1677 c = abc_coerce2(c, &m);
1682 char is_pushundefined(code_t*c)
1684 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1687 static const char* get_package_from_name(const char*name)
1689 /* try explicit imports */
1690 dictentry_t* e = dict_get_slot(state->imports, name);
1692 if(!strcmp(e->key, name)) {
1693 slotinfo_t*c = (slotinfo_t*)e->data;
1694 if(c) return c->package;
1700 static namespace_list_t*get_current_imports()
1702 namespace_list_t*searchlist = 0;
1704 list_append(searchlist, namespace_new_package(state->package));
1706 import_list_t*l = state->wildcard_imports;
1708 namespace_t*ns = namespace_new_package(l->import->package);
1709 list_append(searchlist, ns);
1712 list_append(searchlist, namespace_new_package(""));
1713 list_append(searchlist, namespace_new_package(internal_filename_package));
1717 static slotinfo_t* find_class(const char*name)
1721 c = registry_find(state->package, name);
1724 /* try explicit imports */
1725 dictentry_t* e = dict_get_slot(state->imports, name);
1728 if(!strcmp(e->key, name)) {
1729 c = (slotinfo_t*)e->data;
1735 /* try package.* imports */
1736 import_list_t*l = state->wildcard_imports;
1738 //printf("does package %s contain a class %s?\n", l->import->package, name);
1739 c = registry_find(l->import->package, name);
1744 /* try global package */
1745 c = registry_find("", name);
1748 /* try local "filename" package */
1749 c = registry_find(internal_filename_package, name);
1754 typedcode_t push_class(slotinfo_t*a)
1759 if(a->access == ACCESS_PACKAGEINTERNAL &&
1760 strcmp(a->package, state->package) &&
1761 strcmp(a->package, internal_filename_package)
1763 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1764 infotypename(a), a->name, a->package, state->package);
1767 if(a->kind != INFOTYPE_CLASS) {
1769 x.c = abc_findpropstrict2(x.c, &m);
1770 x.c = abc_getproperty2(x.c, &m);
1771 if(a->kind == INFOTYPE_METHOD) {
1772 methodinfo_t*f = (methodinfo_t*)a;
1773 x.t = TYPE_FUNCTION(f);
1775 varinfo_t*v = (varinfo_t*)a;
1779 classinfo_t*c = (classinfo_t*)a;
1781 x.c = abc_getglobalscope(x.c);
1782 x.c = abc_getslot(x.c, c->slot);
1785 x.c = abc_getlex2(x.c, &m);
1787 x.t = TYPE_CLASS(c);
1792 static char is_getlocal(code_t*c)
1794 if(!c || c->prev || c->next)
1796 return(c->opcode == OPCODE_GETLOCAL
1797 || c->opcode == OPCODE_GETLOCAL_0
1798 || c->opcode == OPCODE_GETLOCAL_1
1799 || c->opcode == OPCODE_GETLOCAL_2
1800 || c->opcode == OPCODE_GETLOCAL_3);
1802 static int getlocalnr(code_t*c)
1804 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1805 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1806 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1807 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1808 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1809 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1813 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1817 [prefix code] [read instruction]
1821 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1823 if(in && in->opcode == OPCODE_COERCE_A) {
1824 in = code_cutlast(in);
1827 syntaxerror("internal error");
1829 /* chop off read instruction */
1833 prefix = r->prev;r->prev = 0;
1839 char use_temp_var = readbefore;
1841 /* generate the write instruction, and maybe append a dup to the prefix code */
1842 code_t* write = abc_nop(0);
1843 if(r->opcode == OPCODE_GETPROPERTY) {
1844 write->opcode = OPCODE_SETPROPERTY;
1845 multiname_t*m = (multiname_t*)r->data[0];
1846 write->data[0] = multiname_clone(m);
1847 if(m->type == QNAME || m->type == MULTINAME) {
1849 prefix = abc_dup(prefix); // we need the object, too
1852 } else if(m->type == MULTINAMEL) {
1854 /* dupping two values on the stack requires 5 operations and one register-
1855 couldn't adobe just have given us a dup2? */
1856 int temp = gettempvar();
1857 prefix = abc_setlocal(prefix, temp);
1858 prefix = abc_dup(prefix);
1859 prefix = abc_getlocal(prefix, temp);
1860 prefix = abc_swap(prefix);
1861 prefix = abc_getlocal(prefix, temp);
1863 prefix = abc_kill(prefix, temp);
1867 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1869 } else if(r->opcode == OPCODE_GETSLOT) {
1870 write->opcode = OPCODE_SETSLOT;
1871 write->data[0] = r->data[0];
1873 prefix = abc_dup(prefix); // we need the object, too
1876 } else if(r->opcode == OPCODE_GETLOCAL) {
1877 write->opcode = OPCODE_SETLOCAL;
1878 write->data[0] = r->data[0];
1879 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1880 write->opcode = OPCODE_SETLOCAL_0;
1881 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1882 write->opcode = OPCODE_SETLOCAL_1;
1883 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1884 write->opcode = OPCODE_SETLOCAL_2;
1885 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1886 write->opcode = OPCODE_SETLOCAL_3;
1887 } else if(r->opcode == OPCODE_GETSUPER) {
1888 write->opcode = OPCODE_SETSUPER;
1889 multiname_t*m = (multiname_t*)r->data[0];
1890 write->data[0] = multiname_clone(m);
1893 syntaxerror("illegal lvalue: can't assign a value to this expression");
1900 /* with getproperty/getslot, we have to be extra careful not
1901 to execute the read code twice, as it might have side-effects
1902 (e.g. if the property is in fact a setter/getter combination)
1904 So read the value, modify it, and write it again,
1905 using prefix only once and making sure (by using a temporary
1906 register) that the return value is what we just wrote */
1907 temp = gettempvar();
1908 c = code_append(c, prefix);
1909 c = code_append(c, r);
1912 c = abc_setlocal(c, temp);
1914 c = code_append(c, middlepart);
1917 c = abc_setlocal(c, temp);
1919 c = code_append(c, write);
1920 c = abc_getlocal(c, temp);
1921 c = abc_kill(c, temp);
1923 /* if we're allowed to execute the read code twice *and*
1924 the middlepart doesn't modify the code, things are easier.
1926 code_t* r2 = code_dup(r);
1927 //c = code_append(c, prefix);
1928 parserassert(!prefix);
1929 c = code_append(c, r);
1930 c = code_append(c, middlepart);
1931 c = code_append(c, write);
1932 c = code_append(c, r2);
1935 /* even smaller version: overwrite the value without reading
1939 c = code_append(c, prefix);
1942 c = code_append(c, middlepart);
1943 c = code_append(c, write);
1944 c = code_append(c, r);
1947 temp = gettempvar();
1949 c = code_append(c, prefix);
1951 c = code_append(c, middlepart);
1953 c = abc_setlocal(c, temp);
1954 c = code_append(c, write);
1955 c = abc_getlocal(c, temp);
1956 c = abc_kill(c, temp);
1962 char is_break_or_jump(code_t*c)
1966 if(c->opcode == OPCODE_JUMP ||
1967 c->opcode == OPCODE___BREAK__ ||
1968 c->opcode == OPCODE___CONTINUE__ ||
1969 c->opcode == OPCODE_THROW ||
1970 c->opcode == OPCODE_RETURNVOID ||
1971 c->opcode == OPCODE_RETURNVALUE) {
1977 void register_namespace(const char*name, const char*url)
1979 NEW(namespace_decl_t,n);
1982 if(!state->namespace2url) {
1983 state->namespace2url = dict_new();
1985 dict_put(state->namespace2url, name, url);
1986 list_append(state->new_namespaces, n);
1987 tokenizer_register_namespace(name);
1990 #define IS_FINALLY_TARGET(op) \
1991 ((op) == OPCODE___CONTINUE__ || \
1992 (op) == OPCODE___BREAK__ || \
1993 (op) == OPCODE_RETURNVOID || \
1994 (op) == OPCODE_RETURNVALUE || \
1995 (op) == OPCODE___RETHROW__)
1997 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1999 #define NEED_EXTRA_STACK_ARG
2000 code_t*finally_label = abc_nop(0);
2001 NEW(lookupswitch_t, l);
2007 code_t*prev = i->prev;
2008 if(IS_FINALLY_TARGET(i->opcode)) {
2011 if(i->opcode == OPCODE___RETHROW__ ||
2012 i->opcode == OPCODE_RETURNVALUE) {
2013 if(i->opcode == OPCODE___RETHROW__)
2014 i->opcode = OPCODE_THROW;
2016 p = abc_coerce_a(p);
2017 p = abc_setlocal(p, tempvar);
2019 p = abc_pushbyte(p, count++);
2020 p = abc_jump(p, finally_label);
2021 code_t*target = p = abc_label(p);
2022 #ifdef NEED_EXTRA_STACK_ARG
2026 p = abc_getlocal(p, tempvar);
2029 p->next = i;i->prev = p;
2030 list_append(l->targets, target);
2036 c = abc_pushbyte(c, -1);
2037 c = code_append(c, finally_label);
2038 c = code_append(c, finally);
2040 #ifdef NEED_EXTRA_STACK_ARG
2043 c = abc_lookupswitch(c, l);
2044 c = l->def = abc_label(c);
2045 #ifdef NEED_EXTRA_STACK_ARG
2052 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
2056 code_t*prev = i->prev;
2057 if(IS_FINALLY_TARGET(i->opcode)) {
2058 if(i->opcode == OPCODE___RETHROW__)
2059 i->opcode = OPCODE_THROW;
2060 code_t*end = code_dup(finally);
2061 code_t*start = code_start(end);
2062 if(prev) prev->next = start;
2069 return code_append(c, finally);
2072 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
2078 int num_insertion_points=0;
2080 if(IS_FINALLY_TARGET(i->opcode))
2081 num_insertion_points++;
2088 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
2093 int simple_version_cost = (1+num_insertion_points)*code_size;
2094 int lookup_version_cost = 4*num_insertion_points + 5;
2096 if(cantdup || simple_version_cost > lookup_version_cost) {
2097 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
2098 return insert_finally_lookup(c, finally, tempvar);
2100 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
2101 return insert_finally_simple(c, finally, tempvar);
2105 #define PASS1 }} if(as3_pass == 1) {{
2106 #define PASS1END }} if(as3_pass == 2) {{
2107 #define PASS2 }} if(as3_pass == 2) {{
2108 #define PASS12 }} {{
2109 #define PASS12END }} if(as3_pass == 2) {{
2113 /* Line 273 of skeleton.m4 */
2114 #line 2115 "parser.tab.c"
2121 typedef YYTYPE_UINT8 yytype_uint8;
2123 typedef unsigned char yytype_uint8;
2127 typedef YYTYPE_INT8 yytype_int8;
2128 #elif (defined __STDC__ || defined __C99__FUNC__ \
2129 || defined __cplusplus || defined _MSC_VER)
2130 typedef signed char yytype_int8;
2132 typedef short int yytype_int8;
2135 #ifdef YYTYPE_UINT16
2136 typedef YYTYPE_UINT16 yytype_uint16;
2138 typedef unsigned short int yytype_uint16;
2142 typedef YYTYPE_INT16 yytype_int16;
2144 typedef short int yytype_int16;
2148 # ifdef __SIZE_TYPE__
2149 # define YYSIZE_T __SIZE_TYPE__
2150 # elif defined size_t
2151 # define YYSIZE_T size_t
2152 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2153 || defined __cplusplus || defined _MSC_VER)
2154 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2155 # define YYSIZE_T size_t
2157 # define YYSIZE_T unsigned int
2161 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2166 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2167 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2171 # define YY_(msgid) msgid
2175 /* Suppress unused-variable warnings by "using" E. */
2176 #if ! defined lint || defined __GNUC__
2177 # define YYUSE(e) ((void) (e))
2179 # define YYUSE(e) /* empty */
2182 /* Identity function, used to suppress warnings about constant conditions. */
2184 # define YYID(n) (n)
2186 #if (defined __STDC__ || defined __C99__FUNC__ \
2187 || defined __cplusplus || defined _MSC_VER)
2200 #if ! defined yyoverflow || YYERROR_VERBOSE
2202 /* The parser invokes alloca or malloc; define the necessary symbols. */
2204 # ifdef YYSTACK_USE_ALLOCA
2205 # if YYSTACK_USE_ALLOCA
2207 # define YYSTACK_ALLOC __builtin_alloca
2208 # elif defined __BUILTIN_VA_ARG_INCR
2209 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2211 # define YYSTACK_ALLOC __alloca
2212 # elif defined _MSC_VER
2213 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2214 # define alloca _alloca
2216 # define YYSTACK_ALLOC alloca
2217 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2218 || defined __cplusplus || defined _MSC_VER)
2219 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2221 # define _STDLIB_H 1
2228 # ifdef YYSTACK_ALLOC
2229 /* Pacify GCC's `empty if-body' warning. */
2230 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2231 # ifndef YYSTACK_ALLOC_MAXIMUM
2232 /* The OS might guarantee only one guard page at the bottom of the stack,
2233 and a page size can be as small as 4096 bytes. So we cannot safely
2234 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2235 to allow for a few compiler-allocated temporary stack slots. */
2236 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2239 # define YYSTACK_ALLOC YYMALLOC
2240 # define YYSTACK_FREE YYFREE
2241 # ifndef YYSTACK_ALLOC_MAXIMUM
2242 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2244 # if (defined __cplusplus && ! defined _STDLIB_H \
2245 && ! ((defined YYMALLOC || defined malloc) \
2246 && (defined YYFREE || defined free)))
2247 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2249 # define _STDLIB_H 1
2253 # define YYMALLOC malloc
2254 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2255 || defined __cplusplus || defined _MSC_VER)
2256 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2260 # define YYFREE free
2261 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2262 || defined __cplusplus || defined _MSC_VER)
2263 void free (void *); /* INFRINGES ON USER NAME SPACE */
2267 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2270 #if (! defined yyoverflow \
2271 && (! defined __cplusplus \
2272 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2274 /* A type that is properly aligned for any stack member. */
2277 yytype_int16 yyss_alloc;
2281 /* The size of the maximum gap between one aligned stack and the next. */
2282 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2284 /* The size of an array large to enough to hold all stacks, each with
2286 # define YYSTACK_BYTES(N) \
2287 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2288 + YYSTACK_GAP_MAXIMUM)
2290 /* Copy COUNT objects from FROM to TO. The source and destination do
2293 # if defined __GNUC__ && 1 < __GNUC__
2294 # define YYCOPY(To, From, Count) \
2295 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2297 # define YYCOPY(To, From, Count) \
2301 for (yyi = 0; yyi < (Count); yyi++) \
2302 (To)[yyi] = (From)[yyi]; \
2308 /* Relocate STACK from its old location to the new one. The
2309 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2310 elements in the stack, and YYPTR gives the new location of the
2311 stack. Advance YYPTR to a properly aligned location for the next
2313 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2316 YYSIZE_T yynewbytes; \
2317 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2318 Stack = &yyptr->Stack_alloc; \
2319 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2320 yyptr += yynewbytes / sizeof (*yyptr); \
2326 /* YYFINAL -- State number of the termination state. */
2328 /* YYLAST -- Last index in YYTABLE. */
2331 /* YYNTOKENS -- Number of terminals. */
2332 #define YYNTOKENS 134
2333 /* YYNNTS -- Number of nonterminals. */
2335 /* YYNRULES -- Number of rules. */
2336 #define YYNRULES 309
2337 /* YYNRULES -- Number of states. */
2338 #define YYNSTATES 521
2340 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2341 #define YYUNDEFTOK 2
2342 #define YYMAXUTOK 363
2344 #define YYTRANSLATE(YYX) \
2345 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2347 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2348 static const yytype_uint8 yytranslate[] =
2350 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2351 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2352 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2353 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2354 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2355 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2356 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2357 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2358 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2359 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2360 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2361 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2362 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2363 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2364 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2365 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2366 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2367 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2368 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2369 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2370 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2371 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2372 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2373 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2374 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2375 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2376 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2377 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2378 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2379 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2380 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2381 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2382 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2383 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2384 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2385 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2390 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2392 static const yytype_uint16 yyprhs[] =
2394 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2395 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2396 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2397 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2398 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2399 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2400 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2401 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2402 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2403 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2404 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2405 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2406 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2407 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2408 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2409 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2410 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2411 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
2412 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
2413 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
2414 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
2415 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
2416 608, 611, 613, 615, 619, 621, 623, 625, 627, 629,
2417 631, 633, 635, 637, 639, 641, 643, 645, 647, 649,
2418 651, 653, 655, 659, 663, 667, 671, 675, 679, 683,
2419 687, 691, 695, 698, 701, 705, 709, 713, 717, 721,
2420 725, 729, 733, 737, 741, 745, 749, 753, 757, 761,
2421 766, 769, 771, 775, 778, 783, 787, 788, 790, 794,
2422 800, 804, 808, 812, 816, 820, 824, 828, 832, 836,
2423 840, 844, 848, 854, 857, 860, 863, 866, 870, 873,
2424 878, 884, 888, 894, 898, 900, 903, 908, 913, 916
2427 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2428 static const yytype_int16 yyrhs[] =
2430 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2431 137, 138, -1, 186, -1, 198, -1, 196, -1, 217,
2432 -1, 207, -1, 147, -1, 148, 126, 136, 132, -1,
2433 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2434 198, -1, 196, -1, 217, -1, 207, -1, 147, -1,
2435 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2436 143, 145, -1, 145, -1, 189, -1, 159, -1, 160,
2437 -1, 161, -1, 163, -1, 171, -1, 154, -1, 183,
2438 -1, 179, -1, 239, -1, 247, -1, 246, -1, 126,
2439 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2440 150, -1, 165, -1, 166, -1, 236, -1, 181, -1,
2441 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2442 144, -1, 3, 89, 3, -1, 102, 237, -1, -1,
2443 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2444 152, -1, 3, 227, 149, -1, -1, 65, 146, -1,
2445 -1, 64, 122, 155, 238, 133, 146, 153, -1, -1,
2446 150, -1, 239, -1, 46, 3, 227, -1, 3, -1,
2447 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2448 238, 99, 239, 133, 146, -1, 158, 157, 68, 238,
2449 133, 146, -1, -1, 14, 122, 162, 238, 133, 146,
2450 -1, -1, 15, 164, 146, 14, 122, 238, 133, -1,
2451 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2452 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2453 168, 169, -1, 34, 240, 105, 142, -1, 62, 105,
2454 142, -1, -1, 16, 122, 172, 240, 133, 126, 167,
2455 132, -1, -1, 33, 122, 3, 227, 133, 174, 126,
2456 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2457 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2458 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2459 37, 238, -1, 37, -1, 39, 122, 238, 133, -1,
2460 182, 146, -1, 3, -1, 19, -1, 4, -1, 185,
2461 127, 184, -1, 184, -1, -1, 19, 185, 126, 187,
2462 139, 132, -1, -1, 19, 126, 188, 139, 132, -1,
2463 41, 223, -1, 41, 185, 127, 115, -1, -1, 191,
2464 -1, 192, -1, 191, 192, -1, 21, -1, 22, -1,
2465 20, -1, 38, -1, 47, -1, 49, -1, 48, -1,
2466 26, -1, 24, -1, 4, -1, -1, 54, 224, -1,
2467 -1, 54, 225, -1, -1, 17, 225, -1, -1, 190,
2468 31, 3, 193, 195, 126, 197, 200, 132, -1, -1,
2469 190, 44, 3, 194, 126, 199, 203, 132, -1, -1,
2470 201, -1, 202, -1, 201, 202, -1, 99, -1, 148,
2471 126, 200, 132, -1, 207, -1, 217, -1, 144, -1,
2472 -1, 204, -1, 205, -1, 204, 205, -1, 99, -1,
2473 46, 3, -1, 190, 27, 216, 3, 122, 213, 133,
2474 227, -1, 46, -1, 32, -1, -1, 190, 206, 208,
2475 209, -1, 210, -1, 209, 100, 210, -1, 3, 227,
2476 149, -1, -1, 102, 212, -1, 10, -1, 8, -1,
2477 9, -1, 12, -1, 5, -1, 56, -1, 55, -1,
2478 45, -1, 3, -1, -1, 214, -1, 93, 215, -1,
2479 214, 100, 93, 215, -1, 214, 100, 215, -1, 215,
2480 -1, 3, 105, 226, 211, -1, 3, 211, -1, 51,
2481 -1, 35, -1, -1, -1, 190, 27, 216, 3, 122,
2482 213, 133, 227, 126, 218, 142, 132, -1, 3, -1,
2483 -1, -1, 27, 219, 122, 213, 133, 227, 126, 221,
2484 142, 132, -1, 184, -1, 185, 127, 184, -1, 223,
2485 -1, 222, -1, 224, -1, 225, 100, 224, -1, 224,
2486 -1, 115, -1, 36, -1, 105, 226, -1, -1, -1,
2487 122, 229, 133, -1, -1, 230, -1, 231, -1, 237,
2488 -1, 230, 100, -1, 231, 237, -1, -1, 25, 240,
2489 232, 228, -1, 240, 122, 229, 133, -1, 53, 122,
2490 229, 133, -1, 63, 240, -1, 42, -1, 42, 238,
2491 -1, 240, -1, 240, -1, 238, 100, 240, -1, 238,
2492 -1, 220, -1, 241, -1, 244, -1, 233, -1, 235,
2493 -1, 234, -1, 6, -1, 10, -1, 11, -1, 8,
2494 -1, 9, -1, 12, -1, 5, -1, 29, -1, 56,
2495 -1, 55, -1, 45, -1, 240, 109, 240, -1, 240,
2496 110, 240, -1, 240, 75, 240, -1, 240, 76, 240,
2497 -1, 240, 71, 240, -1, 240, 72, 240, -1, 240,
2498 74, 240, -1, 240, 73, 240, -1, 240, 87, 240,
2499 -1, 240, 88, 240, -1, 118, 240, -1, 117, 240,
2500 -1, 240, 108, 240, -1, 240, 107, 240, -1, 240,
2501 106, 240, -1, 240, 96, 240, -1, 240, 95, 240,
2502 -1, 240, 94, 240, -1, 240, 114, 240, -1, 240,
2503 116, 240, -1, 240, 113, 240, -1, 240, 112, 240,
2504 -1, 240, 115, 240, -1, 240, 68, 240, -1, 240,
2505 69, 240, -1, 240, 40, 240, -1, 240, 67, 240,
2506 -1, 43, 122, 240, 133, -1, 36, 240, -1, 36,
2507 -1, 122, 238, 133, -1, 112, 240, -1, 240, 124,
2508 240, 125, -1, 124, 229, 125, -1, -1, 243, -1,
2509 237, 105, 237, -1, 243, 100, 237, 105, 237, -1,
2510 70, 242, 132, -1, 240, 80, 240, -1, 240, 79,
2511 240, -1, 240, 85, 240, -1, 240, 84, 240, -1,
2512 240, 86, 240, -1, 240, 78, 240, -1, 240, 77,
2513 240, -1, 240, 83, 240, -1, 240, 81, 240, -1,
2514 240, 82, 240, -1, 240, 102, 240, -1, 240, 104,
2515 240, 105, 240, -1, 240, 91, -1, 240, 90, -1,
2516 91, 240, -1, 90, 240, -1, 53, 127, 3, -1,
2517 128, 3, -1, 240, 127, 128, 3, -1, 240, 127,
2518 3, 89, 3, -1, 240, 92, 3, -1, 240, 127,
2519 122, 240, 133, -1, 240, 127, 3, -1, 3, -1,
2520 18, 3, -1, 18, 3, 102, 3, -1, 18, 3,
2521 102, 5, -1, 190, 245, -1, 23, 18, 224, -1
2524 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2525 static const yytype_uint16 yyrline[] =
2527 0, 2093, 2093, 2095, 2095, 2096, 2097, 2099, 2100, 2101,
2528 2102, 2103, 2104, 2105, 2106, 2108, 2108, 2109, 2110, 2112,
2529 2113, 2114, 2115, 2116, 2117, 2118, 2120, 2121, 2123, 2124,
2530 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136,
2531 2137, 2138, 2139, 2140, 2143, 2144, 2145, 2146, 2147, 2148,
2532 2149, 2150, 2154, 2155, 2159, 2166, 2170, 2171, 2175, 2176,
2533 2178, 2179, 2181, 2242, 2243, 2246, 2246, 2265, 2266, 2267,
2534 2272, 2276, 2281, 2282, 2284, 2304, 2352, 2352, 2371, 2371,
2535 2386, 2389, 2392, 2395, 2399, 2400, 2401, 2402, 2403, 2404,
2536 2406, 2417, 2420, 2420, 2451, 2451, 2476, 2476, 2492, 2493,
2537 2494, 2495, 2503, 2512, 2512, 2561, 2565, 2576, 2586, 2603,
2538 2604, 2605, 2607, 2608, 2610, 2610, 2612, 2612, 2615, 2631,
2539 2648, 2649, 2650, 2651, 2659, 2660, 2661, 2662, 2663, 2664,
2540 2665, 2666, 2667, 2668, 2672, 2673, 2675, 2676, 2678, 2679,
2541 2683, 2681, 2689, 2687, 2696, 2697, 2698, 2699, 2700, 2701,
2542 2702, 2703, 2705, 2711, 2712, 2713, 2714, 2715, 2716, 2719,
2543 2732, 2732, 2734, 2734, 2736, 2737, 2739, 2814, 2815, 2817,
2544 2818, 2819, 2820, 2821, 2823, 2824, 2825, 2826, 2838, 2842,
2545 2848, 2854, 2862, 2867, 2873, 2881, 2889, 2890, 2891, 2894,
2546 2893, 2910, 2911, 2913, 2912, 2936, 2955, 2969, 2970, 2972,
2547 2973, 2975, 2976, 2977, 2986, 2987, 2991, 2992, 2994, 2995,
2548 2996, 2998, 3002, 3003, 3008, 3009, 3045, 3091, 3112, 3133,
2549 3136, 3143, 3144, 3145, 3151, 3157, 3159, 3161, 3163, 3165,
2550 3167, 3169, 3186, 3191, 3194, 3197, 3200, 3203, 3206, 3209,
2551 3212, 3215, 3219, 3222, 3225, 3228, 3231, 3234, 3237, 3240,
2552 3244, 3255, 3273, 3278, 3283, 3288, 3293, 3298, 3302, 3306,
2553 3311, 3315, 3319, 3328, 3337, 3347, 3352, 3364, 3370, 3375,
2554 3381, 3387, 3391, 3393, 3404, 3413, 3420, 3421, 3423, 3429,
2555 3438, 3445, 3457, 3463, 3469, 3475, 3481, 3487, 3493, 3499,
2556 3512, 3523, 3530, 3543, 3570, 3584, 3598, 3612, 3627, 3634,
2557 3641, 3648, 3655, 3666, 3716, 3821, 3828, 3835, 3842, 3857
2561 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2562 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2563 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2564 static const char *const yytname[] =
2566 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2567 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2568 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2569 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2570 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2571 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2572 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2573 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2574 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2575 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2576 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2577 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2578 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2579 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2580 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2581 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2582 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2583 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2584 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2585 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2586 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2587 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2588 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2589 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2590 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2591 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2592 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2593 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2594 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2595 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2596 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2597 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2598 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH_HEAD",
2599 "WITH", "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9",
2600 "IMPORT", "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2601 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2602 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2603 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2604 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12", "SLOT_LIST",
2605 "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2606 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2607 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2608 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2609 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2610 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2611 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2612 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2613 "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2618 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2620 static const yytype_uint16 yytoknum[] =
2622 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2623 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2624 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2625 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2626 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2627 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2628 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2629 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2630 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2631 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2632 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2633 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2634 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2639 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2640 static const yytype_uint8 yyr1[] =
2642 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2643 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2644 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2645 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2646 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2647 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2648 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2649 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2650 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2651 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2652 178, 178, 178, 180, 179, 181, 181, 182, 183, 184,
2653 184, 184, 185, 185, 187, 186, 188, 186, 189, 189,
2654 190, 190, 191, 191, 192, 192, 192, 192, 192, 192,
2655 192, 192, 192, 192, 193, 193, 194, 194, 195, 195,
2656 197, 196, 199, 198, 200, 200, 201, 201, 202, 202,
2657 202, 202, 202, 203, 203, 204, 204, 205, 205, 205,
2658 206, 206, 208, 207, 209, 209, 210, 211, 211, 212,
2659 212, 212, 212, 212, 212, 212, 212, 212, 213, 213,
2660 213, 213, 214, 214, 215, 215, 216, 216, 216, 218,
2661 217, 219, 219, 221, 220, 222, 223, 224, 224, 225,
2662 225, 226, 226, 226, 227, 227, 228, 228, 229, 229,
2663 229, 230, 231, 230, 232, 233, 234, 234, 235, 236,
2664 236, 237, 238, 238, 239, 240, 240, 240, 240, 240,
2665 240, 240, 241, 241, 241, 241, 241, 241, 241, 241,
2666 241, 241, 240, 240, 240, 240, 240, 240, 240, 240,
2667 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2668 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2669 240, 240, 240, 240, 240, 240, 242, 242, 243, 243,
2670 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2671 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
2672 240, 240, 240, 240, 244, 245, 245, 245, 246, 247
2675 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2676 static const yytype_uint8 yyr2[] =
2678 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2679 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2680 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2681 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2682 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2683 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2684 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2685 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2686 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2687 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2688 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2689 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2690 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2691 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2692 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2693 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2694 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2695 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2696 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2697 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2698 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2699 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2700 2, 1, 1, 3, 1, 1, 1, 1, 1, 1,
2701 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2702 1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
2703 3, 3, 2, 2, 3, 3, 3, 3, 3, 3,
2704 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
2705 2, 1, 3, 2, 4, 3, 0, 1, 3, 5,
2706 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2707 3, 3, 5, 2, 2, 2, 2, 3, 2, 4,
2708 5, 3, 5, 3, 1, 2, 4, 4, 2, 3
2711 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2712 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2713 means the default is an error. */
2714 static const yytype_uint16 yydefact[] =
2716 120, 304, 133, 237, 231, 234, 235, 232, 233, 236,
2717 0, 0, 78, 0, 0, 126, 124, 125, 0, 132,
2718 0, 131, 192, 238, 271, 127, 0, 0, 0, 241,
2719 128, 130, 129, 0, 0, 240, 239, 0, 0, 276,
2720 0, 0, 14, 0, 0, 0, 0, 208, 120, 0,
2721 0, 2, 120, 5, 54, 12, 0, 36, 67, 31,
2722 32, 33, 34, 35, 38, 120, 37, 7, 30, 0,
2723 121, 122, 9, 8, 11, 10, 225, 228, 230, 229,
2724 224, 39, 222, 226, 227, 41, 40, 0, 0, 72,
2725 76, 120, 92, 109, 111, 110, 116, 113, 0, 0,
2726 304, 214, 191, 0, 270, 0, 0, 118, 0, 103,
2727 208, 0, 218, 65, 0, 221, 0, 277, 296, 295,
2728 273, 253, 252, 0, 0, 209, 210, 211, 82, 0,
2729 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
2730 46, 47, 48, 50, 0, 49, 298, 1, 6, 120,
2731 304, 0, 68, 0, 0, 69, 53, 108, 0, 188,
2732 0, 161, 0, 160, 162, 308, 123, 0, 0, 0,
2733 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2735 294, 293, 0, 0, 0, 0, 0, 0, 0, 0,
2736 0, 0, 0, 0, 0, 0, 0, 0, 208, 0,
2737 0, 55, 73, 0, 0, 0, 120, 114, 0, 195,
2738 0, 198, 197, 309, 206, 178, 0, 0, 0, 27,
2739 0, 297, 0, 0, 280, 0, 272, 275, 212, 213,
2740 83, 205, 59, 60, 105, 220, 58, 81, 42, 28,
2741 120, 0, 205, 0, 0, 52, 305, 187, 186, 0,
2742 134, 136, 0, 223, 267, 268, 265, 266, 246, 247,
2743 249, 248, 244, 245, 287, 286, 282, 281, 289, 290,
2744 288, 284, 283, 285, 250, 251, 301, 259, 258, 257,
2745 291, 0, 256, 255, 254, 242, 243, 263, 262, 260,
2746 264, 261, 0, 0, 303, 0, 0, 0, 0, 0,
2747 25, 0, 120, 17, 23, 0, 20, 19, 22, 21,
2748 120, 112, 0, 208, 215, 167, 0, 0, 179, 183,
2749 107, 119, 196, 269, 0, 26, 217, 0, 278, 0,
2750 0, 57, 0, 120, 13, 57, 0, 0, 0, 0,
2751 0, 138, 0, 0, 205, 163, 164, 0, 216, 274,
2752 0, 0, 299, 120, 0, 0, 117, 18, 120, 0,
2753 0, 0, 0, 185, 180, 205, 0, 0, 120, 0,
2754 203, 202, 201, 204, 0, 62, 61, 51, 0, 120,
2755 306, 307, 178, 135, 0, 0, 199, 137, 142, 57,
2756 0, 292, 300, 302, 77, 0, 84, 0, 115, 207,
2757 177, 173, 170, 171, 169, 172, 176, 175, 174, 168,
2758 167, 0, 0, 182, 0, 0, 98, 102, 100, 104,
2759 63, 279, 56, 0, 75, 0, 139, 140, 0, 120,
2760 166, 165, 79, 0, 0, 0, 85, 88, 86, 24,
2761 184, 193, 181, 96, 0, 99, 101, 120, 66, 120,
2762 205, 120, 200, 0, 157, 0, 0, 120, 155, 0,
2763 27, 93, 89, 87, 27, 27, 205, 64, 74, 0,
2764 148, 152, 0, 0, 0, 120, 146, 150, 151, 158,
2765 188, 143, 156, 27, 91, 0, 0, 0, 189, 120,
2766 141, 147, 0, 90, 194, 97, 94, 27, 0, 0,
2767 0, 0, 149, 178, 27, 190, 0, 0, 205, 95,
2771 /* YYDEFGOTO[NTERM-NUM]. */
2772 static const yytype_int16 yydefgoto[] =
2774 -1, 50, 51, 52, 53, 311, 312, 313, 334, 335,
2775 137, 138, 157, 314, 139, 385, 140, 246, 243, 458,
2776 57, 232, 153, 154, 58, 59, 60, 61, 213, 62,
2777 91, 141, 142, 445, 446, 447, 448, 63, 215, 426,
2778 510, 427, 475, 428, 429, 64, 229, 143, 65, 66,
2779 219, 220, 67, 320, 216, 68, 144, 70, 71, 351,
2780 353, 395, 316, 461, 317, 439, 484, 485, 486, 466,
2781 467, 468, 164, 318, 262, 355, 356, 373, 419, 327,
2782 328, 329, 259, 319, 507, 103, 76, 474, 221, 222,
2783 382, 397, 383, 341, 324, 124, 125, 126, 224, 77,
2784 78, 79, 145, 127, 80, 81, 82, 83, 116, 117,
2788 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2790 #define YYPACT_NINF -403
2791 static const yytype_int16 yypact[] =
2793 1674, -70, -403, -403, -403, -403, -403, -403, -403, -403,
2794 -15, -72, -403, -52, 19, -403, -403, -403, 80, -403,
2795 2094, -403, 99, -403, 2164, -403, -16, 42, -5, -403,
2796 -403, -403, -403, -1, 5, -403, -403, 2094, 13, 2094,
2797 2094, 2094, -403, 2094, 2094, 2094, 2094, 2094, 634, 123,
2798 128, -403, 504, -403, -403, -403, 8, -403, 2024, -403,
2799 -403, -403, -403, -403, -403, 1926, -403, -403, -403, 240,
2800 361, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2801 38, -403, 2569, -403, -403, -403, -403, 137, 20, -403,
2802 -403, 1926, -403, -403, -403, -403, -403, -403, -87, 42,
2803 -403, -67, -403, 21, -48, 2094, 79, -403, 2094, -403,
2804 2094, 138, -48, -403, 43, 2569, 76, 107, -48, -48,
2805 604, -48, -48, -29, 84, 110, 2094, -403, 210, 211,
2806 2094, 2094, 211, 212, -403, -403, 764, -403, -403, 85,
2807 -403, -403, -403, -403, 209, -403, -403, -403, -403, 1024,
2808 158, 232, -403, 139, 171, -403, 141, -403, 238, 12,
2809 239, -403, 247, -403, -403, -403, -403, 2094, 2094, 2094,
2810 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2811 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2812 -403, -403, 249, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2813 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
2814 11, -403, -403, 2094, 229, 2094, 1154, -403, 42, 133,
2815 135, -403, -403, -403, 142, 15, -10, 90, 2189, 1800,
2816 130, -403, 2094, 2094, -403, 2094, -403, -403, -403, -403,
2817 -403, 161, 169, -403, 38, 38, 169, -403, -403, -403,
2818 1926, 149, 161, 2094, 2094, -403, 168, -403, -403, 280,
2819 231, 233, 286, 2569, 1016, 496, 496, 496, 322, 322,
2820 322, 322, 1016, 1016, 2569, 2569, 2569, 2569, 2569, 2569,
2821 2569, 2569, 2569, 2569, 2630, 2691, -403, 368, 368, 368,
2822 2569, 2386, 2752, 2813, 2874, 1016, 1016, 604, 604, -48,
2823 -48, -48, 157, 2447, 202, 2094, 291, 14, 173, 2260,
2824 -403, 165, 1284, -403, -403, 172, -403, -403, -403, -403,
2825 1154, -403, 42, 2094, -403, -43, 296, 167, 201, -403,
2826 -403, -403, 175, -403, 174, 1800, -403, 44, -403, 200,
2827 63, 207, 211, 894, -403, -27, -11, 46, 113, 189,
2828 42, 298, 42, 190, 161, 217, -403, 2094, -403, -403,
2829 315, 2323, -403, 1926, 2094, 193, -403, -403, 1154, 192,
2830 194, 75, 63, -403, -403, 161, 26, 96, 1926, 2094,
2831 -403, -403, -403, -403, 2094, -403, -403, -403, 2094, 1926,
2832 -403, -403, 15, -403, 42, 199, -403, 230, -403, 207,
2833 286, 2569, -403, -403, -403, 103, 24, 197, -403, -403,
2834 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2835 234, 205, 296, -403, 206, 213, -403, -403, 96, -403,
2836 268, -403, -403, 204, -403, 215, 230, -403, 42, 208,
2837 -403, -403, -403, 2094, 236, 214, 24, -403, -403, -403,
2838 -403, -403, -403, -403, 335, -403, -403, 1926, -403, 1926,
2839 161, 1414, -403, 339, -403, 316, 219, 227, -403, 2508,
2840 1800, -403, -403, -403, 1800, 1800, 161, -403, -403, 223,
2841 -403, -403, 226, 250, 221, 1544, -403, -403, -403, -403,
2842 12, -403, -403, 1800, -403, 222, 224, 225, -403, 1414,
2843 -403, -403, 354, -403, -403, -403, -403, 1800, 228, 241,
2844 235, 243, -403, 15, 1800, -403, 244, 246, 161, -403,
2848 /* YYPGOTO[NTERM-NUM]. */
2849 static const yytype_int16 yypgoto[] =
2851 -403, -403, 218, -403, 312, -299, -403, 61, -402, -31,
2852 1, -55, -85, 48, 2, -23, 321, 251, 58, -403,
2853 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
2854 -403, -403, -403, -403, -403, -62, -60, -403, -403, -40,
2855 -403, -36, -403, -403, -403, -403, -403, -403, -403, -403,
2856 6, 50, -403, -403, -403, -403, 0, -403, 331, -403,
2857 -403, -403, 49, -403, 51, -403, -96, -403, -80, -403,
2858 -403, -61, -403, 3, -403, -403, 7, 9, -403, -376,
2859 -403, -311, -79, 4, -403, -403, -403, -403, -403, 388,
2860 -91, 25, 52, -239, -403, -98, -403, -403, -403, -403,
2861 -403, -403, -403, -34, -9, -49, -13, -403, -403, -403,
2862 -403, -403, -403, -403
2865 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2866 positive, shift that token. If negative, reduce the rule which
2867 number is the opposite. If zero, do what YYDEFACT says.
2868 If YYTABLE_NINF, syntax error. */
2869 #define YYTABLE_NINF -155
2870 static const yytype_int16 yytable[] =
2872 69, 54, 56, 74, 75, 114, 214, 101, 223, 155,
2873 156, 104, 230, 345, 304, 374, 435, 136, 325, 87,
2874 97, 369, 93, 94, 112, 192, 115, 118, 119, 325,
2875 120, 121, 122, 97, 115, 88, 156, 123, 95, 217,
2876 218, -70, 190, 191, 192, 93, 94, 257, 55, 72,
2877 90, 73, 69, 54, 56, 74, 75, 209, 443, 371,
2878 210, 95, 372, 258, 98, 423, 93, 94, 494, 407,
2879 92, 167, 495, 496, 208, 384, 209, 106, 410, 210,
2880 411, 249, 95, 412, 413, 414, 444, 415, 388, 167,
2881 167, 503, 239, 93, 94, 228, 226, 115, 99, 380,
2882 55, 72, 102, 73, 236, 511, 105, 89, 326, 95,
2883 302, 452, 517, 115, 167, 399, 390, 108, 391, 422,
2884 416, 244, 245, 330, 424, 109, 146, 110, 147, 425,
2885 417, 418, 111, 305, 149, 113, 421, 516, 167, 306,
2886 211, 231, 212, 225, 167, 96, 167, 363, 233, 69,
2887 54, 56, 74, 75, 263, 264, 265, 266, 267, 268,
2888 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
2889 279, 280, 281, 282, 283, 284, 285, 378, 381, 389,
2890 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
2891 297, 298, 299, 300, 301, 115, 303, 55, 72, 338,
2892 73, 339, 309, 167, 307, 331, 227, 235, 234, 237,
2893 238, 250, 2, 240, 241, 247, 69, 54, 315, 343,
2894 115, 479, 115, 337, 321, 370, -71, 158, 15, 16,
2895 17, 2, 19, 332, 21, 252, 442, 497, 253, 254,
2896 255, 256, 260, 308, 346, 347, 25, 15, 16, 17,
2897 261, 19, 286, 21, 463, 30, 31, 32, 158, 393,
2898 -113, 396, 322, 336, 323, 25, 340, 159, 158, 342,
2899 348, 160, 161, 463, 30, 31, 32, 159, 404, 520,
2900 249, 344, 161, 349, 162, 350, 163, 352, 249, 354,
2901 358, 360, 361, 430, 362, 364, 163, 366, 368, 325,
2902 375, 376, -112, 396, 434, 379, 377, 464, 156, 384,
2903 115, 392, 69, 54, 315, 394, 398, 400, 402, 406,
2904 69, 54, 315, 156, 408, 437, 464, 409, 332, 449,
2905 438, 451, 453, 457, 156, 454, 371, 459, 476, 433,
2906 -153, 470, 489, 490, 401, 431, 471, 462, 460, 498,
2907 432, 491, 499, 500, 504, 405, 505, 509, 506, -154,
2908 512, 514, 168, 513, 148, 2, 115, 251, 69, 54,
2909 315, 115, 477, 367, 478, 515, 440, 518, 519, 152,
2910 242, 15, 16, 17, 472, 19, 473, 21, 455, 169,
2911 170, 171, 456, -155, -155, -155, -155, 176, 177, 25,
2912 386, 166, 156, 508, 156, 501, 492, 441, 30, 31,
2913 32, 502, 190, 191, 192, 107, 193, 194, 195, 436,
2914 0, 0, 0, 0, 420, 0, 0, 0, 0, 450,
2915 469, 201, 202, 0, 203, 204, 205, 206, 207, 465,
2916 0, 0, 0, 0, 208, 0, 209, 0, 0, 210,
2917 0, 0, 0, 0, 0, 0, 0, 0, 190, 191,
2918 192, 483, 481, 482, 487, 488, 0, 465, 0, 0,
2919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2920 203, 204, 205, 206, 207, 483, 481, 482, 487, 488,
2921 208, 0, 209, 0, 0, 210, 0, 0, 0, 483,
2922 481, 482, 487, 488, -4, 0, 0, 1, 2, 3,
2923 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2924 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
2925 21, 0, 0, 23, 0, 0, 168, 0, 0, 0,
2926 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2927 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2928 36, 0, 0, -155, -155, -155, 0, 37, 38, 0,
2929 0, 176, 177, 0, 39, 0, 0, 0, 0, 0,
2930 0, 0, 0, 0, 0, 0, 190, 191, 192, 0,
2931 193, 194, 195, 0, 40, 41, 0, 0, 0, 0,
2932 0, 0, 0, 42, 0, 201, 202, 0, 203, 204,
2933 205, 206, 207, 0, 0, 0, 43, 0, 208, 0,
2934 209, 44, 45, 210, 0, 0, 46, 0, 47, 0,
2935 48, 0, 49, 0, 0, 0, -4, 1, 2, 3,
2936 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2937 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2938 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2939 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2940 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2941 36, 0, 0, 0, 190, 191, 192, 37, 38, 0,
2942 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2943 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
2944 207, 0, 0, 0, 40, 41, 208, 0, 209, 0,
2945 0, 210, 0, 134, 0, 0, 0, 0, 0, 0,
2946 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2947 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2948 48, 0, 49, 0, 0, 0, 135, 1, 2, 3,
2949 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2950 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2951 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2952 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2953 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2954 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2955 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2957 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2958 0, 0, 0, 134, 0, 0, 0, 0, 0, 0,
2959 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2960 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2961 48, 0, 49, 0, 0, 0, 248, 1, 2, 3,
2962 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2963 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2964 21, 22, 0, 23, 128, 0, 129, 0, 0, 0,
2965 24, 130, 25, 26, 0, 27, 131, 28, 0, 29,
2966 132, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2967 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2968 133, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2970 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2971 0, 0, 0, 134, 0, 0, 0, 0, 0, 0,
2972 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2973 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
2974 48, 0, 49, 0, 0, 0, 387, 1, 2, 3,
2975 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2976 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
2977 21, 0, 0, 23, 0, 0, -155, 0, 0, 0,
2978 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2979 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2980 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2981 0, -155, -155, 0, 39, 0, 0, 0, 0, 0,
2982 0, 0, 0, 0, 0, 0, 190, 191, 192, 0,
2983 193, 194, 195, 0, 40, 41, 0, 0, 0, 0,
2984 0, 0, 0, 42, 0, -155, -155, 0, 203, 204,
2985 205, 206, 207, 0, 0, 0, 43, 0, 208, 0,
2986 209, 44, 45, 210, 0, 0, 46, 0, 47, 0,
2987 48, 0, 49, 0, 0, 0, -3, 1, 2, 3,
2988 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
2989 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
2990 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
2991 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
2992 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
2993 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
2994 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
2995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2996 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
2997 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
2998 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
2999 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3000 48, 0, 49, 0, 0, 0, -15, 1, 2, 3,
3001 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3002 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3003 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3004 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3005 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3006 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3007 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3009 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3010 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
3011 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3012 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3013 48, 0, 49, 0, 0, 0, -16, 1, 2, 3,
3014 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3015 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3016 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3017 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3018 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3019 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3020 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3022 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3023 0, 0, 0, 480, 0, 0, 0, 0, 0, 0,
3024 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3025 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3026 48, 0, 49, 0, 0, 0, -144, 1, 2, 3,
3027 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3028 13, 0, 0, 0, 15, 16, 17, 18, 19, 20,
3029 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3030 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3031 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3032 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3033 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3035 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3036 0, 0, 0, 480, 0, 0, 0, 0, 0, 0,
3037 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3038 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3039 48, 0, 49, 0, -3, 0, -145, 1, 2, 3,
3040 4, 0, 5, 6, 7, 8, 9, 10, 11, 12,
3041 13, 0, 0, 14, 15, 16, 17, 18, 19, 20,
3042 21, 0, 0, 23, 0, 0, 0, 0, 0, 0,
3043 24, 0, 25, 26, 0, 27, 0, 28, 0, 29,
3044 0, 30, 31, 32, 0, 0, 33, 34, 0, 35,
3045 36, 0, 0, 0, 0, 0, 0, 37, 38, 0,
3046 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3048 0, 0, 0, 0, 40, 41, 0, 0, 0, 0,
3049 0, 0, 0, 42, 0, 0, 0, 0, 0, 0,
3050 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
3051 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3052 48, 0, 49, 1, 2, 3, 4, 0, 5, 6,
3053 7, 8, 9, 10, 11, 12, 13, 0, -120, 0,
3054 15, 16, 17, 18, 19, 20, 21, 22, 0, 23,
3055 128, 0, 129, 0, 0, 0, 24, 130, 25, 26,
3056 0, 27, 131, 28, 0, 29, 132, 30, 31, 32,
3057 0, 0, 33, 34, 0, 35, 36, 0, 0, 0,
3058 0, 0, 0, 37, 38, 0, 133, 0, 0, 0,
3059 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3061 40, 41, 0, 0, 0, 0, 0, 0, 0, 134,
3062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3063 0, 0, 43, 0, 0, 0, 0, 44, 45, 0,
3064 0, 0, 46, 0, 47, 0, 48, 0, 49, 1,
3065 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
3066 11, 12, 13, 0, 0, 0, 15, 16, 17, 18,
3067 19, 20, 21, 22, 0, 23, 128, 0, 129, 0,
3068 0, 0, 24, 130, 25, 26, 0, 27, 131, 28,
3069 0, 29, 132, 30, 31, 32, 0, 0, 33, 34,
3070 0, 35, 36, 0, 0, 0, 0, 0, 0, 37,
3071 38, 0, 133, 0, 0, 0, 39, 0, 0, 0,
3072 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3073 0, 0, 0, 0, 0, 0, 40, 41, 0, 0,
3074 0, 0, 0, 0, 0, 134, 0, 150, 0, 3,
3075 4, 0, 5, 6, 7, 8, 9, 0, 43, 0,
3076 0, 0, 0, 44, 45, 0, 0, 0, 46, 20,
3077 47, 22, 48, 23, 49, 0, 129, 0, 0, 0,
3078 24, 0, 0, 0, 0, 0, 0, 28, 0, 29,
3079 151, 0, 0, 0, 0, 0, 0, 34, 0, 35,
3080 36, 0, 0, 0, 0, 0, 0, 37, 0, 0,
3081 0, 0, 0, 0, 39, 0, 0, 100, 0, 3,
3082 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3083 0, 0, 0, 0, 40, 41, 0, 0, 0, 20,
3084 0, 22, 0, 23, 0, 0, 0, 0, 0, 0,
3085 24, 0, 0, 0, 0, 0, 43, 28, 0, 29,
3086 0, 44, 45, 0, 0, 0, 46, 34, 47, 35,
3087 36, 0, 49, 0, 0, 0, 0, 37, 0, 0,
3088 0, 0, 0, 0, 39, 0, 0, 100, 0, 3,
3089 4, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3090 0, 0, 0, 0, 40, 41, 0, 0, 0, 20,
3091 0, 22, 0, 23, 0, 0, 0, 0, 0, 0,
3092 0, 0, 0, 0, 0, 0, 43, 0, 0, 29,
3093 0, 44, 45, 0, 0, 0, 46, 34, 47, 35,
3094 36, 0, 49, 0, 0, 0, 0, 0, 0, 168,
3095 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
3096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3097 0, 0, 0, 0, 40, 41, 169, 170, 171, 0,
3098 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3099 182, 183, 184, 185, 186, 187, 188, 189, 0, 190,
3100 191, 192, 0, 193, 194, 195, 46, 0, 47, 0,
3101 0, 196, 49, 197, 0, 198, 199, 200, 201, 202,
3102 168, 203, 204, 205, 206, 207, 0, 0, 0, 0,
3103 0, 208, 0, 209, 0, 0, 210, 0, 0, 0,
3104 0, 0, 333, 0, 0, 0, 0, 169, 170, 171,
3105 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
3106 181, 182, 183, 184, 185, 186, 187, 188, 189, 0,
3107 190, 191, 192, 0, 193, 194, 195, 0, 0, 0,
3108 0, 0, 196, 168, 197, 0, 198, 199, 200, 201,
3109 202, 0, 203, 204, 205, 206, 207, 0, 0, 0,
3110 0, 0, 208, 0, 209, 0, 0, 210, 0, 0,
3111 169, 170, 171, 365, 172, 173, 174, 175, 176, 177,
3112 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
3113 188, 189, 0, 190, 191, 192, 0, 193, 194, 195,
3114 0, 0, 0, 0, 0, 196, 168, 197, 0, 198,
3115 199, 200, 201, 202, 0, 203, 204, 205, 206, 207,
3116 0, 0, 0, 0, 0, 208, 0, 209, 0, 0,
3117 210, 0, 0, 169, 170, 171, 403, 172, 173, 174,
3118 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
3119 185, 186, 187, 188, 189, 0, 190, 191, 192, 0,
3120 193, 194, 195, 0, 0, 0, 0, 168, 196, 0,
3121 197, 357, 198, 199, 200, 201, 202, 0, 203, 204,
3122 205, 206, 207, 0, 0, 0, 0, 0, 208, 0,
3123 209, 0, 0, 210, 169, 170, 171, 0, 172, 173,
3124 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
3125 184, 185, 186, 187, 188, 189, 0, 190, 191, 192,
3126 0, 193, 194, 195, 0, 0, 0, 0, 168, 196,
3127 0, 197, 0, 198, 199, 200, 201, 202, 0, 203,
3128 204, 205, 206, 207, 0, 0, 0, 0, 0, 208,
3129 0, 209, 359, 0, 210, 169, 170, 171, 0, 172,
3130 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3131 183, 184, 185, 186, 187, 188, 189, 0, 190, 191,
3132 192, 0, 193, 194, 195, 0, 0, 0, 0, 168,
3133 196, 0, 197, 493, 198, 199, 200, 201, 202, 0,
3134 203, 204, 205, 206, 207, 0, 0, 0, 0, 0,
3135 208, 0, 209, 0, 0, 210, 169, 170, 171, 0,
3136 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
3137 182, 183, 184, 185, 186, 187, 188, 189, 0, 190,
3138 191, 192, 0, 193, 194, 195, 0, 0, 0, 0,
3139 168, 196, 0, 197, 0, 198, 199, 200, 201, 202,
3140 0, 203, 204, 205, 206, 207, 0, 0, 0, 0,
3141 0, 208, 0, 209, 0, 0, 210, 169, 170, 171,
3142 0, 172, 173, 174, 175, 176, 177, 0, 0, 0,
3143 0, 0, 0, 0, 0, 0, 0, 0, 189, 0,
3144 190, 191, 192, 0, 193, 194, 195, 0, 0, 0,
3145 0, 168, 0, 0, 0, 0, 198, 199, 200, 201,
3146 202, 0, 203, 204, 205, 206, 207, 0, 0, 0,
3147 0, 0, 208, 0, 209, 0, 0, 210, 169, 170,
3148 171, 0, 172, 173, 174, 175, 176, 177, 0, 0,
3149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3150 0, 190, 191, 192, 0, 193, 194, 195, 0, 0,
3151 0, 0, 168, 0, 0, 0, 0, 198, 199, 200,
3152 201, 202, 0, 203, 204, 205, 206, 207, 0, 0,
3153 0, 0, 0, 208, 0, 209, 0, 0, 210, 169,
3154 170, 171, 0, 172, 173, 174, 175, 176, 177, 0,
3155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3156 0, 0, 190, 191, 192, 0, 193, 194, 195, 0,
3157 0, 0, 0, 168, 0, 0, 0, 0, 0, 199,
3158 200, 201, 202, 0, 203, 204, 205, 206, 207, 0,
3159 0, 0, 0, 0, 208, 0, 209, 0, 0, 210,
3160 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
3161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3162 0, 0, 0, 190, 191, 192, 0, 193, 194, 195,
3163 0, 0, 0, 0, 168, 0, 0, 0, 0, 0,
3164 0, 200, 201, 202, 0, 203, 204, 205, 206, 207,
3165 0, 0, 0, 0, 0, 208, 0, 209, 0, 0,
3166 210, 169, 170, 171, 0, 172, 173, 174, 175, 176,
3167 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3168 0, 0, 0, 0, 190, 191, 192, 0, 193, 194,
3169 195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3170 0, 0, -155, 201, 202, 0, 203, 204, 205, 206,
3171 207, 0, 0, 0, 0, 0, 208, 0, 209, 0,
3175 static const yytype_int16 yycheck[] =
3177 0, 0, 0, 0, 0, 39, 91, 20, 99, 58,
3178 65, 24, 110, 252, 3, 326, 392, 48, 3, 89,
3179 14, 320, 3, 4, 37, 92, 39, 40, 41, 3,
3180 43, 44, 45, 27, 47, 50, 91, 46, 19, 126,
3181 127, 68, 90, 91, 92, 3, 4, 35, 0, 0,
3182 122, 0, 52, 52, 52, 52, 52, 124, 34, 102,
3183 127, 19, 105, 51, 14, 376, 3, 4, 470, 368,
3184 122, 100, 474, 475, 122, 102, 124, 27, 3, 127,
3185 5, 136, 19, 8, 9, 10, 62, 12, 99, 100,
3186 100, 493, 126, 3, 4, 108, 105, 110, 18, 36,
3187 52, 52, 3, 52, 133, 507, 122, 122, 93, 19,
3188 208, 422, 514, 126, 100, 354, 3, 122, 5, 93,
3189 45, 130, 131, 133, 28, 126, 3, 122, 0, 33,
3190 55, 56, 127, 122, 126, 122, 375, 513, 100, 128,
3191 3, 3, 122, 122, 100, 126, 100, 133, 105, 149,
3192 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
3193 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3194 183, 184, 185, 186, 187, 188, 189, 133, 115, 133,
3195 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3196 203, 204, 205, 206, 207, 208, 209, 149, 149, 233,
3197 149, 235, 215, 100, 213, 115, 127, 100, 132, 125,
3198 100, 126, 4, 3, 3, 3, 216, 216, 216, 250,
3199 233, 460, 235, 232, 218, 323, 68, 18, 20, 21,
3200 22, 4, 24, 227, 26, 3, 133, 476, 99, 68,
3201 99, 3, 3, 14, 253, 254, 38, 20, 21, 22,
3202 3, 24, 3, 26, 46, 47, 48, 49, 18, 350,
3203 127, 352, 127, 133, 122, 38, 105, 27, 18, 100,
3204 102, 31, 32, 46, 47, 48, 49, 27, 363, 518,
3205 335, 132, 32, 3, 44, 54, 46, 54, 343, 3,
3206 133, 89, 305, 378, 3, 122, 46, 132, 126, 3,
3207 133, 100, 127, 394, 389, 105, 132, 99, 363, 102,
3208 323, 122, 312, 312, 312, 17, 126, 100, 3, 126,
3209 320, 320, 320, 378, 132, 126, 99, 133, 322, 132,
3210 100, 126, 126, 65, 389, 122, 102, 133, 3, 388,
3211 132, 105, 3, 27, 357, 379, 132, 438, 133, 126,
3212 384, 132, 126, 132, 132, 364, 132, 3, 133, 132,
3213 132, 126, 40, 122, 52, 4, 379, 149, 368, 368,
3214 368, 384, 457, 312, 459, 132, 399, 133, 132, 58,
3215 129, 20, 21, 22, 446, 24, 446, 26, 428, 67,
3216 68, 69, 428, 71, 72, 73, 74, 75, 76, 38,
3217 342, 70, 457, 499, 459, 485, 467, 400, 47, 48,
3218 49, 490, 90, 91, 92, 27, 94, 95, 96, 394,
3219 -1, -1, -1, -1, 372, -1, -1, -1, -1, 420,
3220 443, 109, 110, -1, 112, 113, 114, 115, 116, 439,
3221 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3222 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3223 92, 461, 461, 461, 461, 461, -1, 467, -1, -1,
3224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3225 112, 113, 114, 115, 116, 485, 485, 485, 485, 485,
3226 122, -1, 124, -1, -1, 127, -1, -1, -1, 499,
3227 499, 499, 499, 499, 0, -1, -1, 3, 4, 5,
3228 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3229 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3230 26, -1, -1, 29, -1, -1, 40, -1, -1, -1,
3231 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3232 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3233 56, -1, -1, 67, 68, 69, -1, 63, 64, -1,
3234 -1, 75, 76, -1, 70, -1, -1, -1, -1, -1,
3235 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3236 94, 95, 96, -1, 90, 91, -1, -1, -1, -1,
3237 -1, -1, -1, 99, -1, 109, 110, -1, 112, 113,
3238 114, 115, 116, -1, -1, -1, 112, -1, 122, -1,
3239 124, 117, 118, 127, -1, -1, 122, -1, 124, -1,
3240 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3241 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3242 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3243 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3244 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3245 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3246 56, -1, -1, -1, 90, 91, 92, 63, 64, -1,
3247 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3248 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
3249 116, -1, -1, -1, 90, 91, 122, -1, 124, -1,
3250 -1, 127, -1, 99, -1, -1, -1, -1, -1, -1,
3251 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3252 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3253 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3254 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3255 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3256 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3257 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3258 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3259 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3260 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3262 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3263 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3264 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3265 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3266 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3267 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3268 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3269 26, 27, -1, 29, 30, -1, 32, -1, -1, -1,
3270 36, 37, 38, 39, -1, 41, 42, 43, -1, 45,
3271 46, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3272 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3273 66, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3274 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3275 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3276 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3277 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3278 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3279 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3280 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3281 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3282 26, -1, -1, 29, -1, -1, 40, -1, -1, -1,
3283 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3284 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3285 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3286 -1, 75, 76, -1, 70, -1, -1, -1, -1, -1,
3287 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3288 94, 95, 96, -1, 90, 91, -1, -1, -1, -1,
3289 -1, -1, -1, 99, -1, 109, 110, -1, 112, 113,
3290 114, 115, 116, -1, -1, -1, 112, -1, 122, -1,
3291 124, 117, 118, 127, -1, -1, 122, -1, 124, -1,
3292 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3293 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3294 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3295 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3296 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3297 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3298 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3299 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3301 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3302 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3303 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3304 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3305 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3306 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3307 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3308 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3309 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3310 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3311 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3312 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3314 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3315 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3316 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3317 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3318 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3319 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3320 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3321 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3322 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3323 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3324 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3325 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3327 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3328 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3329 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3330 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3331 126, -1, 128, -1, -1, -1, 132, 3, 4, 5,
3332 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3333 16, -1, -1, -1, 20, 21, 22, 23, 24, 25,
3334 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3335 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3336 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3337 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3338 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3339 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3340 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3341 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3342 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3343 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3344 126, -1, 128, -1, 0, -1, 132, 3, 4, 5,
3345 6, -1, 8, 9, 10, 11, 12, 13, 14, 15,
3346 16, -1, -1, 19, 20, 21, 22, 23, 24, 25,
3347 26, -1, -1, 29, -1, -1, -1, -1, -1, -1,
3348 36, -1, 38, 39, -1, 41, -1, 43, -1, 45,
3349 -1, 47, 48, 49, -1, -1, 52, 53, -1, 55,
3350 56, -1, -1, -1, -1, -1, -1, 63, 64, -1,
3351 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3353 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3354 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3355 -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
3356 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3357 126, -1, 128, 3, 4, 5, 6, -1, 8, 9,
3358 10, 11, 12, 13, 14, 15, 16, -1, 18, -1,
3359 20, 21, 22, 23, 24, 25, 26, 27, -1, 29,
3360 30, -1, 32, -1, -1, -1, 36, 37, 38, 39,
3361 -1, 41, 42, 43, -1, 45, 46, 47, 48, 49,
3362 -1, -1, 52, 53, -1, 55, 56, -1, -1, -1,
3363 -1, -1, -1, 63, 64, -1, 66, -1, -1, -1,
3364 70, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3365 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3366 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3368 -1, -1, 112, -1, -1, -1, -1, 117, 118, -1,
3369 -1, -1, 122, -1, 124, -1, 126, -1, 128, 3,
3370 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3371 14, 15, 16, -1, -1, -1, 20, 21, 22, 23,
3372 24, 25, 26, 27, -1, 29, 30, -1, 32, -1,
3373 -1, -1, 36, 37, 38, 39, -1, 41, 42, 43,
3374 -1, 45, 46, 47, 48, 49, -1, -1, 52, 53,
3375 -1, 55, 56, -1, -1, -1, -1, -1, -1, 63,
3376 64, -1, 66, -1, -1, -1, 70, -1, -1, -1,
3377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3378 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3379 -1, -1, -1, -1, -1, 99, -1, 3, -1, 5,
3380 6, -1, 8, 9, 10, 11, 12, -1, 112, -1,
3381 -1, -1, -1, 117, 118, -1, -1, -1, 122, 25,
3382 124, 27, 126, 29, 128, -1, 32, -1, -1, -1,
3383 36, -1, -1, -1, -1, -1, -1, 43, -1, 45,
3384 46, -1, -1, -1, -1, -1, -1, 53, -1, 55,
3385 56, -1, -1, -1, -1, -1, -1, 63, -1, -1,
3386 -1, -1, -1, -1, 70, -1, -1, 3, -1, 5,
3387 6, -1, 8, 9, 10, 11, 12, -1, -1, -1,
3388 -1, -1, -1, -1, 90, 91, -1, -1, -1, 25,
3389 -1, 27, -1, 29, -1, -1, -1, -1, -1, -1,
3390 36, -1, -1, -1, -1, -1, 112, 43, -1, 45,
3391 -1, 117, 118, -1, -1, -1, 122, 53, 124, 55,
3392 56, -1, 128, -1, -1, -1, -1, 63, -1, -1,
3393 -1, -1, -1, -1, 70, -1, -1, 3, -1, 5,
3394 6, -1, 8, 9, 10, 11, 12, -1, -1, -1,
3395 -1, -1, -1, -1, 90, 91, -1, -1, -1, 25,
3396 -1, 27, -1, 29, -1, -1, -1, -1, -1, -1,
3397 -1, -1, -1, -1, -1, -1, 112, -1, -1, 45,
3398 -1, 117, 118, -1, -1, -1, 122, 53, 124, 55,
3399 56, -1, 128, -1, -1, -1, -1, -1, -1, 40,
3400 -1, -1, -1, -1, 70, -1, -1, -1, -1, -1,
3401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3402 -1, -1, -1, -1, 90, 91, 67, 68, 69, -1,
3403 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3404 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3405 91, 92, -1, 94, 95, 96, 122, -1, 124, -1,
3406 -1, 102, 128, 104, -1, 106, 107, 108, 109, 110,
3407 40, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3408 -1, 122, -1, 124, -1, -1, 127, -1, -1, -1,
3409 -1, -1, 133, -1, -1, -1, -1, 67, 68, 69,
3410 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3411 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3412 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3413 -1, -1, 102, 40, 104, -1, 106, 107, 108, 109,
3414 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3415 -1, -1, 122, -1, 124, -1, -1, 127, -1, -1,
3416 67, 68, 69, 133, 71, 72, 73, 74, 75, 76,
3417 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3418 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3419 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3420 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3421 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3422 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3423 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3424 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3425 94, 95, 96, -1, -1, -1, -1, 40, 102, -1,
3426 104, 105, 106, 107, 108, 109, 110, -1, 112, 113,
3427 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3428 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3429 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3430 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3431 -1, 94, 95, 96, -1, -1, -1, -1, 40, 102,
3432 -1, 104, -1, 106, 107, 108, 109, 110, -1, 112,
3433 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3434 -1, 124, 125, -1, 127, 67, 68, 69, -1, 71,
3435 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3436 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3437 92, -1, 94, 95, 96, -1, -1, -1, -1, 40,
3438 102, -1, 104, 105, 106, 107, 108, 109, 110, -1,
3439 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3440 122, -1, 124, -1, -1, 127, 67, 68, 69, -1,
3441 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3442 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3443 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3444 40, 102, -1, 104, -1, 106, 107, 108, 109, 110,
3445 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3446 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3447 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1,
3448 -1, -1, -1, -1, -1, -1, -1, -1, 88, -1,
3449 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3450 -1, 40, -1, -1, -1, -1, 106, 107, 108, 109,
3451 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3452 -1, -1, 122, -1, 124, -1, -1, 127, 67, 68,
3453 69, -1, 71, 72, 73, 74, 75, 76, -1, -1,
3454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3455 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3456 -1, -1, 40, -1, -1, -1, -1, 106, 107, 108,
3457 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3458 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3459 68, 69, -1, 71, 72, 73, 74, 75, 76, -1,
3460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3461 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3462 -1, -1, -1, 40, -1, -1, -1, -1, -1, 107,
3463 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3464 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3465 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3466 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3467 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3468 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
3469 -1, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3470 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3471 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3472 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3473 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3474 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3475 -1, -1, 108, 109, 110, -1, 112, 113, 114, 115,
3476 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3480 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3481 symbol of state STATE-NUM. */
3482 static const yytype_uint8 yystos[] =
3484 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3485 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3486 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3487 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3488 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3489 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3490 160, 161, 163, 171, 179, 182, 183, 186, 189, 190,
3491 191, 192, 196, 198, 207, 217, 220, 233, 234, 235,
3492 238, 239, 240, 241, 244, 246, 247, 89, 50, 122,
3493 122, 164, 122, 3, 4, 19, 126, 184, 185, 18,
3494 3, 240, 3, 219, 240, 122, 185, 223, 122, 126,
3495 122, 127, 240, 122, 237, 240, 242, 243, 240, 240,
3496 240, 240, 240, 238, 229, 230, 231, 237, 30, 32,
3497 37, 42, 46, 66, 99, 132, 143, 144, 145, 148,
3498 150, 165, 166, 181, 190, 236, 3, 0, 138, 126,
3499 3, 46, 150, 156, 157, 239, 145, 146, 18, 27,
3500 31, 32, 44, 46, 206, 245, 192, 100, 40, 67,
3501 68, 69, 71, 72, 73, 74, 75, 76, 77, 78,
3502 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3503 90, 91, 92, 94, 95, 96, 102, 104, 106, 107,
3504 108, 109, 110, 112, 113, 114, 115, 116, 122, 124,
3505 127, 3, 122, 162, 146, 172, 188, 126, 127, 184,
3506 185, 222, 223, 224, 232, 122, 238, 127, 240, 180,
3507 229, 3, 155, 105, 132, 100, 133, 125, 100, 237,
3508 3, 3, 151, 152, 238, 238, 151, 3, 132, 145,
3509 126, 136, 3, 99, 68, 99, 3, 35, 51, 216,
3510 3, 3, 208, 240, 240, 240, 240, 240, 240, 240,
3511 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3512 240, 240, 240, 240, 240, 240, 3, 240, 240, 240,
3513 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
3514 240, 240, 229, 240, 3, 122, 128, 238, 14, 240,
3515 99, 139, 140, 141, 147, 148, 196, 198, 207, 217,
3516 187, 184, 127, 122, 228, 3, 93, 213, 214, 215,
3517 133, 115, 184, 133, 142, 143, 133, 238, 237, 237,
3518 105, 227, 100, 143, 132, 227, 238, 238, 102, 3,
3519 54, 193, 54, 194, 3, 209, 210, 105, 133, 125,
3520 89, 240, 3, 133, 122, 133, 132, 141, 126, 139,
3521 229, 102, 105, 211, 215, 133, 100, 132, 133, 105,
3522 36, 115, 224, 226, 102, 149, 152, 132, 99, 133,
3523 3, 5, 122, 224, 17, 195, 224, 225, 126, 227,
3524 100, 240, 3, 133, 146, 238, 126, 139, 132, 133,
3525 3, 5, 8, 9, 10, 12, 45, 55, 56, 212,
3526 226, 227, 93, 215, 28, 33, 173, 175, 177, 178,
3527 146, 237, 237, 239, 146, 213, 225, 126, 100, 199,
3528 149, 210, 133, 34, 62, 167, 168, 169, 170, 132,
3529 211, 126, 215, 126, 122, 173, 175, 65, 153, 133,
3530 133, 197, 224, 46, 99, 190, 203, 204, 205, 240,
3531 105, 132, 169, 170, 221, 176, 3, 146, 146, 227,
3532 99, 144, 148, 190, 200, 201, 202, 207, 217, 3,
3533 27, 132, 205, 105, 142, 142, 142, 227, 126, 126,
3534 132, 202, 216, 142, 132, 132, 133, 218, 200, 3,
3535 174, 142, 132, 122, 126, 132, 213, 142, 133, 132,
3539 #define yyerrok (yyerrstatus = 0)
3540 #define yyclearin (yychar = YYEMPTY)
3541 #define YYEMPTY (-2)
3544 #define YYACCEPT goto yyacceptlab
3545 #define YYABORT goto yyabortlab
3546 #define YYERROR goto yyerrorlab
3549 /* Like YYERROR except do call yyerror. This remains here temporarily
3550 to ease the transition to the new meaning of YYERROR, for GCC.
3551 Once GCC version 2 has supplanted version 1, this can go. */
3553 #define YYFAIL goto yyerrlab
3555 #define YYRECOVERING() (!!yyerrstatus)
3557 #define YYBACKUP(Token, Value) \
3559 if (yychar == YYEMPTY && yylen == 1) \
3563 yytoken = YYTRANSLATE (yychar); \
3569 yyerror (YY_("syntax error: cannot back up")); \
3576 #define YYERRCODE 256
3579 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3580 If N is 0, then set CURRENT to the empty location which ends
3581 the previous symbol: RHS[0] (always defined). */
3583 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3584 #ifndef YYLLOC_DEFAULT
3585 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3589 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3590 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3591 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3592 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3596 (Current).first_line = (Current).last_line = \
3597 YYRHSLOC (Rhs, 0).last_line; \
3598 (Current).first_column = (Current).last_column = \
3599 YYRHSLOC (Rhs, 0).last_column; \
3605 /* YY_LOCATION_PRINT -- Print the location on the stream.
3606 This macro was not mandated originally: define only if we know
3607 we won't break user code: when these are the locations we know. */
3609 #ifndef YY_LOCATION_PRINT
3610 # if YYLTYPE_IS_TRIVIAL
3611 # define YY_LOCATION_PRINT(File, Loc) \
3612 fprintf (File, "%d.%d-%d.%d", \
3613 (Loc).first_line, (Loc).first_column, \
3614 (Loc).last_line, (Loc).last_column)
3616 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3621 /* YYLEX -- calling `yylex' with the right arguments. */
3624 # define YYLEX yylex (YYLEX_PARAM)
3626 # define YYLEX yylex ()
3629 /* Enable debugging if requested. */
3633 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3634 # define YYFPRINTF fprintf
3637 # define YYDPRINTF(Args) \
3643 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3647 YYFPRINTF (stderr, "%s ", Title); \
3648 yy_symbol_print (stderr, \
3650 YYFPRINTF (stderr, "\n"); \
3655 /*--------------------------------.
3656 | Print this symbol on YYOUTPUT. |
3657 `--------------------------------*/
3660 #if (defined __STDC__ || defined __C99__FUNC__ \
3661 || defined __cplusplus || defined _MSC_VER)
3663 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3666 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3669 YYSTYPE const * const yyvaluep;
3675 if (yytype < YYNTOKENS)
3676 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3688 /*--------------------------------.
3689 | Print this symbol on YYOUTPUT. |
3690 `--------------------------------*/
3692 #if (defined __STDC__ || defined __C99__FUNC__ \
3693 || defined __cplusplus || defined _MSC_VER)
3695 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3698 yy_symbol_print (yyoutput, yytype, yyvaluep)
3701 YYSTYPE const * const yyvaluep;
3704 if (yytype < YYNTOKENS)
3705 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3707 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3709 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3710 YYFPRINTF (yyoutput, ")");
3713 /*------------------------------------------------------------------.
3714 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3716 `------------------------------------------------------------------*/
3718 #if (defined __STDC__ || defined __C99__FUNC__ \
3719 || defined __cplusplus || defined _MSC_VER)
3721 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3724 yy_stack_print (yybottom, yytop)
3725 yytype_int16 *yybottom;
3726 yytype_int16 *yytop;
3729 YYFPRINTF (stderr, "Stack now");
3730 for (; yybottom <= yytop; yybottom++)
3732 int yybot = *yybottom;
3733 YYFPRINTF (stderr, " %d", yybot);
3735 YYFPRINTF (stderr, "\n");
3738 # define YY_STACK_PRINT(Bottom, Top) \
3741 yy_stack_print ((Bottom), (Top)); \
3745 /*------------------------------------------------.
3746 | Report that the YYRULE is going to be reduced. |
3747 `------------------------------------------------*/
3749 #if (defined __STDC__ || defined __C99__FUNC__ \
3750 || defined __cplusplus || defined _MSC_VER)
3752 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3755 yy_reduce_print (yyvsp, yyrule)
3760 int yynrhs = yyr2[yyrule];
3762 unsigned long int yylno = yyrline[yyrule];
3763 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3765 /* The symbols being reduced. */
3766 for (yyi = 0; yyi < yynrhs; yyi++)
3768 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3769 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3770 &(yyvsp[(yyi + 1) - (yynrhs)])
3772 YYFPRINTF (stderr, "\n");
3776 # define YY_REDUCE_PRINT(Rule) \
3779 yy_reduce_print (yyvsp, Rule); \
3782 /* Nonzero means print parse trace. It is left uninitialized so that
3783 multiple parsers can coexist. */
3785 #else /* !YYDEBUG */
3786 # define YYDPRINTF(Args)
3787 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3788 # define YY_STACK_PRINT(Bottom, Top)
3789 # define YY_REDUCE_PRINT(Rule)
3790 #endif /* !YYDEBUG */
3793 /* YYINITDEPTH -- initial size of the parser's stacks. */
3795 # define YYINITDEPTH 200
3798 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3799 if the built-in stack extension method is used).
3801 Do not make this value too large; the results are undefined if
3802 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3803 evaluated with infinite-precision integer arithmetic. */
3806 # define YYMAXDEPTH 10000
3814 # if defined __GLIBC__ && defined _STRING_H
3815 # define yystrlen strlen
3817 /* Return the length of YYSTR. */
3818 #if (defined __STDC__ || defined __C99__FUNC__ \
3819 || defined __cplusplus || defined _MSC_VER)
3821 yystrlen (const char *yystr)
3829 for (yylen = 0; yystr[yylen]; yylen++)
3837 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3838 # define yystpcpy stpcpy
3840 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3842 #if (defined __STDC__ || defined __C99__FUNC__ \
3843 || defined __cplusplus || defined _MSC_VER)
3845 yystpcpy (char *yydest, const char *yysrc)
3848 yystpcpy (yydest, yysrc)
3854 const char *yys = yysrc;
3856 while ((*yyd++ = *yys++) != '\0')
3865 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3866 quotes and backslashes, so that it's suitable for yyerror. The
3867 heuristic is that double-quoting is unnecessary unless the string
3868 contains an apostrophe, a comma, or backslash (other than
3869 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3870 null, do not copy; instead, return the length of what the result
3873 yytnamerr (char *yyres, const char *yystr)
3878 char const *yyp = yystr;
3885 goto do_not_strip_quotes;
3889 goto do_not_strip_quotes;
3902 do_not_strip_quotes: ;
3906 return yystrlen (yystr);
3908 return yystpcpy (yyres, yystr) - yyres;
3912 /* Copy into YYRESULT an error message about the unexpected token
3913 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3914 including the terminating null byte. If YYRESULT is null, do not
3915 copy anything; just return the number of bytes that would be
3916 copied. As a special case, return 0 if an ordinary "syntax error"
3917 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3918 size calculation. */
3920 yysyntax_error (char *yyresult, int yystate, int yychar)
3922 int yyn = yypact[yystate];
3924 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3928 int yytype = YYTRANSLATE (yychar);
3929 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3930 YYSIZE_T yysize = yysize0;
3932 int yysize_overflow = 0;
3933 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3934 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3938 /* This is so xgettext sees the translatable formats that are
3939 constructed on the fly. */
3940 YY_("syntax error, unexpected %s");
3941 YY_("syntax error, unexpected %s, expecting %s");
3942 YY_("syntax error, unexpected %s, expecting %s or %s");
3943 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3944 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3948 static char const yyunexpected[] = "syntax error, unexpected %s";
3949 static char const yyexpecting[] = ", expecting %s";
3950 static char const yyor[] = " or %s";
3951 char yyformat[sizeof yyunexpected
3952 + sizeof yyexpecting - 1
3953 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3954 * (sizeof yyor - 1))];
3955 char const *yyprefix = yyexpecting;
3957 /* Start YYX at -YYN if negative to avoid negative indexes in
3959 int yyxbegin = yyn < 0 ? -yyn : 0;
3961 /* Stay within bounds of both yycheck and yytname. */
3962 int yychecklim = YYLAST - yyn + 1;
3963 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3966 yyarg[0] = yytname[yytype];
3967 yyfmt = yystpcpy (yyformat, yyunexpected);
3969 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3970 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3972 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3976 yyformat[sizeof yyunexpected - 1] = '\0';
3979 yyarg[yycount++] = yytname[yyx];
3980 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3981 yysize_overflow |= (yysize1 < yysize);
3983 yyfmt = yystpcpy (yyfmt, yyprefix);
3987 yyf = YY_(yyformat);
3988 yysize1 = yysize + yystrlen (yyf);
3989 yysize_overflow |= (yysize1 < yysize);
3992 if (yysize_overflow)
3993 return YYSIZE_MAXIMUM;
3997 /* Avoid sprintf, as that infringes on the user's name space.
3998 Don't have undefined behavior even if the translation
3999 produced a string with the wrong number of "%s"s. */
4000 char *yyp = yyresult;
4002 while ((*yyp = *yyf) != '\0')
4004 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4006 yyp += yytnamerr (yyp, yyarg[yyi++]);
4019 #endif /* YYERROR_VERBOSE */
4022 /*-----------------------------------------------.
4023 | Release the memory associated to this symbol. |
4024 `-----------------------------------------------*/
4027 #if (defined __STDC__ || defined __C99__FUNC__ \
4028 || defined __cplusplus || defined _MSC_VER)
4030 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4033 yydestruct (yymsg, yytype, yyvaluep)
4043 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4053 /* Prevent warnings from -Wmissing-prototypes. */
4054 #ifdef YYPARSE_PARAM
4055 #if defined __STDC__ || defined __cplusplus
4056 int yyparse (void *YYPARSE_PARAM);
4060 #else /* ! YYPARSE_PARAM */
4061 #if defined __STDC__ || defined __cplusplus
4066 #endif /* ! YYPARSE_PARAM */
4069 /* The lookahead symbol. */
4072 /* The semantic value of the lookahead symbol. */
4075 /* Number of syntax errors so far. */
4080 /*-------------------------.
4081 | yyparse or yypush_parse. |
4082 `-------------------------*/
4084 #ifdef YYPARSE_PARAM
4085 #if (defined __STDC__ || defined __C99__FUNC__ \
4086 || defined __cplusplus || defined _MSC_VER)
4088 yyparse (void *YYPARSE_PARAM)
4091 yyparse (YYPARSE_PARAM)
4092 void *YYPARSE_PARAM;
4094 #else /* ! YYPARSE_PARAM */
4095 #if (defined __STDC__ || defined __C99__FUNC__ \
4096 || defined __cplusplus || defined _MSC_VER)
4109 /* Number of tokens to shift before error messages enabled. */
4112 /* The stacks and their tools:
4113 `yyss': related to states.
4114 `yyvs': related to semantic values.
4116 Refer to the stacks thru separate pointers, to allow yyoverflow
4117 to reallocate them elsewhere. */
4119 /* The state stack. */
4120 yytype_int16 yyssa[YYINITDEPTH];
4122 yytype_int16 *yyssp;
4124 /* The semantic value stack. */
4125 YYSTYPE yyvsa[YYINITDEPTH];
4129 YYSIZE_T yystacksize;
4133 /* Lookahead token as an internal (translated) token number. */
4135 /* The variables used to return semantic value and location from the
4140 /* Buffer for error messages, and its allocated size. */
4142 char *yymsg = yymsgbuf;
4143 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4146 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4148 /* The number of symbols on the RHS of the reduced rule.
4149 Keep to zero when no symbol should be popped. */
4155 yystacksize = YYINITDEPTH;
4157 YYDPRINTF ((stderr, "Starting parse\n"));
4162 yychar = YYEMPTY; /* Cause a token to be read. */
4164 /* Initialize stack pointers.
4165 Waste one element of value and location stack
4166 so that they stay on the same level as the state stack.
4167 The wasted elements are never initialized. */
4173 /*------------------------------------------------------------.
4174 | yynewstate -- Push a new state, which is found in yystate. |
4175 `------------------------------------------------------------*/
4177 /* In all cases, when you get here, the value and location stacks
4178 have just been pushed. So pushing a state here evens the stacks. */
4184 if (yyss + yystacksize - 1 <= yyssp)
4186 /* Get the current used size of the three stacks, in elements. */
4187 YYSIZE_T yysize = yyssp - yyss + 1;
4191 /* Give user a chance to reallocate the stack. Use copies of
4192 these so that the &'s don't force the real ones into
4194 YYSTYPE *yyvs1 = yyvs;
4195 yytype_int16 *yyss1 = yyss;
4197 /* Each stack pointer address is followed by the size of the
4198 data in use in that stack, in bytes. This used to be a
4199 conditional around just the two extra args, but that might
4200 be undefined if yyoverflow is a macro. */
4201 yyoverflow (YY_("memory exhausted"),
4202 &yyss1, yysize * sizeof (*yyssp),
4203 &yyvs1, yysize * sizeof (*yyvsp),
4209 #else /* no yyoverflow */
4210 # ifndef YYSTACK_RELOCATE
4211 goto yyexhaustedlab;
4213 /* Extend the stack our own way. */
4214 if (YYMAXDEPTH <= yystacksize)
4215 goto yyexhaustedlab;
4217 if (YYMAXDEPTH < yystacksize)
4218 yystacksize = YYMAXDEPTH;
4221 yytype_int16 *yyss1 = yyss;
4222 union yyalloc *yyptr =
4223 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4225 goto yyexhaustedlab;
4226 YYSTACK_RELOCATE (yyss_alloc, yyss);
4227 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4228 # undef YYSTACK_RELOCATE
4230 YYSTACK_FREE (yyss1);
4233 #endif /* no yyoverflow */
4235 yyssp = yyss + yysize - 1;
4236 yyvsp = yyvs + yysize - 1;
4238 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4239 (unsigned long int) yystacksize));
4241 if (yyss + yystacksize - 1 <= yyssp)
4245 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4247 if (yystate == YYFINAL)
4257 /* Do appropriate processing given the current state. Read a
4258 lookahead token if we need one and don't already have one. */
4260 /* First try to decide what to do without reference to lookahead token. */
4261 yyn = yypact[yystate];
4262 if (yyn == YYPACT_NINF)
4265 /* Not known => get a lookahead token if don't already have one. */
4267 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4268 if (yychar == YYEMPTY)
4270 YYDPRINTF ((stderr, "Reading a token: "));
4274 if (yychar <= YYEOF)
4276 yychar = yytoken = YYEOF;
4277 YYDPRINTF ((stderr, "Now at end of input.\n"));
4281 yytoken = YYTRANSLATE (yychar);
4282 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4285 /* If the proper action on seeing token YYTOKEN is to reduce or to
4286 detect an error, take that action. */
4288 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4293 if (yyn == 0 || yyn == YYTABLE_NINF)
4299 /* Count tokens shifted since error; after three, turn off error
4304 /* Shift the lookahead token. */
4305 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4307 /* Discard the shifted token. */
4316 /*-----------------------------------------------------------.
4317 | yydefault -- do the default action for the current state. |
4318 `-----------------------------------------------------------*/
4320 yyn = yydefact[yystate];
4326 /*-----------------------------.
4327 | yyreduce -- Do a reduction. |
4328 `-----------------------------*/
4330 /* yyn is the number of a rule to reduce with. */
4333 /* If YYLEN is nonzero, implement the default value of the action:
4336 Otherwise, the following line sets YYVAL to garbage.
4337 This behavior is undocumented and Bison
4338 users should not rely upon it. Assigning to YYVAL
4339 unconditionally makes the parser a bit smaller, and it avoids a
4340 GCC warning that YYVAL may be used uninitialized. */
4341 yyval = yyvsp[1-yylen];
4344 YY_REDUCE_PRINT (yyn);
4351 /* Line 1464 of skeleton.m4 */
4352 #line 2120 "parser.y"
4353 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4362 /* Line 1464 of skeleton.m4 */
4363 #line 2121 "parser.y"
4364 {(yyval.code)=code_new();}
4373 /* Line 1464 of skeleton.m4 */
4374 #line 2123 "parser.y"
4375 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4384 /* Line 1464 of skeleton.m4 */
4385 #line 2124 "parser.y"
4386 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4395 /* Line 1464 of skeleton.m4 */
4396 #line 2139 "parser.y"
4397 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4406 /* Line 1464 of skeleton.m4 */
4407 #line 2140 "parser.y"
4417 /* Line 1464 of skeleton.m4 */
4418 #line 2143 "parser.y"
4428 /* Line 1464 of skeleton.m4 */
4429 #line 2150 "parser.y"
4430 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4439 /* Line 1464 of skeleton.m4 */
4440 #line 2154 "parser.y"
4441 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4450 /* Line 1464 of skeleton.m4 */
4451 #line 2155 "parser.y"
4452 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4461 /* Line 1464 of skeleton.m4 */
4462 #line 2159 "parser.y"
4464 code_t**cc = &global->init->method->body->code;
4465 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4475 /* Line 1464 of skeleton.m4 */
4476 #line 2170 "parser.y"
4477 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4486 /* Line 1464 of skeleton.m4 */
4487 #line 2171 "parser.y"
4488 {(yyval.value).c=abc_pushundefined(0);
4489 (yyval.value).t=TYPE_ANY;
4499 /* Line 1464 of skeleton.m4 */
4500 #line 2175 "parser.y"
4501 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4510 /* Line 1464 of skeleton.m4 */
4511 #line 2176 "parser.y"
4512 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4521 /* Line 1464 of skeleton.m4 */
4522 #line 2178 "parser.y"
4523 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4532 /* Line 1464 of skeleton.m4 */
4533 #line 2179 "parser.y"
4534 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4543 /* Line 1464 of skeleton.m4 */
4544 #line 2182 "parser.y"
4547 if(variable_exists((yyvsp[(1) - (3)].id)))
4548 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4550 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4553 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4554 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4555 (yyvsp[(2) - (3)].classinfo)->name);
4560 if(state->method->uses_slots) {
4561 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4563 // this variable is stored in a slot
4565 v->type = (yyvsp[(2) - (3)].classinfo);
4571 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4574 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4576 if((yyvsp[(2) - (3)].classinfo)) {
4577 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4578 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4579 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4581 code_free((yyvsp[(3) - (3)].value).c);
4582 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4585 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4586 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4587 (yyval.code) = abc_coerce_a((yyval.code));
4589 // don't do anything
4590 code_free((yyvsp[(3) - (3)].value).c);
4591 code_free((yyval.code));
4597 (yyval.code) = abc_setslot((yyval.code), index);
4599 (yyval.code) = abc_setlocal((yyval.code), index);
4610 /* Line 1464 of skeleton.m4 */
4611 #line 2242 "parser.y"
4612 {(yyval.code) = code_new();}
4621 /* Line 1464 of skeleton.m4 */
4622 #line 2243 "parser.y"
4623 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4632 /* Line 1464 of skeleton.m4 */
4633 #line 2246 "parser.y"
4634 {PASS12 new_state();}
4643 /* Line 1464 of skeleton.m4 */
4644 #line 2246 "parser.y"
4647 (yyval.code) = code_new();
4648 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4649 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4651 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4652 if((yyvsp[(7) - (7)].code)) {
4653 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4655 myif->branch = (yyval.code) = abc_nop((yyval.code));
4656 if((yyvsp[(7) - (7)].code)) {
4657 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4658 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4660 (yyval.code) = var_block((yyval.code));
4671 /* Line 1464 of skeleton.m4 */
4672 #line 2265 "parser.y"
4673 {(yyval.code)=code_new();}
4682 /* Line 1464 of skeleton.m4 */
4683 #line 2272 "parser.y"
4685 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4686 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4696 /* Line 1464 of skeleton.m4 */
4697 #line 2276 "parser.y"
4700 (yyval.id)=(yyvsp[(1) - (1)].id);
4710 /* Line 1464 of skeleton.m4 */
4711 #line 2281 "parser.y"
4712 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4721 /* Line 1464 of skeleton.m4 */
4722 #line 2282 "parser.y"
4723 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4732 /* Line 1464 of skeleton.m4 */
4733 #line 2284 "parser.y"
4735 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4736 (yyval.code) = code_new();
4737 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4738 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4739 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4740 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4741 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4742 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4743 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4744 (yyval.code) = abc_jump((yyval.code), loopstart);
4745 code_t*out = (yyval.code) = abc_nop((yyval.code));
4746 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4747 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4750 (yyval.code) = var_block((yyval.code));
4761 /* Line 1464 of skeleton.m4 */
4762 #line 2304 "parser.y"
4764 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4766 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4769 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4770 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4771 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4772 int array = new_variable(tmp1name, 0, 0, 0);
4774 (yyval.code) = code_new();
4775 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4776 (yyval.code) = abc_coerce_a((yyval.code));
4777 (yyval.code) = abc_setlocal((yyval.code), array);
4778 (yyval.code) = abc_pushbyte((yyval.code), 0);
4779 (yyval.code) = abc_setlocal((yyval.code), it);
4781 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4783 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4784 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4785 (yyval.code) = abc_getlocal((yyval.code), array);
4786 (yyval.code) = abc_getlocal((yyval.code), it);
4787 if(!(yyvsp[(1) - (6)].for_start).each)
4788 (yyval.code) = abc_nextname((yyval.code));
4790 (yyval.code) = abc_nextvalue((yyval.code));
4791 (yyval.code) = converttype((yyval.code), 0, var->type);
4792 (yyval.code) = abc_setlocal((yyval.code), var->index);
4794 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4795 (yyval.code) = abc_jump((yyval.code), loopstart);
4797 code_t*out = (yyval.code) = abc_nop((yyval.code));
4798 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4799 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4803 (yyval.code) = var_block((yyval.code));
4818 /* Line 1464 of skeleton.m4 */
4819 #line 2352 "parser.y"
4820 {PASS12 new_state();}
4829 /* Line 1464 of skeleton.m4 */
4830 #line 2352 "parser.y"
4833 (yyval.code) = code_new();
4835 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4836 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4837 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4838 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4839 myjmp->branch = cont;
4840 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4841 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4842 code_t*out = (yyval.code) = abc_nop((yyval.code));
4843 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4844 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4846 (yyval.code) = var_block((yyval.code));
4857 /* Line 1464 of skeleton.m4 */
4858 #line 2371 "parser.y"
4859 {PASS12 new_state();}
4868 /* Line 1464 of skeleton.m4 */
4869 #line 2371 "parser.y"
4871 (yyval.code) = code_new();
4872 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4873 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4874 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4875 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4876 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4877 code_t*out = (yyval.code) = abc_nop((yyval.code));
4878 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4879 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4881 (yyval.code) = var_block((yyval.code));
4892 /* Line 1464 of skeleton.m4 */
4893 #line 2386 "parser.y"
4895 (yyval.code) = abc___break__(0, "");
4905 /* Line 1464 of skeleton.m4 */
4906 #line 2389 "parser.y"
4908 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4918 /* Line 1464 of skeleton.m4 */
4919 #line 2392 "parser.y"
4921 (yyval.code) = abc___continue__(0, "");
4931 /* Line 1464 of skeleton.m4 */
4932 #line 2395 "parser.y"
4934 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4944 /* Line 1464 of skeleton.m4 */
4945 #line 2399 "parser.y"
4955 /* Line 1464 of skeleton.m4 */
4956 #line 2400 "parser.y"
4957 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4966 /* Line 1464 of skeleton.m4 */
4967 #line 2401 "parser.y"
4968 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4977 /* Line 1464 of skeleton.m4 */
4978 #line 2402 "parser.y"
4979 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4988 /* Line 1464 of skeleton.m4 */
4989 #line 2403 "parser.y"
4990 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4999 /* Line 1464 of skeleton.m4 */
5000 #line 2404 "parser.y"
5001 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
5010 /* Line 1464 of skeleton.m4 */
5011 #line 2406 "parser.y"
5013 (yyval.code) = abc_getlocal(0, state->switch_var);
5014 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
5015 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5016 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5017 if((yyval.code)->opcode != OPCODE___BREAK__) {
5018 (yyval.code) = abc___fallthrough__((yyval.code), "");
5020 code_t*e = (yyval.code) = abc_nop((yyval.code));
5031 /* Line 1464 of skeleton.m4 */
5032 #line 2417 "parser.y"
5034 (yyval.code) = (yyvsp[(3) - (3)].code);
5044 /* Line 1464 of skeleton.m4 */
5045 #line 2420 "parser.y"
5046 {PASS12 new_state();state->switch_var=alloc_local();}
5055 /* Line 1464 of skeleton.m4 */
5056 #line 2420 "parser.y"
5058 (yyval.code)=(yyvsp[(4) - (8)].value).c;
5059 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5060 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5062 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5063 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5065 code_t*c = (yyval.code),*lastblock=0;
5067 if(c->opcode == OPCODE_IFNE) {
5068 if(!c->next) syntaxerror("internal error in fallthrough handling");
5070 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5072 c->opcode = OPCODE_JUMP;
5073 c->branch = lastblock;
5075 /* fall through end of switch */
5076 c->opcode = OPCODE_NOP;
5082 (yyval.code) = var_block((yyval.code));
5093 /* Line 1464 of skeleton.m4 */
5094 #line 2451 "parser.y"
5095 {PASS12 new_state();
5096 state->exception_name=(yyvsp[(3) - (5)].id);
5097 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5098 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5108 /* Line 1464 of skeleton.m4 */
5109 #line 2456 "parser.y"
5111 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5112 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5114 NEW(abc_exception_t, e)
5115 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5116 e->var_name = multiname_clone(&name);
5117 (yyval.exception) = e;
5120 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5121 e->target = c = abc_nop(0);
5122 c = abc_setlocal(c, i);
5123 c = code_append(c, code_dup(state->method->scope_code));
5124 c = code_append(c, (yyvsp[(8) - (9)].code));
5138 /* Line 1464 of skeleton.m4 */
5139 #line 2476 "parser.y"
5140 {PASS12 new_state();state->exception_name=0;}
5149 /* Line 1464 of skeleton.m4 */
5150 #line 2476 "parser.y"
5152 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5153 if(!(yyvsp[(4) - (5)].code)) {
5154 (yyval.exception)=0;
5156 NEW(abc_exception_t, e)
5157 e->exc_type = 0; //all exceptions
5158 e->var_name = 0; //no name
5161 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5162 (yyval.exception) = e;
5174 /* Line 1464 of skeleton.m4 */
5175 #line 2492 "parser.y"
5176 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5185 /* Line 1464 of skeleton.m4 */
5186 #line 2493 "parser.y"
5187 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5196 /* Line 1464 of skeleton.m4 */
5197 #line 2494 "parser.y"
5198 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5207 /* Line 1464 of skeleton.m4 */
5208 #line 2495 "parser.y"
5210 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5211 (yyval.catch_list).finally = 0;
5212 if((yyvsp[(2) - (2)].exception)) {
5213 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5214 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5225 /* Line 1464 of skeleton.m4 */
5226 #line 2503 "parser.y"
5228 (yyval.catch_list).l=list_new();
5229 (yyval.catch_list).finally = 0;
5230 if((yyvsp[(1) - (1)].exception)) {
5231 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5232 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5243 /* Line 1464 of skeleton.m4 */
5244 #line 2512 "parser.y"
5245 {PASS12 new_state();
5246 state->method->has_exceptions=1;
5247 state->method->late_binding=1;//for invariant scope_code
5257 /* Line 1464 of skeleton.m4 */
5258 #line 2515 "parser.y"
5260 code_t*out = abc_nop(0);
5262 code_t*start = abc_nop(0);
5263 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5264 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5265 (yyval.code) = abc_jump((yyval.code), out);
5267 code_t*end = (yyval.code) = abc_nop((yyval.code));
5270 if((yyvsp[(6) - (6)].catch_list).finally)
5271 tmp = new_variable("__finally__", 0, 0, 0);
5273 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5276 abc_exception_t*e = l->abc_exception;
5278 (yyval.code) = code_append((yyval.code), e->target);
5279 (yyval.code) = abc_jump((yyval.code), out);
5281 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5283 e->target = (yyval.code) = abc_nop((yyval.code));
5284 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5285 (yyval.code) = abc___rethrow__((yyval.code));
5293 (yyval.code) = code_append((yyval.code), out);
5295 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5297 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5299 (yyval.code) = var_block((yyval.code));
5310 /* Line 1464 of skeleton.m4 */
5311 #line 2561 "parser.y"
5313 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5314 (yyval.code)=abc_throw((yyval.code));
5324 /* Line 1464 of skeleton.m4 */
5325 #line 2565 "parser.y"
5327 if(!state->exception_name)
5328 syntaxerror("re-throw only possible within a catch block");
5329 variable_t*v = find_variable(state, state->exception_name);
5330 (yyval.code)=code_new();
5331 (yyval.code)=abc_getlocal((yyval.code), v->index);
5332 (yyval.code)=abc_throw((yyval.code));
5342 /* Line 1464 of skeleton.m4 */
5343 #line 2576 "parser.y"
5346 if(state->method->has_exceptions) {
5347 int v = alloc_local();
5348 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5349 state->method->scope_code = abc_pushwith(state->method->scope_code);
5350 (yyval.value_list).number = v;
5352 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5362 /* Line 1464 of skeleton.m4 */
5363 #line 2586 "parser.y"
5365 /* remove getlocal;pushwith from scope code again */
5366 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5368 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5369 if(state->method->has_exceptions) {
5370 (yyval.code) = abc_dup((yyval.code));
5371 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5373 (yyval.code) = abc_pushwith((yyval.code));
5374 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5375 (yyval.code) = abc_popscope((yyval.code));
5386 /* Line 1464 of skeleton.m4 */
5387 #line 2604 "parser.y"
5388 {PASS12 (yyval.id)="package";}
5397 /* Line 1464 of skeleton.m4 */
5398 #line 2605 "parser.y"
5399 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5408 /* Line 1464 of skeleton.m4 */
5409 #line 2607 "parser.y"
5410 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5419 /* Line 1464 of skeleton.m4 */
5420 #line 2608 "parser.y"
5421 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5430 /* Line 1464 of skeleton.m4 */
5431 #line 2610 "parser.y"
5432 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5441 /* Line 1464 of skeleton.m4 */
5442 #line 2611 "parser.y"
5443 {PASS12 endpackage();(yyval.code)=0;}
5452 /* Line 1464 of skeleton.m4 */
5453 #line 2612 "parser.y"
5454 {PASS12 startpackage("");}
5463 /* Line 1464 of skeleton.m4 */
5464 #line 2613 "parser.y"
5465 {PASS12 endpackage();(yyval.code)=0;}
5474 /* Line 1464 of skeleton.m4 */
5475 #line 2615 "parser.y"
5478 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5479 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5480 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5484 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5486 syntaxerror("Couldn't import class\n");
5487 state_has_imports();
5488 dict_put(state->imports, c->name, c);
5489 import_toplevel(c->package);
5500 /* Line 1464 of skeleton.m4 */
5501 #line 2631 "parser.y"
5504 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5505 as3_schedule_package((yyvsp[(2) - (4)].id));
5510 i->package = (yyvsp[(2) - (4)].id);
5511 state_has_imports();
5512 list_append(state->wildcard_imports, i);
5513 import_toplevel(i->package);
5524 /* Line 1464 of skeleton.m4 */
5525 #line 2648 "parser.y"
5526 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5535 /* Line 1464 of skeleton.m4 */
5536 #line 2649 "parser.y"
5537 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5546 /* Line 1464 of skeleton.m4 */
5547 #line 2650 "parser.y"
5548 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5557 /* Line 1464 of skeleton.m4 */
5558 #line 2651 "parser.y"
5561 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5562 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5563 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5574 /* Line 1464 of skeleton.m4 */
5575 #line 2659 "parser.y"
5576 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5585 /* Line 1464 of skeleton.m4 */
5586 #line 2660 "parser.y"
5587 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5596 /* Line 1464 of skeleton.m4 */
5597 #line 2661 "parser.y"
5598 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5607 /* Line 1464 of skeleton.m4 */
5608 #line 2662 "parser.y"
5609 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5618 /* Line 1464 of skeleton.m4 */
5619 #line 2663 "parser.y"
5620 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5629 /* Line 1464 of skeleton.m4 */
5630 #line 2664 "parser.y"
5631 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5640 /* Line 1464 of skeleton.m4 */
5641 #line 2665 "parser.y"
5642 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5651 /* Line 1464 of skeleton.m4 */
5652 #line 2666 "parser.y"
5653 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5662 /* Line 1464 of skeleton.m4 */
5663 #line 2667 "parser.y"
5664 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5673 /* Line 1464 of skeleton.m4 */
5674 #line 2668 "parser.y"
5675 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5676 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5686 /* Line 1464 of skeleton.m4 */
5687 #line 2672 "parser.y"
5688 {PASS12 (yyval.classinfo)=0;}
5697 /* Line 1464 of skeleton.m4 */
5698 #line 2673 "parser.y"
5699 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5708 /* Line 1464 of skeleton.m4 */
5709 #line 2675 "parser.y"
5710 {PASS12 (yyval.classinfo_list)=list_new();}
5719 /* Line 1464 of skeleton.m4 */
5720 #line 2676 "parser.y"
5721 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5730 /* Line 1464 of skeleton.m4 */
5731 #line 2678 "parser.y"
5732 {PASS12 (yyval.classinfo_list)=list_new();}
5741 /* Line 1464 of skeleton.m4 */
5742 #line 2679 "parser.y"
5743 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5752 /* Line 1464 of skeleton.m4 */
5753 #line 2683 "parser.y"
5754 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5763 /* Line 1464 of skeleton.m4 */
5764 #line 2685 "parser.y"
5765 {PASS12 endclass();(yyval.code)=0;}
5774 /* Line 1464 of skeleton.m4 */
5775 #line 2689 "parser.y"
5776 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5777 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5786 /* Line 1464 of skeleton.m4 */
5787 #line 2692 "parser.y"
5788 {PASS12 endclass();(yyval.code)=0;}
5797 /* Line 1464 of skeleton.m4 */
5798 #line 2705 "parser.y"
5800 code_t*c = state->cls->static_init->header;
5801 c = code_append(c, (yyvsp[(1) - (1)].code));
5802 state->cls->static_init->header = c;
5812 /* Line 1464 of skeleton.m4 */
5813 #line 2716 "parser.y"
5815 syntaxerror("variable declarations not allowed in interfaces");
5825 /* Line 1464 of skeleton.m4 */
5826 #line 2719 "parser.y"
5829 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5830 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5831 syntaxerror("invalid method modifiers: interface methods always need to be public");
5833 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5834 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5835 list_deep_free((yyvsp[(6) - (8)].params).list);
5845 /* Line 1464 of skeleton.m4 */
5846 #line 2734 "parser.y"
5847 {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5856 /* Line 1464 of skeleton.m4 */
5857 #line 2734 "parser.y"
5858 {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5867 /* Line 1464 of skeleton.m4 */
5868 #line 2736 "parser.y"
5869 {(yyval.code) = (yyvsp[(1) - (1)].code);}
5878 /* Line 1464 of skeleton.m4 */
5879 #line 2737 "parser.y"
5880 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
5889 /* Line 1464 of skeleton.m4 */
5890 #line 2740 "parser.y"
5892 int flags = slotstate_flags->flags;
5893 namespace_t ns = modifiers2access(slotstate_flags);
5895 varinfo_t* info = 0;
5897 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5899 check_override(i, flags);
5901 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5903 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5905 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5907 if(ns.name && ns.name[0]) {
5908 syntaxerror("namespaces not allowed on package-level variables");
5910 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5913 info->type = (yyvsp[(2) - (3)].classinfo);
5914 info->flags = flags;
5917 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5919 trait_list_t**traits;
5923 ns.name = state->package;
5924 traits = &global->init->traits;
5925 code = &global->init->method->body->code;
5926 } else if(flags&FLAG_STATIC) {
5928 traits = &state->cls->abc->static_traits;
5929 code = &state->cls->static_init->header;
5931 // instance variable
5932 traits = &state->cls->abc->traits;
5933 code = &state->cls->init->header;
5937 if((yyvsp[(2) - (3)].classinfo)) {
5938 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5939 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5941 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5943 info->slot = t->slot_id;
5945 /* initalization code (if needed) */
5947 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5948 c = abc_getlocal_0(c);
5949 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5950 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5951 c = abc_setslot(c, t->slot_id);
5954 *code = code_append(*code, c);
5956 if(slotstate_varconst==KW_CONST) {
5957 t->kind= TRAIT_CONST;
5970 /* Line 1464 of skeleton.m4 */
5971 #line 2814 "parser.y"
5972 {(yyval.constant)=0;}
5981 /* Line 1464 of skeleton.m4 */
5982 #line 2815 "parser.y"
5983 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5992 /* Line 1464 of skeleton.m4 */
5993 #line 2817 "parser.y"
5994 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
6003 /* Line 1464 of skeleton.m4 */
6004 #line 2818 "parser.y"
6005 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6014 /* Line 1464 of skeleton.m4 */
6015 #line 2819 "parser.y"
6016 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
6025 /* Line 1464 of skeleton.m4 */
6026 #line 2820 "parser.y"
6027 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6036 /* Line 1464 of skeleton.m4 */
6037 #line 2821 "parser.y"
6038 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6047 /* Line 1464 of skeleton.m4 */
6048 #line 2823 "parser.y"
6049 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6058 /* Line 1464 of skeleton.m4 */
6059 #line 2824 "parser.y"
6060 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6069 /* Line 1464 of skeleton.m4 */
6070 #line 2825 "parser.y"
6071 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6080 /* Line 1464 of skeleton.m4 */
6081 #line 2826 "parser.y"
6083 if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
6084 (yyval.constant) = constant_new_float(__builtin_nan(""));
6086 as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
6087 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
6098 /* Line 1464 of skeleton.m4 */
6099 #line 2838 "parser.y"
6102 memset(&(yyval.params),0,sizeof((yyval.params)));
6112 /* Line 1464 of skeleton.m4 */
6113 #line 2842 "parser.y"
6116 (yyval.params)=(yyvsp[(1) - (1)].params);
6126 /* Line 1464 of skeleton.m4 */
6127 #line 2848 "parser.y"
6130 memset(&(yyval.params),0,sizeof((yyval.params)));
6131 (yyval.params).varargs=1;
6132 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6142 /* Line 1464 of skeleton.m4 */
6143 #line 2854 "parser.y"
6146 (yyval.params) =(yyvsp[(1) - (4)].params);
6147 (yyval.params).varargs=1;
6148 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6158 /* Line 1464 of skeleton.m4 */
6159 #line 2862 "parser.y"
6162 (yyval.params) = (yyvsp[(1) - (3)].params);
6163 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6173 /* Line 1464 of skeleton.m4 */
6174 #line 2867 "parser.y"
6177 memset(&(yyval.params),0,sizeof((yyval.params)));
6178 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6188 /* Line 1464 of skeleton.m4 */
6189 #line 2873 "parser.y"
6192 (yyval.param) = rfx_calloc(sizeof(param_t));
6193 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6194 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6196 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6206 /* Line 1464 of skeleton.m4 */
6207 #line 2881 "parser.y"
6210 (yyval.param) = rfx_calloc(sizeof(param_t));
6211 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6212 (yyval.param)->type = TYPE_ANY;
6214 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6224 /* Line 1464 of skeleton.m4 */
6225 #line 2891 "parser.y"
6226 {PASS12 (yyval.token)=0;}
6235 /* Line 1464 of skeleton.m4 */
6236 #line 2894 "parser.y"
6237 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6246 /* Line 1464 of skeleton.m4 */
6247 #line 2895 "parser.y"
6250 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6252 if(!state->method->info) syntaxerror("internal error");
6254 code_t*c = method_header(state->method);
6255 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6257 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6259 list_deep_free((yyvsp[(6) - (12)].params).list);
6270 /* Line 1464 of skeleton.m4 */
6271 #line 2911 "parser.y"
6272 {PASS12 (yyval.id)=0;}
6281 /* Line 1464 of skeleton.m4 */
6282 #line 2913 "parser.y"
6283 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6292 /* Line 1464 of skeleton.m4 */
6293 #line 2914 "parser.y"
6296 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6298 methodinfo_t*f = state->method->info;
6299 if(!f || !f->kind) syntaxerror("internal error");
6301 code_t*c = method_header(state->method);
6302 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6304 int index = state->method->var_index;
6305 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6307 (yyval.value).c = abc_getlocal(0, index);
6308 (yyval.value).t = TYPE_FUNCTION(f);
6310 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6320 /* Line 1464 of skeleton.m4 */
6321 #line 2936 "parser.y"
6323 PASS1 NEW(unresolvedinfo_t,c);
6324 memset(c, 0, sizeof(*c));
6325 c->kind = INFOTYPE_UNRESOLVED;
6326 c->name = (yyvsp[(1) - (1)].id);
6327 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6329 c->nsset = get_current_imports();
6330 /* make the compiler look for this class in the current directory,
6332 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6334 (yyval.classinfo) = (classinfo_t*)c;
6336 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6337 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6338 (yyval.classinfo) = (classinfo_t*)s;
6348 /* Line 1464 of skeleton.m4 */
6349 #line 2955 "parser.y"
6351 PASS1 NEW(unresolvedinfo_t,c);
6352 memset(c, 0, sizeof(*c));
6353 c->kind = INFOTYPE_UNRESOLVED;
6354 c->package = (yyvsp[(1) - (3)].id);
6355 c->name = (yyvsp[(3) - (3)].id);
6356 (yyval.classinfo) = (classinfo_t*)c;
6358 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6359 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6360 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6361 (yyval.classinfo) = (classinfo_t*)s;
6371 /* Line 1464 of skeleton.m4 */
6372 #line 2972 "parser.y"
6373 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6382 /* Line 1464 of skeleton.m4 */
6383 #line 2973 "parser.y"
6384 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6393 /* Line 1464 of skeleton.m4 */
6394 #line 2975 "parser.y"
6395 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6404 /* Line 1464 of skeleton.m4 */
6405 #line 2976 "parser.y"
6406 {PASS12 (yyval.classinfo)=registry_getanytype();}
6415 /* Line 1464 of skeleton.m4 */
6416 #line 2977 "parser.y"
6417 {PASS12 (yyval.classinfo)=registry_getanytype();}
6426 /* Line 1464 of skeleton.m4 */
6427 #line 2986 "parser.y"
6428 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6437 /* Line 1464 of skeleton.m4 */
6438 #line 2987 "parser.y"
6439 {PASS12 (yyval.classinfo)=0;}
6448 /* Line 1464 of skeleton.m4 */
6449 #line 2991 "parser.y"
6450 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6459 /* Line 1464 of skeleton.m4 */
6460 #line 2992 "parser.y"
6461 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6470 /* Line 1464 of skeleton.m4 */
6471 #line 2994 "parser.y"
6472 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6481 /* Line 1464 of skeleton.m4 */
6482 #line 2998 "parser.y"
6483 {(yyval.value_list).number=1;
6484 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6494 /* Line 1464 of skeleton.m4 */
6495 #line 3002 "parser.y"
6496 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6505 /* Line 1464 of skeleton.m4 */
6506 #line 3003 "parser.y"
6508 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6509 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6519 /* Line 1464 of skeleton.m4 */
6520 #line 3009 "parser.y"
6522 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6523 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6525 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6526 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6527 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6528 (yyval.value).c = code_cutlast((yyval.value).c);
6529 (yyval.value).c = code_append((yyval.value).c, paramcode);
6530 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6531 multiname_destroy(name);
6532 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6533 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6534 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6535 multiname_t*name = t->name;
6536 (yyval.value).c = code_cutlast((yyval.value).c);
6537 (yyval.value).c = code_append((yyval.value).c, paramcode);
6538 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6540 (yyval.value).c = code_append((yyval.value).c, paramcode);
6541 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6544 (yyval.value).t = TYPE_ANY;
6545 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6546 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6548 (yyval.value).c = abc_coerce_a((yyval.value).c);
6549 (yyval.value).t = TYPE_ANY;
6560 /* Line 1464 of skeleton.m4 */
6561 #line 3045 "parser.y"
6564 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6565 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6566 (yyval.value).c = code_cutlast((yyval.value).c);
6568 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6570 (yyval.value).t = TYPE_ANY;
6571 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6572 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6573 (yyval.value).c = code_cutlast((yyval.value).c);
6574 (yyval.value).c = code_append((yyval.value).c, paramcode);
6575 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6576 multiname_destroy(name);
6577 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6578 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6579 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6580 if(t->kind!=TRAIT_METHOD) {
6581 //ok: flash allows to assign closures to members.
6583 multiname_t*name = t->name;
6584 (yyval.value).c = code_cutlast((yyval.value).c);
6585 (yyval.value).c = code_append((yyval.value).c, paramcode);
6586 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6587 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6588 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6589 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6590 (yyval.value).c = code_cutlast((yyval.value).c);
6591 (yyval.value).c = code_append((yyval.value).c, paramcode);
6592 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6593 multiname_destroy(name);
6595 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6596 (yyval.value).c = code_append((yyval.value).c, paramcode);
6597 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6600 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6601 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6603 (yyval.value).c = abc_coerce_a((yyval.value).c);
6604 (yyval.value).t = TYPE_ANY;
6615 /* Line 1464 of skeleton.m4 */
6616 #line 3091 "parser.y"
6618 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6619 if(!state->method) syntaxerror("super() not allowed outside of a function");
6620 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6622 (yyval.value).c = code_new();
6623 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6625 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6627 this is dependent on the control path, check this somewhere else
6628 if(state->method->has_super)
6629 syntaxerror("constructor may call super() only once");
6631 state->method->has_super = 1;
6633 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6634 (yyval.value).c = abc_pushundefined((yyval.value).c);
6635 (yyval.value).t = TYPE_ANY;
6645 /* Line 1464 of skeleton.m4 */
6646 #line 3112 "parser.y"
6648 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6649 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6650 (yyval.value).c = code_cutlast((yyval.value).c);
6652 multiname_t*name = 0;
6653 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6654 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6655 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6656 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6657 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6658 (yyval.value).c = code_cutlast((yyval.value).c);
6659 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6661 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6662 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6663 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6665 (yyval.value).t = TYPE_BOOLEAN;
6675 /* Line 1464 of skeleton.m4 */
6676 #line 3133 "parser.y"
6678 (yyval.code) = abc_returnvoid(0);
6688 /* Line 1464 of skeleton.m4 */
6689 #line 3136 "parser.y"
6691 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6692 (yyval.code) = abc_returnvalue((yyval.code));
6702 /* Line 1464 of skeleton.m4 */
6703 #line 3143 "parser.y"
6704 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6713 /* Line 1464 of skeleton.m4 */
6714 #line 3144 "parser.y"
6715 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6724 /* Line 1464 of skeleton.m4 */
6725 #line 3145 "parser.y"
6727 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6728 (yyval.value).c = cut_last_push((yyval.value).c);
6729 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6730 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6740 /* Line 1464 of skeleton.m4 */
6741 #line 3151 "parser.y"
6743 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6753 /* Line 1464 of skeleton.m4 */
6754 #line 3157 "parser.y"
6755 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6764 /* Line 1464 of skeleton.m4 */
6765 #line 3161 "parser.y"
6766 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6775 /* Line 1464 of skeleton.m4 */
6776 #line 3163 "parser.y"
6777 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6786 /* Line 1464 of skeleton.m4 */
6787 #line 3165 "parser.y"
6788 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6797 /* Line 1464 of skeleton.m4 */
6798 #line 3169 "parser.y"
6800 (yyval.value).c = 0;
6801 namespace_t ns = {ACCESS_PACKAGE, ""};
6802 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6803 if(!(yyvsp[(1) - (1)].regexp).options) {
6804 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6805 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6806 (yyval.value).c = abc_construct((yyval.value).c, 1);
6808 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6809 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6810 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6811 (yyval.value).c = abc_construct((yyval.value).c, 2);
6813 (yyval.value).t = TYPE_REGEXP;
6823 /* Line 1464 of skeleton.m4 */
6824 #line 3186 "parser.y"
6825 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6826 //MULTINAME(m, registry_getintclass());
6827 //$$.c = abc_coerce2($$.c, &m); // FIXME
6828 (yyval.value).t = TYPE_INT;
6838 /* Line 1464 of skeleton.m4 */
6839 #line 3191 "parser.y"
6840 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6841 (yyval.value).t = TYPE_INT;
6851 /* Line 1464 of skeleton.m4 */
6852 #line 3194 "parser.y"
6853 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6854 (yyval.value).t = TYPE_INT;
6864 /* Line 1464 of skeleton.m4 */
6865 #line 3197 "parser.y"
6866 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6867 (yyval.value).t = TYPE_UINT;
6877 /* Line 1464 of skeleton.m4 */
6878 #line 3200 "parser.y"
6879 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6880 (yyval.value).t = TYPE_FLOAT;
6890 /* Line 1464 of skeleton.m4 */
6891 #line 3203 "parser.y"
6892 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6893 (yyval.value).t = TYPE_STRING;
6903 /* Line 1464 of skeleton.m4 */
6904 #line 3206 "parser.y"
6905 {(yyval.value).c = abc_pushundefined(0);
6906 (yyval.value).t = TYPE_ANY;
6916 /* Line 1464 of skeleton.m4 */
6917 #line 3209 "parser.y"
6918 {(yyval.value).c = abc_pushtrue(0);
6919 (yyval.value).t = TYPE_BOOLEAN;
6929 /* Line 1464 of skeleton.m4 */
6930 #line 3212 "parser.y"
6931 {(yyval.value).c = abc_pushfalse(0);
6932 (yyval.value).t = TYPE_BOOLEAN;
6942 /* Line 1464 of skeleton.m4 */
6943 #line 3215 "parser.y"
6944 {(yyval.value).c = abc_pushnull(0);
6945 (yyval.value).t = TYPE_NULL;
6955 /* Line 1464 of skeleton.m4 */
6956 #line 3219 "parser.y"
6957 {(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);
6958 (yyval.value).t = TYPE_BOOLEAN;
6968 /* Line 1464 of skeleton.m4 */
6969 #line 3222 "parser.y"
6970 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6971 (yyval.value).t = TYPE_BOOLEAN;
6981 /* Line 1464 of skeleton.m4 */
6982 #line 3225 "parser.y"
6983 {(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);
6984 (yyval.value).t = TYPE_BOOLEAN;
6994 /* Line 1464 of skeleton.m4 */
6995 #line 3228 "parser.y"
6996 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6997 (yyval.value).t = TYPE_BOOLEAN;
7007 /* Line 1464 of skeleton.m4 */
7008 #line 3231 "parser.y"
7009 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
7010 (yyval.value).t = TYPE_BOOLEAN;
7020 /* Line 1464 of skeleton.m4 */
7021 #line 3234 "parser.y"
7022 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
7023 (yyval.value).t = TYPE_BOOLEAN;
7033 /* Line 1464 of skeleton.m4 */
7034 #line 3237 "parser.y"
7035 {(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);
7036 (yyval.value).t = TYPE_BOOLEAN;
7046 /* Line 1464 of skeleton.m4 */
7047 #line 3240 "parser.y"
7048 {(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);
7049 (yyval.value).t = TYPE_BOOLEAN;
7059 /* Line 1464 of skeleton.m4 */
7060 #line 3244 "parser.y"
7061 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
7062 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7063 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7064 (yyval.value).c = abc_dup((yyval.value).c);
7065 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
7066 (yyval.value).c = cut_last_push((yyval.value).c);
7067 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7068 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7069 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7070 jmp->branch = label;
7080 /* Line 1464 of skeleton.m4 */
7081 #line 3255 "parser.y"
7083 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
7084 /*printf("%08x:\n",$1.t);
7085 code_dump($1.c, 0, 0, "", stdout);
7086 printf("%08x:\n",$3.t);
7087 code_dump($3.c, 0, 0, "", stdout);
7088 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
7089 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7090 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
7091 (yyval.value).c = abc_dup((yyval.value).c);
7092 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7093 (yyval.value).c = cut_last_push((yyval.value).c);
7094 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
7095 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
7096 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
7097 jmp->branch = label;
7107 /* Line 1464 of skeleton.m4 */
7108 #line 3273 "parser.y"
7109 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7110 (yyval.value).c = abc_not((yyval.value).c);
7111 (yyval.value).t = TYPE_BOOLEAN;
7121 /* Line 1464 of skeleton.m4 */
7122 #line 3278 "parser.y"
7123 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
7124 (yyval.value).c = abc_bitnot((yyval.value).c);
7125 (yyval.value).t = TYPE_INT;
7135 /* Line 1464 of skeleton.m4 */
7136 #line 3283 "parser.y"
7137 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7138 (yyval.value).c = abc_bitand((yyval.value).c);
7139 (yyval.value).t = TYPE_INT;
7149 /* Line 1464 of skeleton.m4 */
7150 #line 3288 "parser.y"
7151 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7152 (yyval.value).c = abc_bitxor((yyval.value).c);
7153 (yyval.value).t = TYPE_INT;
7163 /* Line 1464 of skeleton.m4 */
7164 #line 3293 "parser.y"
7165 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7166 (yyval.value).c = abc_bitor((yyval.value).c);
7167 (yyval.value).t = TYPE_INT;
7177 /* Line 1464 of skeleton.m4 */
7178 #line 3298 "parser.y"
7179 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7180 (yyval.value).c = abc_rshift((yyval.value).c);
7181 (yyval.value).t = TYPE_INT;
7191 /* Line 1464 of skeleton.m4 */
7192 #line 3302 "parser.y"
7193 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7194 (yyval.value).c = abc_urshift((yyval.value).c);
7195 (yyval.value).t = TYPE_INT;
7205 /* Line 1464 of skeleton.m4 */
7206 #line 3306 "parser.y"
7207 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7208 (yyval.value).c = abc_lshift((yyval.value).c);
7209 (yyval.value).t = TYPE_INT;
7219 /* Line 1464 of skeleton.m4 */
7220 #line 3311 "parser.y"
7221 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7222 (yyval.value).c = abc_divide((yyval.value).c);
7223 (yyval.value).t = TYPE_NUMBER;
7233 /* Line 1464 of skeleton.m4 */
7234 #line 3315 "parser.y"
7235 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7236 (yyval.value).c = abc_modulo((yyval.value).c);
7237 (yyval.value).t = TYPE_NUMBER;
7247 /* Line 1464 of skeleton.m4 */
7248 #line 3319 "parser.y"
7249 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7250 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
7251 (yyval.value).c = abc_add_i((yyval.value).c);
7252 (yyval.value).t = TYPE_INT;
7254 (yyval.value).c = abc_add((yyval.value).c);
7255 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
7266 /* Line 1464 of skeleton.m4 */
7267 #line 3328 "parser.y"
7268 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7269 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7270 (yyval.value).c = abc_subtract_i((yyval.value).c);
7271 (yyval.value).t = TYPE_INT;
7273 (yyval.value).c = abc_subtract((yyval.value).c);
7274 (yyval.value).t = TYPE_NUMBER;
7285 /* Line 1464 of skeleton.m4 */
7286 #line 3337 "parser.y"
7287 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7288 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7289 (yyval.value).c = abc_multiply_i((yyval.value).c);
7290 (yyval.value).t = TYPE_INT;
7292 (yyval.value).c = abc_multiply((yyval.value).c);
7293 (yyval.value).t = TYPE_NUMBER;
7304 /* Line 1464 of skeleton.m4 */
7305 #line 3347 "parser.y"
7306 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
7307 (yyval.value).c = abc_in((yyval.value).c);
7308 (yyval.value).t = TYPE_BOOLEAN;
7318 /* Line 1464 of skeleton.m4 */
7319 #line 3352 "parser.y"
7320 {char use_astype=0; // flash player's astype works differently than astypelate
7321 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7322 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7323 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7324 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7326 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7327 (yyval.value).c = abc_astypelate((yyval.value).c);
7328 (yyval.value).t = TYPE_ANY;
7339 /* Line 1464 of skeleton.m4 */
7340 #line 3365 "parser.y"
7341 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7342 (yyval.value).c = abc_instanceof((yyval.value).c);
7343 (yyval.value).t = TYPE_BOOLEAN;
7353 /* Line 1464 of skeleton.m4 */
7354 #line 3370 "parser.y"
7355 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7356 (yyval.value).c = abc_istypelate((yyval.value).c);
7357 (yyval.value).t = TYPE_BOOLEAN;
7367 /* Line 1464 of skeleton.m4 */
7368 #line 3375 "parser.y"
7370 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7371 (yyval.value).c = abc_typeof((yyval.value).c);
7372 (yyval.value).t = TYPE_STRING;
7382 /* Line 1464 of skeleton.m4 */
7383 #line 3381 "parser.y"
7385 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7386 (yyval.value).c = abc_pushundefined((yyval.value).c);
7387 (yyval.value).t = TYPE_ANY;
7397 /* Line 1464 of skeleton.m4 */
7398 #line 3387 "parser.y"
7399 { (yyval.value).c = abc_pushundefined(0);
7400 (yyval.value).t = TYPE_ANY;
7410 /* Line 1464 of skeleton.m4 */
7411 #line 3391 "parser.y"
7412 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7421 /* Line 1464 of skeleton.m4 */
7422 #line 3393 "parser.y"
7424 (yyval.value)=(yyvsp[(2) - (2)].value);
7425 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7426 (yyval.value).c=abc_negate_i((yyval.value).c);
7427 (yyval.value).t = TYPE_INT;
7429 (yyval.value).c=abc_negate((yyval.value).c);
7430 (yyval.value).t = TYPE_NUMBER;
7441 /* Line 1464 of skeleton.m4 */
7442 #line 3404 "parser.y"
7444 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7445 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7447 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7448 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7449 (yyval.value).t = 0; // array elements have unknown type
7459 /* Line 1464 of skeleton.m4 */
7460 #line 3413 "parser.y"
7462 (yyval.value).c = code_new();
7463 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7464 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).number);
7465 (yyval.value).t = registry_getarrayclass();
7475 /* Line 1464 of skeleton.m4 */
7476 #line 3420 "parser.y"
7477 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7486 /* Line 1464 of skeleton.m4 */
7487 #line 3421 "parser.y"
7488 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7497 /* Line 1464 of skeleton.m4 */
7498 #line 3423 "parser.y"
7500 (yyval.value_list).cc = 0;
7501 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7502 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7503 (yyval.value_list).number = 2;
7513 /* Line 1464 of skeleton.m4 */
7514 #line 3429 "parser.y"
7516 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7517 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7518 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7519 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7529 /* Line 1464 of skeleton.m4 */
7530 #line 3438 "parser.y"
7532 (yyval.value).c = code_new();
7533 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7534 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).number/2);
7535 (yyval.value).t = registry_getobjectclass();
7545 /* Line 1464 of skeleton.m4 */
7546 #line 3445 "parser.y"
7548 code_t*c = (yyvsp[(3) - (3)].value).c;
7549 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7550 c=abc_multiply_i(c);
7554 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7555 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7556 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7566 /* Line 1464 of skeleton.m4 */
7567 #line 3457 "parser.y"
7569 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7570 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7571 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7572 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7582 /* Line 1464 of skeleton.m4 */
7583 #line 3463 "parser.y"
7585 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7586 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7587 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7588 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7598 /* Line 1464 of skeleton.m4 */
7599 #line 3469 "parser.y"
7601 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7602 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7603 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7604 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7614 /* Line 1464 of skeleton.m4 */
7615 #line 3475 "parser.y"
7617 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7618 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7619 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7620 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7630 /* Line 1464 of skeleton.m4 */
7631 #line 3481 "parser.y"
7633 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7634 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7635 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7636 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7646 /* Line 1464 of skeleton.m4 */
7647 #line 3487 "parser.y"
7649 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7650 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7651 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7652 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7662 /* Line 1464 of skeleton.m4 */
7663 #line 3493 "parser.y"
7665 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7666 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7667 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7668 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7678 /* Line 1464 of skeleton.m4 */
7679 #line 3499 "parser.y"
7681 code_t*c = (yyvsp[(3) - (3)].value).c;
7683 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7687 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7690 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7691 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7701 /* Line 1464 of skeleton.m4 */
7702 #line 3512 "parser.y"
7703 { code_t*c = (yyvsp[(3) - (3)].value).c;
7704 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7705 c=abc_subtract_i(c);
7708 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7711 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7712 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7722 /* Line 1464 of skeleton.m4 */
7723 #line 3523 "parser.y"
7725 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7726 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7727 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7728 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7738 /* Line 1464 of skeleton.m4 */
7739 #line 3530 "parser.y"
7741 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7742 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7743 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7744 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7745 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7746 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7747 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7748 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7749 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7750 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7760 /* Line 1464 of skeleton.m4 */
7761 #line 3543 "parser.y"
7763 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7764 if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) {
7765 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7766 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7767 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7768 (yyval.value).c = abc_getlocal(0, nr);
7769 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7770 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7771 (yyval.value).c = abc_getlocal(0, nr);
7772 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7773 } else syntaxerror("internal error");
7775 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7776 c=abc_increment_i(c);
7782 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7783 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7784 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7795 /* Line 1464 of skeleton.m4 */
7796 #line 3570 "parser.y"
7798 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7799 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7800 c=abc_decrement_i(c);
7806 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7807 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7808 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7818 /* Line 1464 of skeleton.m4 */
7819 #line 3584 "parser.y"
7821 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7822 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7823 c=abc_increment_i(c);
7829 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7830 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7831 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7841 /* Line 1464 of skeleton.m4 */
7842 #line 3598 "parser.y"
7844 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7845 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7846 c=abc_decrement_i(c);
7852 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7853 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7854 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7864 /* Line 1464 of skeleton.m4 */
7865 #line 3613 "parser.y"
7866 { if(!state->cls->info)
7867 syntaxerror("super keyword not allowed outside a class");
7868 classinfo_t*t = state->cls->info->superclass;
7869 if(!t) t = TYPE_OBJECT;
7871 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7873 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7874 (yyval.value).c = 0;
7875 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7876 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7877 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7887 /* Line 1464 of skeleton.m4 */
7888 #line 3627 "parser.y"
7891 (yyval.value).c = abc_pushundefined(0);
7892 (yyval.value).t = 0;
7893 as3_warning("ignored @ operator");
7903 /* Line 1464 of skeleton.m4 */
7904 #line 3634 "parser.y"
7906 // child attribute TODO
7907 (yyval.value).c = abc_pushundefined(0);
7908 (yyval.value).t = 0;
7909 as3_warning("ignored .@ operator");
7919 /* Line 1464 of skeleton.m4 */
7920 #line 3641 "parser.y"
7922 // namespace declaration TODO
7923 (yyval.value).c = abc_pushundefined(0);
7924 (yyval.value).t = 0;
7925 as3_warning("ignored :: operator");
7935 /* Line 1464 of skeleton.m4 */
7936 #line 3648 "parser.y"
7939 (yyval.value).c = abc_pushundefined(0);
7940 (yyval.value).t = 0;
7941 as3_warning("ignored .. operator");
7951 /* Line 1464 of skeleton.m4 */
7952 #line 3655 "parser.y"
7955 (yyval.value).c = abc_pushundefined(0);
7956 (yyval.value).t = 0;
7957 as3_warning("ignored .() operator");
7967 /* Line 1464 of skeleton.m4 */
7968 #line 3666 "parser.y"
7970 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
7971 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7973 if(TYPE_IS_CLASS(t) && t->data) {
7978 if(t->subtype==INFOTYPE_UNRESOLVED) {
7979 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7981 memberinfo_t*f = registry_findmember_nsset(t, state->active_namespaces, (yyvsp[(3) - (3)].id), 1);
7983 if(f && !is_static != !(f->flags&FLAG_STATIC))
7985 if(f && f->slot && !noslot) {
7986 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7988 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7989 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7991 /* determine type */
7992 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7993 if(!(yyval.value).t)
7994 (yyval.value).c = abc_coerce_a((yyval.value).c);
7995 } else if((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
7996 string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
7997 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7998 if(dict_contains(state->import_toplevel_packages, package2)) {
7999 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
8000 (yyval.value).c->data[0] = string_new4(package2);
8001 (yyval.value).t = 0;
8003 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
8005 syntaxerror("couldn't resolve %s", package2);
8006 (yyval.value) = push_class(a);
8009 /* when resolving a property on an unknown type, we do know the
8010 name of the property (and don't seem to need the package), but
8011 we need to make avm2 try out all access modes */
8012 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8013 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8014 (yyval.value).c = abc_coerce_a((yyval.value).c);
8015 (yyval.value).t = registry_getanytype();
8026 /* Line 1464 of skeleton.m4 */
8027 #line 3716 "parser.y"
8030 /* Queue unresolved identifiers for checking against the parent
8031 function's variables.
8032 We consider everything which is not a local variable "unresolved".
8033 This encompasses class names, members of the surrounding class
8034 etc. which is *correct* because local variables of the parent function
8037 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
8038 unknown_variable((yyvsp[(1) - (1)].id));
8041 /* let the compiler know that it might check the current directory/package
8042 for this identifier- maybe there's a file $1.as defining $1. */
8043 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8046 (yyval.value).t = 0;
8047 (yyval.value).c = 0;
8052 /* look at variables */
8053 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
8054 // $1 is a local variable
8055 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
8056 (yyval.value).t = v->type;
8059 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
8060 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
8061 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
8062 (yyval.value).t = v->type;
8066 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
8068 /* look at current class' members */
8069 if(state->cls && (f = registry_findmember_nsset(state->cls->info, state->active_namespaces, (yyvsp[(1) - (1)].id), 1)) &&
8070 (f->flags&FLAG_STATIC) >= i_am_static) {
8071 // $1 is a function in this class
8072 int var_is_static = (f->flags&FLAG_STATIC);
8074 if(f->kind == INFOTYPE_METHOD) {
8075 (yyval.value).t = TYPE_FUNCTION(f);
8077 (yyval.value).t = f->type;
8079 if(var_is_static && !i_am_static) {
8080 /* access to a static member from a non-static location.
8081 do this via findpropstrict:
8082 there doesn't seem to be any non-lookup way to access
8083 static properties of a class */
8084 state->method->late_binding = 1;
8085 (yyval.value).t = f->type;
8086 namespace_t ns = {f->access, ""};
8087 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8088 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8089 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8091 } else if(f->slot>0) {
8092 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8093 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8096 namespace_t ns = {f->access, ""};
8097 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
8098 (yyval.value).c = abc_getlocal_0((yyval.value).c);
8099 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8104 /* look at actual classes, in the current package and imported */
8105 if((a = find_class((yyvsp[(1) - (1)].id)))) {
8106 (yyval.value) = push_class(a);
8110 /* look through package prefixes */
8111 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id))) {
8112 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
8113 (yyval.value).t = 0;
8117 /* unknown object, let the avm2 resolve it */
8119 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
8120 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
8121 state->method->late_binding = 1;
8123 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
8125 (yyval.value).t = 0;
8126 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
8127 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8138 /* Line 1464 of skeleton.m4 */
8139 #line 3821 "parser.y"
8142 NEW(namespace_decl_t,n);
8143 n->name = (yyvsp[(2) - (2)].id);
8144 n->url = (yyvsp[(2) - (2)].id);
8145 (yyval.namespace_decl)=n;
8155 /* Line 1464 of skeleton.m4 */
8156 #line 3828 "parser.y"
8159 NEW(namespace_decl_t,n);
8160 n->name = (yyvsp[(2) - (4)].id);
8161 n->url = (yyvsp[(4) - (4)].id);
8162 (yyval.namespace_decl)=n;
8172 /* Line 1464 of skeleton.m4 */
8173 #line 3835 "parser.y"
8176 NEW(namespace_decl_t,n);
8177 n->name = (yyvsp[(2) - (4)].id);
8178 n->url = (yyvsp[(4) - (4)].str).str;
8179 (yyval.namespace_decl)=n;
8189 /* Line 1464 of skeleton.m4 */
8190 #line 3842 "parser.y"
8193 register_namespace((yyvsp[(2) - (2)].namespace_decl)->name, (yyvsp[(2) - (2)].namespace_decl)->url);
8195 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8196 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8197 var->type = TYPE_NAMESPACE;
8199 ns.access = ACCESS_NAMESPACE;
8200 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8201 var->value = constant_new_namespace(&ns);
8213 /* Line 1464 of skeleton.m4 */
8214 #line 3857 "parser.y"
8218 register_namespace((yyvsp[(3) - (3)].classinfo)->name, url);
8227 /* Line 1464 of skeleton.m4 */
8228 #line 8229 "parser.tab.c"
8231 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8235 YY_STACK_PRINT (yyss, yyssp);
8239 /* Now `shift' the result of the reduction. Determine what state
8240 that goes to, based on the state we popped back to and the rule
8241 number reduced by. */
8245 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8246 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8247 yystate = yytable[yystate];
8249 yystate = yydefgoto[yyn - YYNTOKENS];
8254 /*------------------------------------.
8255 | yyerrlab -- here on detecting error |
8256 `------------------------------------*/
8258 /* If not already recovering from an error, report this error. */
8262 #if ! YYERROR_VERBOSE
8263 yyerror (YY_("syntax error"));
8266 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8267 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8269 YYSIZE_T yyalloc = 2 * yysize;
8270 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8271 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8272 if (yymsg != yymsgbuf)
8273 YYSTACK_FREE (yymsg);
8274 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8276 yymsg_alloc = yyalloc;
8280 yymsg_alloc = sizeof yymsgbuf;
8284 if (0 < yysize && yysize <= yymsg_alloc)
8286 (void) yysyntax_error (yymsg, yystate, yychar);
8291 yyerror (YY_("syntax error"));
8293 goto yyexhaustedlab;
8301 if (yyerrstatus == 3)
8303 /* If just tried and failed to reuse lookahead token after an
8304 error, discard it. */
8306 if (yychar <= YYEOF)
8308 /* Return failure if at end of input. */
8309 if (yychar == YYEOF)
8314 yydestruct ("Error: discarding",
8320 /* Else will try to reuse lookahead token after shifting the error
8325 /*---------------------------------------------------.
8326 | yyerrorlab -- error raised explicitly by YYERROR. |
8327 `---------------------------------------------------*/
8330 /* Pacify compilers like GCC when the user code never invokes
8331 YYERROR and the label yyerrorlab therefore never appears in user
8333 if (/*CONSTCOND*/ 0)
8336 /* Do not reclaim the symbols of the rule which action triggered
8340 YY_STACK_PRINT (yyss, yyssp);
8345 /*-------------------------------------------------------------.
8346 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8347 `-------------------------------------------------------------*/
8349 yyerrstatus = 3; /* Each real token shifted decrements this. */
8353 yyn = yypact[yystate];
8354 if (yyn != YYPACT_NINF)
8357 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8365 /* Pop the current state because it cannot handle the error token. */
8370 yydestruct ("Error: popping",
8371 yystos[yystate], yyvsp);
8374 YY_STACK_PRINT (yyss, yyssp);
8380 /* Shift the error token. */
8381 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8387 /*-------------------------------------.
8388 | yyacceptlab -- YYACCEPT comes here. |
8389 `-------------------------------------*/
8394 /*-----------------------------------.
8395 | yyabortlab -- YYABORT comes here. |
8396 `-----------------------------------*/
8401 #if !defined(yyoverflow) || YYERROR_VERBOSE
8402 /*-------------------------------------------------.
8403 | yyexhaustedlab -- memory exhaustion comes here. |
8404 `-------------------------------------------------*/
8406 yyerror (YY_("memory exhausted"));
8412 if (yychar != YYEMPTY)
8413 yydestruct ("Cleanup: discarding lookahead",
8415 /* Do not reclaim the symbols of the rule which action triggered
8416 this YYABORT or YYACCEPT. */
8418 YY_STACK_PRINT (yyss, yyssp);
8419 while (yyssp != yyss)
8421 yydestruct ("Cleanup: popping",
8422 yystos[*yyssp], yyvsp);
8427 YYSTACK_FREE (yyss);
8430 if (yymsg != yymsgbuf)
8431 YYSTACK_FREE (yymsg);
8433 /* Make sure YYID is used. */
8434 return YYID (yyresult);