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 */
88 #include "tokenizer.h"
100 /* Line 198 of skeleton.m4 */
101 #line 102 "parser.tab.c"
103 /* Enabling traces. */
108 /* Enabling verbose error messages. */
109 #ifdef YYERROR_VERBOSE
110 # undef YYERROR_VERBOSE
111 # define YYERROR_VERBOSE 1
113 # define YYERROR_VERBOSE 1
116 /* Enabling the token table. */
117 #ifndef YYTOKEN_TABLE
118 # define YYTOKEN_TABLE 0
125 /* Put the tokens into the symbol table, so that GDB and other debuggers
223 below_semicolon = 353,
224 below_assignment = 354,
227 minusminus_prefix = 357,
228 plusplus_prefix = 358,
231 above_identifier = 361,
239 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
241 /* Line 223 of skeleton.m4 */
246 /* Line 223 of skeleton.m4 */
249 enum yytokentype token;
251 classinfo_t*classinfo;
252 classinfo_list_t*classinfo_list;
254 slotinfo_list_t*slotinfo_list;
257 unsigned int number_uint;
261 //typedcode_list_t*value_list;
262 codeandnumber_t value_list;
268 for_start_t for_start;
269 abc_exception_t *exception;
272 namespace_decl_t* namespace_decl;
275 abc_exception_list_t *l;
281 /* Line 223 of skeleton.m4 */
282 #line 283 "parser.tab.c"
284 # define YYSTYPE_IS_TRIVIAL 1
285 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
286 # define YYSTYPE_IS_DECLARED 1
290 /* Copy the second part of user declarations. */
292 /* Line 273 of skeleton.m4 */
296 static int a3_error(char*s)
298 syntaxerror("%s", s);
299 return 0; //make gcc happy
302 static void parsererror(const char*file, int line, const char*f)
304 syntaxerror("internal error in %s, %s:%d", f, file, line);
307 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
310 static char* concat2(const char* t1, const char* t2)
314 char*text = malloc(l1+l2+1);
315 memcpy(text , t1, l1);
316 memcpy(text+l1, t2, l2);
320 static char* concat3(const char* t1, const char* t2, const char* t3)
325 char*text = malloc(l1+l2+l3+1);
326 memcpy(text , t1, l1);
327 memcpy(text+l1, t2, l2);
328 memcpy(text+l1+l2, t3, l3);
333 typedef struct _import {
336 DECLARE_LIST(import);
338 DECLARE(methodstate);
339 DECLARE_LIST(methodstate);
341 typedef struct _classstate {
347 methodstate_t*static_init;
349 //code_t*static_init;
351 char has_constructor;
354 struct _methodstate {
364 dict_t*unresolved_variables;
367 char uses_parent_function;
373 int var_index; // for inner methods
374 int slot_index; // for inner methods
375 char is_a_slot; // for inner methods
380 abc_exception_list_t*exceptions;
382 methodstate_list_t*innerfunctions;
385 typedef struct _state {
390 import_list_t*wildcard_imports;
391 dict_t*import_toplevel_packages;
394 namespace_list_t*active_namespace_urls;
396 char has_own_imports;
397 char new_vars; // e.g. transition between two functions
400 methodstate_t*method;
407 dict_t*allvars; // also contains variables from sublevels
410 typedef struct _global {
413 parsedclass_list_t*classes;
414 abc_script_t*classinit;
416 abc_script_t*init; //package-level code
419 dict_t*file2token2info;
422 static global_t*global = 0;
423 static state_t* state = 0;
427 #define MEMBER_MULTINAME(m,f,n) \
431 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
432 m##_ns.name = ((slotinfo_t*)(f))->package; \
437 m.namespace_set = 0; \
438 m.name = ((slotinfo_t*)(f))->name; \
440 m.type = MULTINAME; \
442 m.namespace_set = &nopackage_namespace_set; \
446 /* warning: list length of namespace set is undefined */
447 #define MULTINAME_LATE(m, access, package) \
448 namespace_t m##_ns = {access, package}; \
449 namespace_set_t m##_nsset; \
450 namespace_list_t m##_l;m##_l.next = 0; \
451 m##_nsset.namespaces = &m##_l; \
452 m##_nsset = m##_nsset; \
453 m##_l.namespace = &m##_ns; \
454 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
456 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
457 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
458 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
459 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
460 static namespace_list_t nl4 = {&ns4,0};
461 static namespace_list_t nl3 = {&ns3,&nl4};
462 static namespace_list_t nl2 = {&ns2,&nl3};
463 static namespace_list_t nl1 = {&ns1,&nl2};
464 static namespace_set_t nopackage_namespace_set = {&nl1};
466 static dict_t*definitions=0;
467 void as3_set_define(const char*c)
470 definitions = dict_new();
471 if(!dict_contains(definitions,c))
472 dict_put(definitions,c,0);
475 static void new_state()
478 state_t*oldstate = state;
480 memcpy(s, state, sizeof(state_t)); //shallow copy
482 s->imports = dict_new();
484 if(!s->import_toplevel_packages) {
485 s->import_toplevel_packages = dict_new();
489 state->has_own_imports = 0;
490 state->vars = dict_new();
491 state->old = oldstate;
494 trie_remember(active_namespaces);
497 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
500 static void state_destroy(state_t*state)
502 if(state->has_own_imports) {
503 list_free(state->wildcard_imports);
504 dict_destroy(state->imports);state->imports=0;
506 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
507 dict_destroy(state->imports);state->imports=0;
510 dict_destroy(state->vars);state->vars=0;
512 if(state->new_vars && state->allvars) {
513 parserassert(!state->old || state->old->allvars != state->allvars);
514 DICT_ITERATE_DATA(state->allvars, void*, data) {
517 dict_destroy(state->allvars);
520 list_free(state->active_namespace_urls)
521 state->active_namespace_urls = 0;
526 static void old_state()
528 trie_rollback(active_namespaces);
530 if(!state || !state->old)
531 syntaxerror("invalid nesting");
532 state_t*leaving = state;
536 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
537 free(leaving->method);
540 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
545 state_destroy(leaving);
548 static code_t* method_header(methodstate_t*m);
549 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
550 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
553 static char* internal_filename_package = 0;
554 void initialize_file(char*filename)
557 syntaxerror("invalid call to initialize_file during parsing of another file");
560 active_namespaces = trie_new();
563 state->package = internal_filename_package = strdup(filename);
564 state->allvars = dict_new();
566 global->token2info = dict_lookup(global->file2token2info,
567 current_filename // use long version
569 if(!global->token2info) {
570 global->token2info = dict_new2(&ptr_type);
571 dict_put(global->file2token2info, current_filename, global->token2info);
575 state->method = rfx_calloc(sizeof(methodstate_t));
576 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
577 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
579 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
581 syntaxerror("internal error: skewed tokencount");
582 function_initvars(state->method, 0, 0, 1);
583 global->init = abc_initscript(global->file);
589 if(!state || state->level!=1) {
590 syntaxerror("unexpected end of file in pass %d", as3_pass);
594 dict_del(global->file2token2info, current_filename);
595 code_t*header = method_header(state->method);
596 code_t*c = wrap_function(header, 0, global->init->method->body->code);
597 global->init->method->body->code = abc_returnvoid(c);
598 free(state->method);state->method=0;
601 //free(state->package);state->package=0; // used in registry
602 state_destroy(state);state=0;
605 void initialize_parser()
607 global = rfx_calloc(sizeof(global_t));
608 global->file = abc_file_new();
609 global->file->flags &= ~ABCFILE_LAZY;
610 global->file2token2info = dict_new();
611 global->token2info = 0;
612 global->classinit = abc_initscript(global->file);
615 void* finish_parser()
617 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
618 global->token2info=0;
620 initcode_add_classlist(global->classinit, global->classes);
625 typedef struct _variable {
630 methodstate_t*is_inner_method;
633 static variable_t* find_variable(state_t*s, char*name)
638 v = dict_lookup(s->vars, name);
640 if(s->new_vars) break;
643 return dict_lookup(top->allvars, name);
645 static variable_t* find_slot(state_t*s, const char*name)
647 if(s->method && s->method->slots)
648 return dict_lookup(s->method->slots, name);
652 static variable_t* find_variable_safe(state_t*s, char*name)
654 variable_t* v = find_variable(s, name);
656 syntaxerror("undefined variable: %s", name);
660 static char variable_exists(char*name)
662 return dict_contains(state->vars, name);
665 static code_t*defaultvalue(code_t*c, classinfo_t*type)
667 if(TYPE_IS_INT(type)) {
668 c = abc_pushbyte(c, 0);
669 } else if(TYPE_IS_UINT(type)) {
670 c = abc_pushuint(c, 0);
671 } else if(TYPE_IS_FLOAT(type)) {
673 } else if(TYPE_IS_BOOLEAN(type)) {
674 c = abc_pushfalse(c);
676 //c = abc_pushundefined(c);
677 syntaxerror("internal error: can't generate default value for * type");
681 c = abc_coerce2(c, &m);
686 static int alloc_local()
688 return state->method->variable_count++;
691 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
694 variable_t*v = find_slot(state, name);
700 v->index = alloc_local();
705 dict_put(state->vars, name, v);
706 dict_put(state->allvars, name, v);
711 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
713 return new_variable2(name, type, init, maybeslot)->index;
716 #define TEMPVARNAME "__as3_temp__"
719 variable_t*v = find_variable(state, TEMPVARNAME);
724 i = new_variable(TEMPVARNAME, 0, 0, 0);
729 static code_t* var_block(code_t*body)
735 for(t=0;t<state->vars->hashsize;t++) {
736 dictentry_t*e = state->vars->slots[t];
738 variable_t*v = (variable_t*)e->data;
739 if(v->type && v->init) {
740 c = defaultvalue(c, v->type);
741 c = abc_setlocal(c, v->index);
742 k = abc_kill(k, v->index);
752 if(x->opcode== OPCODE___BREAK__ ||
753 x->opcode== OPCODE___CONTINUE__) {
754 /* link kill code before break/continue */
755 code_t*e = code_dup(k);
756 code_t*s = code_start(e);
768 c = code_append(c, body);
769 c = code_append(c, k);
773 static void unknown_variable(char*name)
775 if(!state->method->unresolved_variables)
776 state->method->unresolved_variables = dict_new();
777 if(!dict_contains(state->method->unresolved_variables, name))
778 dict_put(state->method->unresolved_variables, name, 0);
781 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
783 if(m->uses_slots || (m->late_binding && !m->inner)) { //???? especially inner functions need the pushscope
784 c = abc_getlocal_0(c);
785 c = abc_pushscope(c);
788 /* FIXME: this alloc_local() causes variable indexes to be
789 different in pass2 than in pass1 */
790 if(!m->activation_var)
791 m->activation_var = alloc_local();
793 c = abc_newactivation(c);
795 c = abc_pushscope(c);
796 c = abc_setlocal(c, m->activation_var);
798 c = abc_getlocal(c, m->activation_var);
799 c = abc_pushscope(c);
805 static code_t* method_header(methodstate_t*m)
809 c = add_scope_code(c, m, 1);
811 methodstate_list_t*l = m->innerfunctions;
813 parserassert(l->methodstate->abc);
814 if(m->uses_slots && l->methodstate->is_a_slot) {
815 c = abc_getscopeobject(c, 1);
816 c = abc_newfunction(c, l->methodstate->abc);
818 c = abc_setlocal(c, l->methodstate->var_index);
819 c = abc_setslot(c, l->methodstate->slot_index);
821 c = abc_newfunction(c, l->methodstate->abc);
822 c = abc_setlocal(c, l->methodstate->var_index);
824 free(l->methodstate);l->methodstate=0;
828 c = code_append(c, m->header);
831 if(m->is_constructor && !m->has_super) {
832 // call default constructor
833 c = abc_getlocal_0(c);
834 c = abc_constructsuper(c, 0);
838 /* all parameters that are used by inner functions
839 need to be copied from local to slot */
840 parserassert(m->activation_var);
841 DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
842 if(v->is_parameter) {
843 c = abc_getlocal(c, m->activation_var);
844 c = abc_getlocal(c, v->index);
845 c = abc_setslot(c, v->index);
849 list_free(m->innerfunctions);
850 m->innerfunctions = 0;
855 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
857 c = code_append(c, header);
858 c = code_append(c, var_block(body));
859 /* append return if necessary */
860 if(!c || (c->opcode != OPCODE_RETURNVOID &&
861 c->opcode != OPCODE_RETURNVALUE)) {
862 c = abc_returnvoid(c);
867 static void startpackage(char*name)
870 state->package = strdup(name);
872 static void endpackage()
874 //used e.g. in classinfo_register:
875 //free(state->package);state->package=0;
879 #define FLAG_PUBLIC 256
880 #define FLAG_PROTECTED 512
881 #define FLAG_PRIVATE 1024
882 #define FLAG_PACKAGEINTERNAL 2048
883 #define FLAG_NAMESPACE 4096
885 static namespace_t modifiers2access(modifiers_t*mod)
890 if(mod->flags&FLAG_NAMESPACE) {
891 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
892 syntaxerror("invalid combination of access levels and namespaces");
893 ns.access = ACCESS_NAMESPACE;
895 const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
897 /* shouldn't happen- the tokenizer only reports something as a namespace
898 if it was already registered */
899 trie_dump(active_namespaces);
900 syntaxerror("unknown namespace: %s", mod->ns);
903 } else if(mod->flags&FLAG_PUBLIC) {
904 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
905 syntaxerror("invalid combination of access levels");
906 ns.access = ACCESS_PACKAGE;
907 } else if(mod->flags&FLAG_PRIVATE) {
908 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
909 syntaxerror("invalid combination of access levels");
910 ns.access = ACCESS_PRIVATE;
911 } else if(mod->flags&FLAG_PROTECTED) {
912 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
913 syntaxerror("invalid combination of access levels");
914 ns.access = ACCESS_PROTECTED;
916 ns.access = ACCESS_PACKAGEINTERNAL;
920 static slotinfo_t* find_class(const char*name);
922 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
924 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
927 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
932 index = new_variable("this", 0, 0, 0);
933 else if(!m->is_global)
934 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
936 index = new_variable("globalscope", 0, 0, 0);
937 parserassert(!index);
941 /* as variables and slots share the same number, make sure
942 that those variable indices are reserved. It's up to the
943 optimizer to later shuffle the variables down to lower
945 m->variable_count = m->uses_slots;
950 for(p=params->list;p;p=p->next) {
951 variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1);
956 methodstate_list_t*l = m->innerfunctions;
958 methodstate_t*m = l->methodstate;
960 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
961 m->var_index = v->index;
962 m->slot_index = v->index;
963 v->is_inner_method = m;
969 m->scope_code = add_scope_code(m->scope_code, m, 0);
972 if(as3_pass==2 && m->slots) {
973 /* exchange unresolved identifiers with the actual objects */
974 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
975 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
976 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
977 if(!type || type->kind != INFOTYPE_CLASS) {
978 syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
987 char*as3_globalclass=0;
988 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
991 syntaxerror("inner classes now allowed");
996 classinfo_list_t*mlist=0;
998 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
999 syntaxerror("invalid modifier(s)");
1001 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
1002 syntaxerror("public and internal not supported at the same time.");
1004 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1005 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
1006 // all classes extend object
1007 extends = registry_getobjectclass();
1010 /* create the class name, together with the proper attributes */
1014 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1015 access = ACCESS_PRIVATE; package = internal_filename_package;
1016 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1017 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1018 } else if(state->package!=internal_filename_package) {
1019 access = ACCESS_PACKAGE; package = state->package;
1021 syntaxerror("public classes only allowed inside a package");
1025 state->cls = rfx_calloc(sizeof(classstate_t));
1026 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1027 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1028 state->cls->static_init->variable_count=1;
1029 /* notice: we make no effort to initialize the top variable (local0) here,
1030 even though it has special meaning. We just rely on the facat
1031 that pass 1 won't do anything with variables */
1033 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1035 /* set current method to constructor- all code within the class-level (except
1036 static variable initializations) will be executed during construction time */
1037 state->method = state->cls->init;
1039 if(registry_find(package, classname)) {
1040 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1042 /* build info struct */
1043 int num_interfaces = (list_length(implements));
1044 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1045 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1046 state->cls->info->superclass = extends;
1049 classinfo_list_t*l = implements;
1050 for(l=implements;l;l=l->next) {
1051 state->cls->info->interfaces[pos++] = l->classinfo;
1056 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1058 state->method = state->cls->init;
1059 parserassert(state->cls && state->cls->info);
1061 function_initvars(state->cls->init, 0, 0, 1);
1062 function_initvars(state->cls->static_init, 0, 0, 0);
1064 if(extends && (extends->flags & FLAG_FINAL))
1065 syntaxerror("Can't extend final class '%s'", extends->name);
1068 while(state->cls->info->interfaces[pos]) {
1069 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1070 syntaxerror("'%s' is not an interface",
1071 state->cls->info->interfaces[pos]->name);
1075 /* generate the abc code for this class */
1076 MULTINAME(classname2,state->cls->info);
1077 multiname_t*extends2 = sig2mname(extends);
1079 /* don't add the class to the class index just yet- that will be done later
1081 state->cls->abc = abc_class_new(0, &classname2, extends2);
1082 state->cls->abc->file = global->file;
1084 multiname_destroy(extends2);
1085 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1086 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1087 if(state->cls->info->flags&FLAG_INTERFACE) {
1088 abc_class_interface(state->cls->abc);
1091 abc_class_protectedNS(state->cls->abc, classname);
1093 for(mlist=implements;mlist;mlist=mlist->next) {
1094 MULTINAME(m, mlist->classinfo);
1095 abc_class_add_interface(state->cls->abc, &m);
1098 NEW(parsedclass_t,p);
1099 p->cls = state->cls->info;
1100 p->abc = state->cls->abc;
1101 list_append(global->classes, p);
1103 /* flash.display.MovieClip handling */
1104 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1105 if(state->package && state->package[0]) {
1106 as3_globalclass = concat3(state->package, ".", classname);
1108 as3_globalclass = strdup(classname);
1114 static void endclass()
1117 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1119 c = abc_getlocal_0(c);
1120 c = abc_constructsuper(c, 0);
1121 state->cls->init->header = code_append(state->cls->init->header, c);
1122 state->cls->has_constructor=1;
1124 if(state->cls->init) {
1125 if(state->cls->info->flags&FLAG_INTERFACE) {
1126 if(state->cls->init->header)
1127 syntaxerror("interface can not have class-level code");
1129 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1130 code_t*c = method_header(state->cls->init);
1131 m->body->code = wrap_function(c, 0, m->body->code);
1134 if(state->cls->static_init) {
1135 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1136 code_t*c = method_header(state->cls->static_init);
1137 m->body->code = wrap_function(c, 0, m->body->code);
1144 void check_code_for_break(code_t*c)
1147 if(c->opcode == OPCODE___BREAK__) {
1148 char*name = string_cstr(c->data[0]);
1149 syntaxerror("Unresolved \"break %s\"", name);
1151 if(c->opcode == OPCODE___CONTINUE__) {
1152 char*name = string_cstr(c->data[0]);
1153 syntaxerror("Unresolved \"continue %s\"", name);
1155 if(c->opcode == OPCODE___RETHROW__) {
1156 syntaxerror("Unresolved \"rethrow\"");
1158 if(c->opcode == OPCODE___FALLTHROUGH__) {
1159 syntaxerror("Unresolved \"fallthrough\"");
1161 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1162 char*name = string_cstr(c->data[0]);
1163 syntaxerror("Can't reference a package (%s) as such", name);
1169 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1171 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1172 if(TYPE_IS_NUMBER(t)) {
1173 xassert(c->type == CONSTANT_FLOAT
1174 || c->type == CONSTANT_INT
1175 || c->type == CONSTANT_UINT);
1176 } else if(TYPE_IS_UINT(t)) {
1177 xassert(c->type == CONSTANT_UINT ||
1178 (c->type == CONSTANT_INT && c->i>=0));
1179 } else if(TYPE_IS_INT(t)) {
1180 xassert(c->type == CONSTANT_INT);
1181 } else if(TYPE_IS_BOOLEAN(t)) {
1182 xassert(c->type == CONSTANT_TRUE
1183 || c->type == CONSTANT_FALSE);
1187 static void check_override(memberinfo_t*m, int flags)
1191 if(m->parent == state->cls->info)
1192 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1194 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1195 if(m->access==ACCESS_PRIVATE)
1197 if(m->flags & FLAG_FINAL)
1198 syntaxerror("can't override final member %s", m->name);
1200 /* allow this. it's no issue.
1201 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1202 syntaxerror("can't override static member %s", m->name);*/
1204 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1205 syntaxerror("can't override non-static member %s with static declaration", m->name);
1207 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1208 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1209 if(m->kind == INFOTYPE_METHOD)
1210 syntaxerror("can't override without explicit 'override' declaration");
1212 syntaxerror("can't override '%s'", m->name);
1217 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1219 methodinfo_t*minfo = 0;
1220 namespace_t ns = modifiers2access(mod);
1223 minfo = methodinfo_register_global(ns.access, state->package, name);
1224 minfo->return_type = return_type;
1225 } else if(getset != KW_GET && getset != KW_SET) {
1227 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1229 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1231 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1232 minfo->return_type = return_type;
1233 // getslot on a member slot only returns "undefined", so no need
1234 // to actually store these
1235 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1237 //class getter/setter
1238 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1240 if(getset == KW_GET) {
1242 } else if(params->list && params->list->param && !params->list->next) {
1243 type = params->list->param->type;
1245 syntaxerror("setter function needs to take exactly one argument");
1246 // not sure wether to look into superclasses here, too
1247 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1249 if(minfo->kind!=INFOTYPE_VAR)
1250 syntaxerror("class already contains a method called '%s'", name);
1251 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1252 syntaxerror("class already contains a field called '%s'", name);
1253 if(minfo->subtype & gs)
1254 syntaxerror("getter/setter for '%s' already defined", name);
1255 /* make a setter or getter into a getset */
1256 minfo->subtype |= gs;
1259 FIXME: this check needs to be done in pass 2
1261 if((!minfo->return_type != !type) ||
1262 (minfo->return_type && type &&
1263 !strcmp(minfo->return_type->name, type->name))) {
1264 syntaxerror("different type in getter and setter: %s and %s",
1265 minfo->return_type?minfo->return_type->name:"*",
1266 type?type->name:"*");
1269 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1270 minfo->kind = INFOTYPE_VAR; //hack
1271 minfo->subtype = gs;
1272 minfo->return_type = type;
1275 /* can't assign a slot as getter and setter might have different slots */
1276 //minfo->slot = slot;
1278 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1279 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1280 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1285 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1287 //parserassert(state->method && state->method->info);
1289 methodstate_t*parent_method = state->method;
1292 return_type = 0; // not valid in pass 1
1296 state->new_vars = 1;
1297 state->allvars = dict_new();
1300 state->method = rfx_calloc(sizeof(methodstate_t));
1301 state->method->inner = 1;
1302 state->method->variable_count = 0;
1303 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1305 NEW(methodinfo_t,minfo);
1306 minfo->kind = INFOTYPE_METHOD;
1307 minfo->access = ACCESS_PACKAGEINTERNAL;
1309 state->method->info = minfo;
1312 list_append(parent_method->innerfunctions, state->method);
1314 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1316 function_initvars(state->method, params, 0, 1);
1320 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1321 state->method->variable_count = 0;
1322 parserassert(state->method);
1324 state->method->info->return_type = return_type;
1325 function_initvars(state->method, params, 0, 1);
1329 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1330 params_t*params, classinfo_t*return_type)
1332 if(state->method && state->method->info) {
1333 syntaxerror("not able to start another method scope");
1336 state->new_vars = 1;
1337 state->allvars = dict_new();
1340 state->method = rfx_calloc(sizeof(methodstate_t));
1341 state->method->has_super = 0;
1344 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1346 state->method->is_global = 1;
1347 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1349 if(state->method->is_constructor)
1350 name = "__as3_constructor__";
1352 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1354 function_initvars(state->method, params, mod->flags, 1);
1356 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1360 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1361 state->method->variable_count = 0;
1362 parserassert(state->method);
1365 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1366 check_override(m, mod->flags);
1370 state->cls->has_constructor |= state->method->is_constructor;
1373 function_initvars(state->method, params, mod->flags, 1);
1377 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1378 params_t*params, classinfo_t*return_type, code_t*body)
1381 // store inner methods in variables
1382 function_initvars(state->method, 0, 0, 0);
1384 methodstate_list_t*ml = state->method->innerfunctions;
1386 dict_t*xvars = dict_new();
1389 methodstate_t*m = ml->methodstate;
1390 parserassert(m->inner);
1391 if(m->unresolved_variables) {
1392 dict_t*d = m->unresolved_variables;
1394 for(t=0;t<d->hashsize;t++) {
1395 dictentry_t*l = d->slots[t];
1397 /* check parent method's variables */
1399 if((v=find_variable(state, l->key))) {
1400 m->uses_parent_function = 1;
1401 state->method->uses_slots = 1;
1402 dict_put(xvars, l->key, 0);
1409 dict_destroy(m->unresolved_variables);
1410 m->unresolved_variables = 0;
1415 if(state->method->uses_slots) {
1416 state->method->slots = dict_new();
1418 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1419 if(!name) syntaxerror("internal error");
1420 if(v->index && dict_contains(xvars, name)) {
1423 if(v->is_inner_method) {
1424 v->is_inner_method->is_a_slot = 1;
1427 dict_put(state->method->slots, name, v);
1430 state->method->uses_slots = i;
1431 dict_destroy(state->vars);state->vars = 0;
1432 parserassert(state->new_vars);
1433 dict_destroy(state->allvars);state->allvars = 0;
1440 /*if(state->method->uses_parent_function){
1441 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1446 multiname_t*type2 = sig2mname(return_type);
1448 if(state->method->inner) {
1449 f = state->method->abc;
1450 abc_method_init(f, global->file, type2, 1);
1451 } else if(state->method->is_constructor) {
1452 f = abc_class_getconstructor(state->cls->abc, type2);
1453 } else if(!state->method->is_global) {
1454 namespace_t ns = modifiers2access(mod);
1456 /* deal with protected */
1457 if(ns.access == ACCESS_PROTECTED && state->cls)
1458 ns.name = state->cls->info->name;
1460 multiname_t mname = {QNAME, &ns, 0, name};
1462 if(mod->flags&FLAG_STATIC)
1463 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1465 f = abc_class_method(state->cls->abc, type2, &mname);
1466 slot = f->trait->slot_id;
1468 namespace_t mname_ns = {state->method->info->access, state->package};
1469 multiname_t mname = {QNAME, &mname_ns, 0, name};
1471 f = abc_method_new(global->file, type2, 1);
1472 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1473 //abc_code_t*c = global->init->method->body->code;
1475 //flash doesn't seem to allow us to access function slots
1476 //state->method->info->slot = slot;
1478 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1479 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1480 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1481 if(params->varargs) f->flags |= METHOD_NEED_REST;
1485 for(p=params->list;p;p=p->next) {
1486 if(params->varargs && !p->next) {
1487 break; //varargs: omit last parameter in function signature
1489 multiname_t*m = sig2mname(p->param->type);
1490 list_append(f->parameters, m);
1491 if(p->param->value) {
1492 check_constant_against_type(p->param->type, p->param->value);
1493 opt=1;list_append(f->optional_parameters, p->param->value);
1495 syntaxerror("non-optional parameter not allowed after optional parameters");
1498 if(state->method->slots) {
1499 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1501 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1502 multiname_t*type = sig2mname(v->type);
1503 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1504 t->slot_id = v->index;
1509 check_code_for_break(body);
1511 /* Seems this works now.
1512 if(state->method->exceptions && state->method->uses_slots) {
1513 as3_warning("try/catch and activation not supported yet within the same method");
1517 f->body->code = body;
1518 f->body->exceptions = state->method->exceptions;
1519 } else { //interface
1521 syntaxerror("interface methods can't have a method body");
1531 void breakjumpsto(code_t*c, char*name, code_t*jump)
1534 if(c->opcode == OPCODE___BREAK__) {
1535 string_t*name2 = c->data[0];
1536 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1537 c->opcode = OPCODE_JUMP;
1544 void continuejumpsto(code_t*c, char*name, code_t*jump)
1547 if(c->opcode == OPCODE___CONTINUE__) {
1548 string_t*name2 = c->data[0];
1549 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1550 c->opcode = OPCODE_JUMP;
1558 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1560 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1565 return abc_coerce_a(c);
1569 // cast an "any" type to a specific type. subject to
1570 // runtime exceptions
1571 return abc_coerce2(c, &m);
1574 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1575 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1576 // allow conversion between number types
1577 if(TYPE_IS_UINT(to))
1578 return abc_convert_u(c);
1579 else if(TYPE_IS_INT(to))
1580 return abc_convert_i(c);
1581 else if(TYPE_IS_NUMBER(to))
1582 return abc_convert_d(c);
1583 return abc_coerce2(c, &m);
1586 if(TYPE_IS_BOOLEAN(to))
1587 return abc_convert_b(c);
1588 if(TYPE_IS_STRING(to))
1589 return abc_convert_s(c);
1590 if(TYPE_IS_OBJECT(to))
1591 return abc_convert_o(c);
1593 classinfo_t*supertype = from;
1595 if(supertype == to) {
1596 // target type is one of from's superclasses
1597 return abc_coerce2(c, &m);
1600 while(supertype->interfaces[t]) {
1601 if(supertype->interfaces[t]==to) {
1602 // target type is one of from's interfaces
1603 return abc_coerce2(c, &m);
1607 supertype = supertype->superclass;
1609 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1611 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1613 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1616 as3_error("can't convert type %s%s%s to %s%s%s",
1617 from->package, from->package[0]?".":"", from->name,
1618 to->package, to->package[0]?".":"", to->name);
1622 /* move to ast.c todo end */
1624 char is_pushundefined(code_t*c)
1626 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1629 static const char* get_package_from_name(const char*name)
1631 /* try explicit imports */
1632 dictentry_t* e = dict_get_slot(state->imports, name);
1634 if(!strcmp(e->key, name)) {
1635 slotinfo_t*c = (slotinfo_t*)e->data;
1636 if(c) return c->package;
1642 static namespace_list_t*get_current_imports()
1644 namespace_list_t*searchlist = 0;
1646 list_append(searchlist, namespace_new_package(state->package));
1648 import_list_t*l = state->wildcard_imports;
1650 namespace_t*ns = namespace_new_package(l->import->package);
1651 list_append(searchlist, ns);
1654 list_append(searchlist, namespace_new_package(""));
1655 list_append(searchlist, namespace_new_package(internal_filename_package));
1659 static slotinfo_t* find_class(const char*name)
1663 c = registry_find(state->package, name);
1666 /* try explicit imports */
1667 dictentry_t* e = dict_get_slot(state->imports, name);
1670 if(!strcmp(e->key, name)) {
1671 c = (slotinfo_t*)e->data;
1677 /* try package.* imports */
1678 import_list_t*l = state->wildcard_imports;
1680 //printf("does package %s contain a class %s?\n", l->import->package, name);
1681 c = registry_find(l->import->package, name);
1686 /* try global package */
1687 c = registry_find("", name);
1690 /* try local "filename" package */
1691 c = registry_find(internal_filename_package, name);
1696 typedcode_t push_class(slotinfo_t*a)
1701 if(a->access == ACCESS_PACKAGEINTERNAL &&
1702 strcmp(a->package, state->package) &&
1703 strcmp(a->package, internal_filename_package)
1705 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1706 infotypename(a), a->name, a->package, state->package);
1709 if(a->kind != INFOTYPE_CLASS) {
1711 x.c = abc_findpropstrict2(x.c, &m);
1712 x.c = abc_getproperty2(x.c, &m);
1713 if(a->kind == INFOTYPE_METHOD) {
1714 methodinfo_t*f = (methodinfo_t*)a;
1715 x.t = TYPE_FUNCTION(f);
1717 varinfo_t*v = (varinfo_t*)a;
1721 classinfo_t*c = (classinfo_t*)a;
1723 x.c = abc_getglobalscope(x.c);
1724 x.c = abc_getslot(x.c, c->slot);
1727 x.c = abc_getlex2(x.c, &m);
1729 x.t = TYPE_CLASS(c);
1735 char is_break_or_jump(code_t*c)
1739 if(c->opcode == OPCODE_JUMP ||
1740 c->opcode == OPCODE___BREAK__ ||
1741 c->opcode == OPCODE___CONTINUE__ ||
1742 c->opcode == OPCODE_THROW ||
1743 c->opcode == OPCODE_RETURNVOID ||
1744 c->opcode == OPCODE_RETURNVALUE) {
1750 #define IS_FINALLY_TARGET(op) \
1751 ((op) == OPCODE___CONTINUE__ || \
1752 (op) == OPCODE___BREAK__ || \
1753 (op) == OPCODE_RETURNVOID || \
1754 (op) == OPCODE_RETURNVALUE || \
1755 (op) == OPCODE___RETHROW__)
1757 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1759 #define NEED_EXTRA_STACK_ARG
1760 code_t*finally_label = abc_nop(0);
1761 NEW(lookupswitch_t, l);
1767 code_t*prev = i->prev;
1768 if(IS_FINALLY_TARGET(i->opcode)) {
1771 if(i->opcode == OPCODE___RETHROW__ ||
1772 i->opcode == OPCODE_RETURNVALUE) {
1773 if(i->opcode == OPCODE___RETHROW__)
1774 i->opcode = OPCODE_THROW;
1776 p = abc_coerce_a(p);
1777 p = abc_setlocal(p, tempvar);
1779 p = abc_pushbyte(p, count++);
1780 p = abc_jump(p, finally_label);
1781 code_t*target = p = abc_label(p);
1782 #ifdef NEED_EXTRA_STACK_ARG
1786 p = abc_getlocal(p, tempvar);
1789 p->next = i;i->prev = p;
1790 list_append(l->targets, target);
1796 c = abc_pushbyte(c, -1);
1797 c = code_append(c, finally_label);
1798 c = code_append(c, finally);
1800 #ifdef NEED_EXTRA_STACK_ARG
1803 c = abc_lookupswitch(c, l);
1804 c = l->def = abc_label(c);
1805 #ifdef NEED_EXTRA_STACK_ARG
1812 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1816 code_t*prev = i->prev;
1817 if(IS_FINALLY_TARGET(i->opcode)) {
1818 if(i->opcode == OPCODE___RETHROW__)
1819 i->opcode = OPCODE_THROW;
1820 code_t*end = code_dup(finally);
1821 code_t*start = code_start(end);
1822 if(prev) prev->next = start;
1829 return code_append(c, finally);
1832 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1838 int num_insertion_points=0;
1840 if(IS_FINALLY_TARGET(i->opcode))
1841 num_insertion_points++;
1848 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1853 int simple_version_cost = (1+num_insertion_points)*code_size;
1854 int lookup_version_cost = 4*num_insertion_points + 5;
1856 if(cantdup || simple_version_cost > lookup_version_cost) {
1857 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1858 return insert_finally_lookup(c, finally, tempvar);
1860 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
1861 return insert_finally_simple(c, finally, tempvar);
1865 #define PASS1 }} if(as3_pass == 1) {{
1866 #define PASS1END }} if(as3_pass == 2) {{
1867 #define PASS2 }} if(as3_pass == 2) {{
1868 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
1869 #define PASS12END }} if(as3_pass == 2) {{
1870 #define PASS_ALWAYS }} {{
1874 /* Line 273 of skeleton.m4 */
1875 #line 1876 "parser.tab.c"
1876 /* Unqualified %code blocks. */
1878 /* Line 274 of skeleton.m4 */
1879 #line 1952 "parser.y"
1881 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1887 /* Line 274 of skeleton.m4 */
1888 #line 2401 "parser.y"
1890 static void state_has_imports()
1892 state->wildcard_imports = list_clone(state->wildcard_imports);
1893 state->imports = dict_clone(state->imports);
1894 state->has_own_imports = 1;
1896 static void import_toplevel(const char*package)
1898 char* s = strdup(package);
1900 dict_put(state->import_toplevel_packages, s, 0);
1901 char*x = strrchr(s, '.');
1910 /* Line 274 of skeleton.m4 */
1911 #line 2534 "parser.y"
1913 static int slotstate_varconst = 0;
1914 static modifiers_t*slotstate_flags = 0;
1915 static void setslotstate(modifiers_t* flags, int varconst)
1917 slotstate_varconst = varconst;
1918 slotstate_flags = flags;
1920 if(flags && flags->flags&FLAG_STATIC) {
1921 state->method = state->cls->static_init;
1923 state->method = state->cls->init;
1926 parserassert(state->method);
1929 static trait_t* add_abc_slot(modifiers_t* modifiers, const char*name, multiname_t*m, code_t***c)
1931 int flags = modifiers->flags;
1932 namespace_t ns = modifiers2access(modifiers);
1933 /* deal with protected */
1934 if(ns.access == ACCESS_PROTECTED && state->cls)
1935 ns.name = state->cls->info->name;
1938 multiname_t mname = {QNAME, &ns, 0, name};
1940 trait_list_t**traits;
1944 ns.name = state->package;
1945 traits = &global->init->traits;
1946 code = &global->init->method->body->code;
1947 } else if(flags&FLAG_STATIC) {
1949 traits = &state->cls->abc->static_traits;
1950 code = &state->cls->static_init->header;
1952 // instance variable
1953 traits = &state->cls->abc->traits;
1954 code = &state->cls->init->header;
1959 memcpy(m, &mname, sizeof(multiname_t));
1961 return trait_new_member(traits, 0, multiname_clone(&mname), 0);
1965 /* Line 274 of skeleton.m4 */
1966 #line 2712 "parser.y"
1968 static int xml_level = 0;
1971 /* Line 274 of skeleton.m4 */
1972 #line 3390 "parser.y"
1974 node_t* resolve_identifier(char*name)
1984 /* look at variables */
1985 if((v = find_variable(state, name))) {
1986 // name is a local variable
1987 o.c = abc_getlocal(o.c, v->index);
1989 return mkcodenode(o);
1991 if((v = find_slot(state, name))) {
1992 o.c = abc_getscopeobject(o.c, 1);
1993 o.c = abc_getslot(o.c, v->index);
1995 return mkcodenode(o);
1998 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
2000 /* look at current class' members */
2001 if(!state->method->inner &&
2003 (f = findmember_nsset(state->cls->info, name, 1)))
2005 // name is a member or attribute in this class
2006 int var_is_static = (f->flags&FLAG_STATIC);
2008 if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
2009 /* if the variable is a constant (and we know what is evaluates to), we
2010 can just use the value itself */
2011 varinfo_t*v = (varinfo_t*)f;
2013 return mkconstnode(v->value);
2017 if(var_is_static >= i_am_static) {
2018 if(f->kind == INFOTYPE_METHOD) {
2019 o.t = TYPE_FUNCTION(f);
2024 if(var_is_static && !i_am_static) {
2025 /* access to a static member from a non-static location.
2026 do this via findpropstrict:
2027 there doesn't seem to be any non-lookup way to access
2028 static properties of a class */
2029 state->method->late_binding = 1;
2031 namespace_t ns = {f->access, f->package};
2032 multiname_t m = {QNAME, &ns, 0, name};
2033 o.c = abc_findpropstrict2(o.c, &m);
2034 o.c = abc_getproperty2(o.c, &m);
2035 return mkcodenode(o);
2036 } else if(f->slot>0) {
2037 o.c = abc_getlocal_0(o.c);
2038 o.c = abc_getslot(o.c, f->slot);
2039 return mkcodenode(o);
2041 namespace_t ns = {f->access, f->package};
2042 multiname_t m = {QNAME, &ns, 0, name};
2043 o.c = abc_getlocal_0(o.c);
2044 o.c = abc_getproperty2(o.c, &m);
2045 return mkcodenode(o);
2050 /* look at actual classes, in the current package and imported */
2051 if((a = find_class(name))) {
2053 return mkcodenode(o);
2056 /* look through package prefixes */
2057 if(dict_contains(state->import_toplevel_packages, name) ||
2058 registry_ispackage(name)) {
2059 o.c = abc___pushpackage__(o.c, name);
2061 return mkcodenode(o); //?
2064 /* unknown object, let the avm2 resolve it */
2066 //as3_softwarning("Couldn't resolve '%s', doing late binding", name);
2067 as3_warning("Couldn't resolve '%s', doing late binding", name);
2068 state->method->late_binding = 1;
2070 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, name};
2073 o.c = abc_findpropstrict2(o.c, &m);
2074 o.c = abc_getproperty2(o.c, &m);
2075 return mkcodenode(o);
2080 /* Line 274 of skeleton.m4 */
2081 #line 3523 "parser.y"
2083 void add_active_url(const char*url)
2087 list_append(state->active_namespace_urls, n);
2092 /* Line 274 of skeleton.m4 */
2093 #line 2094 "parser.tab.c"
2100 typedef YYTYPE_UINT8 yytype_uint8;
2102 typedef unsigned char yytype_uint8;
2106 typedef YYTYPE_INT8 yytype_int8;
2107 #elif (defined __STDC__ || defined __C99__FUNC__ \
2108 || defined __cplusplus || defined _MSC_VER)
2109 typedef signed char yytype_int8;
2111 typedef short int yytype_int8;
2114 #ifdef YYTYPE_UINT16
2115 typedef YYTYPE_UINT16 yytype_uint16;
2117 typedef unsigned short int yytype_uint16;
2121 typedef YYTYPE_INT16 yytype_int16;
2123 typedef short int yytype_int16;
2127 # ifdef __SIZE_TYPE__
2128 # define YYSIZE_T __SIZE_TYPE__
2129 # elif defined size_t
2130 # define YYSIZE_T size_t
2131 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2132 || defined __cplusplus || defined _MSC_VER)
2133 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2134 # define YYSIZE_T size_t
2136 # define YYSIZE_T unsigned int
2140 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2145 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2146 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2150 # define YY_(msgid) msgid
2154 /* Suppress unused-variable warnings by "using" E. */
2155 #if ! defined lint || defined __GNUC__
2156 # define YYUSE(e) ((void) (e))
2158 # define YYUSE(e) /* empty */
2161 /* Identity function, used to suppress warnings about constant conditions. */
2163 # define YYID(n) (n)
2165 #if (defined __STDC__ || defined __C99__FUNC__ \
2166 || defined __cplusplus || defined _MSC_VER)
2179 #if ! defined yyoverflow || YYERROR_VERBOSE
2181 /* The parser invokes alloca or malloc; define the necessary symbols. */
2183 # ifdef YYSTACK_USE_ALLOCA
2184 # if YYSTACK_USE_ALLOCA
2186 # define YYSTACK_ALLOC __builtin_alloca
2187 # elif defined __BUILTIN_VA_ARG_INCR
2188 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2190 # define YYSTACK_ALLOC __alloca
2191 # elif defined _MSC_VER
2192 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2193 # define alloca _alloca
2195 # define YYSTACK_ALLOC alloca
2196 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2197 || defined __cplusplus || defined _MSC_VER)
2198 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2200 # define _STDLIB_H 1
2207 # ifdef YYSTACK_ALLOC
2208 /* Pacify GCC's `empty if-body' warning. */
2209 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2210 # ifndef YYSTACK_ALLOC_MAXIMUM
2211 /* The OS might guarantee only one guard page at the bottom of the stack,
2212 and a page size can be as small as 4096 bytes. So we cannot safely
2213 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2214 to allow for a few compiler-allocated temporary stack slots. */
2215 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2218 # define YYSTACK_ALLOC YYMALLOC
2219 # define YYSTACK_FREE YYFREE
2220 # ifndef YYSTACK_ALLOC_MAXIMUM
2221 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2223 # if (defined __cplusplus && ! defined _STDLIB_H \
2224 && ! ((defined YYMALLOC || defined malloc) \
2225 && (defined YYFREE || defined free)))
2226 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2228 # define _STDLIB_H 1
2232 # define YYMALLOC malloc
2233 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2234 || defined __cplusplus || defined _MSC_VER)
2235 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2239 # define YYFREE free
2240 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2241 || defined __cplusplus || defined _MSC_VER)
2242 void free (void *); /* INFRINGES ON USER NAME SPACE */
2246 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2249 #if (! defined yyoverflow \
2250 && (! defined __cplusplus \
2251 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2253 /* A type that is properly aligned for any stack member. */
2256 yytype_int16 yyss_alloc;
2260 /* The size of the maximum gap between one aligned stack and the next. */
2261 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2263 /* The size of an array large to enough to hold all stacks, each with
2265 # define YYSTACK_BYTES(N) \
2266 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2267 + YYSTACK_GAP_MAXIMUM)
2269 /* Copy COUNT objects from FROM to TO. The source and destination do
2272 # if defined __GNUC__ && 1 < __GNUC__
2273 # define YYCOPY(To, From, Count) \
2274 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2276 # define YYCOPY(To, From, Count) \
2280 for (yyi = 0; yyi < (Count); yyi++) \
2281 (To)[yyi] = (From)[yyi]; \
2287 /* Relocate STACK from its old location to the new one. The
2288 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2289 elements in the stack, and YYPTR gives the new location of the
2290 stack. Advance YYPTR to a properly aligned location for the next
2292 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2295 YYSIZE_T yynewbytes; \
2296 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2297 Stack = &yyptr->Stack_alloc; \
2298 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2299 yyptr += yynewbytes / sizeof (*yyptr); \
2305 /* YYFINAL -- State number of the termination state. */
2307 /* YYLAST -- Last index in YYTABLE. */
2310 /* YYNTOKENS -- Number of terminals. */
2311 #define YYNTOKENS 134
2312 /* YYNNTS -- Number of nonterminals. */
2314 /* YYNRULES -- Number of rules. */
2315 #define YYNRULES 331
2316 /* YYNRULES -- Number of states. */
2317 #define YYNSTATES 570
2319 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2320 #define YYUNDEFTOK 2
2321 #define YYMAXUTOK 363
2323 #define YYTRANSLATE(YYX) \
2324 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2326 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2327 static const yytype_uint8 yytranslate[] =
2329 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2330 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2332 2, 2, 2, 118, 2, 2, 2, 116, 107, 2,
2333 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2334 2, 2, 2, 2, 2, 2, 2, 2, 104, 99,
2335 109, 102, 110, 103, 128, 2, 2, 2, 2, 2,
2336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2338 2, 124, 2, 125, 106, 2, 2, 2, 2, 2,
2339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2341 2, 2, 2, 126, 105, 132, 117, 2, 2, 2,
2342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2350 2, 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, 2, 2, 2, 2, 2, 2, 2,
2354 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2355 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2356 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2357 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2358 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2359 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2360 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2361 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2362 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2363 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2364 95, 96, 97, 98, 101, 108, 111, 119, 120, 121,
2369 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2371 static const yytype_uint16 yyprhs[] =
2373 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2374 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2375 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2376 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2377 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2378 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2379 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2380 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2381 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2382 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2383 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2384 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2385 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2386 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2387 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2388 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2389 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2390 468, 470, 472, 474, 476, 478, 480, 482, 484, 486,
2391 488, 490, 491, 492, 495, 498, 501, 505, 516, 523,
2392 535, 536, 538, 540, 543, 547, 548, 550, 553, 558,
2393 562, 564, 569, 572, 574, 576, 577, 578, 591, 593,
2394 594, 595, 606, 608, 612, 614, 616, 618, 622, 624,
2395 626, 628, 631, 632, 633, 637, 638, 640, 642, 644,
2396 647, 650, 651, 656, 661, 666, 669, 671, 674, 676,
2397 678, 680, 684, 686, 690, 691, 693, 695, 697, 701,
2398 707, 709, 711, 713, 715, 717, 719, 721, 723, 725,
2399 729, 733, 737, 741, 745, 749, 753, 757, 761, 765,
2400 769, 773, 776, 779, 783, 787, 791, 795, 799, 803,
2401 807, 811, 815, 819, 823, 827, 831, 835, 839, 844,
2402 847, 849, 853, 856, 861, 865, 869, 873, 877, 881,
2403 885, 889, 893, 897, 901, 905, 909, 915, 918, 921,
2404 924, 927, 931, 934, 940, 942, 944, 946, 948, 954,
2405 958, 964, 969, 974, 981, 988, 992, 994, 997, 1002,
2409 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2410 static const yytype_int16 yyrhs[] =
2412 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2413 137, 138, -1, 186, -1, 198, -1, 196, -1, 227,
2414 -1, 207, -1, 147, -1, 148, 126, 136, 132, -1,
2415 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2416 198, -1, 196, -1, 227, -1, 207, -1, 147, -1,
2417 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2418 143, 145, -1, 145, -1, 189, -1, 159, -1, 160,
2419 -1, 161, -1, 163, -1, 171, -1, 154, -1, 183,
2420 -1, 179, -1, 250, -1, 261, -1, 260, -1, 126,
2421 143, 132, -1, 126, 132, -1, 99, -1, 144, -1,
2422 150, -1, 165, -1, 166, -1, 246, -1, 181, -1,
2423 148, 126, 143, 132, -1, 145, 99, -1, 145, -1,
2424 144, -1, 3, 89, 3, -1, 102, 254, -1, -1,
2425 45, 151, -1, 31, 151, -1, 152, -1, 151, 100,
2426 152, -1, 3, 237, 149, -1, -1, 64, 146, -1,
2427 -1, 63, 122, 155, 248, 133, 146, 153, -1, -1,
2428 150, -1, 250, -1, 45, 3, 237, -1, 3, -1,
2429 11, 122, -1, 11, 49, 122, -1, 158, 156, 99,
2430 248, 99, 250, 133, 146, -1, 158, 157, 67, 248,
2431 133, 146, -1, -1, 12, 122, 162, 248, 133, 146,
2432 -1, -1, 13, 164, 146, 12, 122, 248, 133, -1,
2433 65, -1, 65, 3, -1, 29, -1, 29, 3, -1,
2434 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2435 168, 169, -1, 33, 254, 104, 142, -1, 61, 104,
2436 142, -1, -1, 14, 122, 172, 254, 133, 126, 167,
2437 132, -1, -1, 32, 122, 3, 237, 133, 174, 126,
2438 142, 132, -1, -1, 26, 126, 176, 142, 132, -1,
2439 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2440 175, -1, -1, 51, 126, 180, 142, 132, 178, -1,
2441 36, 248, -1, 36, -1, 38, 122, 248, 133, -1,
2442 182, 146, -1, 3, -1, 17, -1, 4, -1, 185,
2443 127, 184, -1, 184, -1, -1, 17, 185, 126, 187,
2444 139, 132, -1, -1, 17, 126, 188, 139, 132, -1,
2445 40, 233, -1, 40, 185, 127, 115, -1, -1, 191,
2446 -1, 192, -1, 191, 192, -1, 19, -1, 20, -1,
2447 18, -1, 37, -1, 46, -1, 48, -1, 47, -1,
2448 24, -1, 22, -1, 4, -1, -1, 53, 234, -1,
2449 -1, 53, 235, -1, -1, 15, 235, -1, -1, 190,
2450 30, 3, 193, 195, 126, 197, 200, 132, -1, -1,
2451 190, 43, 3, 194, 126, 199, 203, 132, -1, -1,
2452 201, -1, 202, -1, 201, 202, -1, 99, -1, 148,
2453 126, 200, 132, -1, 207, -1, 227, -1, 144, -1,
2454 -1, 204, -1, 205, -1, 204, 205, -1, 99, -1,
2455 45, 3, -1, 190, 25, 226, 3, 122, 223, 133,
2456 237, -1, 45, -1, 31, -1, -1, 190, 206, 208,
2457 209, -1, 210, -1, 209, 100, 210, -1, 3, 237,
2458 149, -1, -1, 102, 254, -1, 8, -1, 9, -1,
2459 10, -1, 5, -1, 55, -1, 54, -1, 44, -1,
2460 27, -1, 28, -1, 219, -1, 109, -1, 110, -1,
2461 -1, -1, 217, 5, -1, 217, 110, -1, 219, 217,
2462 -1, 218, 219, 217, -1, 214, 3, 220, 215, 217,
2463 109, 114, 3, 216, 110, -1, 214, 3, 220, 114,
2464 216, 110, -1, 214, 3, 220, 215, 217, 218, 109,
2465 114, 3, 216, 110, -1, -1, 221, -1, 222, -1,
2466 221, 222, -1, 3, 102, 5, -1, -1, 224, -1,
2467 93, 225, -1, 224, 100, 93, 225, -1, 224, 100,
2468 225, -1, 225, -1, 3, 104, 236, 211, -1, 3,
2469 211, -1, 50, -1, 34, -1, -1, -1, 190, 25,
2470 226, 3, 122, 223, 133, 237, 126, 228, 142, 132,
2471 -1, 3, -1, -1, -1, 25, 229, 122, 223, 133,
2472 237, 126, 231, 142, 132, -1, 184, -1, 185, 127,
2473 184, -1, 233, -1, 232, -1, 234, -1, 235, 100,
2474 234, -1, 234, -1, 115, -1, 35, -1, 104, 236,
2475 -1, -1, -1, 122, 239, 133, -1, -1, 240, -1,
2476 241, -1, 247, -1, 240, 100, -1, 241, 247, -1,
2477 -1, 23, 254, 242, 238, -1, 254, 122, 239, 133,
2478 -1, 52, 122, 239, 133, -1, 62, 254, -1, 41,
2479 -1, 41, 248, -1, 254, -1, 249, -1, 254, -1,
2480 249, 100, 254, -1, 254, -1, 250, 100, 254, -1,
2481 -1, 253, -1, 3, -1, 5, -1, 252, 104, 247,
2482 -1, 253, 100, 252, 104, 247, -1, 230, -1, 257,
2483 -1, 243, -1, 245, -1, 244, -1, 258, -1, 212,
2484 -1, 213, -1, 6, -1, 124, 239, 125, -1, 69,
2485 251, 132, -1, 254, 109, 254, -1, 254, 110, 254,
2486 -1, 254, 74, 254, -1, 254, 75, 254, -1, 254,
2487 70, 254, -1, 254, 71, 254, -1, 254, 73, 254,
2488 -1, 254, 72, 254, -1, 254, 87, 254, -1, 254,
2489 88, 254, -1, 118, 254, -1, 117, 254, -1, 254,
2490 107, 254, -1, 254, 106, 254, -1, 254, 105, 254,
2491 -1, 254, 96, 254, -1, 254, 95, 254, -1, 254,
2492 94, 254, -1, 254, 114, 254, -1, 254, 116, 254,
2493 -1, 254, 113, 254, -1, 254, 112, 254, -1, 254,
2494 115, 254, -1, 254, 67, 254, -1, 254, 68, 254,
2495 -1, 254, 39, 254, -1, 254, 66, 254, -1, 42,
2496 122, 254, 133, -1, 35, 254, -1, 35, -1, 122,
2497 249, 133, -1, 112, 254, -1, 254, 124, 254, 125,
2498 -1, 254, 79, 254, -1, 254, 78, 254, -1, 254,
2499 85, 254, -1, 254, 84, 254, -1, 254, 86, 254,
2500 -1, 254, 77, 254, -1, 254, 76, 254, -1, 254,
2501 83, 254, -1, 254, 80, 254, -1, 254, 81, 254,
2502 -1, 254, 82, 254, -1, 254, 102, 254, -1, 254,
2503 103, 254, 104, 254, -1, 254, 91, -1, 254, 90,
2504 -1, 91, 254, -1, 90, 254, -1, 52, 127, 3,
2505 -1, 128, 3, -1, 254, 127, 122, 254, 133, -1,
2506 3, -1, 4, -1, 3, -1, 115, -1, 254, 127,
2507 255, 89, 256, -1, 254, 92, 256, -1, 254, 127,
2508 124, 254, 125, -1, 254, 127, 128, 256, -1, 254,
2509 92, 128, 256, -1, 254, 127, 128, 124, 254, 125,
2510 -1, 254, 92, 128, 124, 254, 125, -1, 254, 127,
2511 256, -1, 3, -1, 16, 3, -1, 16, 3, 102,
2512 3, -1, 16, 3, 102, 5, -1, 190, 259, -1,
2516 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2517 static const yytype_uint16 yyrline[] =
2519 0, 1857, 1857, 1859, 1859, 1860, 1861, 1863, 1864, 1865,
2520 1866, 1867, 1868, 1869, 1870, 1872, 1872, 1873, 1874, 1876,
2521 1877, 1878, 1879, 1880, 1881, 1882, 1884, 1885, 1887, 1890,
2522 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902,
2523 1903, 1904, 1905, 1906, 1909, 1910, 1911, 1912, 1913, 1914,
2524 1915, 1916, 1928, 1929, 1933, 1940, 1959, 1960, 1962, 1963,
2525 1965, 1966, 1968, 2028, 2029, 2032, 2032, 2051, 2052, 2053,
2526 2058, 2062, 2067, 2068, 2070, 2090, 2138, 2138, 2157, 2157,
2527 2172, 2175, 2178, 2181, 2185, 2186, 2187, 2188, 2189, 2190,
2528 2192, 2203, 2206, 2206, 2237, 2237, 2262, 2262, 2278, 2279,
2529 2280, 2281, 2289, 2298, 2298, 2347, 2351, 2362, 2372, 2389,
2530 2390, 2391, 2393, 2394, 2396, 2396, 2398, 2398, 2421, 2435,
2531 2451, 2452, 2453, 2454, 2461, 2462, 2463, 2464, 2465, 2466,
2532 2467, 2468, 2469, 2470, 2474, 2475, 2477, 2478, 2480, 2481,
2533 2485, 2483, 2491, 2489, 2498, 2499, 2500, 2501, 2502, 2503,
2534 2504, 2505, 2507, 2513, 2514, 2515, 2516, 2517, 2518, 2521,
2535 2587, 2587, 2589, 2589, 2591, 2592, 2594, 2678, 2679, 2688,
2536 2689, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2716, 2718,
2537 2719, 2720, 2722, 2723, 2724, 2726, 2727, 2729, 2733, 2736,
2538 2741, 2742, 2743, 2744, 2745, 2755, 2759, 2765, 2771, 2779,
2539 2784, 2790, 2798, 2806, 2807, 2808, 2811, 2810, 2827, 2828,
2540 2830, 2829, 2853, 2872, 2886, 2887, 2889, 2890, 2892, 2893,
2541 2894, 2903, 2904, 2908, 2909, 2911, 2912, 2913, 2915, 2919,
2542 2920, 2925, 2926, 2963, 3013, 3034, 3056, 3059, 3066, 3069,
2543 3072, 3075, 3078, 3081, 3086, 3087, 3089, 3090, 3092, 3098,
2544 3107, 3108, 3109, 3110, 3111, 3112, 3114, 3118, 3131, 3151,
2545 3161, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178,
2546 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188,
2547 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198,
2548 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208,
2549 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3217, 3218, 3219,
2550 3220, 3222, 3237, 3244, 3251, 3252, 3253, 3254, 3256, 3274,
2551 3281, 3292, 3299, 3306, 3316, 3327, 3497, 3532, 3539, 3546,
2556 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2557 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2558 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2559 static const char *const yytname[] =
2561 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2562 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2563 "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2564 "\"namespace\"", "\"package\"", "\"protected\"", "\"public\"",
2565 "\"private\"", "\"use\"", "\"internal\"", "\"new\"", "\"native\"",
2566 "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2567 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2568 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2569 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2570 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2571 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2572 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2573 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2574 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2575 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2576 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"", "\"+=\"",
2577 "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"",
2578 "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"",
2579 "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2580 "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "below_lt",
2581 "'<'", "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'",
2582 "'!'", "minusminus_prefix", "plusplus_prefix", "below_curly", "'('",
2583 "new2", "'['", "']'", "'{'", "'.'", "'@'", "above_identifier",
2584 "below_else", "above_function", "'}'", "')'", "$accept", "PROGRAM",
2585 "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2586 "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2587 "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2588 "PACKAGE_INITCODE", "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION",
2589 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2590 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2591 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2592 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2593 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2594 "TRY", "$@7", "THROW", "WITH_HEAD", "WITH", "X_IDENTIFIER", "PACKAGE",
2595 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2596 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2597 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2598 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2599 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2600 "SLOT_DECLARATION", "$@12", "SLOT_LIST", "ONE_SLOT", "MAYBECONSTANT",
2601 "CONSTANT", "XML", "OPEN", "CLOSE", "CLOSE2", "XMLTEXT", "XML2",
2602 "XMLNODE", "MAYBE_XMLATTRIBUTES", "XMLATTRIBUTES", "XMLATTRIBUTE",
2603 "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2604 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2605 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2606 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2607 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2608 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2609 "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_DICT_EXPRPAIR_LIST",
2610 "DICTLH", "DICT_EXPRPAIR_LIST", "E", "ID_OR_NS", "SUBNODE", "MEMBER",
2611 "VAR_READ", "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2616 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2618 static const yytype_uint16 yytoknum[] =
2620 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2621 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2622 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2623 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2624 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2625 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2626 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2627 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2628 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2629 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2630 44, 354, 61, 63, 58, 124, 94, 38, 355, 60,
2631 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2632 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2637 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2638 static const yytype_uint16 yyr1[] =
2640 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2641 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2642 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2643 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2644 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
2645 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2646 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2647 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2648 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2649 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2650 178, 178, 178, 180, 179, 181, 181, 182, 183, 184,
2651 184, 184, 185, 185, 187, 186, 188, 186, 189, 189,
2652 190, 190, 191, 191, 192, 192, 192, 192, 192, 192,
2653 192, 192, 192, 192, 193, 193, 194, 194, 195, 195,
2654 197, 196, 199, 198, 200, 200, 201, 201, 202, 202,
2655 202, 202, 202, 203, 203, 204, 204, 205, 205, 205,
2656 206, 206, 208, 207, 209, 209, 210, 211, 211, 212,
2657 212, 212, 212, 212, 212, 212, 212, 212, 213, 214,
2658 215, 216, 217, 217, 217, 218, 218, 219, 219, 219,
2659 220, 220, 221, 221, 222, 223, 223, 223, 223, 224,
2660 224, 225, 225, 226, 226, 226, 228, 227, 229, 229,
2661 231, 230, 232, 233, 234, 234, 235, 235, 236, 236,
2662 236, 237, 237, 238, 238, 239, 239, 239, 240, 241,
2663 240, 242, 243, 244, 244, 245, 246, 246, 247, 248,
2664 249, 249, 250, 250, 251, 251, 252, 252, 253, 253,
2665 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
2666 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
2667 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
2668 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
2669 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
2670 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
2671 254, 254, 254, 254, 255, 255, 256, 256, 254, 254,
2672 254, 254, 254, 254, 254, 257, 258, 259, 259, 259,
2676 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2677 static const yytype_uint8 yyr2[] =
2679 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2680 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2681 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2682 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2683 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2684 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2685 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2686 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2687 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2688 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2689 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2690 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2691 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2692 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2693 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2694 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2695 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2696 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2697 1, 0, 0, 2, 2, 2, 3, 10, 6, 11,
2698 0, 1, 1, 2, 3, 0, 1, 2, 4, 3,
2699 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
2700 0, 10, 1, 3, 1, 1, 1, 3, 1, 1,
2701 1, 2, 0, 0, 3, 0, 1, 1, 1, 2,
2702 2, 0, 4, 4, 4, 2, 1, 2, 1, 1,
2703 1, 3, 1, 3, 0, 1, 1, 1, 3, 5,
2704 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2705 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2706 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2707 3, 3, 3, 3, 3, 3, 3, 3, 4, 2,
2708 1, 3, 2, 4, 3, 3, 3, 3, 3, 3,
2709 3, 3, 3, 3, 3, 3, 5, 2, 2, 2,
2710 2, 3, 2, 5, 1, 1, 1, 1, 5, 3,
2711 5, 4, 4, 6, 6, 3, 1, 2, 4, 4,
2715 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2716 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2717 means the default is an error. */
2718 static const yytype_uint16 yydefact[] =
2720 120, 326, 133, 172, 258, 169, 170, 171, 0, 0,
2721 78, 0, 0, 126, 124, 125, 0, 132, 0, 131,
2722 209, 176, 177, 290, 127, 0, 0, 0, 175, 128,
2723 130, 129, 0, 0, 174, 173, 0, 0, 244, 0,
2724 0, 14, 179, 0, 0, 0, 0, 225, 120, 0,
2725 0, 2, 120, 5, 54, 12, 0, 36, 67, 31,
2726 32, 33, 34, 35, 38, 120, 37, 7, 30, 0,
2727 121, 122, 9, 8, 11, 256, 257, 0, 178, 10,
2728 250, 252, 254, 253, 39, 242, 251, 255, 41, 40,
2729 0, 0, 72, 76, 120, 92, 109, 111, 110, 116,
2730 113, 0, 0, 326, 231, 208, 0, 289, 0, 0,
2731 118, 0, 103, 225, 0, 235, 65, 246, 247, 0,
2732 0, 245, 310, 309, 292, 272, 271, 0, 240, 0,
2733 226, 227, 228, 238, 82, 0, 106, 236, 0, 80,
2734 44, 43, 120, 45, 29, 0, 46, 47, 48, 50,
2735 0, 49, 312, 1, 6, 120, 326, 0, 68, 0,
2736 0, 69, 53, 108, 0, 205, 0, 161, 0, 160,
2737 162, 330, 123, 190, 0, 0, 0, 0, 0, 0,
2738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2739 0, 0, 0, 0, 0, 0, 0, 0, 308, 307,
2740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2741 0, 0, 0, 0, 0, 0, 225, 0, 0, 55,
2742 73, 0, 0, 0, 120, 114, 0, 212, 0, 215,
2743 214, 331, 223, 195, 0, 239, 0, 0, 27, 0,
2744 311, 0, 260, 0, 0, 0, 291, 259, 229, 230,
2745 83, 222, 59, 60, 105, 237, 58, 81, 42, 28,
2746 120, 0, 222, 0, 0, 52, 327, 204, 203, 0,
2747 134, 136, 0, 0, 0, 191, 192, 243, 286, 287,
2748 284, 285, 265, 266, 268, 267, 263, 264, 300, 299,
2749 295, 294, 302, 303, 304, 301, 297, 296, 298, 269,
2750 270, 316, 317, 0, 319, 278, 277, 276, 305, 0,
2751 275, 274, 273, 261, 262, 282, 281, 279, 283, 280,
2752 0, 0, 316, 315, 0, 0, 0, 0, 325, 0,
2753 0, 0, 25, 0, 120, 17, 23, 0, 20, 19,
2754 22, 21, 120, 112, 0, 225, 232, 167, 0, 0,
2755 196, 200, 107, 119, 213, 288, 0, 26, 234, 0,
2756 248, 0, 241, 0, 57, 0, 120, 13, 57, 0,
2757 0, 0, 0, 0, 138, 0, 0, 222, 163, 164,
2758 0, 180, 181, 182, 193, 0, 322, 0, 233, 293,
2759 0, 0, 0, 321, 0, 120, 0, 0, 117, 18,
2760 120, 0, 0, 0, 0, 202, 197, 222, 0, 0,
2761 120, 0, 220, 219, 218, 221, 0, 62, 61, 51,
2762 0, 120, 328, 329, 195, 135, 0, 0, 216, 137,
2763 142, 57, 0, 194, 0, 0, 0, 306, 313, 320,
2764 0, 318, 77, 0, 84, 0, 115, 224, 168, 167,
2765 0, 0, 199, 0, 0, 98, 102, 100, 104, 63,
2766 249, 56, 0, 75, 0, 139, 140, 0, 120, 166,
2767 165, 188, 183, 179, 184, 0, 182, 324, 323, 79,
2768 0, 0, 0, 85, 88, 86, 24, 201, 210, 198,
2769 96, 0, 99, 101, 120, 66, 120, 222, 120, 217,
2770 0, 157, 0, 0, 120, 155, 0, 179, 182, 185,
2771 0, 27, 93, 89, 87, 27, 27, 222, 64, 74,
2772 0, 148, 152, 0, 0, 0, 120, 146, 150, 151,
2773 158, 205, 143, 156, 181, 0, 186, 27, 91, 0,
2774 0, 0, 206, 120, 141, 147, 0, 0, 181, 90,
2775 211, 97, 94, 27, 0, 0, 187, 0, 0, 0,
2776 149, 195, 189, 27, 207, 0, 0, 222, 95, 159
2779 /* YYDEFGOTO[NTERM-NUM]. */
2780 static const yytype_int16 yydefgoto[] =
2782 -1, 50, 51, 52, 53, 333, 334, 335, 356, 357,
2783 143, 144, 163, 336, 145, 417, 146, 256, 253, 495,
2784 57, 241, 159, 160, 58, 59, 60, 61, 221, 62,
2785 94, 147, 148, 482, 483, 484, 485, 63, 223, 455,
2786 558, 456, 516, 457, 458, 64, 238, 149, 65, 66,
2787 227, 228, 67, 342, 224, 68, 150, 70, 71, 374,
2788 376, 427, 338, 498, 339, 468, 525, 526, 527, 503,
2789 504, 505, 170, 340, 272, 378, 379, 405, 75, 76,
2790 77, 383, 434, 435, 475, 78, 274, 275, 276, 349,
2791 350, 351, 269, 341, 553, 106, 80, 515, 229, 230,
2792 414, 429, 415, 364, 346, 129, 130, 131, 232, 81,
2793 82, 83, 151, 132, 234, 235, 84, 119, 120, 121,
2794 85, 327, 304, 86, 87, 171, 88, 89
2797 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2799 #define YYPACT_NINF -467
2800 static const yytype_int16 yypact[] =
2802 1718, -46, -467, -467, -467, -467, -467, -467, -29, -54,
2803 -467, -32, 60, -467, -467, -467, 46, -467, 2165, -467,
2804 99, -467, -467, 2236, -467, -10, 82, -2, -467, -467,
2805 -467, -467, 22, -61, -467, -467, 2165, 25, 110, 2165,
2806 2165, -467, -467, 2165, 2165, 2165, 2165, 2165, 678, 150,
2807 211, -467, 548, -467, -467, -467, 88, -467, 2094, -467,
2808 -467, -467, -467, -467, -467, 1970, -467, -467, -467, 49,
2809 347, -467, -467, -467, -467, -467, -467, 213, -467, -467,
2810 -467, -467, -467, -467, 120, 2936, -467, -467, -467, -467,
2811 220, 105, -467, -467, 1970, -467, -467, -467, -467, -467,
2812 -467, 92, 82, -467, -55, -467, 109, 157, 2165, 94,
2813 -467, 2165, -467, 2165, 230, 157, -467, -467, -467, 107,
2814 130, 141, 157, 157, 397, 157, 157, -60, 2874, 118,
2815 152, 2165, -467, 2874, 253, 254, 2165, 2165, 254, 255,
2816 -467, -467, 808, -467, -467, 134, -467, -467, -467, -467,
2817 245, -467, -467, -467, -467, 1068, 195, 264, -467, 176,
2818 209, 120, 178, -467, 275, 33, 277, -467, 279, -467,
2819 -467, -467, -467, 280, 2165, 2165, 2165, 2165, 2165, 2165,
2820 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165,
2821 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, -467, -467,
2822 13, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165,
2823 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 21, -467,
2824 -467, 2165, 273, 2165, 1198, -467, 82, 163, 164, -467,
2825 -467, -467, 170, 39, 160, 194, 102, 2295, 1844, 167,
2826 -467, 2165, -467, 2165, 110, 2165, -467, -467, -467, -467,
2827 -467, 197, 202, -467, -467, -467, 202, -467, -467, -467,
2828 1970, 171, 197, 2165, 2165, -467, 207, -467, -467, 301,
2829 257, 260, 303, 212, 32, 280, -467, 2874, 1060, 540,
2830 540, 540, 3184, 3184, 3184, 3184, 1060, 1060, 2874, 2874,
2831 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 349,
2832 2998, -467, -467, 16, -467, 393, 393, 393, 2874, 2502,
2833 2229, 3060, 3122, 1060, 1060, 397, 397, 157, 157, 157,
2834 182, 2564, 227, -467, 2165, 2165, 36, 229, -467, 186,
2835 198, 2364, -467, 189, 1328, -467, -467, 200, -467, -467,
2836 -467, -467, 1198, -467, 82, 2165, -467, 50, 320, 191,
2837 231, -467, -467, -467, 201, -467, 206, 1844, -467, 196,
2838 -467, 223, 2874, 72, 238, 254, 938, -467, -20, 242,
2839 214, 204, 208, 82, 330, 82, 222, 197, 246, -467,
2840 350, -467, -467, -467, -467, 2165, -467, 2165, -467, -467,
2841 2433, 2626, 2165, -467, 15, 1970, 2165, 232, -467, -467,
2842 1198, 224, 221, 2165, 72, -467, -467, 197, 41, 103,
2843 1970, 2165, -467, -467, -467, -467, 2165, -467, -467, -467,
2844 2165, 1970, -467, -467, 39, -467, 82, 233, -467, 261,
2845 -467, 238, 303, -467, 247, 17, 2688, 2874, -467, -467,
2846 2750, -467, -467, 235, 27, 241, -467, -467, 2874, 258,
2847 236, 320, -467, 251, 256, -467, -467, 103, -467, 300,
2848 -467, 2874, -52, -467, 243, 261, -467, 82, 218, -467,
2849 -467, -467, -467, 267, -467, 276, -467, -467, -467, -467,
2850 2165, 282, 259, 27, -467, -467, -467, -467, -467, -467,
2851 -467, 384, -467, -467, 1970, -467, 1970, 197, 1458, -467,
2852 386, -467, 367, 265, 250, -467, 396, 290, -467, 23,
2853 2812, 1844, -467, -467, -467, 1844, 1844, 197, -467, -467,
2854 270, -467, -467, 281, 228, 278, 1588, -467, -467, -467,
2855 -467, 33, -467, -467, -467, 402, 23, 1844, -467, 286,
2856 293, 294, -467, 1458, -467, -467, 406, 302, -467, -467,
2857 -467, -467, -467, 1844, 296, 289, -467, 304, 287, 297,
2858 -467, 39, -467, 1844, -467, 298, 310, 197, -467, -467
2861 /* YYPGOTO[NTERM-NUM]. */
2862 static const yytype_int16 yypgoto[] =
2864 -467, -467, 271, -467, 378, -296, -467, 98, -466, -31,
2865 1, -58, -88, 51, 2, 18, 375, 299, 70, -467,
2866 -467, -467, -467, -467, -467, -467, -467, -467, -467, -467,
2867 -467, -467, -467, -467, -467, -37, -36, -467, -467, -9,
2868 -467, -7, -467, -467, -467, -467, -467, -467, -467, -467,
2869 9, 96, -467, -467, -467, -467, 0, -467, 381, -467,
2870 -467, -467, 57, -467, 58, -467, -91, -467, -73, -467,
2871 -467, -47, -467, 3, -467, -467, 28, 20, -467, -467,
2872 -467, -467, -423, -417, -467, -397, -467, -467, 199, -411,
2873 -467, -307, -65, 4, -467, -467, -467, -467, -467, 444,
2874 -87, 52, 68, -192, -467, -99, -467, -467, -467, -467,
2875 -467, -467, -467, -122, -125, 429, -50, -467, 237, -467,
2876 -13, -467, -189, -467, -467, -467, -467, -467
2879 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2880 positive, shift that token. If negative, reduce the rule which
2881 number is the opposite. If zero, do what YYDEFACT says.
2882 If YYTABLE_NINF, syntax error. */
2883 #define YYTABLE_NINF -315
2884 static const yytype_int16 yytable[] =
2886 69, 54, 56, 74, 79, 104, 222, 162, 161, 249,
2887 107, 254, 255, 464, 239, 231, 301, 142, 301, 301,
2888 91, 100, 472, 115, 322, 323, 122, 123, 472, 328,
2889 124, 125, 126, 128, 133, 100, 162, 200, 476, 301,
2890 245, 406, 347, 90, 347, 538, 401, -70, 174, 539,
2891 540, 55, 69, 54, 56, 74, 79, 72, 73, 509,
2892 480, 113, 102, 96, 97, 164, 114, 267, 93, 217,
2893 368, 549, 218, 246, 165, 96, 97, 98, 508, 166,
2894 167, 496, 416, 268, 259, 96, 97, 559, 481, 98,
2895 95, 536, 168, 92, 169, 128, 329, 566, 237, 98,
2896 133, 452, 105, 55, 445, 96, 97, 412, 101, 72,
2897 73, 547, 108, 117, 386, 118, 359, 320, 133, 98,
2898 111, 360, 109, 128, 128, 557, 473, 474, 302, 453,
2899 302, 302, 348, 474, 451, 454, 302, 393, 369, 370,
2900 385, 303, 381, 324, 489, 325, 382, 116, 112, 326,
2901 565, 302, 403, 152, 404, 69, 54, 56, 74, 79,
2902 392, 277, 278, 279, 280, 281, 282, 283, 284, 285,
2903 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
2904 296, 297, 298, 299, 300, 431, 99, 413, 305, 306,
2905 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
2906 317, 318, 319, 133, 321, 441, 55, 422, 128, 423,
2907 331, 153, 72, 73, 155, 450, 173, 353, 225, 226,
2908 174, 236, 2, 219, 69, 54, 337, 220, 128, 366,
2909 133, 233, 362, 240, 243, 343, 13, 14, 15, 242,
2910 17, 244, 19, 247, 164, 354, 402, 198, 199, 200,
2911 128, 128, 248, 165, 2, 24, 250, 251, 257, 167,
2912 260, 164, -71, 500, 29, 30, 31, 262, 13, 14,
2913 15, 443, 17, 169, 19, 263, 264, 265, 266, 216,
2914 270, 217, 271, 273, 218, 330, 425, 24, 428, 460,
2915 -113, 344, 345, 352, 245, 500, 29, 30, 31, 259,
2916 358, 363, 365, 367, 372, 520, 377, 442, 259, 371,
2917 373, 390, 391, 375, 380, 388, -314, 501, 394, 395,
2918 396, 398, 459, 347, 407, 541, 400, 411, -112, 410,
2919 424, 408, 133, 463, 69, 54, 337, 162, 409, 428,
2920 416, 420, 69, 54, 337, 426, 432, 421, 430, 501,
2921 -153, 2, 162, 354, 447, 433, 446, 471, 444, 466,
2922 403, 467, 488, 162, 494, 13, 14, 15, 479, 17,
2923 462, 19, 436, 486, 437, 569, 497, 490, 491, 440,
2924 499, 506, -154, 128, 24, 507, 511, 517, 175, 530,
2925 448, 512, 531, 29, 30, 31, 542, 532, 133, 534,
2926 69, 54, 337, 461, 535, 548, 518, 543, 519, 555,
2927 544, 561, 556, 563, 562, 176, 177, 178, 550, 179,
2928 180, 181, 182, 183, 184, 551, 261, 552, 560, 564,
2929 154, 567, 399, 158, 252, 418, 162, 197, 162, 198,
2930 199, 200, 568, 201, 202, 203, 513, 514, 492, 469,
2931 493, 172, 554, 545, 206, 207, 208, 533, 209, 210,
2932 470, 211, 212, 213, 214, 215, 546, 510, 502, 487,
2933 110, 216, 449, 217, 384, 127, 218, 0, 465, 0,
2934 0, 361, 0, 198, 199, 200, 0, 198, 199, 200,
2935 0, 0, 0, 0, 0, 0, 0, 0, 524, 522,
2936 523, 528, 529, 0, 502, 211, 212, 213, 214, 215,
2937 0, 213, 214, 215, 0, 216, 0, 217, 0, 216,
2938 218, 217, 0, 0, 218, 0, 524, 522, 523, 528,
2939 529, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2940 0, 0, 0, 524, 522, 523, 528, 529, -4, 0,
2941 0, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2942 9, 10, 11, 0, 0, 12, 13, 14, 15, 16,
2943 17, 18, 19, 0, 0, 21, 22, 0, 0, 175,
2944 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
2945 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
2946 33, 0, 34, 35, 0, 0, -315, -315, -315, 0,
2947 36, 37, 0, 0, 183, 184, 0, 38, 0, 0,
2948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2949 198, 199, 200, 0, 201, 202, 203, 0, 39, 40,
2950 0, 0, 0, 0, 0, 0, 0, 41, 0, 209,
2951 210, 0, 211, 212, 213, 214, 215, 42, 0, 0,
2952 43, 0, 216, 0, 217, 44, 45, 218, 0, 0,
2953 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
2954 -4, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2955 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
2956 17, 18, 19, 20, 0, 21, 22, 134, 0, 135,
2957 0, 0, 0, 23, 136, 24, 25, 0, 26, 137,
2958 27, 0, 28, 138, 29, 30, 31, 0, 0, 32,
2959 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2960 36, 37, 0, 139, 0, 0, 0, 38, 0, 0,
2961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2962 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2963 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
2964 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2965 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
2966 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
2967 141, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2968 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
2969 17, 18, 19, 20, 0, 21, 22, 134, 0, 135,
2970 0, 0, 0, 23, 136, 24, 25, 0, 26, 137,
2971 27, 0, 28, 138, 29, 30, 31, 0, 0, 32,
2972 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2973 36, 37, 0, 139, 0, 0, 0, 38, 0, 0,
2974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2975 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2976 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
2977 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2978 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
2979 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
2980 258, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2981 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
2982 17, 18, 19, 20, 0, 21, 22, 134, 0, 135,
2983 0, 0, 0, 23, 136, 24, 25, 0, 26, 137,
2984 27, 0, 28, 138, 29, 30, 31, 0, 0, 32,
2985 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2986 36, 37, 0, 139, 0, 0, 0, 38, 0, 0,
2987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2988 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2989 0, 0, 0, 0, 0, 0, 0, 140, 0, 0,
2990 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2991 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
2992 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
2993 419, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2994 9, 10, 11, 0, 0, 12, 13, 14, 15, 16,
2995 17, 18, 19, 0, 0, 21, 22, 0, 0, -315,
2996 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
2997 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
2998 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2999 36, 37, 0, 0, -315, -315, 0, 38, 0, 0,
3000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3001 198, 199, 200, 0, 201, 202, 203, 0, 39, 40,
3002 0, 0, 0, 0, 0, 0, 0, 41, 0, -315,
3003 -315, 0, 211, 212, 213, 214, 215, 42, 0, 0,
3004 43, 0, 216, 0, 217, 44, 45, 218, 0, 0,
3005 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
3006 -3, 1, 2, 3, 4, 0, 5, 6, 7, 8,
3007 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
3008 17, 18, 19, 0, 0, 21, 22, 0, 0, 0,
3009 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
3010 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
3011 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3012 36, 37, 0, 0, 0, 0, 0, 38, 0, 0,
3013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3014 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
3015 0, 0, 0, 0, 0, 0, 0, 332, 0, 0,
3016 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
3017 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
3018 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
3019 -15, 1, 2, 3, 4, 0, 5, 6, 7, 8,
3020 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
3021 17, 18, 19, 0, 0, 21, 22, 0, 0, 0,
3022 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
3023 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
3024 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3025 36, 37, 0, 0, 0, 0, 0, 38, 0, 0,
3026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3027 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
3028 0, 0, 0, 0, 0, 0, 0, 332, 0, 0,
3029 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
3030 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
3031 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
3032 -16, 1, 2, 3, 4, 0, 5, 6, 7, 8,
3033 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
3034 17, 18, 19, 0, 0, 21, 22, 0, 0, 0,
3035 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
3036 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
3037 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3038 36, 37, 0, 0, 0, 0, 0, 38, 0, 0,
3039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3040 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
3041 0, 0, 0, 0, 0, 0, 0, 521, 0, 0,
3042 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
3043 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
3044 46, 0, 47, 0, 48, 0, 49, 0, 0, 0,
3045 -144, 1, 2, 3, 4, 0, 5, 6, 7, 8,
3046 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
3047 17, 18, 19, 0, 0, 21, 22, 0, 0, 0,
3048 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
3049 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
3050 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3051 36, 37, 0, 0, 0, 0, 0, 38, 0, 0,
3052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3053 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
3054 0, 0, 0, 0, 0, 0, 0, 521, 0, 0,
3055 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
3056 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
3057 46, 0, 47, 0, 48, 0, 49, 0, -3, 0,
3058 -145, 1, 2, 3, 4, 0, 5, 6, 7, 8,
3059 9, 10, 11, 0, 0, 12, 13, 14, 15, 16,
3060 17, 18, 19, 0, 0, 21, 22, 0, 0, 0,
3061 0, 0, 0, 23, 0, 24, 25, 0, 26, 0,
3062 27, 0, 28, 0, 29, 30, 31, 0, 0, 32,
3063 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
3064 36, 37, 0, 0, 0, 0, 0, 38, 0, 0,
3065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3066 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
3067 0, 0, 0, 0, 0, 0, 0, 41, 0, 0,
3068 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
3069 43, 0, 0, 0, 0, 44, 45, 0, 0, 0,
3070 46, 0, 47, 0, 48, 0, 49, 1, 2, 3,
3071 4, 0, 5, 6, 7, 8, 9, 10, 11, 0,
3072 -120, 0, 13, 14, 15, 16, 17, 18, 19, 20,
3073 0, 21, 22, 134, 0, 135, 0, 0, 0, 23,
3074 136, 24, 25, 0, 26, 137, 27, 0, 28, 138,
3075 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
3076 0, 0, 0, 0, 0, 0, 36, 37, 0, 139,
3077 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
3078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3079 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
3080 0, 0, 0, 140, 0, 0, 0, 0, 0, 0,
3081 0, 0, 0, 42, 0, 0, 43, 0, 0, 0,
3082 0, 44, 45, 0, 0, 0, 46, 0, 47, 0,
3083 48, 0, 49, 1, 2, 3, 4, 0, 5, 6,
3084 7, 8, 9, 10, 11, 0, 0, 0, 13, 14,
3085 15, 16, 17, 18, 19, 20, 0, 21, 22, 134,
3086 0, 135, 0, 0, 0, 23, 136, 24, 25, 0,
3087 26, 137, 27, 0, 28, 138, 29, 30, 31, 0,
3088 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
3089 0, 0, 36, 37, 0, 139, 0, 0, 0, 38,
3090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3092 39, 40, 0, 0, 0, 0, 0, 0, 0, 140,
3093 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
3094 0, 0, 43, 0, 0, 0, 0, 44, 45, 0,
3095 0, 0, 46, 0, 47, 0, 48, 156, 49, 3,
3096 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
3097 0, 0, 0, 0, 0, 0, 0, 18, 0, 20,
3098 0, 21, 22, 0, 0, 135, 0, 0, 0, 23,
3099 0, 0, 0, 0, 0, 0, 27, 0, 28, 157,
3100 0, 0, 0, 0, 0, 0, 33, 0, 34, 35,
3101 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
3102 0, 0, 0, 38, 0, 0, 0, 0, 103, 0,
3103 3, 4, 0, 5, 6, 7, 0, 0, 0, 0,
3104 0, 0, 0, 0, 39, 40, 0, 0, 18, 0,
3105 20, 0, 21, 22, 0, 0, 0, 0, 0, 0,
3106 23, 0, 0, 42, 0, 0, 43, 27, 0, 28,
3107 0, 44, 45, 0, 0, 0, 46, 33, 47, 34,
3108 35, 0, 49, 0, 0, 0, 0, 36, 0, 0,
3109 0, 0, 0, 0, 38, 0, 0, 0, 0, 103,
3110 0, 3, 4, 0, 5, 6, 7, 0, 0, 0,
3111 0, 0, 0, 0, 0, 39, 40, 0, 0, 18,
3112 0, 20, 0, 21, 22, 0, 0, 0, 175, 0,
3113 0, 0, 0, 0, 42, 0, 0, 43, 0, 0,
3114 28, 0, 44, 45, 0, 0, 0, 46, 33, 47,
3115 34, 35, 0, 49, 0, 176, 177, 178, 0, 179,
3116 180, 181, 182, 183, 184, 38, 0, 0, 0, 0,
3117 0, 0, 0, 0, 0, 0, 0, 0, 0, 198,
3118 199, 200, 0, 201, 202, 203, 39, 40, 0, 0,
3119 0, 0, 0, 0, 175, 207, 208, 0, 209, 210,
3120 0, 211, 212, 213, 214, 215, 0, 0, 0, 0,
3121 0, 216, 0, 217, 0, 0, 218, 0, 46, 0,
3122 47, 176, 177, 178, 49, 179, 180, 181, 182, 183,
3123 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
3124 194, 195, 196, 197, 0, 198, 199, 200, 0, 201,
3125 202, 203, 0, 0, 0, 0, 0, 204, 205, 0,
3126 206, 207, 208, 175, 209, 210, 0, 211, 212, 213,
3127 214, 215, 0, 0, 0, 0, 0, 216, 0, 217,
3128 0, 0, 218, 0, 0, 0, 0, 0, 355, 0,
3129 176, 177, 178, 0, 179, 180, 181, 182, 183, 184,
3130 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
3131 195, 196, 197, 0, 198, 199, 200, 0, 201, 202,
3132 203, 0, 0, 0, 0, 0, 204, 205, 0, 206,
3133 207, 208, 175, 209, 210, 0, 211, 212, 213, 214,
3134 215, 0, 0, 0, 0, 0, 216, 0, 217, 0,
3135 0, 218, 0, 0, 0, 0, 0, 397, 0, 176,
3136 177, 178, 0, 179, 180, 181, 182, 183, 184, 185,
3137 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
3138 196, 197, 0, 198, 199, 200, 0, 201, 202, 203,
3139 0, 0, 0, 0, 0, 204, 205, 0, 206, 207,
3140 208, 175, 209, 210, 0, 211, 212, 213, 214, 215,
3141 0, 0, 0, 0, 0, 216, 0, 217, 0, 0,
3142 218, 0, 0, 0, 0, 0, 438, 0, 176, 177,
3143 178, 0, 179, 180, 181, 182, 183, 184, 185, 186,
3144 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
3145 197, 0, 198, 199, 200, 0, 201, 202, 203, 0,
3146 0, 0, 0, 175, 204, 205, 387, 206, 207, 208,
3147 0, 209, 210, 0, 211, 212, 213, 214, 215, 0,
3148 0, 0, 0, 0, 216, 0, 217, 0, 0, 218,
3149 176, 177, 178, 0, 179, 180, 181, 182, 183, 184,
3150 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
3151 195, 196, 197, 0, 198, 199, 200, 0, 201, 202,
3152 203, 0, 0, 0, 0, 175, 204, 205, 0, 206,
3153 207, 208, 0, 209, 210, 0, 211, 212, 213, 214,
3154 215, 0, 0, 0, 0, 0, 216, 0, 217, 389,
3155 0, 218, 176, 177, 178, 0, 179, 180, 181, 182,
3156 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
3157 193, 194, 195, 196, 197, 0, 198, 199, 200, 0,
3158 201, 202, 203, 0, 0, 0, 0, 175, 204, 205,
3159 0, 206, 207, 208, 0, 209, 210, 0, 211, 212,
3160 213, 214, 215, 0, 0, 0, 0, 0, 216, 0,
3161 217, 439, 0, 218, 176, 177, 178, 0, 179, 180,
3162 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
3163 191, 192, 193, 194, 195, 196, 197, 0, 198, 199,
3164 200, 0, 201, 202, 203, 0, 0, 0, 0, 175,
3165 204, 205, 0, 206, 207, 208, 0, 209, 210, 0,
3166 211, 212, 213, 214, 215, 0, 0, 0, 0, 0,
3167 216, 0, 217, 477, 0, 218, 176, 177, 178, 0,
3168 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
3169 189, 190, 191, 192, 193, 194, 195, 196, 197, 0,
3170 198, 199, 200, 0, 201, 202, 203, 0, 0, 0,
3171 0, 175, 204, 205, 0, 206, 207, 208, 0, 209,
3172 210, 0, 211, 212, 213, 214, 215, 0, 0, 0,
3173 0, 0, 216, 0, 217, 478, 0, 218, 176, 177,
3174 178, 0, 179, 180, 181, 182, 183, 184, 185, 186,
3175 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
3176 197, 0, 198, 199, 200, 0, 201, 202, 203, 0,
3177 0, 0, 0, 175, 204, 205, 537, 206, 207, 208,
3178 0, 209, 210, 0, 211, 212, 213, 214, 215, 0,
3179 0, 0, 0, 0, 216, 0, 217, 0, 0, 218,
3180 176, 177, 178, 0, 179, 180, 181, 182, 183, 184,
3181 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
3182 195, 196, 197, 0, 198, 199, 200, 0, 201, 202,
3183 203, 0, 0, 0, 0, 175, 204, 205, 0, 206,
3184 207, 208, 0, 209, 210, 0, 211, 212, 213, 214,
3185 215, 0, 0, 0, 0, 0, 216, 0, 217, 0,
3186 0, 218, 176, 177, 178, 0, 179, 180, 181, 182,
3187 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
3188 193, 194, 195, 196, 197, 0, 198, 199, 200, 0,
3189 201, 202, 203, 0, 0, 0, 0, 175, 204, 205,
3190 0, 206, 207, 208, 0, 0, 210, 0, 211, 212,
3191 213, 214, 215, 0, 0, 0, 0, 0, 216, 0,
3192 217, 0, 0, 218, 176, 177, 178, 0, 179, 180,
3193 181, 182, 183, 184, 0, 0, 0, 0, 0, 0,
3194 0, 0, 0, 0, 0, 0, 0, 0, 198, 199,
3195 200, 0, 201, 202, 203, 0, 0, 0, 0, 175,
3196 0, 0, 0, 206, 207, 208, 0, 209, 210, 0,
3197 211, 212, 213, 214, 215, 0, 0, 0, 0, 0,
3198 216, 0, 217, 0, 0, 218, 176, 177, 178, 0,
3199 179, 180, 181, 182, 183, 184, 0, 0, 0, 0,
3200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3201 198, 199, 200, 0, 201, 202, 203, 0, 0, 0,
3202 0, 175, 0, 0, 0, 0, 0, 208, 0, 209,
3203 210, 0, 211, 212, 213, 214, 215, 0, 0, 0,
3204 0, 0, 216, 0, 217, 0, 0, 218, 176, 177,
3205 178, 0, 179, 180, 181, 182, 183, 184, 0, 0,
3206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3207 0, 0, 198, 199, 200, 0, 201, 202, 203, 0,
3208 0, 0, 0, 175, 0, 0, 0, 0, 0, -315,
3209 0, 209, 210, 0, 211, 212, 213, 214, 215, 0,
3210 0, 0, 0, 0, 216, 0, 217, 0, 0, 218,
3211 176, 177, 178, 0, -315, -315, -315, -315, 183, 184,
3212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3213 0, 0, 0, 0, 198, 199, 200, 0, 201, 202,
3214 203, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3215 0, 0, 0, 209, 210, 0, 211, 212, 213, 214,
3216 215, 0, 0, 0, 0, 0, 216, 0, 217, 0,
3220 static const yytype_int16 yycheck[] =
3222 0, 0, 0, 0, 0, 18, 94, 65, 58, 131,
3223 23, 136, 137, 424, 113, 102, 3, 48, 3, 3,
3224 49, 12, 5, 36, 3, 4, 39, 40, 5, 218,
3225 43, 44, 45, 46, 47, 26, 94, 92, 435, 3,
3226 100, 348, 3, 89, 3, 511, 342, 67, 100, 515,
3227 516, 0, 52, 52, 52, 52, 52, 0, 0, 476,
3228 33, 122, 16, 3, 4, 16, 127, 34, 122, 124,
3229 262, 537, 127, 133, 25, 3, 4, 17, 475, 30,
3230 31, 133, 102, 50, 142, 3, 4, 553, 61, 17,
3231 122, 508, 43, 122, 45, 108, 221, 563, 111, 17,
3232 113, 408, 3, 52, 400, 3, 4, 35, 12, 52,
3233 52, 534, 122, 3, 303, 5, 241, 216, 131, 17,
3234 122, 243, 26, 136, 137, 548, 109, 110, 115, 26,
3235 115, 115, 93, 110, 93, 32, 115, 326, 263, 264,
3236 124, 128, 110, 122, 451, 124, 114, 122, 126, 128,
3237 561, 115, 102, 3, 104, 155, 155, 155, 155, 155,
3238 124, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3239 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
3240 193, 194, 195, 196, 197, 377, 126, 115, 201, 202,
3241 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
3242 213, 214, 215, 216, 217, 394, 155, 3, 221, 5,
3243 223, 0, 155, 155, 126, 407, 3, 115, 126, 127,
3244 100, 127, 4, 3, 224, 224, 224, 122, 241, 260,
3245 243, 122, 245, 3, 104, 226, 18, 19, 20, 132,
3246 22, 100, 24, 125, 16, 236, 345, 90, 91, 92,
3247 263, 264, 100, 25, 4, 37, 3, 3, 3, 31,
3248 126, 16, 67, 45, 46, 47, 48, 3, 18, 19,
3249 20, 396, 22, 45, 24, 99, 67, 99, 3, 122,
3250 3, 124, 3, 3, 127, 12, 373, 37, 375, 411,
3251 127, 127, 122, 133, 100, 45, 46, 47, 48, 357,
3252 133, 104, 100, 132, 3, 497, 3, 395, 366, 102,
3253 53, 324, 325, 53, 102, 133, 89, 99, 89, 133,
3254 122, 132, 410, 3, 133, 517, 126, 104, 127, 133,
3255 122, 100, 345, 421, 334, 334, 334, 395, 132, 426,
3256 102, 99, 342, 342, 342, 15, 100, 133, 126, 99,
3257 132, 4, 410, 344, 133, 5, 132, 110, 126, 126,
3258 102, 100, 126, 421, 64, 18, 19, 20, 133, 22,
3259 420, 24, 385, 132, 387, 567, 133, 126, 122, 392,
3260 467, 114, 132, 396, 37, 109, 104, 3, 39, 3,
3261 403, 132, 25, 46, 47, 48, 126, 132, 411, 3,
3262 400, 400, 400, 416, 114, 3, 494, 126, 496, 3,
3263 132, 122, 110, 126, 110, 66, 67, 68, 132, 70,
3264 71, 72, 73, 74, 75, 132, 155, 133, 132, 132,
3265 52, 133, 334, 58, 135, 365, 494, 88, 496, 90,
3266 91, 92, 132, 94, 95, 96, 483, 483, 457, 431,
3267 457, 70, 543, 526, 105, 106, 107, 504, 109, 110,
3268 432, 112, 113, 114, 115, 116, 531, 480, 468, 449,
3269 26, 122, 404, 124, 275, 46, 127, -1, 426, -1,
3270 -1, 244, -1, 90, 91, 92, -1, 90, 91, 92,
3271 -1, -1, -1, -1, -1, -1, -1, -1, 498, 498,
3272 498, 498, 498, -1, 504, 112, 113, 114, 115, 116,
3273 -1, 114, 115, 116, -1, 122, -1, 124, -1, 122,
3274 127, 124, -1, -1, 127, -1, 526, 526, 526, 526,
3275 526, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3276 -1, -1, -1, 543, 543, 543, 543, 543, 0, -1,
3277 -1, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3278 12, 13, 14, -1, -1, 17, 18, 19, 20, 21,
3279 22, 23, 24, -1, -1, 27, 28, -1, -1, 39,
3280 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3281 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3282 52, -1, 54, 55, -1, -1, 66, 67, 68, -1,
3283 62, 63, -1, -1, 74, 75, -1, 69, -1, -1,
3284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3285 90, 91, 92, -1, 94, 95, 96, -1, 90, 91,
3286 -1, -1, -1, -1, -1, -1, -1, 99, -1, 109,
3287 110, -1, 112, 113, 114, 115, 116, 109, -1, -1,
3288 112, -1, 122, -1, 124, 117, 118, 127, -1, -1,
3289 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3290 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3291 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3292 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3293 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3294 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3295 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3296 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3298 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3299 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3300 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3301 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3302 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3303 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3304 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3305 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3306 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3307 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3308 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3309 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3310 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3311 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3312 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3313 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3314 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3315 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3316 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3317 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3318 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3319 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3320 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3321 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3322 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3324 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3325 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3326 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3327 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3328 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3329 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3330 12, 13, 14, -1, -1, 17, 18, 19, 20, 21,
3331 22, 23, 24, -1, -1, 27, 28, -1, -1, 39,
3332 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3333 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3334 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3335 62, 63, -1, -1, 74, 75, -1, 69, -1, -1,
3336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3337 90, 91, 92, -1, 94, 95, 96, -1, 90, 91,
3338 -1, -1, -1, -1, -1, -1, -1, 99, -1, 109,
3339 110, -1, 112, 113, 114, 115, 116, 109, -1, -1,
3340 112, -1, 122, -1, 124, 117, 118, 127, -1, -1,
3341 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3342 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3343 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3344 22, 23, 24, -1, -1, 27, 28, -1, -1, -1,
3345 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3346 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3347 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3348 62, 63, -1, -1, -1, -1, -1, 69, -1, -1,
3349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3350 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3351 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3352 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3353 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3354 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3355 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3356 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3357 22, 23, 24, -1, -1, 27, 28, -1, -1, -1,
3358 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3359 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3360 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3361 62, 63, -1, -1, -1, -1, -1, 69, -1, -1,
3362 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3363 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3364 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3365 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3366 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3367 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3368 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3369 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3370 22, 23, 24, -1, -1, 27, 28, -1, -1, -1,
3371 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3372 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3373 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3374 62, 63, -1, -1, -1, -1, -1, 69, -1, -1,
3375 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3376 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3377 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3378 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3379 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3380 122, -1, 124, -1, 126, -1, 128, -1, -1, -1,
3381 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3382 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3383 22, 23, 24, -1, -1, 27, 28, -1, -1, -1,
3384 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3385 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3386 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3387 62, 63, -1, -1, -1, -1, -1, 69, -1, -1,
3388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3389 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3390 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3391 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3392 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3393 122, -1, 124, -1, 126, -1, 128, -1, 0, -1,
3394 132, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3395 12, 13, 14, -1, -1, 17, 18, 19, 20, 21,
3396 22, 23, 24, -1, -1, 27, 28, -1, -1, -1,
3397 -1, -1, -1, 35, -1, 37, 38, -1, 40, -1,
3398 42, -1, 44, -1, 46, 47, 48, -1, -1, 51,
3399 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3400 62, 63, -1, -1, -1, -1, -1, 69, -1, -1,
3401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3402 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3403 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3404 -1, -1, -1, -1, -1, -1, -1, 109, -1, -1,
3405 112, -1, -1, -1, -1, 117, 118, -1, -1, -1,
3406 122, -1, 124, -1, 126, -1, 128, 3, 4, 5,
3407 6, -1, 8, 9, 10, 11, 12, 13, 14, -1,
3408 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
3409 -1, 27, 28, 29, -1, 31, -1, -1, -1, 35,
3410 36, 37, 38, -1, 40, 41, 42, -1, 44, 45,
3411 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3412 -1, -1, -1, -1, -1, -1, 62, 63, -1, 65,
3413 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3414 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3415 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3416 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3417 -1, -1, -1, 109, -1, -1, 112, -1, -1, -1,
3418 -1, 117, 118, -1, -1, -1, 122, -1, 124, -1,
3419 126, -1, 128, 3, 4, 5, 6, -1, 8, 9,
3420 10, 11, 12, 13, 14, -1, -1, -1, 18, 19,
3421 20, 21, 22, 23, 24, 25, -1, 27, 28, 29,
3422 -1, 31, -1, -1, -1, 35, 36, 37, 38, -1,
3423 40, 41, 42, -1, 44, 45, 46, 47, 48, -1,
3424 -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
3425 -1, -1, 62, 63, -1, 65, -1, -1, -1, 69,
3426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3428 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3429 -1, -1, -1, -1, -1, -1, -1, -1, -1, 109,
3430 -1, -1, 112, -1, -1, -1, -1, 117, 118, -1,
3431 -1, -1, 122, -1, 124, -1, 126, 3, 128, 5,
3432 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
3433 -1, -1, -1, -1, -1, -1, -1, 23, -1, 25,
3434 -1, 27, 28, -1, -1, 31, -1, -1, -1, 35,
3435 -1, -1, -1, -1, -1, -1, 42, -1, 44, 45,
3436 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55,
3437 -1, -1, -1, -1, -1, -1, 62, -1, -1, -1,
3438 -1, -1, -1, 69, -1, -1, -1, -1, 3, -1,
3439 5, 6, -1, 8, 9, 10, -1, -1, -1, -1,
3440 -1, -1, -1, -1, 90, 91, -1, -1, 23, -1,
3441 25, -1, 27, 28, -1, -1, -1, -1, -1, -1,
3442 35, -1, -1, 109, -1, -1, 112, 42, -1, 44,
3443 -1, 117, 118, -1, -1, -1, 122, 52, 124, 54,
3444 55, -1, 128, -1, -1, -1, -1, 62, -1, -1,
3445 -1, -1, -1, -1, 69, -1, -1, -1, -1, 3,
3446 -1, 5, 6, -1, 8, 9, 10, -1, -1, -1,
3447 -1, -1, -1, -1, -1, 90, 91, -1, -1, 23,
3448 -1, 25, -1, 27, 28, -1, -1, -1, 39, -1,
3449 -1, -1, -1, -1, 109, -1, -1, 112, -1, -1,
3450 44, -1, 117, 118, -1, -1, -1, 122, 52, 124,
3451 54, 55, -1, 128, -1, 66, 67, 68, -1, 70,
3452 71, 72, 73, 74, 75, 69, -1, -1, -1, -1,
3453 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3454 91, 92, -1, 94, 95, 96, 90, 91, -1, -1,
3455 -1, -1, -1, -1, 39, 106, 107, -1, 109, 110,
3456 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3457 -1, 122, -1, 124, -1, -1, 127, -1, 122, -1,
3458 124, 66, 67, 68, 128, 70, 71, 72, 73, 74,
3459 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3460 85, 86, 87, 88, -1, 90, 91, 92, -1, 94,
3461 95, 96, -1, -1, -1, -1, -1, 102, 103, -1,
3462 105, 106, 107, 39, 109, 110, -1, 112, 113, 114,
3463 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3464 -1, -1, 127, -1, -1, -1, -1, -1, 133, -1,
3465 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3466 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3467 86, 87, 88, -1, 90, 91, 92, -1, 94, 95,
3468 96, -1, -1, -1, -1, -1, 102, 103, -1, 105,
3469 106, 107, 39, 109, 110, -1, 112, 113, 114, 115,
3470 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3471 -1, 127, -1, -1, -1, -1, -1, 133, -1, 66,
3472 67, 68, -1, 70, 71, 72, 73, 74, 75, 76,
3473 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3474 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3475 -1, -1, -1, -1, -1, 102, 103, -1, 105, 106,
3476 107, 39, 109, 110, -1, 112, 113, 114, 115, 116,
3477 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3478 127, -1, -1, -1, -1, -1, 133, -1, 66, 67,
3479 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
3480 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3481 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3482 -1, -1, -1, 39, 102, 103, 104, 105, 106, 107,
3483 -1, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3484 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3485 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3486 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3487 86, 87, 88, -1, 90, 91, 92, -1, 94, 95,
3488 96, -1, -1, -1, -1, 39, 102, 103, -1, 105,
3489 106, 107, -1, 109, 110, -1, 112, 113, 114, 115,
3490 116, -1, -1, -1, -1, -1, 122, -1, 124, 125,
3491 -1, 127, 66, 67, 68, -1, 70, 71, 72, 73,
3492 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3493 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3494 94, 95, 96, -1, -1, -1, -1, 39, 102, 103,
3495 -1, 105, 106, 107, -1, 109, 110, -1, 112, 113,
3496 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3497 124, 125, -1, 127, 66, 67, 68, -1, 70, 71,
3498 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3499 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3500 92, -1, 94, 95, 96, -1, -1, -1, -1, 39,
3501 102, 103, -1, 105, 106, 107, -1, 109, 110, -1,
3502 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3503 122, -1, 124, 125, -1, 127, 66, 67, 68, -1,
3504 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3505 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3506 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3507 -1, 39, 102, 103, -1, 105, 106, 107, -1, 109,
3508 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3509 -1, -1, 122, -1, 124, 125, -1, 127, 66, 67,
3510 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
3511 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3512 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3513 -1, -1, -1, 39, 102, 103, 104, 105, 106, 107,
3514 -1, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3515 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3516 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3517 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3518 86, 87, 88, -1, 90, 91, 92, -1, 94, 95,
3519 96, -1, -1, -1, -1, 39, 102, 103, -1, 105,
3520 106, 107, -1, 109, 110, -1, 112, 113, 114, 115,
3521 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3522 -1, 127, 66, 67, 68, -1, 70, 71, 72, 73,
3523 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3524 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3525 94, 95, 96, -1, -1, -1, -1, 39, 102, 103,
3526 -1, 105, 106, 107, -1, -1, 110, -1, 112, 113,
3527 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3528 124, -1, -1, 127, 66, 67, 68, -1, 70, 71,
3529 72, 73, 74, 75, -1, -1, -1, -1, -1, -1,
3530 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3531 92, -1, 94, 95, 96, -1, -1, -1, -1, 39,
3532 -1, -1, -1, 105, 106, 107, -1, 109, 110, -1,
3533 112, 113, 114, 115, 116, -1, -1, -1, -1, -1,
3534 122, -1, 124, -1, -1, 127, 66, 67, 68, -1,
3535 70, 71, 72, 73, 74, 75, -1, -1, -1, -1,
3536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3537 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3538 -1, 39, -1, -1, -1, -1, -1, 107, -1, 109,
3539 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3540 -1, -1, 122, -1, 124, -1, -1, 127, 66, 67,
3541 68, -1, 70, 71, 72, 73, 74, 75, -1, -1,
3542 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3543 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3544 -1, -1, -1, 39, -1, -1, -1, -1, -1, 107,
3545 -1, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3546 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3547 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3548 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3549 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3550 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3551 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115,
3552 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3556 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3557 symbol of state STATE-NUM. */
3558 static const yytype_uint16 yystos[] =
3560 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3561 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
3562 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
3563 47, 48, 51, 52, 54, 55, 62, 63, 69, 90,
3564 91, 99, 109, 112, 117, 118, 122, 124, 126, 128,
3565 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3566 160, 161, 163, 171, 179, 182, 183, 186, 189, 190,
3567 191, 192, 196, 198, 207, 212, 213, 214, 219, 227,
3568 230, 243, 244, 245, 250, 254, 257, 258, 260, 261,
3569 89, 49, 122, 122, 164, 122, 3, 4, 17, 126,
3570 184, 185, 16, 3, 254, 3, 229, 254, 122, 185,
3571 233, 122, 126, 122, 127, 254, 122, 3, 5, 251,
3572 252, 253, 254, 254, 254, 254, 254, 249, 254, 239,
3573 240, 241, 247, 254, 29, 31, 36, 41, 45, 65,
3574 99, 132, 143, 144, 145, 148, 150, 165, 166, 181,
3575 190, 246, 3, 0, 138, 126, 3, 45, 150, 156,
3576 157, 250, 145, 146, 16, 25, 30, 31, 43, 45,
3577 206, 259, 192, 3, 100, 39, 66, 67, 68, 70,
3578 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3579 81, 82, 83, 84, 85, 86, 87, 88, 90, 91,
3580 92, 94, 95, 96, 102, 103, 105, 106, 107, 109,
3581 110, 112, 113, 114, 115, 116, 122, 124, 127, 3,
3582 122, 162, 146, 172, 188, 126, 127, 184, 185, 232,
3583 233, 234, 242, 122, 248, 249, 127, 254, 180, 239,
3584 3, 155, 132, 104, 100, 100, 133, 125, 100, 247,
3585 3, 3, 151, 152, 248, 248, 151, 3, 132, 145,
3586 126, 136, 3, 99, 67, 99, 3, 34, 50, 226,
3587 3, 3, 208, 3, 220, 221, 222, 254, 254, 254,
3588 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
3589 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
3590 254, 3, 115, 128, 256, 254, 254, 254, 254, 254,
3591 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
3592 239, 254, 3, 4, 122, 124, 128, 255, 256, 248,
3593 12, 254, 99, 139, 140, 141, 147, 148, 196, 198,
3594 207, 227, 187, 184, 127, 122, 238, 3, 93, 223,
3595 224, 225, 133, 115, 184, 133, 142, 143, 133, 248,
3596 247, 252, 254, 104, 237, 100, 143, 132, 237, 248,
3597 248, 102, 3, 53, 193, 53, 194, 3, 209, 210,
3598 102, 110, 114, 215, 222, 124, 256, 104, 133, 125,
3599 254, 254, 124, 256, 89, 133, 122, 133, 132, 141,
3600 126, 139, 239, 102, 104, 211, 225, 133, 100, 132,
3601 133, 104, 35, 115, 234, 236, 102, 149, 152, 132,
3602 99, 133, 3, 5, 122, 234, 15, 195, 234, 235,
3603 126, 237, 100, 5, 216, 217, 254, 254, 133, 125,
3604 254, 256, 146, 248, 126, 139, 132, 133, 254, 236,
3605 237, 93, 225, 26, 32, 173, 175, 177, 178, 146,
3606 247, 254, 250, 146, 223, 235, 126, 100, 199, 149,
3607 210, 110, 5, 109, 110, 218, 219, 125, 125, 133,
3608 33, 61, 167, 168, 169, 170, 132, 211, 126, 225,
3609 126, 122, 173, 175, 64, 153, 133, 133, 197, 234,
3610 45, 99, 190, 203, 204, 205, 114, 109, 219, 217,
3611 254, 104, 132, 169, 170, 231, 176, 3, 146, 146,
3612 237, 99, 144, 148, 190, 200, 201, 202, 207, 227,
3613 3, 25, 132, 205, 3, 114, 217, 104, 142, 142,
3614 142, 237, 126, 126, 132, 202, 226, 216, 3, 142,
3615 132, 132, 133, 228, 200, 3, 110, 216, 174, 142,
3616 132, 122, 110, 126, 132, 223, 142, 133, 132, 237
3619 #define yyerrok (yyerrstatus = 0)
3620 #define yyclearin (yychar = YYEMPTY)
3621 #define YYEMPTY (-2)
3624 #define YYACCEPT goto yyacceptlab
3625 #define YYABORT goto yyabortlab
3626 #define YYERROR goto yyerrorlab
3629 /* Like YYERROR except do call yyerror. This remains here temporarily
3630 to ease the transition to the new meaning of YYERROR, for GCC.
3631 Once GCC version 2 has supplanted version 1, this can go. */
3633 #define YYFAIL goto yyerrlab
3635 #define YYRECOVERING() (!!yyerrstatus)
3637 #define YYBACKUP(Token, Value) \
3639 if (yychar == YYEMPTY && yylen == 1) \
3643 yytoken = YYTRANSLATE (yychar); \
3649 yyerror (YY_("syntax error: cannot back up")); \
3656 #define YYERRCODE 256
3659 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3660 If N is 0, then set CURRENT to the empty location which ends
3661 the previous symbol: RHS[0] (always defined). */
3663 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3664 #ifndef YYLLOC_DEFAULT
3665 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3669 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3670 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3671 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3672 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3676 (Current).first_line = (Current).last_line = \
3677 YYRHSLOC (Rhs, 0).last_line; \
3678 (Current).first_column = (Current).last_column = \
3679 YYRHSLOC (Rhs, 0).last_column; \
3685 /* YY_LOCATION_PRINT -- Print the location on the stream.
3686 This macro was not mandated originally: define only if we know
3687 we won't break user code: when these are the locations we know. */
3689 #ifndef YY_LOCATION_PRINT
3690 # if YYLTYPE_IS_TRIVIAL
3691 # define YY_LOCATION_PRINT(File, Loc) \
3692 fprintf (File, "%d.%d-%d.%d", \
3693 (Loc).first_line, (Loc).first_column, \
3694 (Loc).last_line, (Loc).last_column)
3696 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3701 /* YYLEX -- calling `yylex' with the right arguments. */
3704 # define YYLEX yylex (YYLEX_PARAM)
3706 # define YYLEX yylex ()
3709 /* Enable debugging if requested. */
3713 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3714 # define YYFPRINTF fprintf
3717 # define YYDPRINTF(Args) \
3723 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3727 YYFPRINTF (stderr, "%s ", Title); \
3728 yy_symbol_print (stderr, \
3730 YYFPRINTF (stderr, "\n"); \
3735 /*--------------------------------.
3736 | Print this symbol on YYOUTPUT. |
3737 `--------------------------------*/
3740 #if (defined __STDC__ || defined __C99__FUNC__ \
3741 || defined __cplusplus || defined _MSC_VER)
3743 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3746 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3749 YYSTYPE const * const yyvaluep;
3755 if (yytype < YYNTOKENS)
3756 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3768 /*--------------------------------.
3769 | Print this symbol on YYOUTPUT. |
3770 `--------------------------------*/
3772 #if (defined __STDC__ || defined __C99__FUNC__ \
3773 || defined __cplusplus || defined _MSC_VER)
3775 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3778 yy_symbol_print (yyoutput, yytype, yyvaluep)
3781 YYSTYPE const * const yyvaluep;
3784 if (yytype < YYNTOKENS)
3785 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3787 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3789 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3790 YYFPRINTF (yyoutput, ")");
3793 /*------------------------------------------------------------------.
3794 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3796 `------------------------------------------------------------------*/
3798 #if (defined __STDC__ || defined __C99__FUNC__ \
3799 || defined __cplusplus || defined _MSC_VER)
3801 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3804 yy_stack_print (yybottom, yytop)
3805 yytype_int16 *yybottom;
3806 yytype_int16 *yytop;
3809 YYFPRINTF (stderr, "Stack now");
3810 for (; yybottom <= yytop; yybottom++)
3812 int yybot = *yybottom;
3813 YYFPRINTF (stderr, " %d", yybot);
3815 YYFPRINTF (stderr, "\n");
3818 # define YY_STACK_PRINT(Bottom, Top) \
3821 yy_stack_print ((Bottom), (Top)); \
3825 /*------------------------------------------------.
3826 | Report that the YYRULE is going to be reduced. |
3827 `------------------------------------------------*/
3829 #if (defined __STDC__ || defined __C99__FUNC__ \
3830 || defined __cplusplus || defined _MSC_VER)
3832 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3835 yy_reduce_print (yyvsp, yyrule)
3840 int yynrhs = yyr2[yyrule];
3842 unsigned long int yylno = yyrline[yyrule];
3843 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3845 /* The symbols being reduced. */
3846 for (yyi = 0; yyi < yynrhs; yyi++)
3848 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3849 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3850 &(yyvsp[(yyi + 1) - (yynrhs)])
3852 YYFPRINTF (stderr, "\n");
3856 # define YY_REDUCE_PRINT(Rule) \
3859 yy_reduce_print (yyvsp, Rule); \
3862 /* Nonzero means print parse trace. It is left uninitialized so that
3863 multiple parsers can coexist. */
3865 #else /* !YYDEBUG */
3866 # define YYDPRINTF(Args)
3867 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3868 # define YY_STACK_PRINT(Bottom, Top)
3869 # define YY_REDUCE_PRINT(Rule)
3870 #endif /* !YYDEBUG */
3873 /* YYINITDEPTH -- initial size of the parser's stacks. */
3875 # define YYINITDEPTH 200
3878 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3879 if the built-in stack extension method is used).
3881 Do not make this value too large; the results are undefined if
3882 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3883 evaluated with infinite-precision integer arithmetic. */
3886 # define YYMAXDEPTH 10000
3894 # if defined __GLIBC__ && defined _STRING_H
3895 # define yystrlen strlen
3897 /* Return the length of YYSTR. */
3898 #if (defined __STDC__ || defined __C99__FUNC__ \
3899 || defined __cplusplus || defined _MSC_VER)
3901 yystrlen (const char *yystr)
3909 for (yylen = 0; yystr[yylen]; yylen++)
3917 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3918 # define yystpcpy stpcpy
3920 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3922 #if (defined __STDC__ || defined __C99__FUNC__ \
3923 || defined __cplusplus || defined _MSC_VER)
3925 yystpcpy (char *yydest, const char *yysrc)
3928 yystpcpy (yydest, yysrc)
3934 const char *yys = yysrc;
3936 while ((*yyd++ = *yys++) != '\0')
3945 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3946 quotes and backslashes, so that it's suitable for yyerror. The
3947 heuristic is that double-quoting is unnecessary unless the string
3948 contains an apostrophe, a comma, or backslash (other than
3949 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3950 null, do not copy; instead, return the length of what the result
3953 yytnamerr (char *yyres, const char *yystr)
3958 char const *yyp = yystr;
3965 goto do_not_strip_quotes;
3969 goto do_not_strip_quotes;
3982 do_not_strip_quotes: ;
3986 return yystrlen (yystr);
3988 return yystpcpy (yyres, yystr) - yyres;
3992 /* Copy into YYRESULT an error message about the unexpected token
3993 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3994 including the terminating null byte. If YYRESULT is null, do not
3995 copy anything; just return the number of bytes that would be
3996 copied. As a special case, return 0 if an ordinary "syntax error"
3997 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3998 size calculation. */
4000 yysyntax_error (char *yyresult, int yystate, int yychar)
4002 int yyn = yypact[yystate];
4004 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
4008 int yytype = YYTRANSLATE (yychar);
4009 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
4010 YYSIZE_T yysize = yysize0;
4012 int yysize_overflow = 0;
4013 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4014 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4018 /* This is so xgettext sees the translatable formats that are
4019 constructed on the fly. */
4020 YY_("syntax error, unexpected %s");
4021 YY_("syntax error, unexpected %s, expecting %s");
4022 YY_("syntax error, unexpected %s, expecting %s or %s");
4023 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
4024 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
4028 static char const yyunexpected[] = "syntax error, unexpected %s";
4029 static char const yyexpecting[] = ", expecting %s";
4030 static char const yyor[] = " or %s";
4031 char yyformat[sizeof yyunexpected
4032 + sizeof yyexpecting - 1
4033 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
4034 * (sizeof yyor - 1))];
4035 char const *yyprefix = yyexpecting;
4037 /* Start YYX at -YYN if negative to avoid negative indexes in
4039 int yyxbegin = yyn < 0 ? -yyn : 0;
4041 /* Stay within bounds of both yycheck and yytname. */
4042 int yychecklim = YYLAST - yyn + 1;
4043 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4046 yyarg[0] = yytname[yytype];
4047 yyfmt = yystpcpy (yyformat, yyunexpected);
4049 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4050 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4052 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4056 yyformat[sizeof yyunexpected - 1] = '\0';
4059 yyarg[yycount++] = yytname[yyx];
4060 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4061 yysize_overflow |= (yysize1 < yysize);
4063 yyfmt = yystpcpy (yyfmt, yyprefix);
4067 yyf = YY_(yyformat);
4068 yysize1 = yysize + yystrlen (yyf);
4069 yysize_overflow |= (yysize1 < yysize);
4072 if (yysize_overflow)
4073 return YYSIZE_MAXIMUM;
4077 /* Avoid sprintf, as that infringes on the user's name space.
4078 Don't have undefined behavior even if the translation
4079 produced a string with the wrong number of "%s"s. */
4080 char *yyp = yyresult;
4082 while ((*yyp = *yyf) != '\0')
4084 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4086 yyp += yytnamerr (yyp, yyarg[yyi++]);
4099 #endif /* YYERROR_VERBOSE */
4102 /*-----------------------------------------------.
4103 | Release the memory associated to this symbol. |
4104 `-----------------------------------------------*/
4107 #if (defined __STDC__ || defined __C99__FUNC__ \
4108 || defined __cplusplus || defined _MSC_VER)
4110 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4113 yydestruct (yymsg, yytype, yyvaluep)
4123 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4133 /* Prevent warnings from -Wmissing-prototypes. */
4134 #ifdef YYPARSE_PARAM
4135 #if defined __STDC__ || defined __cplusplus
4136 int yyparse (void *YYPARSE_PARAM);
4140 #else /* ! YYPARSE_PARAM */
4141 #if defined __STDC__ || defined __cplusplus
4146 #endif /* ! YYPARSE_PARAM */
4149 /* The lookahead symbol. */
4152 /* The semantic value of the lookahead symbol. */
4155 /* Number of syntax errors so far. */
4160 /*-------------------------.
4161 | yyparse or yypush_parse. |
4162 `-------------------------*/
4164 #ifdef YYPARSE_PARAM
4165 #if (defined __STDC__ || defined __C99__FUNC__ \
4166 || defined __cplusplus || defined _MSC_VER)
4168 yyparse (void *YYPARSE_PARAM)
4171 yyparse (YYPARSE_PARAM)
4172 void *YYPARSE_PARAM;
4174 #else /* ! YYPARSE_PARAM */
4175 #if (defined __STDC__ || defined __C99__FUNC__ \
4176 || defined __cplusplus || defined _MSC_VER)
4189 /* Number of tokens to shift before error messages enabled. */
4192 /* The stacks and their tools:
4193 `yyss': related to states.
4194 `yyvs': related to semantic values.
4196 Refer to the stacks thru separate pointers, to allow yyoverflow
4197 to reallocate them elsewhere. */
4199 /* The state stack. */
4200 yytype_int16 yyssa[YYINITDEPTH];
4202 yytype_int16 *yyssp;
4204 /* The semantic value stack. */
4205 YYSTYPE yyvsa[YYINITDEPTH];
4209 YYSIZE_T yystacksize;
4213 /* Lookahead token as an internal (translated) token number. */
4215 /* The variables used to return semantic value and location from the
4220 /* Buffer for error messages, and its allocated size. */
4222 char *yymsg = yymsgbuf;
4223 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4226 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4228 /* The number of symbols on the RHS of the reduced rule.
4229 Keep to zero when no symbol should be popped. */
4235 yystacksize = YYINITDEPTH;
4237 YYDPRINTF ((stderr, "Starting parse\n"));
4242 yychar = YYEMPTY; /* Cause a token to be read. */
4244 /* Initialize stack pointers.
4245 Waste one element of value and location stack
4246 so that they stay on the same level as the state stack.
4247 The wasted elements are never initialized. */
4253 /*------------------------------------------------------------.
4254 | yynewstate -- Push a new state, which is found in yystate. |
4255 `------------------------------------------------------------*/
4257 /* In all cases, when you get here, the value and location stacks
4258 have just been pushed. So pushing a state here evens the stacks. */
4264 if (yyss + yystacksize - 1 <= yyssp)
4266 /* Get the current used size of the three stacks, in elements. */
4267 YYSIZE_T yysize = yyssp - yyss + 1;
4271 /* Give user a chance to reallocate the stack. Use copies of
4272 these so that the &'s don't force the real ones into
4274 YYSTYPE *yyvs1 = yyvs;
4275 yytype_int16 *yyss1 = yyss;
4277 /* Each stack pointer address is followed by the size of the
4278 data in use in that stack, in bytes. This used to be a
4279 conditional around just the two extra args, but that might
4280 be undefined if yyoverflow is a macro. */
4281 yyoverflow (YY_("memory exhausted"),
4282 &yyss1, yysize * sizeof (*yyssp),
4283 &yyvs1, yysize * sizeof (*yyvsp),
4289 #else /* no yyoverflow */
4290 # ifndef YYSTACK_RELOCATE
4291 goto yyexhaustedlab;
4293 /* Extend the stack our own way. */
4294 if (YYMAXDEPTH <= yystacksize)
4295 goto yyexhaustedlab;
4297 if (YYMAXDEPTH < yystacksize)
4298 yystacksize = YYMAXDEPTH;
4301 yytype_int16 *yyss1 = yyss;
4302 union yyalloc *yyptr =
4303 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4305 goto yyexhaustedlab;
4306 YYSTACK_RELOCATE (yyss_alloc, yyss);
4307 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4308 # undef YYSTACK_RELOCATE
4310 YYSTACK_FREE (yyss1);
4313 #endif /* no yyoverflow */
4315 yyssp = yyss + yysize - 1;
4316 yyvsp = yyvs + yysize - 1;
4318 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4319 (unsigned long int) yystacksize));
4321 if (yyss + yystacksize - 1 <= yyssp)
4325 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4327 if (yystate == YYFINAL)
4337 /* Do appropriate processing given the current state. Read a
4338 lookahead token if we need one and don't already have one. */
4340 /* First try to decide what to do without reference to lookahead token. */
4341 yyn = yypact[yystate];
4342 if (yyn == YYPACT_NINF)
4345 /* Not known => get a lookahead token if don't already have one. */
4347 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4348 if (yychar == YYEMPTY)
4350 YYDPRINTF ((stderr, "Reading a token: "));
4354 if (yychar <= YYEOF)
4356 yychar = yytoken = YYEOF;
4357 YYDPRINTF ((stderr, "Now at end of input.\n"));
4361 yytoken = YYTRANSLATE (yychar);
4362 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4365 /* If the proper action on seeing token YYTOKEN is to reduce or to
4366 detect an error, take that action. */
4368 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4373 if (yyn == 0 || yyn == YYTABLE_NINF)
4379 /* Count tokens shifted since error; after three, turn off error
4384 /* Shift the lookahead token. */
4385 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4387 /* Discard the shifted token. */
4396 /*-----------------------------------------------------------.
4397 | yydefault -- do the default action for the current state. |
4398 `-----------------------------------------------------------*/
4400 yyn = yydefact[yystate];
4406 /*-----------------------------.
4407 | yyreduce -- Do a reduction. |
4408 `-----------------------------*/
4410 /* yyn is the number of a rule to reduce with. */
4413 /* If YYLEN is nonzero, implement the default value of the action:
4416 Otherwise, the following line sets YYVAL to garbage.
4417 This behavior is undocumented and Bison
4418 users should not rely upon it. Assigning to YYVAL
4419 unconditionally makes the parser a bit smaller, and it avoids a
4420 GCC warning that YYVAL may be used uninitialized. */
4421 yyval = yyvsp[1-yylen];
4424 YY_REDUCE_PRINT (yyn);
4431 /* Line 1464 of skeleton.m4 */
4432 #line 1869 "parser.y"
4433 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4442 /* Line 1464 of skeleton.m4 */
4443 #line 1881 "parser.y"
4444 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4453 /* Line 1464 of skeleton.m4 */
4454 #line 1884 "parser.y"
4455 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4464 /* Line 1464 of skeleton.m4 */
4465 #line 1885 "parser.y"
4466 {(yyval.code)=code_new();}
4475 /* Line 1464 of skeleton.m4 */
4476 #line 1887 "parser.y"
4478 (yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));
4488 /* Line 1464 of skeleton.m4 */
4489 #line 1890 "parser.y"
4490 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4499 /* Line 1464 of skeleton.m4 */
4500 #line 1905 "parser.y"
4501 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4510 /* Line 1464 of skeleton.m4 */
4511 #line 1906 "parser.y"
4521 /* Line 1464 of skeleton.m4 */
4522 #line 1909 "parser.y"
4532 /* Line 1464 of skeleton.m4 */
4533 #line 1916 "parser.y"
4537 (yyval.code) = (yyvsp[(3) - (4)].code);
4541 as3_pass=(yyvsp[(1) - (4)].number_int);
4551 /* Line 1464 of skeleton.m4 */
4552 #line 1928 "parser.y"
4553 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4562 /* Line 1464 of skeleton.m4 */
4563 #line 1929 "parser.y"
4564 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4573 /* Line 1464 of skeleton.m4 */
4574 #line 1933 "parser.y"
4576 code_t**cc = &global->init->method->body->code;
4577 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4587 /* Line 1464 of skeleton.m4 */
4588 #line 1940 "parser.y"
4591 (yyval.number_int)=as3_pass;
4592 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4593 if(!definitions || !dict_contains(definitions, key)) {
4606 /* Line 1464 of skeleton.m4 */
4607 #line 1959 "parser.y"
4608 {(yyval.node)=(yyvsp[(2) - (2)].node);}
4617 /* Line 1464 of skeleton.m4 */
4618 #line 1960 "parser.y"
4619 {(yyval.node)=mkdummynode();}
4628 /* Line 1464 of skeleton.m4 */
4629 #line 1962 "parser.y"
4630 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4639 /* Line 1464 of skeleton.m4 */
4640 #line 1963 "parser.y"
4641 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4650 /* Line 1464 of skeleton.m4 */
4651 #line 1965 "parser.y"
4652 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4661 /* Line 1464 of skeleton.m4 */
4662 #line 1966 "parser.y"
4663 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4672 /* Line 1464 of skeleton.m4 */
4673 #line 1969 "parser.y"
4676 if(variable_exists((yyvsp[(1) - (3)].id)))
4677 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4679 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4684 if(state->method->uses_slots) {
4685 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4687 // this variable is stored in a slot
4689 v->type = (yyvsp[(2) - (3)].classinfo);
4695 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4698 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4700 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
4701 if(!is_subtype_of(v.t, (yyvsp[(2) - (3)].classinfo))) {
4702 syntaxerror("Can't convert %s to %s", v.t->name, (yyvsp[(2) - (3)].classinfo)->name);
4704 if((yyvsp[(2) - (3)].classinfo)) {
4705 if(v.c->prev || v.c->opcode != OPCODE_PUSHUNDEFINED) {
4706 (yyval.code) = code_append((yyval.code), v.c);
4707 (yyval.code) = converttype((yyval.code), v.t, (yyvsp[(2) - (3)].classinfo));
4710 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4713 if(v.c->prev || v.c->opcode != OPCODE_PUSHUNDEFINED) {
4714 (yyval.code) = code_append((yyval.code), v.c);
4715 (yyval.code) = abc_coerce_a((yyval.code));
4717 // don't do anything
4719 code_free((yyval.code));
4725 (yyval.code) = abc_setslot((yyval.code), index);
4727 (yyval.code) = abc_setlocal((yyval.code), index);
4738 /* Line 1464 of skeleton.m4 */
4739 #line 2028 "parser.y"
4740 {(yyval.code) = code_new();}
4749 /* Line 1464 of skeleton.m4 */
4750 #line 2029 "parser.y"
4751 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4760 /* Line 1464 of skeleton.m4 */
4761 #line 2032 "parser.y"
4762 {PASS12 new_state();}
4771 /* Line 1464 of skeleton.m4 */
4772 #line 2032 "parser.y"
4775 (yyval.code) = code_new();
4776 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4777 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4779 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4780 if((yyvsp[(7) - (7)].code)) {
4781 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4783 myif->branch = (yyval.code) = abc_nop((yyval.code));
4784 if((yyvsp[(7) - (7)].code)) {
4785 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4786 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4788 (yyval.code) = var_block((yyval.code));
4799 /* Line 1464 of skeleton.m4 */
4800 #line 2051 "parser.y"
4801 {(yyval.code)=code_new();}
4810 /* Line 1464 of skeleton.m4 */
4811 #line 2058 "parser.y"
4813 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4814 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4824 /* Line 1464 of skeleton.m4 */
4825 #line 2062 "parser.y"
4828 (yyval.id)=(yyvsp[(1) - (1)].id);
4838 /* Line 1464 of skeleton.m4 */
4839 #line 2067 "parser.y"
4840 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4849 /* Line 1464 of skeleton.m4 */
4850 #line 2068 "parser.y"
4851 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4860 /* Line 1464 of skeleton.m4 */
4861 #line 2070 "parser.y"
4863 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4864 (yyval.code) = code_new();
4865 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4866 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4867 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4868 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4869 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4870 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4871 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4872 (yyval.code) = abc_jump((yyval.code), loopstart);
4873 code_t*out = (yyval.code) = abc_nop((yyval.code));
4874 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4875 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4878 (yyval.code) = var_block((yyval.code));
4889 /* Line 1464 of skeleton.m4 */
4890 #line 2090 "parser.y"
4892 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4894 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4897 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4898 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4899 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4900 int array = new_variable(tmp1name, 0, 0, 0);
4902 (yyval.code) = code_new();
4903 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4904 (yyval.code) = abc_coerce_a((yyval.code));
4905 (yyval.code) = abc_setlocal((yyval.code), array);
4906 (yyval.code) = abc_pushbyte((yyval.code), 0);
4907 (yyval.code) = abc_setlocal((yyval.code), it);
4909 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4911 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4912 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4913 (yyval.code) = abc_getlocal((yyval.code), array);
4914 (yyval.code) = abc_getlocal((yyval.code), it);
4915 if(!(yyvsp[(1) - (6)].for_start).each)
4916 (yyval.code) = abc_nextname((yyval.code));
4918 (yyval.code) = abc_nextvalue((yyval.code));
4919 (yyval.code) = converttype((yyval.code), 0, var->type);
4920 (yyval.code) = abc_setlocal((yyval.code), var->index);
4922 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4923 (yyval.code) = abc_jump((yyval.code), loopstart);
4925 code_t*out = (yyval.code) = abc_nop((yyval.code));
4926 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4927 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4931 (yyval.code) = var_block((yyval.code));
4946 /* Line 1464 of skeleton.m4 */
4947 #line 2138 "parser.y"
4948 {PASS12 new_state();}
4957 /* Line 1464 of skeleton.m4 */
4958 #line 2138 "parser.y"
4961 (yyval.code) = code_new();
4963 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4964 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4965 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4966 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4967 myjmp->branch = cont;
4968 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4969 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4970 code_t*out = (yyval.code) = abc_nop((yyval.code));
4971 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4972 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4974 (yyval.code) = var_block((yyval.code));
4985 /* Line 1464 of skeleton.m4 */
4986 #line 2157 "parser.y"
4987 {PASS12 new_state();}
4996 /* Line 1464 of skeleton.m4 */
4997 #line 2157 "parser.y"
4999 (yyval.code) = code_new();
5000 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
5001 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
5002 code_t*cont = (yyval.code) = abc_nop((yyval.code));
5003 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
5004 (yyval.code) = abc_iftrue((yyval.code), loopstart);
5005 code_t*out = (yyval.code) = abc_nop((yyval.code));
5006 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
5007 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
5009 (yyval.code) = var_block((yyval.code));
5020 /* Line 1464 of skeleton.m4 */
5021 #line 2172 "parser.y"
5023 (yyval.code) = abc___break__(0, "");
5033 /* Line 1464 of skeleton.m4 */
5034 #line 2175 "parser.y"
5036 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
5046 /* Line 1464 of skeleton.m4 */
5047 #line 2178 "parser.y"
5049 (yyval.code) = abc___continue__(0, "");
5059 /* Line 1464 of skeleton.m4 */
5060 #line 2181 "parser.y"
5062 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
5072 /* Line 1464 of skeleton.m4 */
5073 #line 2185 "parser.y"
5083 /* Line 1464 of skeleton.m4 */
5084 #line 2186 "parser.y"
5085 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5094 /* Line 1464 of skeleton.m4 */
5095 #line 2187 "parser.y"
5096 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5105 /* Line 1464 of skeleton.m4 */
5106 #line 2188 "parser.y"
5107 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
5116 /* Line 1464 of skeleton.m4 */
5117 #line 2189 "parser.y"
5118 {(yyval.code)=(yyvsp[(1) - (1)].code);}
5127 /* Line 1464 of skeleton.m4 */
5128 #line 2190 "parser.y"
5129 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
5138 /* Line 1464 of skeleton.m4 */
5139 #line 2192 "parser.y"
5141 (yyval.code) = abc_getlocal(0, state->switch_var);
5142 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
5143 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
5144 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
5145 if((yyval.code)->opcode != OPCODE___BREAK__) {
5146 (yyval.code) = abc___fallthrough__((yyval.code), "");
5148 code_t*e = (yyval.code) = abc_nop((yyval.code));
5159 /* Line 1464 of skeleton.m4 */
5160 #line 2203 "parser.y"
5162 (yyval.code) = (yyvsp[(3) - (3)].code);
5172 /* Line 1464 of skeleton.m4 */
5173 #line 2206 "parser.y"
5174 {PASS12 new_state();state->switch_var=alloc_local();}
5183 /* Line 1464 of skeleton.m4 */
5184 #line 2206 "parser.y"
5186 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
5187 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
5188 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
5190 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
5191 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
5193 code_t*c = (yyval.code),*lastblock=0;
5195 if(c->opcode == OPCODE_IFNE) {
5196 if(!c->next) syntaxerror("internal error in fallthrough handling");
5198 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
5200 c->opcode = OPCODE_JUMP;
5201 c->branch = lastblock;
5203 /* fall through end of switch */
5204 c->opcode = OPCODE_NOP;
5210 (yyval.code) = var_block((yyval.code));
5221 /* Line 1464 of skeleton.m4 */
5222 #line 2237 "parser.y"
5223 {PASS12 new_state();
5224 state->exception_name=(yyvsp[(3) - (5)].id);
5225 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5226 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5236 /* Line 1464 of skeleton.m4 */
5237 #line 2242 "parser.y"
5239 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5240 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5242 NEW(abc_exception_t, e)
5243 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5244 e->var_name = multiname_clone(&name);
5245 (yyval.exception) = e;
5248 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5249 e->target = c = abc_nop(0);
5250 c = abc_setlocal(c, i);
5251 c = code_append(c, code_dup(state->method->scope_code));
5252 c = code_append(c, (yyvsp[(8) - (9)].code));
5266 /* Line 1464 of skeleton.m4 */
5267 #line 2262 "parser.y"
5268 {PASS12 new_state();state->exception_name=0;}
5277 /* Line 1464 of skeleton.m4 */
5278 #line 2262 "parser.y"
5280 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5281 if(!(yyvsp[(4) - (5)].code)) {
5282 (yyval.exception)=0;
5284 NEW(abc_exception_t, e)
5285 e->exc_type = 0; //all exceptions
5286 e->var_name = 0; //no name
5289 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5290 (yyval.exception) = e;
5302 /* Line 1464 of skeleton.m4 */
5303 #line 2278 "parser.y"
5304 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5313 /* Line 1464 of skeleton.m4 */
5314 #line 2279 "parser.y"
5315 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5324 /* Line 1464 of skeleton.m4 */
5325 #line 2280 "parser.y"
5326 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5335 /* Line 1464 of skeleton.m4 */
5336 #line 2281 "parser.y"
5338 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5339 (yyval.catch_list).finally = 0;
5340 if((yyvsp[(2) - (2)].exception)) {
5341 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5342 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5353 /* Line 1464 of skeleton.m4 */
5354 #line 2289 "parser.y"
5356 (yyval.catch_list).l=list_new();
5357 (yyval.catch_list).finally = 0;
5358 if((yyvsp[(1) - (1)].exception)) {
5359 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5360 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5371 /* Line 1464 of skeleton.m4 */
5372 #line 2298 "parser.y"
5373 {PASS12 new_state();
5374 state->method->has_exceptions=1;
5375 state->method->late_binding=1;//for invariant scope_code
5385 /* Line 1464 of skeleton.m4 */
5386 #line 2301 "parser.y"
5388 code_t*out = abc_nop(0);
5390 code_t*start = abc_nop(0);
5391 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5392 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5393 (yyval.code) = abc_jump((yyval.code), out);
5395 code_t*end = (yyval.code) = abc_nop((yyval.code));
5398 if((yyvsp[(6) - (6)].catch_list).finally)
5399 tmp = new_variable("__finally__", 0, 0, 0);
5401 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5404 abc_exception_t*e = l->abc_exception;
5406 (yyval.code) = code_append((yyval.code), e->target);
5407 (yyval.code) = abc_jump((yyval.code), out);
5409 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5411 e->target = (yyval.code) = abc_nop((yyval.code));
5412 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5413 (yyval.code) = abc___rethrow__((yyval.code));
5421 (yyval.code) = code_append((yyval.code), out);
5423 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5425 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5427 (yyval.code) = var_block((yyval.code));
5438 /* Line 1464 of skeleton.m4 */
5439 #line 2347 "parser.y"
5441 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5442 (yyval.code)=abc_throw((yyval.code));
5452 /* Line 1464 of skeleton.m4 */
5453 #line 2351 "parser.y"
5455 if(!state->exception_name)
5456 syntaxerror("re-throw only possible within a catch block");
5457 variable_t*v = find_variable(state, state->exception_name);
5458 (yyval.code)=code_new();
5459 (yyval.code)=abc_getlocal((yyval.code), v->index);
5460 (yyval.code)=abc_throw((yyval.code));
5470 /* Line 1464 of skeleton.m4 */
5471 #line 2362 "parser.y"
5474 if(state->method->has_exceptions) {
5475 int v = alloc_local();
5476 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5477 state->method->scope_code = abc_pushwith(state->method->scope_code);
5478 (yyval.value_list).number = v;
5480 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5490 /* Line 1464 of skeleton.m4 */
5491 #line 2372 "parser.y"
5493 /* remove getlocal;pushwith from scope code again */
5494 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5496 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5497 if(state->method->has_exceptions) {
5498 (yyval.code) = abc_dup((yyval.code));
5499 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5501 (yyval.code) = abc_pushwith((yyval.code));
5502 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5503 (yyval.code) = abc_popscope((yyval.code));
5514 /* Line 1464 of skeleton.m4 */
5515 #line 2390 "parser.y"
5516 {PASS12 (yyval.id)="package";}
5525 /* Line 1464 of skeleton.m4 */
5526 #line 2391 "parser.y"
5527 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5536 /* Line 1464 of skeleton.m4 */
5537 #line 2393 "parser.y"
5538 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5547 /* Line 1464 of skeleton.m4 */
5548 #line 2394 "parser.y"
5549 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5558 /* Line 1464 of skeleton.m4 */
5559 #line 2396 "parser.y"
5560 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5569 /* Line 1464 of skeleton.m4 */
5570 #line 2397 "parser.y"
5571 {PASS12 endpackage();(yyval.code)=0;}
5580 /* Line 1464 of skeleton.m4 */
5581 #line 2398 "parser.y"
5582 {PASS12 startpackage("");}
5591 /* Line 1464 of skeleton.m4 */
5592 #line 2399 "parser.y"
5593 {PASS12 endpackage();(yyval.code)=0;}
5602 /* Line 1464 of skeleton.m4 */
5603 #line 2421 "parser.y"
5606 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5607 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5608 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5610 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5612 syntaxerror("Couldn't import class\n");
5613 state_has_imports();
5614 dict_put(state->imports, c->name, c);
5615 import_toplevel(c->package);
5626 /* Line 1464 of skeleton.m4 */
5627 #line 2435 "parser.y"
5630 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5631 as3_schedule_package((yyvsp[(2) - (4)].id));
5635 i->package = (yyvsp[(2) - (4)].id);
5636 state_has_imports();
5637 list_append(state->wildcard_imports, i);
5638 import_toplevel(i->package);
5649 /* Line 1464 of skeleton.m4 */
5650 #line 2451 "parser.y"
5651 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5660 /* Line 1464 of skeleton.m4 */
5661 #line 2452 "parser.y"
5662 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5671 /* Line 1464 of skeleton.m4 */
5672 #line 2453 "parser.y"
5673 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5682 /* Line 1464 of skeleton.m4 */
5683 #line 2454 "parser.y"
5686 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5687 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5688 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5699 /* Line 1464 of skeleton.m4 */
5700 #line 2461 "parser.y"
5701 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5710 /* Line 1464 of skeleton.m4 */
5711 #line 2462 "parser.y"
5712 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5721 /* Line 1464 of skeleton.m4 */
5722 #line 2463 "parser.y"
5723 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5732 /* Line 1464 of skeleton.m4 */
5733 #line 2464 "parser.y"
5734 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5743 /* Line 1464 of skeleton.m4 */
5744 #line 2465 "parser.y"
5745 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5754 /* Line 1464 of skeleton.m4 */
5755 #line 2466 "parser.y"
5756 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5765 /* Line 1464 of skeleton.m4 */
5766 #line 2467 "parser.y"
5767 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5776 /* Line 1464 of skeleton.m4 */
5777 #line 2468 "parser.y"
5778 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5787 /* Line 1464 of skeleton.m4 */
5788 #line 2469 "parser.y"
5789 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5798 /* Line 1464 of skeleton.m4 */
5799 #line 2470 "parser.y"
5800 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5801 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5811 /* Line 1464 of skeleton.m4 */
5812 #line 2474 "parser.y"
5813 {PASS12 (yyval.classinfo)=0;}
5822 /* Line 1464 of skeleton.m4 */
5823 #line 2475 "parser.y"
5824 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5833 /* Line 1464 of skeleton.m4 */
5834 #line 2477 "parser.y"
5835 {PASS12 (yyval.classinfo_list)=list_new();}
5844 /* Line 1464 of skeleton.m4 */
5845 #line 2478 "parser.y"
5846 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5855 /* Line 1464 of skeleton.m4 */
5856 #line 2480 "parser.y"
5857 {PASS12 (yyval.classinfo_list)=list_new();}
5866 /* Line 1464 of skeleton.m4 */
5867 #line 2481 "parser.y"
5868 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5877 /* Line 1464 of skeleton.m4 */
5878 #line 2485 "parser.y"
5879 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5888 /* Line 1464 of skeleton.m4 */
5889 #line 2487 "parser.y"
5890 {PASS12 endclass();(yyval.code)=0;}
5899 /* Line 1464 of skeleton.m4 */
5900 #line 2491 "parser.y"
5901 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5902 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5911 /* Line 1464 of skeleton.m4 */
5912 #line 2494 "parser.y"
5913 {PASS12 endclass();(yyval.code)=0;}
5922 /* Line 1464 of skeleton.m4 */
5923 #line 2503 "parser.y"
5924 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
5933 /* Line 1464 of skeleton.m4 */
5934 #line 2507 "parser.y"
5936 code_t*c = state->cls->static_init->header;
5937 c = code_append(c, (yyvsp[(1) - (1)].code));
5938 state->cls->static_init->header = c;
5948 /* Line 1464 of skeleton.m4 */
5949 #line 2518 "parser.y"
5951 syntaxerror("variable declarations not allowed in interfaces");
5961 /* Line 1464 of skeleton.m4 */
5962 #line 2521 "parser.y"
5965 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5966 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5967 syntaxerror("invalid method modifiers: interface methods always need to be public");
5969 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5970 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5971 list_deep_free((yyvsp[(6) - (8)].params).list);
5981 /* Line 1464 of skeleton.m4 */
5982 #line 2589 "parser.y"
5983 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5992 /* Line 1464 of skeleton.m4 */
5993 #line 2589 "parser.y"
5994 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
6003 /* Line 1464 of skeleton.m4 */
6004 #line 2591 "parser.y"
6005 {PASS12 (yyval.code)=0;}
6014 /* Line 1464 of skeleton.m4 */
6015 #line 2592 "parser.y"
6016 {PASS12 (yyval.code)=0;}
6025 /* Line 1464 of skeleton.m4 */
6026 #line 2595 "parser.y"
6029 int flags = slotstate_flags->flags;
6030 namespace_t ns = modifiers2access(slotstate_flags);
6034 varinfo_t* info = 0;
6036 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
6038 check_override(i, flags);
6040 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
6042 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
6044 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
6046 if(ns.name && ns.name[0]) {
6047 syntaxerror("namespaces not allowed on package-level variables");
6049 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
6052 info->type = (yyvsp[(2) - (3)].classinfo);
6053 info->flags = flags;
6055 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
6059 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
6063 trait_t*t = add_abc_slot(slotstate_flags, (yyvsp[(1) - (3)].id), &mname, &code);
6065 if((yyvsp[(2) - (3)].classinfo)) {
6066 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
6067 t->type_name = multiname_clone(&m);
6069 info->slot = t->slot_id;
6071 /* workaround for "VerifyError: Error #1053: Illegal override of ::test2 in C1"
6072 FIXME: is there a way to use slots and still don't have conflicting overrides?
6074 info->slot = t->slot_id = 0;
6076 constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
6077 if(cval.type!=CONSTANT_UNKNOWN) {
6078 /* compile time constant */
6079 t->value = malloc(sizeof(constant_t));
6080 memcpy(t->value, &cval, sizeof(constant_t));
6081 info->value = constant_clone(t->value);
6083 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
6084 /* initalization code (if needed) */
6086 if(v.c && !is_pushundefined(v.c)) {
6087 c = abc_getlocal_0(c);
6088 c = code_append(c, v.c);
6089 c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
6091 c = abc_setproperty2(c, &mname);
6093 c = abc_setslot(c, t->slot_id);
6096 *code = code_append(*code, c);
6099 if(slotstate_varconst==KW_CONST) {
6100 t->kind= TRAIT_CONST;
6101 info->flags |= FLAG_CONST;
6115 /* Line 1464 of skeleton.m4 */
6116 #line 2678 "parser.y"
6117 {(yyval.constant)=0;}
6126 /* Line 1464 of skeleton.m4 */
6127 #line 2679 "parser.y"
6129 (yyval.constant) = malloc(sizeof(constant_t));
6130 *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
6131 if((yyval.constant)->type == CONSTANT_UNKNOWN) {
6132 syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
6143 /* Line 1464 of skeleton.m4 */
6144 #line 2688 "parser.y"
6145 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
6154 /* Line 1464 of skeleton.m4 */
6155 #line 2689 "parser.y"
6157 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
6167 /* Line 1464 of skeleton.m4 */
6168 #line 2692 "parser.y"
6169 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
6178 /* Line 1464 of skeleton.m4 */
6179 #line 2693 "parser.y"
6180 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
6189 /* Line 1464 of skeleton.m4 */
6190 #line 2694 "parser.y"
6191 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
6200 /* Line 1464 of skeleton.m4 */
6201 #line 2695 "parser.y"
6202 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
6211 /* Line 1464 of skeleton.m4 */
6212 #line 2696 "parser.y"
6213 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6222 /* Line 1464 of skeleton.m4 */
6223 #line 2697 "parser.y"
6224 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6233 /* Line 1464 of skeleton.m4 */
6234 #line 2698 "parser.y"
6235 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6244 /* Line 1464 of skeleton.m4 */
6245 #line 2718 "parser.y"
6246 {PASS_ALWAYS tokenizer_begin_xml();xml_level++;}
6255 /* Line 1464 of skeleton.m4 */
6256 #line 2719 "parser.y"
6257 {PASS_ALWAYS tokenizer_begin_xmltext();}
6266 /* Line 1464 of skeleton.m4 */
6267 #line 2720 "parser.y"
6268 {PASS_ALWAYS if(!--xml_level) tokenizer_end_xml(); else tokenizer_begin_xmltext();}
6277 /* Line 1464 of skeleton.m4 */
6278 #line 2722 "parser.y"
6288 /* Line 1464 of skeleton.m4 */
6289 #line 2723 "parser.y"
6290 {(yyval.id)=concat2((yyvsp[(1) - (2)].id), string_cstr(&(yyvsp[(2) - (2)].str)));}
6299 /* Line 1464 of skeleton.m4 */
6300 #line 2724 "parser.y"
6301 {(yyval.id)=concat2((yyvsp[(1) - (2)].id), ">");}
6310 /* Line 1464 of skeleton.m4 */
6311 #line 2726 "parser.y"
6312 {(yyval.id)=concat2((yyvsp[(1) - (2)].id),(yyvsp[(2) - (2)].id));}
6321 /* Line 1464 of skeleton.m4 */
6322 #line 2727 "parser.y"
6323 {(yyval.id)=concat3((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));free((yyvsp[(2) - (3)].id));free((yyvsp[(3) - (3)].id));}
6332 /* Line 1464 of skeleton.m4 */
6333 #line 2729 "parser.y"
6335 (yyval.id) = allocprintf("<%s%s>%s</%s>", (yyvsp[(2) - (10)].id), (yyvsp[(3) - (10)].id), (yyvsp[(5) - (10)].id), (yyvsp[(8) - (10)].id));
6336 free((yyvsp[(2) - (10)].id));free((yyvsp[(3) - (10)].id));free((yyvsp[(5) - (10)].id));free((yyvsp[(8) - (10)].id));
6346 /* Line 1464 of skeleton.m4 */
6347 #line 2733 "parser.y"
6349 (yyval.id) = allocprintf("<%s%s/>", (yyvsp[(2) - (6)].id), (yyvsp[(3) - (6)].id));
6359 /* Line 1464 of skeleton.m4 */
6360 #line 2736 "parser.y"
6362 (yyval.id) = allocprintf("<%s%s>%s%s</%s>", (yyvsp[(2) - (11)].id), (yyvsp[(3) - (11)].id), (yyvsp[(5) - (11)].id), (yyvsp[(6) - (11)].id), (yyvsp[(9) - (11)].id));
6363 free((yyvsp[(2) - (11)].id));free((yyvsp[(3) - (11)].id));free((yyvsp[(5) - (11)].id));free((yyvsp[(6) - (11)].id));free((yyvsp[(6) - (11)].id));free((yyvsp[(9) - (11)].id));
6373 /* Line 1464 of skeleton.m4 */
6374 #line 2741 "parser.y"
6375 {(yyval.id)=strdup("");}
6384 /* Line 1464 of skeleton.m4 */
6385 #line 2742 "parser.y"
6386 {(yyval.id)=concat2(" ",(yyvsp[(1) - (1)].id));}
6395 /* Line 1464 of skeleton.m4 */
6396 #line 2743 "parser.y"
6397 {(yyval.id)=(yyvsp[(1) - (1)].id);}
6406 /* Line 1464 of skeleton.m4 */
6407 #line 2744 "parser.y"
6408 {(yyval.id)=concat3((yyvsp[(1) - (2)].id)," ",(yyvsp[(2) - (2)].id));free((yyvsp[(1) - (2)].id));free((yyvsp[(2) - (2)].id));}
6417 /* Line 1464 of skeleton.m4 */
6418 #line 2745 "parser.y"
6420 char* str = string_cstr(&(yyvsp[(3) - (3)].str));
6421 (yyval.id)=allocprintf("%s=\"%s\"", (yyvsp[(1) - (3)].id),str);
6423 free((yyvsp[(1) - (3)].id));free((char*)(yyvsp[(3) - (3)].str).str);
6433 /* Line 1464 of skeleton.m4 */
6434 #line 2755 "parser.y"
6437 memset(&(yyval.params),0,sizeof((yyval.params)));
6447 /* Line 1464 of skeleton.m4 */
6448 #line 2759 "parser.y"
6451 (yyval.params)=(yyvsp[(1) - (1)].params);
6461 /* Line 1464 of skeleton.m4 */
6462 #line 2765 "parser.y"
6465 memset(&(yyval.params),0,sizeof((yyval.params)));
6466 (yyval.params).varargs=1;
6467 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6477 /* Line 1464 of skeleton.m4 */
6478 #line 2771 "parser.y"
6481 (yyval.params) =(yyvsp[(1) - (4)].params);
6482 (yyval.params).varargs=1;
6483 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6493 /* Line 1464 of skeleton.m4 */
6494 #line 2779 "parser.y"
6497 (yyval.params) = (yyvsp[(1) - (3)].params);
6498 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6508 /* Line 1464 of skeleton.m4 */
6509 #line 2784 "parser.y"
6512 memset(&(yyval.params),0,sizeof((yyval.params)));
6513 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6523 /* Line 1464 of skeleton.m4 */
6524 #line 2790 "parser.y"
6527 (yyval.param) = rfx_calloc(sizeof(param_t));
6528 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6529 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6531 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6541 /* Line 1464 of skeleton.m4 */
6542 #line 2798 "parser.y"
6545 (yyval.param) = rfx_calloc(sizeof(param_t));
6546 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6547 (yyval.param)->type = TYPE_ANY;
6549 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6559 /* Line 1464 of skeleton.m4 */
6560 #line 2808 "parser.y"
6561 {PASS12 (yyval.token)=0;}
6570 /* Line 1464 of skeleton.m4 */
6571 #line 2811 "parser.y"
6572 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6581 /* Line 1464 of skeleton.m4 */
6582 #line 2812 "parser.y"
6585 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6587 if(!state->method->info) syntaxerror("internal error");
6589 code_t*c = method_header(state->method);
6590 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6592 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6594 list_deep_free((yyvsp[(6) - (12)].params).list);
6605 /* Line 1464 of skeleton.m4 */
6606 #line 2828 "parser.y"
6607 {PASS12 (yyval.id)=0;}
6616 /* Line 1464 of skeleton.m4 */
6617 #line 2830 "parser.y"
6618 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6627 /* Line 1464 of skeleton.m4 */
6628 #line 2831 "parser.y"
6631 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6633 methodinfo_t*f = state->method->info;
6634 if(!f || !f->kind) syntaxerror("internal error");
6636 code_t*c = method_header(state->method);
6637 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6639 int index = state->method->var_index;
6640 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6642 (yyval.value).c = abc_getlocal(0, index);
6643 (yyval.value).t = TYPE_FUNCTION(f);
6645 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6655 /* Line 1464 of skeleton.m4 */
6656 #line 2853 "parser.y"
6658 PASS1 NEW(unresolvedinfo_t,c);
6659 memset(c, 0, sizeof(*c));
6660 c->kind = INFOTYPE_UNRESOLVED;
6661 c->name = (yyvsp[(1) - (1)].id);
6662 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6664 c->nsset = get_current_imports();
6665 /* make the compiler look for this class in the current directory,
6667 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6669 (yyval.classinfo) = (classinfo_t*)c;
6671 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6672 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6673 (yyval.classinfo) = (classinfo_t*)s;
6683 /* Line 1464 of skeleton.m4 */
6684 #line 2872 "parser.y"
6686 PASS1 NEW(unresolvedinfo_t,c);
6687 memset(c, 0, sizeof(*c));
6688 c->kind = INFOTYPE_UNRESOLVED;
6689 c->package = (yyvsp[(1) - (3)].id);
6690 c->name = (yyvsp[(3) - (3)].id);
6691 (yyval.classinfo) = (classinfo_t*)c;
6693 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6694 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6695 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6696 (yyval.classinfo) = (classinfo_t*)s;
6706 /* Line 1464 of skeleton.m4 */
6707 #line 2889 "parser.y"
6708 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6717 /* Line 1464 of skeleton.m4 */
6718 #line 2890 "parser.y"
6719 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6728 /* Line 1464 of skeleton.m4 */
6729 #line 2892 "parser.y"
6730 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6739 /* Line 1464 of skeleton.m4 */
6740 #line 2893 "parser.y"
6741 {PASS12 (yyval.classinfo)=TYPE_ANY;}
6750 /* Line 1464 of skeleton.m4 */
6751 #line 2894 "parser.y"
6752 {PASS12 (yyval.classinfo)=TYPE_VOID;}
6761 /* Line 1464 of skeleton.m4 */
6762 #line 2903 "parser.y"
6763 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6772 /* Line 1464 of skeleton.m4 */
6773 #line 2904 "parser.y"
6774 {PASS12 (yyval.classinfo)=0;}
6783 /* Line 1464 of skeleton.m4 */
6784 #line 2908 "parser.y"
6785 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6794 /* Line 1464 of skeleton.m4 */
6795 #line 2909 "parser.y"
6796 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6805 /* Line 1464 of skeleton.m4 */
6806 #line 2911 "parser.y"
6807 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6816 /* Line 1464 of skeleton.m4 */
6817 #line 2915 "parser.y"
6818 {(yyval.value_list).number=1;
6819 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6829 /* Line 1464 of skeleton.m4 */
6830 #line 2919 "parser.y"
6831 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6840 /* Line 1464 of skeleton.m4 */
6841 #line 2920 "parser.y"
6843 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6844 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6854 /* Line 1464 of skeleton.m4 */
6855 #line 2926 "parser.y"
6857 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
6858 (yyval.value).c = v.c;
6859 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6861 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6862 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6863 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6864 (yyval.value).c = code_cutlast((yyval.value).c);
6865 (yyval.value).c = code_append((yyval.value).c, paramcode);
6866 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6867 multiname_destroy(name);
6868 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6869 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6870 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6871 multiname_t*name = t->name;
6872 (yyval.value).c = code_cutlast((yyval.value).c);
6873 (yyval.value).c = code_append((yyval.value).c, paramcode);
6874 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6876 (yyval.value).c = code_append((yyval.value).c, paramcode);
6877 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6880 (yyval.value).t = TYPE_ANY;
6881 if(TYPE_IS_CLASS(v.t) && v.t->data) {
6882 (yyval.value).t = v.t->data;
6884 (yyval.value).c = abc_coerce_a((yyval.value).c);
6885 (yyval.value).t = TYPE_ANY;
6896 /* Line 1464 of skeleton.m4 */
6897 #line 2963 "parser.y"
6900 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
6901 (yyval.value).c = v.c;
6902 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6903 (yyval.value).c = code_cutlast((yyval.value).c);
6905 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6907 (yyval.value).t = TYPE_ANY;
6908 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6909 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6910 (yyval.value).c = code_cutlast((yyval.value).c);
6911 (yyval.value).c = code_append((yyval.value).c, paramcode);
6912 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6913 multiname_destroy(name);
6914 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6915 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6916 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6917 if(t->kind!=TRAIT_METHOD) {
6918 //ok: flash allows to assign closures to members.
6920 multiname_t*name = t->name;
6921 (yyval.value).c = code_cutlast((yyval.value).c);
6922 (yyval.value).c = code_append((yyval.value).c, paramcode);
6923 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6924 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6925 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6926 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6927 (yyval.value).c = code_cutlast((yyval.value).c);
6928 (yyval.value).c = code_append((yyval.value).c, paramcode);
6929 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6930 multiname_destroy(name);
6932 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6933 (yyval.value).c = code_append((yyval.value).c, paramcode);
6934 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6937 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
6938 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
6939 } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
6940 // calling a class is like a typecast
6941 (yyval.value).t = (classinfo_t*)v.t->data;
6943 (yyval.value).c = abc_coerce_a((yyval.value).c);
6944 (yyval.value).t = TYPE_ANY;
6955 /* Line 1464 of skeleton.m4 */
6956 #line 3013 "parser.y"
6958 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6959 if(!state->method) syntaxerror("super() not allowed outside of a function");
6960 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6962 (yyval.value).c = code_new();
6963 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6965 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6967 this is dependent on the control path, check this somewhere else
6968 if(state->method->has_super)
6969 syntaxerror("constructor may call super() only once");
6971 state->method->has_super = 1;
6973 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6974 (yyval.value).c = abc_pushundefined((yyval.value).c);
6975 (yyval.value).t = TYPE_ANY;
6985 /* Line 1464 of skeleton.m4 */
6986 #line 3034 "parser.y"
6988 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
6989 (yyval.value).c = v.c;
6990 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6991 (yyval.value).c = code_cutlast((yyval.value).c);
6993 multiname_t*name = 0;
6994 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6995 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6996 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6997 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6998 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6999 (yyval.value).c = code_cutlast((yyval.value).c);
7000 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
7002 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7003 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
7004 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
7006 (yyval.value).t = TYPE_BOOLEAN;
7016 /* Line 1464 of skeleton.m4 */
7017 #line 3056 "parser.y"
7019 (yyval.code) = abc_returnvoid(0);
7029 /* Line 1464 of skeleton.m4 */
7030 #line 3059 "parser.y"
7032 (yyval.code) = (yyvsp[(2) - (2)].value).c;
7033 (yyval.code) = abc_returnvalue((yyval.code));
7043 /* Line 1464 of skeleton.m4 */
7044 #line 3066 "parser.y"
7046 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7056 /* Line 1464 of skeleton.m4 */
7057 #line 3069 "parser.y"
7059 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
7069 /* Line 1464 of skeleton.m4 */
7070 #line 3072 "parser.y"
7072 (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
7082 /* Line 1464 of skeleton.m4 */
7083 #line 3075 "parser.y"
7085 (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7095 /* Line 1464 of skeleton.m4 */
7096 #line 3078 "parser.y"
7098 (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
7108 /* Line 1464 of skeleton.m4 */
7109 #line 3081 "parser.y"
7111 (yyval.code) = (yyvsp[(1) - (3)].code);
7112 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
7122 /* Line 1464 of skeleton.m4 */
7123 #line 3086 "parser.y"
7124 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
7133 /* Line 1464 of skeleton.m4 */
7134 #line 3087 "parser.y"
7135 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7144 /* Line 1464 of skeleton.m4 */
7145 #line 3089 "parser.y"
7146 {(yyval.code)=abc_pushstring(0,(yyvsp[(1) - (1)].id));}
7155 /* Line 1464 of skeleton.m4 */
7156 #line 3090 "parser.y"
7157 {(yyval.code)=abc_pushstring2(0,&(yyvsp[(1) - (1)].str));}
7166 /* Line 1464 of skeleton.m4 */
7167 #line 3092 "parser.y"
7169 (yyval.value_list).cc = 0;
7170 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].code));
7171 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7172 (yyval.value_list).number = 2;
7182 /* Line 1464 of skeleton.m4 */
7183 #line 3098 "parser.y"
7185 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7186 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
7187 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].code));
7188 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7198 /* Line 1464 of skeleton.m4 */
7199 #line 3107 "parser.y"
7200 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7209 /* Line 1464 of skeleton.m4 */
7210 #line 3108 "parser.y"
7211 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7220 /* Line 1464 of skeleton.m4 */
7221 #line 3109 "parser.y"
7222 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7231 /* Line 1464 of skeleton.m4 */
7232 #line 3110 "parser.y"
7233 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7242 /* Line 1464 of skeleton.m4 */
7243 #line 3111 "parser.y"
7244 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
7253 /* Line 1464 of skeleton.m4 */
7254 #line 3112 "parser.y"
7255 {(yyval.node) = (yyvsp[(1) - (1)].node);}
7264 /* Line 1464 of skeleton.m4 */
7265 #line 3114 "parser.y"
7267 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
7277 /* Line 1464 of skeleton.m4 */
7278 #line 3118 "parser.y"
7282 namespace_t ns = {ACCESS_PACKAGE, ""};
7283 multiname_t m = {QNAME, &ns, 0, "XML"};
7284 v.c = abc_getlex2(v.c, &m);
7285 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].id));
7286 v.c = abc_construct(v.c, 1);
7288 (yyval.node) = mkcodenode(v);
7298 /* Line 1464 of skeleton.m4 */
7299 #line 3131 "parser.y"
7303 namespace_t ns = {ACCESS_PACKAGE, ""};
7304 multiname_t m = {QNAME, &ns, 0, "RegExp"};
7305 if(!(yyvsp[(1) - (1)].regexp).options) {
7306 v.c = abc_getlex2(v.c, &m);
7307 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7308 v.c = abc_construct(v.c, 1);
7310 v.c = abc_getlex2(v.c, &m);
7311 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
7312 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
7313 v.c = abc_construct(v.c, 2);
7316 (yyval.node) = mkcodenode(v);
7326 /* Line 1464 of skeleton.m4 */
7327 #line 3151 "parser.y"
7331 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7332 v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
7333 v.t = registry_getarrayclass();
7334 (yyval.node) = mkcodenode(v);
7344 /* Line 1464 of skeleton.m4 */
7345 #line 3161 "parser.y"
7349 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
7350 v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
7351 v.t = registry_getobjectclass();
7352 (yyval.node) = mkcodenode(v);
7362 /* Line 1464 of skeleton.m4 */
7363 #line 3170 "parser.y"
7364 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7373 /* Line 1464 of skeleton.m4 */
7374 #line 3171 "parser.y"
7375 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7384 /* Line 1464 of skeleton.m4 */
7385 #line 3172 "parser.y"
7386 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7395 /* Line 1464 of skeleton.m4 */
7396 #line 3173 "parser.y"
7397 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7406 /* Line 1464 of skeleton.m4 */
7407 #line 3174 "parser.y"
7408 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7417 /* Line 1464 of skeleton.m4 */
7418 #line 3175 "parser.y"
7419 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7428 /* Line 1464 of skeleton.m4 */
7429 #line 3176 "parser.y"
7430 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7439 /* Line 1464 of skeleton.m4 */
7440 #line 3177 "parser.y"
7441 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7450 /* Line 1464 of skeleton.m4 */
7451 #line 3178 "parser.y"
7452 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7461 /* Line 1464 of skeleton.m4 */
7462 #line 3179 "parser.y"
7463 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7472 /* Line 1464 of skeleton.m4 */
7473 #line 3180 "parser.y"
7474 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
7483 /* Line 1464 of skeleton.m4 */
7484 #line 3181 "parser.y"
7485 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
7494 /* Line 1464 of skeleton.m4 */
7495 #line 3182 "parser.y"
7496 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7505 /* Line 1464 of skeleton.m4 */
7506 #line 3183 "parser.y"
7507 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7516 /* Line 1464 of skeleton.m4 */
7517 #line 3184 "parser.y"
7518 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7527 /* Line 1464 of skeleton.m4 */
7528 #line 3185 "parser.y"
7529 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7538 /* Line 1464 of skeleton.m4 */
7539 #line 3186 "parser.y"
7540 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7549 /* Line 1464 of skeleton.m4 */
7550 #line 3187 "parser.y"
7551 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7560 /* Line 1464 of skeleton.m4 */
7561 #line 3188 "parser.y"
7562 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7571 /* Line 1464 of skeleton.m4 */
7572 #line 3189 "parser.y"
7573 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7582 /* Line 1464 of skeleton.m4 */
7583 #line 3190 "parser.y"
7584 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7593 /* Line 1464 of skeleton.m4 */
7594 #line 3191 "parser.y"
7595 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7604 /* Line 1464 of skeleton.m4 */
7605 #line 3192 "parser.y"
7606 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7615 /* Line 1464 of skeleton.m4 */
7616 #line 3193 "parser.y"
7617 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7626 /* Line 1464 of skeleton.m4 */
7627 #line 3194 "parser.y"
7628 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7637 /* Line 1464 of skeleton.m4 */
7638 #line 3195 "parser.y"
7639 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7648 /* Line 1464 of skeleton.m4 */
7649 #line 3196 "parser.y"
7650 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7659 /* Line 1464 of skeleton.m4 */
7660 #line 3197 "parser.y"
7661 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
7670 /* Line 1464 of skeleton.m4 */
7671 #line 3198 "parser.y"
7672 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
7681 /* Line 1464 of skeleton.m4 */
7682 #line 3199 "parser.y"
7683 { (yyval.node) = mkconstnode(constant_new_undefined());}
7692 /* Line 1464 of skeleton.m4 */
7693 #line 3200 "parser.y"
7694 { (yyval.node)=(yyvsp[(2) - (3)].node);}
7703 /* Line 1464 of skeleton.m4 */
7704 #line 3201 "parser.y"
7705 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
7714 /* Line 1464 of skeleton.m4 */
7715 #line 3202 "parser.y"
7716 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
7725 /* Line 1464 of skeleton.m4 */
7726 #line 3203 "parser.y"
7727 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7736 /* Line 1464 of skeleton.m4 */
7737 #line 3204 "parser.y"
7738 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7747 /* Line 1464 of skeleton.m4 */
7748 #line 3205 "parser.y"
7749 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7758 /* Line 1464 of skeleton.m4 */
7759 #line 3206 "parser.y"
7760 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7769 /* Line 1464 of skeleton.m4 */
7770 #line 3207 "parser.y"
7771 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7780 /* Line 1464 of skeleton.m4 */
7781 #line 3208 "parser.y"
7782 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7791 /* Line 1464 of skeleton.m4 */
7792 #line 3209 "parser.y"
7793 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7802 /* Line 1464 of skeleton.m4 */
7803 #line 3210 "parser.y"
7804 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7813 /* Line 1464 of skeleton.m4 */
7814 #line 3211 "parser.y"
7815 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7824 /* Line 1464 of skeleton.m4 */
7825 #line 3212 "parser.y"
7826 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7835 /* Line 1464 of skeleton.m4 */
7836 #line 3213 "parser.y"
7837 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7846 /* Line 1464 of skeleton.m4 */
7847 #line 3214 "parser.y"
7848 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7857 /* Line 1464 of skeleton.m4 */
7858 #line 3215 "parser.y"
7859 { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
7868 /* Line 1464 of skeleton.m4 */
7869 #line 3217 "parser.y"
7870 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
7879 /* Line 1464 of skeleton.m4 */
7880 #line 3218 "parser.y"
7881 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
7890 /* Line 1464 of skeleton.m4 */
7891 #line 3219 "parser.y"
7892 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
7901 /* Line 1464 of skeleton.m4 */
7902 #line 3220 "parser.y"
7903 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
7912 /* Line 1464 of skeleton.m4 */
7913 #line 3223 "parser.y"
7914 { if(!state->cls->info)
7915 syntaxerror("super keyword not allowed outside a class");
7916 classinfo_t*t = state->cls->info->superclass;
7917 if(!t) t = TYPE_OBJECT;
7918 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7919 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7922 v.c = abc_getlocal_0(v.c);
7923 v.c = abc_getsuper2(v.c, &m);
7924 v.t = slotinfo_gettype((slotinfo_t*)f);
7925 (yyval.node) = mkcodenode(v);
7935 /* Line 1464 of skeleton.m4 */
7936 #line 3237 "parser.y"
7938 // attribute occuring in .() loops
7940 (yyval.node) = mkdummynode();
7941 as3_warning("ignored @ operator");
7951 /* Line 1464 of skeleton.m4 */
7952 #line 3244 "parser.y"
7955 // TODO: this needs to be implemented using a loop
7956 (yyval.node) = mkdummynode();
7957 as3_warning("ignored .() operator");
7967 /* Line 1464 of skeleton.m4 */
7968 #line 3251 "parser.y"
7969 {(yyval.id)=(yyvsp[(1) - (1)].id);}
7978 /* Line 1464 of skeleton.m4 */
7979 #line 3252 "parser.y"
7980 {(yyval.id)=(char*)(yyvsp[(1) - (1)].id);}
7989 /* Line 1464 of skeleton.m4 */
7990 #line 3254 "parser.y"
8000 /* Line 1464 of skeleton.m4 */
8001 #line 3256 "parser.y"
8003 typedcode_t v = node_read((yyvsp[(1) - (5)].node));
8004 typedcode_t w = node_read(resolve_identifier((yyvsp[(3) - (5)].id)));
8005 v.c = code_append(v.c, w.c);
8006 if(!TYPE_IS_NAMESPACE(w.t)) {
8007 as3_softwarning("%s might not be a namespace", (yyvsp[(3) - (5)].id));
8009 v.c = converttype(v.c, w.t, TYPE_NAMESPACE);
8010 multiname_t m = {RTQNAME, 0, 0, (yyvsp[(5) - (5)].id)};
8011 v.c = abc_getproperty2(v.c, &m);
8012 if(TYPE_IS_XML(v.t)) {
8015 v.c = abc_coerce_a(v.c);
8018 (yyval.node) = mkcodenode(v);
8028 /* Line 1464 of skeleton.m4 */
8029 #line 3274 "parser.y"
8031 typedcode_t v = node_read((yyvsp[(1) - (3)].node));
8032 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8033 v.c = abc_getdescendants2(v.c, &m);
8035 (yyval.node) = mkcodenode(v);
8045 /* Line 1464 of skeleton.m4 */
8046 #line 3281 "parser.y"
8048 typedcode_t v = node_read((yyvsp[(1) - (5)].node));
8049 typedcode_t w = node_read((yyvsp[(4) - (5)].node));
8050 multiname_t m = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
8051 v.c = code_append(v.c, w.c);
8052 v.c = converttype(w.c, w.t, TYPE_STRING);
8053 v.c = abc_getproperty2(v.c, &m);
8055 (yyval.node) = mkcodenode(v);
8065 /* Line 1464 of skeleton.m4 */
8066 #line 3292 "parser.y"
8068 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8069 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8070 v.c = abc_getproperty2(v.c, &m);
8072 (yyval.node) = mkcodenode(v);
8082 /* Line 1464 of skeleton.m4 */
8083 #line 3299 "parser.y"
8085 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
8086 multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
8087 v.c = abc_getdescendants2(v.c, &m);
8089 (yyval.node) = mkcodenode(v);
8099 /* Line 1464 of skeleton.m4 */
8100 #line 3306 "parser.y"
8102 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8103 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8104 multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8105 v.c = code_append(v.c, w.c);
8106 v.c = converttype(w.c, w.t, TYPE_STRING);
8107 v.c = abc_getproperty2(v.c, &m);
8109 (yyval.node) = mkcodenode(v);
8119 /* Line 1464 of skeleton.m4 */
8120 #line 3316 "parser.y"
8122 typedcode_t v = node_read((yyvsp[(1) - (6)].node));
8123 typedcode_t w = node_read((yyvsp[(5) - (6)].node));
8124 multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
8125 v.c = code_append(v.c, w.c);
8126 v.c = converttype(w.c, w.t, TYPE_STRING);
8127 v.c = abc_getdescendants2(v.c, &m);
8129 (yyval.node) = mkcodenode(v);
8139 /* Line 1464 of skeleton.m4 */
8140 #line 3327 "parser.y"
8142 typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
8143 (yyval.value).c = v1.c;
8144 classinfo_t*t = v1.t;
8146 if(TYPE_IS_CLASS(t) && t->data) {
8150 if(TYPE_IS_XML(t)) {
8151 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8152 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8153 (yyval.value).c = abc_coerce_a((yyval.value).c);
8154 (yyval.value).t = TYPE_XMLLIST;
8156 if(t->subtype==INFOTYPE_UNRESOLVED) {
8157 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
8159 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
8161 if(f && !is_static != !(f->flags&FLAG_STATIC))
8163 if(f && f->slot && !noslot) {
8164 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
8167 as3_softwarning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
8169 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
8170 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8172 /* determine type */
8173 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
8174 if(!(yyval.value).t)
8175 (yyval.value).c = abc_coerce_a((yyval.value).c);
8177 } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
8178 string_t*package = v1.c->data[0];
8179 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
8181 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
8183 (yyval.value) = push_class(a);
8184 } else if(dict_contains(state->import_toplevel_packages, package2) ||
8185 registry_ispackage(package2)) {
8186 (yyval.value).c = v1.c;
8187 (yyval.value).c->data[0] = string_new4(package2);
8188 (yyval.value).t = 0;
8190 syntaxerror("couldn't resolve %s", package2);
8193 /* when resolving a property on an unknown type, we do know the
8194 name of the property (and don't seem to need the package), but
8195 we need to make avm2 try out all access modes */
8196 as3_warning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
8197 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
8198 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
8199 (yyval.value).c = abc_coerce_a((yyval.value).c);
8200 (yyval.value).t = TYPE_ANY;
8211 /* Line 1464 of skeleton.m4 */
8212 #line 3497 "parser.y"
8215 /* Queue unresolved identifiers for checking against the parent
8216 function's variables.
8217 We consider everything which is not a local variable "unresolved".
8218 This encompasses class names, members of the surrounding class
8219 etc. which is *correct* because local variables of the parent function
8222 if(!find_variable(state, (yyvsp[(1) - (1)].id))) {
8223 if(state->method->inner) {
8224 unknown_variable((yyvsp[(1) - (1)].id));
8226 /* let the compiler know that it might want to check the current directory/package
8227 for this identifier- maybe there's a file $1.as defining $1. */
8228 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
8234 (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
8244 /* Line 1464 of skeleton.m4 */
8245 #line 3532 "parser.y"
8248 NEW(namespace_decl_t,n);
8249 n->name = (yyvsp[(2) - (2)].id);
8250 n->url = (yyvsp[(2) - (2)].id);
8251 (yyval.namespace_decl)=n;
8261 /* Line 1464 of skeleton.m4 */
8262 #line 3539 "parser.y"
8265 NEW(namespace_decl_t,n);
8266 n->name = (yyvsp[(2) - (4)].id);
8267 n->url = (yyvsp[(4) - (4)].id);
8268 (yyval.namespace_decl)=n;
8278 /* Line 1464 of skeleton.m4 */
8279 #line 3546 "parser.y"
8282 NEW(namespace_decl_t,n);
8283 n->name = (yyvsp[(2) - (4)].id);
8284 n->url = (yyvsp[(4) - (4)].str).str;
8285 (yyval.namespace_decl)=n;
8295 /* Line 1464 of skeleton.m4 */
8296 #line 3553 "parser.y"
8299 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
8301 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
8302 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
8303 var->type = TYPE_NAMESPACE;
8305 ns.access = ACCESS_NAMESPACE;
8306 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
8307 var->value = constant_new_namespace(&ns);
8310 MULTINAME(m, TYPE_NAMESPACE);
8311 trait_t*t = add_abc_slot(&(yyvsp[(1) - (2)].flags), (yyvsp[(2) - (2)].namespace_decl)->name, 0, 0);
8312 t->value = var->value;
8313 t->type_name = multiname_clone(&m);
8326 /* Line 1464 of skeleton.m4 */
8327 #line 3575 "parser.y"
8330 const char*url = (yyvsp[(3) - (3)].classinfo)->name;
8332 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
8333 if(s->kind == INFOTYPE_UNRESOLVED) {
8334 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
8336 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
8339 if(!s || s->kind != INFOTYPE_VAR)
8340 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
8341 if(!s->value || !NS_TYPE(s->value->type))
8342 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
8343 url = s->value->ns->name;
8345 trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
8346 add_active_url(url);
8355 /* Line 1464 of skeleton.m4 */
8356 #line 8357 "parser.tab.c"
8359 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8363 YY_STACK_PRINT (yyss, yyssp);
8367 /* Now `shift' the result of the reduction. Determine what state
8368 that goes to, based on the state we popped back to and the rule
8369 number reduced by. */
8373 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8374 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8375 yystate = yytable[yystate];
8377 yystate = yydefgoto[yyn - YYNTOKENS];
8382 /*------------------------------------.
8383 | yyerrlab -- here on detecting error |
8384 `------------------------------------*/
8386 /* If not already recovering from an error, report this error. */
8390 #if ! YYERROR_VERBOSE
8391 yyerror (YY_("syntax error"));
8394 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8395 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8397 YYSIZE_T yyalloc = 2 * yysize;
8398 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8399 yyalloc = YYSTACK_ALLOC_MAXIMUM;
8400 if (yymsg != yymsgbuf)
8401 YYSTACK_FREE (yymsg);
8402 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8404 yymsg_alloc = yyalloc;
8408 yymsg_alloc = sizeof yymsgbuf;
8412 if (0 < yysize && yysize <= yymsg_alloc)
8414 (void) yysyntax_error (yymsg, yystate, yychar);
8419 yyerror (YY_("syntax error"));
8421 goto yyexhaustedlab;
8429 if (yyerrstatus == 3)
8431 /* If just tried and failed to reuse lookahead token after an
8432 error, discard it. */
8434 if (yychar <= YYEOF)
8436 /* Return failure if at end of input. */
8437 if (yychar == YYEOF)
8442 yydestruct ("Error: discarding",
8448 /* Else will try to reuse lookahead token after shifting the error
8453 /*---------------------------------------------------.
8454 | yyerrorlab -- error raised explicitly by YYERROR. |
8455 `---------------------------------------------------*/
8458 /* Pacify compilers like GCC when the user code never invokes
8459 YYERROR and the label yyerrorlab therefore never appears in user
8461 if (/*CONSTCOND*/ 0)
8464 /* Do not reclaim the symbols of the rule which action triggered
8468 YY_STACK_PRINT (yyss, yyssp);
8473 /*-------------------------------------------------------------.
8474 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8475 `-------------------------------------------------------------*/
8477 yyerrstatus = 3; /* Each real token shifted decrements this. */
8481 yyn = yypact[yystate];
8482 if (yyn != YYPACT_NINF)
8485 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8493 /* Pop the current state because it cannot handle the error token. */
8498 yydestruct ("Error: popping",
8499 yystos[yystate], yyvsp);
8502 YY_STACK_PRINT (yyss, yyssp);
8508 /* Shift the error token. */
8509 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8515 /*-------------------------------------.
8516 | yyacceptlab -- YYACCEPT comes here. |
8517 `-------------------------------------*/
8522 /*-----------------------------------.
8523 | yyabortlab -- YYABORT comes here. |
8524 `-----------------------------------*/
8529 #if !defined(yyoverflow) || YYERROR_VERBOSE
8530 /*-------------------------------------------------.
8531 | yyexhaustedlab -- memory exhaustion comes here. |
8532 `-------------------------------------------------*/
8534 yyerror (YY_("memory exhausted"));
8540 if (yychar != YYEMPTY)
8541 yydestruct ("Cleanup: discarding lookahead",
8543 /* Do not reclaim the symbols of the rule which action triggered
8544 this YYABORT or YYACCEPT. */
8546 YY_STACK_PRINT (yyss, yyssp);
8547 while (yyssp != yyss)
8549 yydestruct ("Cleanup: popping",
8550 yystos[*yyssp], yyvsp);
8555 YYSTACK_FREE (yyss);
8558 if (yymsg != yymsgbuf)
8559 YYSTACK_FREE (yymsg);
8561 /* Make sure YYID is used. */
8562 return YYID (yyresult);