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"
99 /* Line 198 of skeleton.m4 */
100 #line 101 "parser.tab.c"
102 /* Enabling traces. */
107 /* Enabling verbose error messages. */
108 #ifdef YYERROR_VERBOSE
109 # undef YYERROR_VERBOSE
110 # define YYERROR_VERBOSE 1
112 # define YYERROR_VERBOSE 1
115 /* Enabling the token table. */
116 #ifndef YYTOKEN_TABLE
117 # define YYTOKEN_TABLE 0
124 /* Put the tokens into the symbol table, so that GDB and other debuggers
222 below_semicolon = 353,
223 below_assignment = 354,
225 minusminus_prefix = 356,
226 plusplus_prefix = 357,
229 above_identifier = 360,
237 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
239 /* Line 223 of skeleton.m4 */
244 /* Line 223 of skeleton.m4 */
247 enum yytokentype token;
249 classinfo_t*classinfo;
250 classinfo_list_t*classinfo_list;
252 slotinfo_list_t*slotinfo_list;
255 unsigned int number_uint;
259 //typedcode_list_t*value_list;
260 codeandnumber_t value_list;
266 for_start_t for_start;
267 abc_exception_t *exception;
270 namespace_decl_t* namespace_decl;
273 abc_exception_list_t *l;
279 /* Line 223 of skeleton.m4 */
280 #line 281 "parser.tab.c"
282 # define YYSTYPE_IS_TRIVIAL 1
283 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
284 # define YYSTYPE_IS_DECLARED 1
288 /* Copy the second part of user declarations. */
290 /* Line 273 of skeleton.m4 */
294 static int a3_error(char*s)
296 syntaxerror("%s", s);
297 return 0; //make gcc happy
300 static void parsererror(const char*file, int line, const char*f)
302 syntaxerror("internal error in %s, %s:%d", f, file, line);
305 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
308 static char* concat2(const char* t1, const char* t2)
312 char*text = malloc(l1+l2+1);
313 memcpy(text , t1, l1);
314 memcpy(text+l1, t2, l2);
318 static char* concat3(const char* t1, const char* t2, const char* t3)
323 char*text = malloc(l1+l2+l3+1);
324 memcpy(text , t1, l1);
325 memcpy(text+l1, t2, l2);
326 memcpy(text+l1+l2, t3, l3);
331 typedef struct _import {
334 DECLARE_LIST(import);
336 DECLARE(methodstate);
337 DECLARE_LIST(methodstate);
339 typedef struct _classstate {
345 methodstate_t*static_init;
347 //code_t*static_init;
349 char has_constructor;
352 struct _methodstate {
362 dict_t*unresolved_variables;
365 char uses_parent_function;
371 int var_index; // for inner methods
372 int slot_index; // for inner methods
373 char is_a_slot; // for inner methods
378 abc_exception_list_t*exceptions;
380 methodstate_list_t*innerfunctions;
383 typedef struct _state {
388 import_list_t*wildcard_imports;
389 dict_t*import_toplevel_packages;
392 namespace_list_t*active_namespace_urls;
394 char has_own_imports;
395 char new_vars; // e.g. transition between two functions
398 methodstate_t*method;
407 typedef struct _global {
411 dict_t*file2token2info;
414 static global_t*global = 0;
415 static state_t* state = 0;
419 #define MULTINAME(m,x) \
423 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
425 #define MEMBER_MULTINAME(m,f,n) \
429 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
430 m##_ns.name = ((slotinfo_t*)(f))->package; \
435 m.namespace_set = 0; \
436 m.name = ((slotinfo_t*)(f))->name; \
438 m.type = MULTINAME; \
440 m.namespace_set = &nopackage_namespace_set; \
444 /* warning: list length of namespace set is undefined */
445 #define MULTINAME_LATE(m, access, package) \
446 namespace_t m##_ns = {access, package}; \
447 namespace_set_t m##_nsset; \
448 namespace_list_t m##_l;m##_l.next = 0; \
449 m##_nsset.namespaces = &m##_l; \
450 m##_nsset = m##_nsset; \
451 m##_l.namespace = &m##_ns; \
452 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
454 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
455 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
456 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
457 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
458 static namespace_list_t nl4 = {&ns4,0};
459 static namespace_list_t nl3 = {&ns3,&nl4};
460 static namespace_list_t nl2 = {&ns2,&nl3};
461 static namespace_list_t nl1 = {&ns1,&nl2};
462 static namespace_set_t nopackage_namespace_set = {&nl1};
464 static dict_t*definitions=0;
465 void as3_set_define(const char*c)
468 definitions = dict_new();
469 if(!dict_contains(definitions,c))
470 dict_put(definitions,c,0);
473 static void new_state()
476 state_t*oldstate = state;
478 memcpy(s, state, sizeof(state_t)); //shallow copy
480 s->imports = dict_new();
482 if(!s->import_toplevel_packages) {
483 s->import_toplevel_packages = dict_new();
487 state->has_own_imports = 0;
488 state->vars = dict_new();
489 state->old = oldstate;
492 trie_remember(active_namespaces);
495 state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
498 static void state_destroy(state_t*state)
500 if(state->has_own_imports) {
501 list_free(state->wildcard_imports);
502 dict_destroy(state->imports);state->imports=0;
504 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
505 dict_destroy(state->imports);state->imports=0;
509 for(t=0;t<state->vars->hashsize;t++) {
510 dictentry_t*e =state->vars->slots[t];
512 free(e->data);e->data=0;
516 dict_destroy(state->vars);state->vars=0;
519 list_free(state->active_namespace_urls)
520 state->active_namespace_urls = 0;
525 static void old_state()
527 trie_rollback(active_namespaces);
529 if(!state || !state->old)
530 syntaxerror("invalid nesting");
531 state_t*leaving = state;
535 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
536 free(leaving->method);
539 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
544 state_destroy(leaving);
547 static code_t* method_header(methodstate_t*m);
548 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
549 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
552 static char* internal_filename_package = 0;
553 void initialize_file(char*filename)
556 syntaxerror("invalid call to initialize_file during parsing of another file");
559 active_namespaces = trie_new();
562 state->package = internal_filename_package = strdup(filename);
564 global->token2info = dict_lookup(global->file2token2info,
565 current_filename // use long version
567 if(!global->token2info) {
568 global->token2info = dict_new2(&ptr_type);
569 dict_put(global->file2token2info, current_filename, global->token2info);
573 state->method = rfx_calloc(sizeof(methodstate_t));
574 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
575 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
577 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
579 syntaxerror("internal error: skewed tokencount");
580 function_initvars(state->method, 0, 0, 1);
581 global->init = abc_initscript(global->file);
587 if(!state || state->level!=1) {
588 syntaxerror("unexpected end of file in pass %d", as3_pass);
592 dict_del(global->file2token2info, current_filename);
594 code_t*header = method_header(state->method);
595 code_t*c = wrap_function(header, 0, global->init->method->body->code);
596 global->init->method->body->code = c;
597 free(state->method);state->method=0;
600 //free(state->package);state->package=0; // used in registry
601 state_destroy(state);state=0;
604 void initialize_parser()
606 global = rfx_calloc(sizeof(global_t));
607 global->file = abc_file_new();
608 global->file->flags &= ~ABCFILE_LAZY;
609 global->file2token2info = dict_new();
610 global->token2info = 0;
613 void* finish_parser()
615 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
616 global->token2info=0;
620 typedef struct _variable {
625 methodstate_t*is_inner_method;
628 static variable_t* find_variable(state_t*s, char*name)
632 v = dict_lookup(s->vars, name);
634 if(s->new_vars) break;
639 static variable_t* find_slot(state_t*s, const char*name)
641 if(s->method && s->method->slots)
642 return dict_lookup(s->method->slots, name);
646 static variable_t* find_variable_safe(state_t*s, char*name)
648 variable_t* v = find_variable(s, name);
650 syntaxerror("undefined variable: %s", name);
654 static char variable_exists(char*name)
656 return dict_contains(state->vars, name);
659 static code_t*defaultvalue(code_t*c, classinfo_t*type)
661 if(TYPE_IS_INT(type)) {
662 c = abc_pushbyte(c, 0);
663 } else if(TYPE_IS_UINT(type)) {
664 c = abc_pushuint(c, 0);
665 } else if(TYPE_IS_FLOAT(type)) {
667 } else if(TYPE_IS_BOOLEAN(type)) {
668 c = abc_pushfalse(c);
670 //c = abc_pushundefined(c);
671 syntaxerror("internal error: can't generate default value for * type");
675 c = abc_coerce2(c, &m);
680 static int alloc_local()
682 return state->method->variable_count++;
685 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
688 variable_t*v = find_slot(state, name);
694 v->index = alloc_local();
699 dict_put(state->vars, name, v);
703 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
705 return new_variable2(name, type, init, maybeslot)->index;
708 #define TEMPVARNAME "__as3_temp__"
711 variable_t*v = find_variable(state, TEMPVARNAME);
714 return new_variable(TEMPVARNAME, 0, 0, 0);
717 static code_t* var_block(code_t*body)
723 for(t=0;t<state->vars->hashsize;t++) {
724 dictentry_t*e = state->vars->slots[t];
726 variable_t*v = (variable_t*)e->data;
727 if(v->type && v->init) {
728 c = defaultvalue(c, v->type);
729 c = abc_setlocal(c, v->index);
730 k = abc_kill(k, v->index);
740 if(x->opcode== OPCODE___BREAK__ ||
741 x->opcode== OPCODE___CONTINUE__) {
742 /* link kill code before break/continue */
743 code_t*e = code_dup(k);
744 code_t*s = code_start(e);
756 c = code_append(c, body);
757 c = code_append(c, k);
761 static void unknown_variable(char*name)
763 if(!state->method->unresolved_variables)
764 state->method->unresolved_variables = dict_new();
765 if(!dict_contains(state->method->unresolved_variables, name))
766 dict_put(state->method->unresolved_variables, name, 0);
769 static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
771 if(m->uses_slots || (m->late_binding && !m->inner)) { //???? especially inner functions need the pushscope
772 c = abc_getlocal_0(c);
773 c = abc_pushscope(c);
776 /* FIXME: this alloc_local() causes variable indexes to be
777 different in pass2 than in pass1 */
778 if(!m->activation_var)
779 m->activation_var = alloc_local();
781 c = abc_newactivation(c);
783 c = abc_pushscope(c);
784 c = abc_setlocal(c, m->activation_var);
786 c = abc_getlocal(c, m->activation_var);
787 c = abc_pushscope(c);
793 static code_t* method_header(methodstate_t*m)
797 c = add_scope_code(c, m, 1);
799 methodstate_list_t*l = m->innerfunctions;
801 parserassert(l->methodstate->abc);
802 if(m->uses_slots && l->methodstate->is_a_slot) {
803 c = abc_getscopeobject(c, 1);
804 c = abc_newfunction(c, l->methodstate->abc);
806 c = abc_setlocal(c, l->methodstate->var_index);
807 c = abc_setslot(c, l->methodstate->slot_index);
809 c = abc_newfunction(c, l->methodstate->abc);
810 c = abc_setlocal(c, l->methodstate->var_index);
812 free(l->methodstate);l->methodstate=0;
816 c = code_append(c, m->header);
819 if(m->is_constructor && !m->has_super) {
820 // call default constructor
821 c = abc_getlocal_0(c);
822 c = abc_constructsuper(c, 0);
826 /* all parameters that are used by inner functions
827 need to be copied from local to slot */
828 parserassert(m->activation_var);
829 DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
830 if(v->is_parameter) {
831 c = abc_getlocal(c, m->activation_var);
832 c = abc_getlocal(c, v->index);
833 c = abc_setslot(c, v->index);
837 list_free(m->innerfunctions);
838 m->innerfunctions = 0;
843 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
845 c = code_append(c, header);
846 c = code_append(c, var_block(body));
847 /* append return if necessary */
848 if(!c || (c->opcode != OPCODE_RETURNVOID &&
849 c->opcode != OPCODE_RETURNVALUE)) {
850 c = abc_returnvoid(c);
855 static void startpackage(char*name)
858 state->package = strdup(name);
860 static void endpackage()
862 //used e.g. in classinfo_register:
863 //free(state->package);state->package=0;
867 #define FLAG_PUBLIC 256
868 #define FLAG_PROTECTED 512
869 #define FLAG_PRIVATE 1024
870 #define FLAG_PACKAGEINTERNAL 2048
871 #define FLAG_NAMESPACE 4096
873 static namespace_t modifiers2access(modifiers_t*mod)
878 if(mod->flags&FLAG_NAMESPACE) {
879 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
880 syntaxerror("invalid combination of access levels and namespaces");
881 ns.access = ACCESS_NAMESPACE;
883 const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
885 /* shouldn't happen- the tokenizer only reports something as a namespace
886 if it was already registered */
887 trie_dump(active_namespaces);
888 syntaxerror("unknown namespace: %s", mod->ns);
891 } else if(mod->flags&FLAG_PUBLIC) {
892 if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
893 syntaxerror("invalid combination of access levels");
894 ns.access = ACCESS_PACKAGE;
895 } else if(mod->flags&FLAG_PRIVATE) {
896 if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
897 syntaxerror("invalid combination of access levels");
898 ns.access = ACCESS_PRIVATE;
899 } else if(mod->flags&FLAG_PROTECTED) {
900 if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
901 syntaxerror("invalid combination of access levels");
902 ns.access = ACCESS_PROTECTED;
904 ns.access = ACCESS_PACKAGEINTERNAL;
908 static slotinfo_t* find_class(const char*name);
910 static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
912 return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
915 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
920 index = new_variable("this", 0, 0, 0);
921 else if(!m->is_global)
922 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
924 index = new_variable("globalscope", 0, 0, 0);
927 parserassert(!index);
931 /* as variables and slots share the same number, make sure
932 that those variable indices are reserved. It's up to the
933 optimizer to later shuffle the variables down to lower
935 m->variable_count = m->uses_slots;
940 for(p=params->list;p;p=p->next) {
941 variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1);
946 methodstate_list_t*l = m->innerfunctions;
948 methodstate_t*m = l->methodstate;
950 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
951 m->var_index = v->index;
952 m->slot_index = v->index;
953 v->is_inner_method = m;
959 m->scope_code = add_scope_code(m->scope_code, m, 0);
962 if(as3_pass==2 && m->slots) {
963 /* exchange unresolved identifiers with the actual objects */
964 DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
965 if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
966 classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
967 if(!type || type->kind != INFOTYPE_CLASS) {
968 syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
977 char*as3_globalclass=0;
978 static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
981 syntaxerror("inner classes now allowed");
986 classinfo_list_t*mlist=0;
988 if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
989 syntaxerror("invalid modifier(s)");
991 if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
992 syntaxerror("public and internal not supported at the same time.");
994 //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
995 if(!(mod->flags&FLAG_INTERFACE) && !extends) {
996 // all classes extend object
997 extends = registry_getobjectclass();
1000 /* create the class name, together with the proper attributes */
1004 if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
1005 access = ACCESS_PRIVATE; package = internal_filename_package;
1006 } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
1007 access = ACCESS_PACKAGEINTERNAL; package = state->package;
1008 } else if(state->package!=internal_filename_package) {
1009 access = ACCESS_PACKAGE; package = state->package;
1011 syntaxerror("public classes only allowed inside a package");
1015 state->cls = rfx_calloc(sizeof(classstate_t));
1016 state->cls->init = rfx_calloc(sizeof(methodstate_t));
1017 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
1018 /* notice: we make no effort to initialize the top variable (local0) here,
1019 even though it has special meaning. We just rely on the facat
1020 that pass 1 won't do anything with variables */
1022 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
1024 /* set current method to constructor- all code within the class-level (except
1025 static variable initializations) will be executed during construction time */
1026 state->method = state->cls->init;
1028 if(registry_find(package, classname)) {
1029 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
1031 /* build info struct */
1032 int num_interfaces = (list_length(implements));
1033 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
1034 state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
1037 classinfo_list_t*l = implements;
1038 for(l=implements;l;l=l->next) {
1039 state->cls->info->interfaces[pos++] = l->classinfo;
1044 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1046 state->method = state->cls->init;
1047 parserassert(state->cls && state->cls->info);
1049 function_initvars(state->cls->init, 0, 0, 1);
1050 function_initvars(state->cls->static_init, 0, 0, 0);
1052 if(extends && (extends->flags & FLAG_FINAL))
1053 syntaxerror("Can't extend final class '%s'", extends->name);
1056 while(state->cls->info->interfaces[pos]) {
1057 if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
1058 syntaxerror("'%s' is not an interface",
1059 state->cls->info->interfaces[pos]->name);
1063 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
1064 state->cls->info->superclass = extends;
1066 /* generate the abc code for this class */
1067 MULTINAME(classname2,state->cls->info);
1068 multiname_t*extends2 = sig2mname(extends);
1070 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
1071 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
1072 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
1073 if(state->cls->info->flags&FLAG_INTERFACE) {
1074 abc_class_interface(state->cls->abc);
1077 abc_class_protectedNS(state->cls->abc, classname);
1079 for(mlist=implements;mlist;mlist=mlist->next) {
1080 MULTINAME(m, mlist->classinfo);
1081 abc_class_add_interface(state->cls->abc, &m);
1084 /* write the construction code for this class to the global init
1086 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
1088 abc_method_body_t*m = global->init->method->body;
1089 __ getglobalscope(m);
1090 classinfo_t*s = extends;
1095 //TODO: take a look at the current scope stack, maybe
1096 // we can re-use something
1101 multiname_t*s2 = sig2mname(s);
1103 multiname_destroy(s2);
1105 __ pushscope(m); count++;
1106 m->code = m->code->prev->prev; // invert
1108 /* continue appending after last op end */
1109 while(m->code && m->code->next) m->code = m->code->next;
1111 /* TODO: if this is one of *our* classes, we can also
1112 do a getglobalscope/getslot <nr> (which references
1113 the init function's slots) */
1115 __ getlex2(m, extends2);
1117 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1118 stack is not the superclass */
1119 __ pushscope(m);count++;
1122 /* notice: we get a verify error #1107 if the top element on the scope
1123 stack is not the global object */
1125 __ pushscope(m);count++;
1127 __ newclass(m,state->cls->abc);
1131 __ setslot(m, slotindex);
1132 multiname_destroy(extends2);
1134 /* flash.display.MovieClip handling */
1136 if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1137 if(state->package && state->package[0]) {
1138 as3_globalclass = concat3(state->package, ".", classname);
1140 as3_globalclass = strdup(classname);
1146 static void endclass()
1149 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1151 c = abc_getlocal_0(c);
1152 c = abc_constructsuper(c, 0);
1153 state->cls->init->header = code_append(state->cls->init->header, c);
1154 state->cls->has_constructor=1;
1156 if(state->cls->init) {
1157 if(state->cls->info->flags&FLAG_INTERFACE) {
1158 if(state->cls->init->header)
1159 syntaxerror("interface can not have class-level code");
1161 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1162 code_t*c = method_header(state->cls->init);
1163 m->body->code = wrap_function(c, 0, m->body->code);
1166 if(state->cls->static_init) {
1167 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1168 code_t*c = method_header(state->cls->static_init);
1169 m->body->code = wrap_function(c, 0, m->body->code);
1176 void check_code_for_break(code_t*c)
1179 if(c->opcode == OPCODE___BREAK__) {
1180 char*name = string_cstr(c->data[0]);
1181 syntaxerror("Unresolved \"break %s\"", name);
1183 if(c->opcode == OPCODE___CONTINUE__) {
1184 char*name = string_cstr(c->data[0]);
1185 syntaxerror("Unresolved \"continue %s\"", name);
1187 if(c->opcode == OPCODE___RETHROW__) {
1188 syntaxerror("Unresolved \"rethrow\"");
1190 if(c->opcode == OPCODE___FALLTHROUGH__) {
1191 syntaxerror("Unresolved \"fallthrough\"");
1193 if(c->opcode == OPCODE___PUSHPACKAGE__) {
1194 char*name = string_cstr(c->data[0]);
1195 syntaxerror("Can't reference a package (%s) as such", name);
1201 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1203 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1204 if(TYPE_IS_NUMBER(t)) {
1205 xassert(c->type == CONSTANT_FLOAT
1206 || c->type == CONSTANT_INT
1207 || c->type == CONSTANT_UINT);
1208 } else if(TYPE_IS_UINT(t)) {
1209 xassert(c->type == CONSTANT_UINT ||
1210 (c->type == CONSTANT_INT && c->i>=0));
1211 } else if(TYPE_IS_INT(t)) {
1212 xassert(c->type == CONSTANT_INT);
1213 } else if(TYPE_IS_BOOLEAN(t)) {
1214 xassert(c->type == CONSTANT_TRUE
1215 || c->type == CONSTANT_FALSE);
1219 static void check_override(memberinfo_t*m, int flags)
1223 if(m->parent == state->cls->info)
1224 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1226 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1227 if(m->access==ACCESS_PRIVATE)
1229 if(m->flags & FLAG_FINAL)
1230 syntaxerror("can't override final member %s", m->name);
1232 /* allow this. it's no issue.
1233 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1234 syntaxerror("can't override static member %s", m->name);*/
1236 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1237 syntaxerror("can't override non-static member %s with static declaration", m->name);
1239 if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
1240 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1241 if(m->kind == INFOTYPE_METHOD)
1242 syntaxerror("can't override without explicit 'override' declaration");
1244 syntaxerror("can't override '%s'", m->name);
1249 static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
1251 methodinfo_t*minfo = 0;
1252 namespace_t ns = modifiers2access(mod);
1255 minfo = methodinfo_register_global(ns.access, state->package, name);
1256 minfo->return_type = 0; // save this for pass 2
1257 } else if(getset != KW_GET && getset != KW_SET) {
1259 memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
1261 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1263 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1264 minfo->return_type = 0; // save this for pass 2
1265 // getslot on a member slot only returns "undefined", so no need
1266 // to actually store these
1267 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1269 //class getter/setter
1270 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1272 if(getset == KW_GET) {
1274 } else if(params->list && params->list->param && !params->list->next) {
1275 type = params->list->param->type;
1277 syntaxerror("setter function needs to take exactly one argument");
1278 // not sure wether to look into superclasses here, too
1279 minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
1281 if(minfo->kind!=INFOTYPE_SLOT)
1282 syntaxerror("class already contains a method called '%s'", name);
1283 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1284 syntaxerror("class already contains a field called '%s'", name);
1285 if(minfo->subtype & gs)
1286 syntaxerror("getter/setter for '%s' already defined", name);
1287 /* make a setter or getter into a getset */
1288 minfo->subtype |= gs;
1291 FIXME: this check needs to be done in pass 2
1293 if((!minfo->return_type != !type) ||
1294 (minfo->return_type && type &&
1295 !strcmp(minfo->return_type->name, type->name))) {
1296 syntaxerror("different type in getter and setter: %s and %s",
1297 minfo->return_type?minfo->return_type->name:"*",
1298 type?type->name:"*");
1301 minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
1302 minfo->kind = INFOTYPE_SLOT; //hack
1303 minfo->subtype = gs;
1304 minfo->return_type = 0;
1306 /* can't assign a slot as getter and setter might have different slots */
1307 //minfo->slot = slot;
1309 if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1310 if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1311 if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1316 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1318 //parserassert(state->method && state->method->info);
1320 methodstate_t*parent_method = state->method;
1323 return_type = 0; // not valid in pass 1
1327 state->new_vars = 1;
1330 state->method = rfx_calloc(sizeof(methodstate_t));
1331 state->method->inner = 1;
1332 state->method->variable_count = 0;
1333 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1335 NEW(methodinfo_t,minfo);
1336 minfo->kind = INFOTYPE_METHOD;
1337 minfo->access = ACCESS_PACKAGEINTERNAL;
1339 state->method->info = minfo;
1342 list_append(parent_method->innerfunctions, state->method);
1344 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1346 function_initvars(state->method, params, 0, 1);
1350 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1351 state->method->variable_count = 0;
1352 parserassert(state->method);
1354 state->method->info->return_type = return_type;
1355 function_initvars(state->method, params, 0, 1);
1359 static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1360 params_t*params, classinfo_t*return_type)
1362 if(state->method && state->method->info) {
1363 syntaxerror("not able to start another method scope");
1366 state->new_vars = 1;
1369 state->method = rfx_calloc(sizeof(methodstate_t));
1370 state->method->has_super = 0;
1373 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1375 state->method->is_global = 1;
1376 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1378 if(state->method->is_constructor)
1379 name = "__as3_constructor__";
1381 state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
1383 function_initvars(state->method, params, mod->flags, 1);
1385 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1389 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1390 state->method->variable_count = 0;
1391 parserassert(state->method);
1394 memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
1395 check_override(m, mod->flags);
1399 state->cls->has_constructor |= state->method->is_constructor;
1402 state->method->info->return_type = return_type;
1403 function_initvars(state->method, params, mod->flags, 1);
1407 static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
1408 params_t*params, classinfo_t*return_type, code_t*body)
1411 // store inner methods in variables
1412 function_initvars(state->method, 0, 0, 0);
1414 methodstate_list_t*ml = state->method->innerfunctions;
1416 dict_t*xvars = dict_new();
1419 methodstate_t*m = ml->methodstate;
1420 parserassert(m->inner);
1421 if(m->unresolved_variables) {
1422 dict_t*d = m->unresolved_variables;
1424 for(t=0;t<d->hashsize;t++) {
1425 dictentry_t*l = d->slots[t];
1427 /* check parent method's variables */
1429 if((v=find_variable(state, l->key))) {
1430 m->uses_parent_function = 1;
1431 state->method->uses_slots = 1;
1432 dict_put(xvars, l->key, 0);
1439 dict_destroy(m->unresolved_variables);
1440 m->unresolved_variables = 0;
1445 if(state->method->uses_slots) {
1446 state->method->slots = dict_new();
1448 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1449 if(!name) syntaxerror("internal error");
1450 if(v->index && dict_contains(xvars, name)) {
1453 if(v->is_inner_method) {
1454 v->is_inner_method->is_a_slot = 1;
1457 dict_put(state->method->slots, name, v);
1460 state->method->uses_slots = i;
1461 dict_destroy(state->vars);state->vars = 0;
1468 /*if(state->method->uses_parent_function){
1469 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1474 multiname_t*type2 = sig2mname(return_type);
1476 if(state->method->inner) {
1477 f = state->method->abc;
1478 abc_method_init(f, global->file, type2, 1);
1479 } else if(state->method->is_constructor) {
1480 f = abc_class_getconstructor(state->cls->abc, type2);
1481 } else if(!state->method->is_global) {
1482 namespace_t mname_ns = modifiers2access(mod);
1483 multiname_t mname = {QNAME, &mname_ns, 0, name};
1485 if(mod->flags&FLAG_STATIC)
1486 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1488 f = abc_class_method(state->cls->abc, type2, &mname);
1489 slot = f->trait->slot_id;
1491 namespace_t mname_ns = {state->method->info->access, state->package};
1492 multiname_t mname = {QNAME, &mname_ns, 0, name};
1494 f = abc_method_new(global->file, type2, 1);
1495 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1496 //abc_code_t*c = global->init->method->body->code;
1498 //flash doesn't seem to allow us to access function slots
1499 //state->method->info->slot = slot;
1501 if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1502 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1503 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1504 if(params->varargs) f->flags |= METHOD_NEED_REST;
1508 for(p=params->list;p;p=p->next) {
1509 if(params->varargs && !p->next) {
1510 break; //varargs: omit last parameter in function signature
1512 multiname_t*m = sig2mname(p->param->type);
1513 list_append(f->parameters, m);
1514 if(p->param->value) {
1515 check_constant_against_type(p->param->type, p->param->value);
1516 opt=1;list_append(f->optional_parameters, p->param->value);
1518 syntaxerror("non-optional parameter not allowed after optional parameters");
1521 if(state->method->slots) {
1522 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1524 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1525 multiname_t*type = sig2mname(v->type);
1526 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1527 t->slot_id = v->index;
1532 check_code_for_break(body);
1534 /* Seems this works now.
1535 if(state->method->exceptions && state->method->uses_slots) {
1536 as3_warning("try/catch and activation not supported yet within the same method");
1540 f->body->code = body;
1541 f->body->exceptions = state->method->exceptions;
1542 } else { //interface
1544 syntaxerror("interface methods can't have a method body");
1554 void breakjumpsto(code_t*c, char*name, code_t*jump)
1557 if(c->opcode == OPCODE___BREAK__) {
1558 string_t*name2 = c->data[0];
1559 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1560 c->opcode = OPCODE_JUMP;
1567 void continuejumpsto(code_t*c, char*name, code_t*jump)
1570 if(c->opcode == OPCODE___CONTINUE__) {
1571 string_t*name2 = c->data[0];
1572 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1573 c->opcode = OPCODE_JUMP;
1581 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1583 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1588 return abc_coerce_a(c);
1592 // cast an "any" type to a specific type. subject to
1593 // runtime exceptions
1594 return abc_coerce2(c, &m);
1597 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1598 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1599 // allow conversion between number types
1600 if(TYPE_IS_UINT(to))
1601 return abc_convert_u(c);
1602 else if(TYPE_IS_INT(to))
1603 return abc_convert_i(c);
1604 else if(TYPE_IS_NUMBER(to))
1605 return abc_convert_d(c);
1606 return abc_coerce2(c, &m);
1609 if(TYPE_IS_BOOLEAN(to))
1610 return abc_convert_b(c);
1611 if(TYPE_IS_STRING(to))
1612 return abc_convert_s(c);
1613 if(TYPE_IS_OBJECT(to))
1614 return abc_convert_o(c);
1616 classinfo_t*supertype = from;
1618 if(supertype == to) {
1619 // target type is one of from's superclasses
1620 return abc_coerce2(c, &m);
1623 while(supertype->interfaces[t]) {
1624 if(supertype->interfaces[t]==to) {
1625 // target type is one of from's interfaces
1626 return abc_coerce2(c, &m);
1630 supertype = supertype->superclass;
1632 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1634 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1636 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1639 as3_error("can't convert type %s%s%s to %s%s%s",
1640 from->package, from->package[0]?".":"", from->name,
1641 to->package, to->package[0]?".":"", to->name);
1645 /* move to ast.c todo end */
1647 char is_pushundefined(code_t*c)
1649 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1652 static const char* get_package_from_name(const char*name)
1654 /* try explicit imports */
1655 dictentry_t* e = dict_get_slot(state->imports, name);
1657 if(!strcmp(e->key, name)) {
1658 slotinfo_t*c = (slotinfo_t*)e->data;
1659 if(c) return c->package;
1665 static namespace_list_t*get_current_imports()
1667 namespace_list_t*searchlist = 0;
1669 list_append(searchlist, namespace_new_package(state->package));
1671 import_list_t*l = state->wildcard_imports;
1673 namespace_t*ns = namespace_new_package(l->import->package);
1674 list_append(searchlist, ns);
1677 list_append(searchlist, namespace_new_package(""));
1678 list_append(searchlist, namespace_new_package(internal_filename_package));
1682 static slotinfo_t* find_class(const char*name)
1686 c = registry_find(state->package, name);
1689 /* try explicit imports */
1690 dictentry_t* e = dict_get_slot(state->imports, name);
1693 if(!strcmp(e->key, name)) {
1694 c = (slotinfo_t*)e->data;
1700 /* try package.* imports */
1701 import_list_t*l = state->wildcard_imports;
1703 //printf("does package %s contain a class %s?\n", l->import->package, name);
1704 c = registry_find(l->import->package, name);
1709 /* try global package */
1710 c = registry_find("", name);
1713 /* try local "filename" package */
1714 c = registry_find(internal_filename_package, name);
1719 typedcode_t push_class(slotinfo_t*a)
1724 if(a->access == ACCESS_PACKAGEINTERNAL &&
1725 strcmp(a->package, state->package) &&
1726 strcmp(a->package, internal_filename_package)
1728 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
1729 infotypename(a), a->name, a->package, state->package);
1732 if(a->kind != INFOTYPE_CLASS) {
1734 x.c = abc_findpropstrict2(x.c, &m);
1735 x.c = abc_getproperty2(x.c, &m);
1736 if(a->kind == INFOTYPE_METHOD) {
1737 methodinfo_t*f = (methodinfo_t*)a;
1738 x.t = TYPE_FUNCTION(f);
1740 varinfo_t*v = (varinfo_t*)a;
1744 classinfo_t*c = (classinfo_t*)a;
1746 x.c = abc_getglobalscope(x.c);
1747 x.c = abc_getslot(x.c, c->slot);
1750 x.c = abc_getlex2(x.c, &m);
1752 x.t = TYPE_CLASS(c);
1758 char is_break_or_jump(code_t*c)
1762 if(c->opcode == OPCODE_JUMP ||
1763 c->opcode == OPCODE___BREAK__ ||
1764 c->opcode == OPCODE___CONTINUE__ ||
1765 c->opcode == OPCODE_THROW ||
1766 c->opcode == OPCODE_RETURNVOID ||
1767 c->opcode == OPCODE_RETURNVALUE) {
1773 #define IS_FINALLY_TARGET(op) \
1774 ((op) == OPCODE___CONTINUE__ || \
1775 (op) == OPCODE___BREAK__ || \
1776 (op) == OPCODE_RETURNVOID || \
1777 (op) == OPCODE_RETURNVALUE || \
1778 (op) == OPCODE___RETHROW__)
1780 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1782 #define NEED_EXTRA_STACK_ARG
1783 code_t*finally_label = abc_nop(0);
1784 NEW(lookupswitch_t, l);
1790 code_t*prev = i->prev;
1791 if(IS_FINALLY_TARGET(i->opcode)) {
1794 if(i->opcode == OPCODE___RETHROW__ ||
1795 i->opcode == OPCODE_RETURNVALUE) {
1796 if(i->opcode == OPCODE___RETHROW__)
1797 i->opcode = OPCODE_THROW;
1799 p = abc_coerce_a(p);
1800 p = abc_setlocal(p, tempvar);
1802 p = abc_pushbyte(p, count++);
1803 p = abc_jump(p, finally_label);
1804 code_t*target = p = abc_label(p);
1805 #ifdef NEED_EXTRA_STACK_ARG
1809 p = abc_getlocal(p, tempvar);
1812 p->next = i;i->prev = p;
1813 list_append(l->targets, target);
1819 c = abc_pushbyte(c, -1);
1820 c = code_append(c, finally_label);
1821 c = code_append(c, finally);
1823 #ifdef NEED_EXTRA_STACK_ARG
1826 c = abc_lookupswitch(c, l);
1827 c = l->def = abc_label(c);
1828 #ifdef NEED_EXTRA_STACK_ARG
1835 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1839 code_t*prev = i->prev;
1840 if(IS_FINALLY_TARGET(i->opcode)) {
1841 if(i->opcode == OPCODE___RETHROW__)
1842 i->opcode = OPCODE_THROW;
1843 code_t*end = code_dup(finally);
1844 code_t*start = code_start(end);
1845 if(prev) prev->next = start;
1852 return code_append(c, finally);
1855 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1861 int num_insertion_points=0;
1863 if(IS_FINALLY_TARGET(i->opcode))
1864 num_insertion_points++;
1871 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1876 int simple_version_cost = (1+num_insertion_points)*code_size;
1877 int lookup_version_cost = 4*num_insertion_points + 5;
1879 if(cantdup || simple_version_cost > lookup_version_cost) {
1880 //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
1881 return insert_finally_lookup(c, finally, tempvar);
1883 //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
1884 return insert_finally_simple(c, finally, tempvar);
1888 #define PASS1 }} if(as3_pass == 1) {{
1889 #define PASS1END }} if(as3_pass == 2) {{
1890 #define PASS2 }} if(as3_pass == 2) {{
1891 #define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
1892 #define PASS12END }} if(as3_pass == 2) {{
1893 #define PASS_ALWAYS }} {{
1897 /* Line 273 of skeleton.m4 */
1898 #line 1899 "parser.tab.c"
1899 /* Unqualified %code blocks. */
1901 /* Line 274 of skeleton.m4 */
1902 #line 1963 "parser.y"
1904 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1910 /* Line 274 of skeleton.m4 */
1911 #line 2415 "parser.y"
1913 static void state_has_imports()
1915 state->wildcard_imports = list_clone(state->wildcard_imports);
1916 state->imports = dict_clone(state->imports);
1917 state->has_own_imports = 1;
1919 static void import_toplevel(const char*package)
1921 char* s = strdup(package);
1923 dict_put(state->import_toplevel_packages, s, 0);
1924 char*x = strrchr(s, '.');
1933 /* Line 274 of skeleton.m4 */
1934 #line 2548 "parser.y"
1936 static int slotstate_varconst = 0;
1937 static modifiers_t*slotstate_flags = 0;
1938 static void setslotstate(modifiers_t* flags, int varconst)
1940 slotstate_varconst = varconst;
1941 slotstate_flags = flags;
1943 if(flags && flags->flags&FLAG_STATIC) {
1944 state->method = state->cls->static_init;
1946 state->method = state->cls->init;
1949 parserassert(state->method);
1954 /* Line 274 of skeleton.m4 */
1955 #line 3387 "parser.y"
1957 void add_active_url(const char*url)
1961 list_append(state->active_namespace_urls, n);
1966 /* Line 274 of skeleton.m4 */
1967 #line 1968 "parser.tab.c"
1974 typedef YYTYPE_UINT8 yytype_uint8;
1976 typedef unsigned char yytype_uint8;
1980 typedef YYTYPE_INT8 yytype_int8;
1981 #elif (defined __STDC__ || defined __C99__FUNC__ \
1982 || defined __cplusplus || defined _MSC_VER)
1983 typedef signed char yytype_int8;
1985 typedef short int yytype_int8;
1988 #ifdef YYTYPE_UINT16
1989 typedef YYTYPE_UINT16 yytype_uint16;
1991 typedef unsigned short int yytype_uint16;
1995 typedef YYTYPE_INT16 yytype_int16;
1997 typedef short int yytype_int16;
2001 # ifdef __SIZE_TYPE__
2002 # define YYSIZE_T __SIZE_TYPE__
2003 # elif defined size_t
2004 # define YYSIZE_T size_t
2005 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
2006 || defined __cplusplus || defined _MSC_VER)
2007 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2008 # define YYSIZE_T size_t
2010 # define YYSIZE_T unsigned int
2014 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2019 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2020 # define YY_(msgid) dgettext ("bison-runtime", msgid)
2024 # define YY_(msgid) msgid
2028 /* Suppress unused-variable warnings by "using" E. */
2029 #if ! defined lint || defined __GNUC__
2030 # define YYUSE(e) ((void) (e))
2032 # define YYUSE(e) /* empty */
2035 /* Identity function, used to suppress warnings about constant conditions. */
2037 # define YYID(n) (n)
2039 #if (defined __STDC__ || defined __C99__FUNC__ \
2040 || defined __cplusplus || defined _MSC_VER)
2053 #if ! defined yyoverflow || YYERROR_VERBOSE
2055 /* The parser invokes alloca or malloc; define the necessary symbols. */
2057 # ifdef YYSTACK_USE_ALLOCA
2058 # if YYSTACK_USE_ALLOCA
2060 # define YYSTACK_ALLOC __builtin_alloca
2061 # elif defined __BUILTIN_VA_ARG_INCR
2062 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2064 # define YYSTACK_ALLOC __alloca
2065 # elif defined _MSC_VER
2066 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2067 # define alloca _alloca
2069 # define YYSTACK_ALLOC alloca
2070 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2071 || defined __cplusplus || defined _MSC_VER)
2072 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2074 # define _STDLIB_H 1
2081 # ifdef YYSTACK_ALLOC
2082 /* Pacify GCC's `empty if-body' warning. */
2083 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2084 # ifndef YYSTACK_ALLOC_MAXIMUM
2085 /* The OS might guarantee only one guard page at the bottom of the stack,
2086 and a page size can be as small as 4096 bytes. So we cannot safely
2087 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2088 to allow for a few compiler-allocated temporary stack slots. */
2089 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2092 # define YYSTACK_ALLOC YYMALLOC
2093 # define YYSTACK_FREE YYFREE
2094 # ifndef YYSTACK_ALLOC_MAXIMUM
2095 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2097 # if (defined __cplusplus && ! defined _STDLIB_H \
2098 && ! ((defined YYMALLOC || defined malloc) \
2099 && (defined YYFREE || defined free)))
2100 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2102 # define _STDLIB_H 1
2106 # define YYMALLOC malloc
2107 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2108 || defined __cplusplus || defined _MSC_VER)
2109 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2113 # define YYFREE free
2114 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2115 || defined __cplusplus || defined _MSC_VER)
2116 void free (void *); /* INFRINGES ON USER NAME SPACE */
2120 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2123 #if (! defined yyoverflow \
2124 && (! defined __cplusplus \
2125 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2127 /* A type that is properly aligned for any stack member. */
2130 yytype_int16 yyss_alloc;
2134 /* The size of the maximum gap between one aligned stack and the next. */
2135 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2137 /* The size of an array large to enough to hold all stacks, each with
2139 # define YYSTACK_BYTES(N) \
2140 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2141 + YYSTACK_GAP_MAXIMUM)
2143 /* Copy COUNT objects from FROM to TO. The source and destination do
2146 # if defined __GNUC__ && 1 < __GNUC__
2147 # define YYCOPY(To, From, Count) \
2148 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2150 # define YYCOPY(To, From, Count) \
2154 for (yyi = 0; yyi < (Count); yyi++) \
2155 (To)[yyi] = (From)[yyi]; \
2161 /* Relocate STACK from its old location to the new one. The
2162 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2163 elements in the stack, and YYPTR gives the new location of the
2164 stack. Advance YYPTR to a properly aligned location for the next
2166 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2169 YYSIZE_T yynewbytes; \
2170 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2171 Stack = &yyptr->Stack_alloc; \
2172 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2173 yyptr += yynewbytes / sizeof (*yyptr); \
2179 /* YYFINAL -- State number of the termination state. */
2181 /* YYLAST -- Last index in YYTABLE. */
2184 /* YYNTOKENS -- Number of terminals. */
2185 #define YYNTOKENS 133
2186 /* YYNNTS -- Number of nonterminals. */
2188 /* YYNRULES -- Number of rules. */
2189 #define YYNRULES 302
2190 /* YYNRULES -- Number of states. */
2191 #define YYNSTATES 516
2193 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2194 #define YYUNDEFTOK 2
2195 #define YYMAXUTOK 362
2197 #define YYTRANSLATE(YYX) \
2198 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2200 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2201 static const yytype_uint8 yytranslate[] =
2203 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2205 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2206 2, 2, 2, 117, 2, 2, 2, 115, 107, 2,
2207 121, 132, 114, 112, 100, 111, 126, 113, 2, 2,
2208 2, 2, 2, 2, 2, 2, 2, 2, 104, 99,
2209 108, 102, 109, 103, 127, 2, 2, 2, 2, 2,
2210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2212 2, 123, 2, 124, 106, 2, 2, 2, 2, 2,
2213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2215 2, 2, 2, 125, 105, 131, 116, 2, 2, 2,
2216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2228 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2229 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2230 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2231 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2232 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2233 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2234 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2235 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2236 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2237 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2238 95, 96, 97, 98, 101, 110, 118, 119, 120, 122,
2243 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2245 static const yytype_uint16 yyprhs[] =
2247 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2248 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2249 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2250 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2251 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
2252 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
2253 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2254 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2255 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2256 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2257 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
2258 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
2259 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
2260 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
2261 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
2262 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
2263 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
2264 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
2265 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
2266 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
2267 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
2268 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
2269 608, 611, 613, 615, 619, 621, 625, 626, 628, 632,
2270 638, 640, 642, 644, 646, 648, 650, 652, 654, 658,
2271 662, 666, 670, 674, 678, 682, 686, 690, 694, 698,
2272 702, 705, 708, 712, 716, 720, 724, 728, 732, 736,
2273 740, 744, 748, 752, 756, 760, 764, 768, 773, 776,
2274 778, 782, 785, 790, 794, 798, 802, 806, 810, 814,
2275 818, 822, 826, 830, 834, 838, 844, 847, 850, 853,
2276 856, 860, 863, 868, 874, 878, 884, 888, 890, 893,
2280 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2281 static const yytype_int16 yyrhs[] =
2283 134, 0, -1, 135, -1, -1, 136, -1, 137, -1,
2284 136, 137, -1, 185, -1, 197, -1, 195, -1, 216,
2285 -1, 206, -1, 146, -1, 147, 125, 135, 131, -1,
2286 99, -1, -1, 139, -1, 140, -1, 139, 140, -1,
2287 197, -1, 195, -1, 216, -1, 206, -1, 146, -1,
2288 147, 125, 138, 131, -1, 99, -1, 142, -1, -1,
2289 142, 144, -1, 144, -1, 188, -1, 158, -1, 159,
2290 -1, 160, -1, 162, -1, 170, -1, 153, -1, 182,
2291 -1, 178, -1, 238, -1, 246, -1, 245, -1, 125,
2292 142, 131, -1, 125, 131, -1, 99, -1, 143, -1,
2293 149, -1, 164, -1, 165, -1, 235, -1, 180, -1,
2294 147, 125, 142, 131, -1, 144, 99, -1, 144, -1,
2295 143, -1, 3, 89, 3, -1, 102, 236, -1, -1,
2296 45, 150, -1, 31, 150, -1, 151, -1, 150, 100,
2297 151, -1, 3, 226, 148, -1, -1, 64, 145, -1,
2298 -1, 63, 121, 154, 237, 132, 145, 152, -1, -1,
2299 149, -1, 238, -1, 45, 3, 226, -1, 3, -1,
2300 11, 121, -1, 11, 49, 121, -1, 157, 155, 99,
2301 237, 99, 238, 132, 145, -1, 157, 156, 67, 237,
2302 132, 145, -1, -1, 12, 121, 161, 237, 132, 145,
2303 -1, -1, 13, 163, 145, 12, 121, 237, 132, -1,
2304 65, -1, 65, 3, -1, 29, -1, 29, 3, -1,
2305 -1, 167, -1, 169, -1, 167, 169, -1, 168, -1,
2306 167, 168, -1, 33, 241, 104, 141, -1, 61, 104,
2307 141, -1, -1, 14, 121, 171, 241, 132, 125, 166,
2308 131, -1, -1, 32, 121, 3, 226, 132, 173, 125,
2309 141, 131, -1, -1, 26, 125, 175, 141, 131, -1,
2310 172, -1, 176, 172, -1, 176, -1, 176, 174, -1,
2311 174, -1, -1, 51, 125, 179, 141, 131, 177, -1,
2312 36, 237, -1, 36, -1, 38, 121, 237, 132, -1,
2313 181, 145, -1, 3, -1, 17, -1, 4, -1, 184,
2314 126, 183, -1, 183, -1, -1, 17, 184, 125, 186,
2315 138, 131, -1, -1, 17, 125, 187, 138, 131, -1,
2316 40, 222, -1, 40, 184, 126, 114, -1, -1, 190,
2317 -1, 191, -1, 190, 191, -1, 19, -1, 20, -1,
2318 18, -1, 37, -1, 46, -1, 48, -1, 47, -1,
2319 24, -1, 22, -1, 4, -1, -1, 53, 223, -1,
2320 -1, 53, 224, -1, -1, 15, 224, -1, -1, 189,
2321 30, 3, 192, 194, 125, 196, 199, 131, -1, -1,
2322 189, 43, 3, 193, 125, 198, 202, 131, -1, -1,
2323 200, -1, 201, -1, 200, 201, -1, 99, -1, 147,
2324 125, 199, 131, -1, 206, -1, 216, -1, 143, -1,
2325 -1, 203, -1, 204, -1, 203, 204, -1, 99, -1,
2326 45, 3, -1, 189, 25, 215, 3, 121, 212, 132,
2327 226, -1, 45, -1, 31, -1, -1, 189, 205, 207,
2328 208, -1, 209, -1, 208, 100, 209, -1, 3, 226,
2329 148, -1, -1, 102, 211, -1, 8, -1, 9, -1,
2330 10, -1, 5, -1, 55, -1, 54, -1, 44, -1,
2331 27, -1, 28, -1, -1, 213, -1, 93, 214, -1,
2332 213, 100, 93, 214, -1, 213, 100, 214, -1, 214,
2333 -1, 3, 104, 225, 210, -1, 3, 210, -1, 50,
2334 -1, 34, -1, -1, -1, 189, 25, 215, 3, 121,
2335 212, 132, 226, 125, 217, 141, 131, -1, 3, -1,
2336 -1, -1, 25, 218, 121, 212, 132, 226, 125, 220,
2337 141, 131, -1, 183, -1, 184, 126, 183, -1, 222,
2338 -1, 221, -1, 223, -1, 224, 100, 223, -1, 223,
2339 -1, 114, -1, 35, -1, 104, 225, -1, -1, -1,
2340 121, 228, 132, -1, -1, 229, -1, 230, -1, 236,
2341 -1, 229, 100, -1, 230, 236, -1, -1, 23, 241,
2342 231, 227, -1, 241, 121, 228, 132, -1, 52, 121,
2343 228, 132, -1, 62, 241, -1, 41, -1, 41, 237,
2344 -1, 241, -1, 241, -1, 237, 100, 241, -1, 241,
2345 -1, 238, 100, 241, -1, -1, 240, -1, 236, 104,
2346 236, -1, 240, 100, 236, 104, 236, -1, 219, -1,
2347 243, -1, 242, -1, 232, -1, 234, -1, 233, -1,
2348 211, -1, 6, -1, 123, 228, 124, -1, 69, 239,
2349 131, -1, 241, 108, 241, -1, 241, 109, 241, -1,
2350 241, 74, 241, -1, 241, 75, 241, -1, 241, 70,
2351 241, -1, 241, 71, 241, -1, 241, 73, 241, -1,
2352 241, 72, 241, -1, 241, 87, 241, -1, 241, 88,
2353 241, -1, 117, 241, -1, 116, 241, -1, 241, 107,
2354 241, -1, 241, 106, 241, -1, 241, 105, 241, -1,
2355 241, 96, 241, -1, 241, 95, 241, -1, 241, 94,
2356 241, -1, 241, 113, 241, -1, 241, 115, 241, -1,
2357 241, 112, 241, -1, 241, 111, 241, -1, 241, 114,
2358 241, -1, 241, 67, 241, -1, 241, 68, 241, -1,
2359 241, 39, 241, -1, 241, 66, 241, -1, 42, 121,
2360 241, 132, -1, 35, 241, -1, 35, -1, 121, 237,
2361 132, -1, 111, 241, -1, 241, 123, 241, 124, -1,
2362 241, 79, 241, -1, 241, 78, 241, -1, 241, 85,
2363 241, -1, 241, 84, 241, -1, 241, 86, 241, -1,
2364 241, 77, 241, -1, 241, 76, 241, -1, 241, 83,
2365 241, -1, 241, 80, 241, -1, 241, 81, 241, -1,
2366 241, 82, 241, -1, 241, 102, 241, -1, 241, 103,
2367 241, 104, 241, -1, 241, 91, -1, 241, 90, -1,
2368 91, 241, -1, 90, 241, -1, 52, 126, 3, -1,
2369 127, 3, -1, 241, 126, 127, 3, -1, 241, 126,
2370 3, 89, 3, -1, 241, 92, 3, -1, 241, 126,
2371 121, 241, 132, -1, 241, 126, 3, -1, 3, -1,
2372 16, 3, -1, 16, 3, 102, 3, -1, 16, 3,
2373 102, 5, -1, 189, 244, -1, 21, 16, 223, -1
2376 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2377 static const yytype_uint16 yyrline[] =
2379 0, 1878, 1878, 1880, 1880, 1881, 1882, 1884, 1885, 1886,
2380 1887, 1888, 1889, 1890, 1891, 1893, 1893, 1894, 1895, 1897,
2381 1898, 1899, 1900, 1901, 1902, 1903, 1905, 1906, 1908, 1909,
2382 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921,
2383 1922, 1923, 1924, 1925, 1928, 1929, 1930, 1931, 1932, 1933,
2384 1934, 1935, 1939, 1940, 1944, 1951, 1970, 1971, 1975, 1976,
2385 1978, 1979, 1981, 2042, 2043, 2046, 2046, 2065, 2066, 2067,
2386 2072, 2076, 2081, 2082, 2084, 2104, 2152, 2152, 2171, 2171,
2387 2186, 2189, 2192, 2195, 2199, 2200, 2201, 2202, 2203, 2204,
2388 2206, 2217, 2220, 2220, 2251, 2251, 2276, 2276, 2292, 2293,
2389 2294, 2295, 2303, 2312, 2312, 2361, 2365, 2376, 2386, 2403,
2390 2404, 2405, 2407, 2408, 2410, 2410, 2412, 2412, 2435, 2449,
2391 2465, 2466, 2467, 2468, 2475, 2476, 2477, 2478, 2479, 2480,
2392 2481, 2482, 2483, 2484, 2488, 2489, 2491, 2492, 2494, 2495,
2393 2499, 2497, 2505, 2503, 2512, 2513, 2514, 2515, 2516, 2517,
2394 2518, 2519, 2521, 2527, 2528, 2529, 2530, 2531, 2532, 2535,
2395 2567, 2567, 2569, 2569, 2571, 2572, 2574, 2659, 2660, 2663,
2396 2664, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2688, 2692,
2397 2698, 2704, 2712, 2717, 2723, 2731, 2739, 2740, 2741, 2744,
2398 2743, 2760, 2761, 2763, 2762, 2786, 2805, 2819, 2820, 2822,
2399 2823, 2825, 2826, 2827, 2836, 2837, 2841, 2842, 2844, 2845,
2400 2846, 2848, 2852, 2853, 2858, 2859, 2896, 2943, 2964, 2986,
2401 2989, 2996, 2997, 2998, 3005, 3006, 3011, 3012, 3014, 3020,
2402 3029, 3030, 3031, 3032, 3033, 3034, 3036, 3041, 3061, 3071,
2403 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089,
2404 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099,
2405 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109,
2406 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119,
2407 3120, 3121, 3122, 3123, 3124, 3125, 3127, 3128, 3129, 3130,
2408 3132, 3147, 3153, 3159, 3165, 3171, 3184, 3242, 3351, 3358,
2413 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2414 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2415 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2416 static const char *const yytname[] =
2418 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2419 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2420 "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2421 "\"namespace\"", "\"package\"", "\"protected\"", "\"public\"",
2422 "\"private\"", "\"use\"", "\"internal\"", "\"new\"", "\"native\"",
2423 "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2424 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2425 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2426 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2427 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2428 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2429 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2430 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2431 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2432 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2433 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"", "\"+=\"",
2434 "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"",
2435 "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"",
2436 "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2437 "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'",
2438 "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'",
2439 "minusminus_prefix", "plusplus_prefix", "below_curly", "'('", "new2",
2440 "'['", "']'", "'{'", "'.'", "'@'", "above_identifier", "below_else",
2441 "above_function", "'}'", "')'", "$accept", "PROGRAM",
2442 "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2443 "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2444 "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2445 "PACKAGE_INITCODE", "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION",
2446 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2447 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2448 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2449 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2450 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2451 "TRY", "$@7", "THROW", "WITH_HEAD", "WITH", "X_IDENTIFIER", "PACKAGE",
2452 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2453 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2454 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2455 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2456 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2457 "SLOT_DECLARATION", "$@12", "SLOT_LIST", "ONE_SLOT", "MAYBECONSTANT",
2458 "CONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2459 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2460 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2461 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2462 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2463 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2464 "VOIDEXPRESSION", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "E", "MEMBER",
2465 "VAR_READ", "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2470 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2472 static const yytype_uint16 yytoknum[] =
2474 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2475 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2476 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2477 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2478 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2479 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2480 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2481 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2482 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2483 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2484 44, 354, 61, 63, 58, 124, 94, 38, 60, 62,
2485 355, 45, 43, 47, 42, 37, 126, 33, 356, 357,
2486 358, 40, 359, 91, 93, 123, 46, 64, 360, 361,
2491 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2492 static const yytype_uint8 yyr1[] =
2494 0, 133, 134, 135, 135, 136, 136, 137, 137, 137,
2495 137, 137, 137, 137, 137, 138, 138, 139, 139, 140,
2496 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
2497 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
2498 143, 143, 143, 143, 144, 144, 144, 144, 144, 144,
2499 144, 144, 145, 145, 146, 147, 148, 148, 149, 149,
2500 150, 150, 151, 152, 152, 154, 153, 155, 155, 155,
2501 156, 156, 157, 157, 158, 159, 161, 160, 163, 162,
2502 164, 164, 165, 165, 166, 166, 166, 166, 167, 167,
2503 168, 169, 171, 170, 173, 172, 175, 174, 176, 176,
2504 177, 177, 177, 179, 178, 180, 180, 181, 182, 183,
2505 183, 183, 184, 184, 186, 185, 187, 185, 188, 188,
2506 189, 189, 190, 190, 191, 191, 191, 191, 191, 191,
2507 191, 191, 191, 191, 192, 192, 193, 193, 194, 194,
2508 196, 195, 198, 197, 199, 199, 200, 200, 201, 201,
2509 201, 201, 201, 202, 202, 203, 203, 204, 204, 204,
2510 205, 205, 207, 206, 208, 208, 209, 210, 210, 211,
2511 211, 211, 211, 211, 211, 211, 211, 211, 212, 212,
2512 212, 212, 213, 213, 214, 214, 215, 215, 215, 217,
2513 216, 218, 218, 220, 219, 221, 222, 223, 223, 224,
2514 224, 225, 225, 225, 226, 226, 227, 227, 228, 228,
2515 228, 229, 230, 229, 231, 232, 233, 233, 234, 235,
2516 235, 236, 237, 237, 238, 238, 239, 239, 240, 240,
2517 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2518 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2519 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2520 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2521 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2522 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
2523 241, 241, 241, 241, 241, 241, 242, 243, 244, 244,
2527 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2528 static const yytype_uint8 yyr2[] =
2530 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2531 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2532 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2533 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2534 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2535 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2536 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2537 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2538 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2539 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2540 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2541 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2542 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2543 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2544 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2545 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2546 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2547 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2548 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2549 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2550 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2551 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2552 2, 1, 1, 3, 1, 3, 0, 1, 3, 5,
2553 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
2554 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2555 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
2556 3, 3, 3, 3, 3, 3, 3, 4, 2, 1,
2557 3, 2, 4, 3, 3, 3, 3, 3, 3, 3,
2558 3, 3, 3, 3, 3, 5, 2, 2, 2, 2,
2559 3, 2, 4, 5, 3, 5, 3, 1, 2, 4,
2563 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2564 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2565 means the default is an error. */
2566 static const yytype_uint16 yydefact[] =
2568 120, 297, 133, 172, 237, 169, 170, 171, 0, 0,
2569 78, 0, 0, 126, 124, 125, 0, 132, 0, 131,
2570 192, 176, 177, 269, 127, 0, 0, 0, 175, 128,
2571 130, 129, 0, 0, 174, 173, 0, 0, 226, 0,
2572 0, 14, 0, 0, 0, 0, 208, 120, 0, 0,
2573 2, 120, 5, 54, 12, 0, 36, 67, 31, 32,
2574 33, 34, 35, 38, 120, 37, 7, 30, 0, 121,
2575 122, 9, 8, 11, 236, 10, 230, 233, 235, 234,
2576 39, 224, 232, 231, 41, 40, 0, 0, 72, 76,
2577 120, 92, 109, 111, 110, 116, 113, 0, 0, 297,
2578 214, 191, 0, 268, 0, 0, 118, 0, 103, 208,
2579 0, 218, 65, 0, 0, 227, 221, 289, 288, 271,
2580 251, 250, 0, 222, 0, 209, 210, 211, 82, 0,
2581 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
2582 46, 47, 48, 50, 0, 49, 291, 1, 6, 120,
2583 297, 0, 68, 0, 0, 69, 53, 108, 0, 188,
2584 0, 161, 0, 160, 162, 301, 123, 0, 0, 0,
2585 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2587 0, 287, 286, 0, 0, 0, 0, 0, 0, 0,
2588 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
2589 0, 0, 55, 73, 0, 0, 0, 120, 114, 0,
2590 195, 0, 198, 197, 302, 206, 178, 0, 0, 0,
2591 27, 0, 290, 0, 0, 239, 0, 0, 270, 238,
2592 212, 213, 83, 205, 59, 60, 105, 220, 58, 81,
2593 42, 28, 120, 0, 205, 0, 0, 52, 298, 187,
2594 186, 0, 134, 136, 0, 225, 265, 266, 263, 264,
2595 244, 245, 247, 246, 242, 243, 279, 278, 274, 273,
2596 281, 282, 283, 280, 276, 275, 277, 248, 249, 294,
2597 257, 256, 255, 284, 0, 254, 253, 252, 240, 241,
2598 261, 260, 258, 262, 259, 0, 0, 296, 0, 0,
2599 0, 0, 0, 25, 0, 120, 17, 23, 0, 20,
2600 19, 22, 21, 120, 112, 0, 208, 215, 167, 0,
2601 0, 179, 183, 107, 119, 196, 267, 0, 26, 217,
2602 0, 228, 0, 223, 0, 57, 0, 120, 13, 57,
2603 0, 0, 0, 0, 0, 138, 0, 0, 205, 163,
2604 164, 0, 216, 272, 0, 0, 292, 120, 0, 0,
2605 117, 18, 120, 0, 0, 0, 0, 185, 180, 205,
2606 0, 0, 120, 0, 203, 202, 201, 204, 0, 62,
2607 61, 51, 0, 120, 299, 300, 178, 135, 0, 0,
2608 199, 137, 142, 57, 0, 285, 293, 295, 77, 0,
2609 84, 0, 115, 207, 168, 167, 0, 0, 182, 0,
2610 0, 98, 102, 100, 104, 63, 229, 56, 0, 75,
2611 0, 139, 140, 0, 120, 166, 165, 79, 0, 0,
2612 0, 85, 88, 86, 24, 184, 193, 181, 96, 0,
2613 99, 101, 120, 66, 120, 205, 120, 200, 0, 157,
2614 0, 0, 120, 155, 0, 27, 93, 89, 87, 27,
2615 27, 205, 64, 74, 0, 148, 152, 0, 0, 0,
2616 120, 146, 150, 151, 158, 188, 143, 156, 27, 91,
2617 0, 0, 0, 189, 120, 141, 147, 0, 90, 194,
2618 97, 94, 27, 0, 0, 0, 0, 149, 178, 27,
2619 190, 0, 0, 205, 95, 159
2622 /* YYDEFGOTO[NTERM-NUM]. */
2623 static const yytype_int16 yydefgoto[] =
2625 -1, 49, 50, 51, 52, 314, 315, 316, 337, 338,
2626 137, 138, 157, 317, 139, 389, 140, 248, 245, 453,
2627 56, 233, 153, 154, 57, 58, 59, 60, 214, 61,
2628 90, 141, 142, 440, 441, 442, 443, 62, 216, 421,
2629 505, 422, 470, 423, 424, 63, 230, 143, 64, 65,
2630 220, 221, 66, 323, 217, 67, 144, 69, 70, 355,
2631 357, 399, 319, 456, 320, 434, 479, 480, 481, 461,
2632 462, 463, 164, 321, 264, 359, 360, 377, 74, 330,
2633 331, 332, 261, 322, 502, 102, 76, 469, 222, 223,
2634 386, 401, 387, 345, 327, 124, 125, 126, 225, 77,
2635 78, 79, 145, 127, 122, 80, 114, 115, 81, 82,
2639 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2641 #define YYPACT_NINF -381
2642 static const yytype_int16 yypact[] =
2644 1660, -45, -381, -381, -381, -381, -381, -381, -36, -74,
2645 -381, -47, 55, -381, -381, -381, 68, -381, 2103, -381,
2646 62, -381, -381, 2158, -381, -28, 117, -9, -381, -381,
2647 -381, -381, 5, -81, -381, -381, 2103, 8, 2103, 2103,
2648 2103, -381, 2103, 2103, 2103, 2103, 2103, 628, 123, 131,
2649 -381, 499, -381, -381, -381, 7, -381, 2033, -381, -381,
2650 -381, -381, -381, -381, 1910, -381, -381, -381, 222, 250,
2651 -381, -381, -381, -381, -381, -381, -381, -381, -381, -381,
2652 35, 2612, -381, -381, -381, -381, 133, 19, -381, -381,
2653 1910, -381, -381, -381, -381, -381, -381, -89, 117, -381,
2654 -53, -381, 20, 167, 2103, 18, -381, 2103, -381, 2103,
2655 135, 167, -381, 38, 14, 43, 2612, 167, 167, 594,
2656 167, 167, -76, 2612, 22, 48, 2103, -381, 199, 201,
2657 2103, 2103, 201, 206, -381, -381, 757, -381, -381, 85,
2658 -381, -381, -381, -381, 196, -381, -381, -381, -381, 1015,
2659 147, 223, -381, 126, 163, 35, 134, -381, 229, 32,
2660 232, -381, 233, -381, -381, -381, -381, 2103, 2103, 2103,
2661 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
2662 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
2663 2103, -381, -381, 236, 2103, 2103, 2103, 2103, 2103, 2103,
2664 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
2665 2103, 12, -381, -381, 2103, 228, 2103, 1144, -381, 117,
2666 115, 118, -381, -381, -381, 124, 16, -54, 86, 2216,
2667 1785, 114, -381, 2103, 2103, -381, 2103, 2103, -381, -381,
2668 -381, -381, -381, 152, 173, -381, 178, 178, 173, -381,
2669 -381, -381, 1910, 132, 152, 2103, 2103, -381, 181, -381,
2670 -381, 282, 239, 247, 283, 2612, 328, 491, 491, 491,
2671 2978, 2978, 2978, 2978, 328, 328, 2612, 2612, 2612, 2612,
2672 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2673, 2734, -381,
2673 217, 217, 217, 2612, 2429, 2795, 2856, 2917, 328, 328,
2674 594, 594, 167, 167, 167, 157, 2490, 212, 2103, 309,
2675 -25, 193, 2287, -381, 187, 1273, -381, -381, 194, -381,
2676 -381, -381, -381, 1144, -381, 117, 2103, -381, -40, 317,
2677 189, 227, -381, -381, -381, 207, -381, 191, 1785, -381,
2678 -21, -381, 231, 2612, 64, 234, 201, 886, -381, -39,
2679 23, -17, 99, 218, 117, 327, 117, 219, 152, 245,
2680 -381, 2103, -381, -381, 344, 2358, -381, 1910, 2103, 224,
2681 -381, -381, 1144, 220, 221, 33, 64, -381, -381, 152,
2682 17, 60, 1910, 2103, -381, -381, -381, -381, 2103, -381,
2683 -381, -381, 2103, 1910, -381, -381, 16, -381, 117, 225,
2684 -381, 252, -381, 234, 283, 2612, -381, -381, -381, -5,
2685 15, 226, -381, -381, -381, 256, 238, 317, -381, 240,
2686 243, -381, -381, 60, -381, 296, -381, -381, 47, -381,
2687 244, 252, -381, 117, 257, -381, -381, -381, 2103, 264,
2688 230, 15, -381, -381, -381, -381, -381, -381, -381, 374,
2689 -381, -381, 1910, -381, 1910, 152, 1402, -381, 375, -381,
2690 354, 254, 362, -381, 2551, 1785, -381, -381, -381, 1785,
2691 1785, 152, -381, -381, 258, -381, -381, 262, 235, 259,
2692 1531, -381, -381, -381, -381, 32, -381, -381, 1785, -381,
2693 260, 261, 263, -381, 1402, -381, -381, 386, -381, -381,
2694 -381, -381, 1785, 266, 272, 269, 270, -381, 16, 1785,
2695 -381, 268, 273, 152, -381, -381
2698 /* YYPGOTO[NTERM-NUM]. */
2699 static const yytype_int16 yypgoto[] =
2701 -381, -381, 265, -381, 355, -301, -381, 90, -254, -30,
2702 1, -56, -83, 49, 2, 10, 358, 287, 65, -381,
2703 -381, -381, -381, -381, -381, -381, -381, -381, -381, -381,
2704 -381, -381, -381, -381, -381, -24, -20, -381, -381, -11,
2705 -381, 6, -381, -381, -381, -381, -381, -381, -381, -381,
2706 9, 93, -381, -381, -381, -381, 0, -381, 357, -381,
2707 -381, -381, 50, -381, 57, -381, -67, -381, -52, -381,
2708 -381, -32, -381, 3, -381, -381, 27, 29, 58, -380,
2709 -381, -311, -50, 4, -381, -381, -381, -381, -381, 406,
2710 -92, 40, 69, -242, -381, -95, -381, -381, -381, -381,
2711 -381, -381, -381, -29, -6, -46, -381, -381, -13, -381,
2712 -381, -381, -381, -381
2715 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2716 positive, shift that token. If negative, reduce the rule which
2717 number is the opposite. If zero, do what YYDEFACT says.
2718 If YYTABLE_NINF, syntax error. */
2719 #define YYTABLE_NINF -155
2720 static const yytype_int16 yytable[] =
2722 68, 53, 55, 73, 75, 100, 224, 215, 156, 113,
2723 103, 155, 349, 87, 231, 307, 430, 136, 378, 328,
2724 328, 96, 373, 111, 237, 116, 117, 118, -70, 119,
2725 120, 121, 123, 116, 156, 96, 218, 219, 3, 193,
2726 109, 5, 6, 7, 86, 110, 237, 89, 438, 54,
2727 71, 68, 53, 55, 73, 75, 238, 72, 92, 93,
2728 21, 22, 375, 388, 376, 101, 259, 92, 93, 418,
2729 210, 411, 94, 211, 91, 237, 439, 28, 333, 237,
2730 251, 94, 260, 237, 98, 88, 419, 34, 35, 92,
2731 93, 123, 420, 104, 229, 237, 116, 241, 227, 384,
2732 54, 71, 394, 94, 395, 97, 447, 367, 72, 329,
2733 417, 382, 107, 116, 305, 393, 403, 123, 123, 105,
2734 92, 93, 392, 237, 246, 247, 146, 437, 511, 112,
2735 108, 147, 149, 308, 94, 167, 212, 416, 232, 309,
2736 213, 226, 234, 236, 228, 235, 239, 167, 240, 68,
2737 53, 55, 73, 75, 265, 266, 267, 268, 269, 270,
2738 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
2739 281, 282, 283, 284, 285, 286, 287, 288, 385, 454,
2740 95, 290, 291, 292, 293, 294, 295, 296, 297, 298,
2741 299, 300, 301, 302, 303, 304, 116, 306, 54, 71,
2742 334, 123, 242, 312, 243, 341, 72, 342, 310, 249,
2743 252, 489, 158, 474, -71, 490, 491, 68, 53, 318,
2744 123, 116, 347, 116, 343, 255, 254, 340, 324, 492,
2745 256, 374, 258, 257, 498, 262, 263, 335, 158, 289,
2746 311, -113, 123, 123, 325, 326, 339, 159, 506, 350,
2747 351, 158, 160, 161, 2, 512, 344, 191, 192, 193,
2748 159, 2, 397, 348, 400, 162, 161, 163, 13, 14,
2749 15, 515, 17, 346, 19, 13, 14, 15, 237, 17,
2750 163, 19, 251, 352, 408, 353, 358, 24, 209, 362,
2751 210, 251, 354, 211, 24, 365, 29, 30, 31, 425,
2752 356, 364, 458, 29, 30, 31, 400, 191, 192, 193,
2753 429, 156, 366, 116, 368, 68, 53, 318, 370, 372,
2754 328, 379, 381, 68, 53, 318, 156, 380, 204, 205,
2755 206, 207, 208, -112, 335, 383, 388, 156, 209, 396,
2756 210, 457, 398, 211, 402, 404, 428, 406, 405, 410,
2757 432, 412, 433, 413, 426, 123, 459, 444, 375, 427,
2758 452, 466, 409, 446, 449, 448, 2, -155, 465, 472,
2759 116, 473, 68, 53, 318, 116, 455, 471, 484, 485,
2760 13, 14, 15, 493, 17, 486, 19, 494, -153, 504,
2761 495, 499, 500, 508, 509, 501, 156, 507, 156, 24,
2762 513, 510, -155, -155, 514, 371, 148, 458, 29, 30,
2763 31, 390, 450, 435, 253, 152, 244, 467, 191, 192,
2764 193, 468, 194, 195, 196, 464, 166, 503, 496, 451,
2765 487, 436, 106, 414, 460, 497, -155, -155, 431, 204,
2766 205, 206, 207, 208, 445, 415, 0, 0, 0, 209,
2767 0, 210, 0, 0, 211, 0, 478, 476, 477, 482,
2768 483, 459, 460, 0, 0, 0, 0, 0, 0, 0,
2769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2770 478, 476, 477, 482, 483, 0, 0, 0, 0, 0,
2771 0, 0, 0, -154, 478, 476, 477, 482, 483, -4,
2772 0, 0, 1, 2, 3, 4, 0, 5, 6, 7,
2773 8, 9, 10, 11, 0, 0, 12, 13, 14, 15,
2774 16, 17, 18, 19, 0, 0, 21, 22, 0, 0,
2775 168, 0, 0, 0, 23, 0, 24, 25, 0, 26,
2776 0, 27, 0, 28, 0, 29, 30, 31, 0, 0,
2777 32, 33, 0, 34, 35, 0, 0, -155, -155, -155,
2778 0, 36, 37, 0, 0, 176, 177, 0, 38, 0,
2779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2780 0, 191, 192, 193, 0, 194, 195, 196, 0, 39,
2781 40, 0, 0, 0, 0, 0, 0, 0, 41, 202,
2782 203, 0, 204, 205, 206, 207, 208, 0, 0, 0,
2783 42, 0, 209, 0, 210, 43, 44, 211, 0, 0,
2784 45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
2785 -4, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2786 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
2787 17, 18, 19, 20, 0, 21, 22, 128, 0, 129,
2788 0, 0, 0, 23, 130, 24, 25, 0, 26, 131,
2789 27, 0, 28, 132, 29, 30, 31, 0, 0, 32,
2790 33, 0, 34, 35, 191, 192, 193, 0, 0, 0,
2791 36, 37, 0, 133, 0, 0, 0, 38, 0, 0,
2792 0, 0, 0, 0, 0, 0, 0, 206, 207, 208,
2793 0, 0, 0, 0, 0, 209, 0, 210, 39, 40,
2794 211, 0, 0, 0, 0, 0, 0, 134, 0, 0,
2795 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
2796 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
2797 0, 46, 0, 47, 0, 48, 0, 0, 0, 135,
2798 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2799 10, 11, 0, 0, 0, 13, 14, 15, 16, 17,
2800 18, 19, 20, 0, 21, 22, 128, 0, 129, 0,
2801 0, 0, 23, 130, 24, 25, 0, 26, 131, 27,
2802 0, 28, 132, 29, 30, 31, 0, 0, 32, 33,
2803 0, 34, 35, 0, 0, 0, 0, 0, 0, 36,
2804 37, 0, 133, 0, 0, 0, 38, 0, 0, 0,
2805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2806 0, 0, 0, 0, 0, 0, 0, 39, 40, 0,
2807 0, 0, 0, 0, 0, 0, 134, 0, 0, 0,
2808 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
2809 0, 0, 0, 43, 44, 0, 0, 0, 45, 0,
2810 46, 0, 47, 0, 48, 0, 0, 0, 250, 1,
2811 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2812 11, 0, 0, 0, 13, 14, 15, 16, 17, 18,
2813 19, 20, 0, 21, 22, 128, 0, 129, 0, 0,
2814 0, 23, 130, 24, 25, 0, 26, 131, 27, 0,
2815 28, 132, 29, 30, 31, 0, 0, 32, 33, 0,
2816 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
2817 0, 133, 0, 0, 0, 38, 0, 0, 0, 0,
2818 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2819 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2820 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2821 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2822 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2823 0, 47, 0, 48, 0, 0, 0, 391, 1, 2,
2824 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
2825 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
2826 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
2827 23, 0, 24, 25, 0, 26, 0, 27, 0, 28,
2828 0, 29, 30, 31, 0, 0, 32, 33, 0, 34,
2829 35, 0, 0, 0, 0, 0, 0, 36, 37, 0,
2830 0, 0, 0, 0, 38, 0, 0, 0, 0, 0,
2831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2832 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
2833 0, 0, 0, 0, 41, 0, 0, 0, 0, 0,
2834 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2835 0, 43, 44, 0, 0, 0, 45, 0, 46, 0,
2836 47, 0, 48, 0, 0, 0, -3, 1, 2, 3,
2837 4, 0, 5, 6, 7, 8, 9, 10, 11, 0,
2838 0, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2839 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
2840 0, 24, 25, 0, 26, 0, 27, 0, 28, 0,
2841 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
2842 0, 0, 0, 0, 0, 0, 36, 37, 0, 0,
2843 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
2844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2845 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2846 0, 0, 0, 313, 0, 0, 0, 0, 0, 0,
2847 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
2848 43, 44, 0, 0, 0, 45, 0, 46, 0, 47,
2849 0, 48, 0, 0, 0, -15, 1, 2, 3, 4,
2850 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
2851 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2852 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
2853 24, 25, 0, 26, 0, 27, 0, 28, 0, 29,
2854 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
2855 0, 0, 0, 0, 0, 36, 37, 0, 0, 0,
2856 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
2857 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2858 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
2859 0, 0, 313, 0, 0, 0, 0, 0, 0, 0,
2860 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
2861 44, 0, 0, 0, 45, 0, 46, 0, 47, 0,
2862 48, 0, 0, 0, -16, 1, 2, 3, 4, 0,
2863 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
2864 13, 14, 15, 16, 17, 18, 19, 0, 0, 21,
2865 22, 0, 0, 0, 0, 0, 0, 23, 0, 24,
2866 25, 0, 26, 0, 27, 0, 28, 0, 29, 30,
2867 31, 0, 0, 32, 33, 0, 34, 35, 0, 0,
2868 0, 0, 0, 0, 36, 37, 0, 0, 0, 0,
2869 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
2870 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2871 0, 0, 39, 40, 0, 0, 0, 0, 0, 0,
2872 0, 475, 0, 0, 0, 0, 0, 0, 0, 0,
2873 0, 0, 0, 42, 0, 0, 0, 0, 43, 44,
2874 0, 0, 0, 45, 0, 46, 0, 47, 0, 48,
2875 0, 0, 0, -144, 1, 2, 3, 4, 0, 5,
2876 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
2877 14, 15, 16, 17, 18, 19, 0, 0, 21, 22,
2878 0, 0, 0, 0, 0, 0, 23, 0, 24, 25,
2879 0, 26, 0, 27, 0, 28, 0, 29, 30, 31,
2880 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
2881 0, 0, 0, 36, 37, 0, 0, 0, 0, 0,
2882 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2883 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2884 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2885 475, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2886 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2887 0, 0, 45, 0, 46, 0, 47, 0, 48, 0,
2888 -3, 0, -145, 1, 2, 3, 4, 0, 5, 6,
2889 7, 8, 9, 10, 11, 0, 0, 12, 13, 14,
2890 15, 16, 17, 18, 19, 0, 0, 21, 22, 0,
2891 0, 0, 0, 0, 0, 23, 0, 24, 25, 0,
2892 26, 0, 27, 0, 28, 0, 29, 30, 31, 0,
2893 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
2894 0, 0, 36, 37, 0, 0, 0, 0, 0, 38,
2895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2896 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2897 39, 40, 0, 0, 0, 0, 0, 0, 0, 41,
2898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2899 0, 42, 0, 0, 0, 0, 43, 44, 0, 0,
2900 0, 45, 0, 46, 0, 47, 0, 48, 1, 2,
2901 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
2902 0, -120, 0, 13, 14, 15, 16, 17, 18, 19,
2903 20, 0, 21, 22, 128, 0, 129, 0, 0, 0,
2904 23, 130, 24, 25, 0, 26, 131, 27, 0, 28,
2905 132, 29, 30, 31, 0, 0, 32, 33, 0, 34,
2906 35, 0, 0, 0, 0, 0, 0, 36, 37, 0,
2907 133, 0, 0, 0, 38, 0, 0, 0, 0, 0,
2908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2909 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
2910 0, 0, 0, 0, 134, 0, 0, 0, 0, 0,
2911 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2912 0, 43, 44, 0, 0, 0, 45, 0, 46, 0,
2913 47, 0, 48, 1, 2, 3, 4, 0, 5, 6,
2914 7, 8, 9, 10, 11, 0, 0, 0, 13, 14,
2915 15, 16, 17, 18, 19, 20, 0, 21, 22, 128,
2916 0, 129, 0, 0, 0, 23, 130, 24, 25, 0,
2917 26, 131, 27, 0, 28, 132, 29, 30, 31, 0,
2918 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
2919 0, 0, 36, 37, 0, 133, 0, 0, 0, 38,
2920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2922 39, 40, 0, 0, 0, 0, 0, 0, 0, 134,
2923 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2924 0, 42, 0, 0, 0, 0, 43, 44, 0, 0,
2925 0, 45, 0, 46, 0, 47, 150, 48, 3, 4,
2926 0, 5, 6, 7, 0, 0, 0, 0, 0, 0,
2927 0, 0, 0, 0, 0, 0, 18, 0, 20, 0,
2928 21, 22, 0, 0, 129, 0, 0, 0, 23, 0,
2929 0, 0, 0, 0, 0, 27, 0, 28, 151, 0,
2930 0, 0, 0, 0, 0, 33, 0, 34, 35, 0,
2931 0, 0, 0, 0, 0, 36, 0, 0, 0, 0,
2932 0, 0, 38, 0, 0, 0, 99, 0, 3, 4,
2933 0, 5, 6, 7, 0, 0, 0, 0, 0, 0,
2934 0, 0, 0, 39, 40, 0, 18, 0, 20, 0,
2935 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
2936 0, 0, 0, 0, 42, 27, 0, 28, 0, 43,
2937 44, 0, 0, 0, 45, 33, 46, 34, 35, 0,
2938 48, 99, 0, 3, 4, 36, 5, 6, 7, 0,
2939 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
2940 0, 18, 0, 20, 0, 21, 22, 0, 0, 0,
2941 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
2942 0, 0, 28, 0, 0, 0, 0, 0, 0, 0,
2943 33, 0, 34, 35, 42, 0, 0, 0, 0, 43,
2944 44, 0, 0, 0, 45, 0, 46, 38, 0, 0,
2945 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2946 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2947 0, 0, 0, 0, 0, 168, 0, 0, 0, 0,
2948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2949 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,
2950 0, 46, 169, 170, 171, 48, 172, 173, 174, 175,
2951 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
2952 186, 187, 188, 189, 190, 0, 191, 192, 193, 0,
2953 194, 195, 196, 0, 0, 0, 0, 0, 197, 198,
2954 0, 199, 200, 201, 202, 203, 168, 204, 205, 206,
2955 207, 208, 0, 0, 0, 0, 0, 209, 0, 210,
2956 0, 0, 211, 0, 0, 0, 0, 0, 336, 0,
2957 0, 0, 0, 169, 170, 171, 0, 172, 173, 174,
2958 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
2959 185, 186, 187, 188, 189, 190, 0, 191, 192, 193,
2960 0, 194, 195, 196, 0, 0, 0, 0, 0, 197,
2961 198, 0, 199, 200, 201, 202, 203, 168, 204, 205,
2962 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
2963 210, 0, 0, 211, 0, 0, 0, 0, 0, 369,
2964 0, 0, 0, 0, 169, 170, 171, 0, 172, 173,
2965 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2966 184, 185, 186, 187, 188, 189, 190, 0, 191, 192,
2967 193, 0, 194, 195, 196, 0, 0, 0, 0, 0,
2968 197, 198, 0, 199, 200, 201, 202, 203, 168, 204,
2969 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
2970 0, 210, 0, 0, 211, 0, 0, 0, 0, 0,
2971 407, 0, 0, 0, 0, 169, 170, 171, 0, 172,
2972 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2973 183, 184, 185, 186, 187, 188, 189, 190, 0, 191,
2974 192, 193, 0, 194, 195, 196, 0, 0, 0, 168,
2975 0, 197, 198, 361, 199, 200, 201, 202, 203, 0,
2976 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
2977 209, 0, 210, 0, 0, 211, 169, 170, 171, 0,
2978 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2979 182, 183, 184, 185, 186, 187, 188, 189, 190, 0,
2980 191, 192, 193, 0, 194, 195, 196, 0, 0, 0,
2981 168, 0, 197, 198, 0, 199, 200, 201, 202, 203,
2982 0, 204, 205, 206, 207, 208, 0, 0, 0, 0,
2983 0, 209, 0, 210, 363, 0, 211, 169, 170, 171,
2984 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
2985 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
2986 0, 191, 192, 193, 0, 194, 195, 196, 0, 0,
2987 0, 168, 0, 197, 198, 488, 199, 200, 201, 202,
2988 203, 0, 204, 205, 206, 207, 208, 0, 0, 0,
2989 0, 0, 209, 0, 210, 0, 0, 211, 169, 170,
2990 171, 0, 172, 173, 174, 175, 176, 177, 178, 179,
2991 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
2992 190, 0, 191, 192, 193, 0, 194, 195, 196, 0,
2993 0, 0, 168, 0, 197, 198, 0, 199, 200, 201,
2994 202, 203, 0, 204, 205, 206, 207, 208, 0, 0,
2995 0, 0, 0, 209, 0, 210, 0, 0, 211, 169,
2996 170, 171, 0, 172, 173, 174, 175, 176, 177, 0,
2997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2998 0, 190, 0, 191, 192, 193, 0, 194, 195, 196,
2999 0, 0, 0, 168, 0, 0, 0, 0, 199, 200,
3000 201, 202, 203, 0, 204, 205, 206, 207, 208, 0,
3001 0, 0, 0, 0, 209, 0, 210, 0, 0, 211,
3002 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
3003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3004 0, 0, 0, 0, 191, 192, 193, 0, 194, 195,
3005 196, 0, 0, 0, 168, 0, 0, 0, 0, 199,
3006 200, 201, 202, 203, 0, 204, 205, 206, 207, 208,
3007 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
3008 211, 169, 170, 171, 0, 172, 173, 174, 175, 176,
3009 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3010 0, 0, 0, 0, 0, 191, 192, 193, 0, 194,
3011 195, 196, 0, 0, 0, 168, 0, 0, 0, 0,
3012 0, 200, 201, 202, 203, 0, 204, 205, 206, 207,
3013 208, 0, 0, 0, 0, 0, 209, 0, 210, 0,
3014 0, 211, 169, 170, 171, 0, 172, 173, 174, 175,
3015 176, 177, 0, 0, 0, 0, 0, 0, 0, 0,
3016 0, 0, 0, 0, 0, 0, 191, 192, 193, 0,
3017 194, 195, 196, 0, 0, 0, 168, 0, 0, 0,
3018 0, 0, 0, 201, 202, 203, 0, 204, 205, 206,
3019 207, 208, 0, 0, 0, 0, 0, 209, 0, 210,
3020 0, 0, 211, 169, 170, 171, 0, 172, 173, 174,
3021 175, 176, 177, 0, 0, 0, 0, 0, 0, 0,
3022 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
3023 0, 194, 195, 196, 0, 0, 0, 168, 0, 0,
3024 0, 0, 0, 0, -155, 202, 203, 0, 204, 205,
3025 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
3026 210, 0, 0, 211, 169, 170, 171, 0, -155, -155,
3027 -155, -155, 176, 177, 0, 0, 0, 0, 0, 0,
3028 0, 0, 0, 0, 0, 0, 0, 0, 191, 192,
3029 193, 0, 194, 195, 196, 0, 0, 0, 0, 0,
3030 0, 0, 0, 0, 0, 0, 202, 203, 0, 204,
3031 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
3035 static const yytype_int16 yycheck[] =
3037 0, 0, 0, 0, 0, 18, 98, 90, 64, 38,
3038 23, 57, 254, 49, 109, 3, 396, 47, 329, 3,
3039 3, 12, 323, 36, 100, 38, 39, 40, 67, 42,
3040 43, 44, 45, 46, 90, 26, 125, 126, 5, 92,
3041 121, 8, 9, 10, 89, 126, 100, 121, 33, 0,
3042 0, 51, 51, 51, 51, 51, 132, 0, 3, 4,
3043 27, 28, 102, 102, 104, 3, 34, 3, 4, 380,
3044 123, 372, 17, 126, 121, 100, 61, 44, 132, 100,
3045 136, 17, 50, 100, 16, 121, 26, 54, 55, 3,
3046 4, 104, 32, 121, 107, 100, 109, 126, 104, 35,
3047 51, 51, 3, 17, 5, 12, 417, 132, 51, 93,
3048 93, 132, 121, 126, 209, 132, 358, 130, 131, 26,
3049 3, 4, 99, 100, 130, 131, 3, 132, 508, 121,
3050 125, 0, 125, 121, 17, 100, 3, 379, 3, 127,
3051 121, 121, 104, 100, 126, 131, 124, 100, 100, 149,
3052 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
3053 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3054 183, 184, 185, 186, 187, 188, 189, 190, 114, 132,
3055 125, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3056 203, 204, 205, 206, 207, 208, 209, 210, 149, 149,
3057 114, 214, 3, 216, 3, 234, 149, 236, 214, 3,
3058 125, 465, 16, 455, 67, 469, 470, 217, 217, 217,
3059 233, 234, 252, 236, 237, 99, 3, 233, 219, 471,
3060 67, 326, 3, 99, 488, 3, 3, 228, 16, 3,
3061 12, 126, 255, 256, 126, 121, 132, 25, 502, 255,
3062 256, 16, 30, 31, 4, 509, 104, 90, 91, 92,
3063 25, 4, 354, 131, 356, 43, 31, 45, 18, 19,
3064 20, 513, 22, 100, 24, 18, 19, 20, 100, 22,
3065 45, 24, 338, 102, 367, 3, 3, 37, 121, 132,
3066 123, 347, 53, 126, 37, 308, 46, 47, 48, 382,
3067 53, 89, 45, 46, 47, 48, 398, 90, 91, 92,
3068 393, 367, 3, 326, 121, 315, 315, 315, 131, 125,
3069 3, 132, 131, 323, 323, 323, 382, 100, 111, 112,
3070 113, 114, 115, 126, 325, 104, 102, 393, 121, 121,
3071 123, 433, 15, 126, 125, 100, 392, 3, 361, 125,
3072 125, 131, 100, 132, 383, 368, 99, 131, 102, 388,
3073 64, 131, 368, 125, 121, 125, 4, 39, 104, 452,
3074 383, 454, 372, 372, 372, 388, 132, 3, 3, 25,
3075 18, 19, 20, 125, 22, 131, 24, 125, 131, 3,
3076 131, 131, 131, 121, 125, 132, 452, 131, 454, 37,
3077 132, 131, 74, 75, 131, 315, 51, 45, 46, 47,
3078 48, 346, 423, 403, 149, 57, 129, 441, 90, 91,
3079 92, 441, 94, 95, 96, 438, 69, 494, 480, 423,
3080 462, 404, 26, 375, 434, 485, 108, 109, 398, 111,
3081 112, 113, 114, 115, 415, 376, -1, -1, -1, 121,
3082 -1, 123, -1, -1, 126, -1, 456, 456, 456, 456,
3083 456, 99, 462, -1, -1, -1, -1, -1, -1, -1,
3084 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3085 480, 480, 480, 480, 480, -1, -1, -1, -1, -1,
3086 -1, -1, -1, 131, 494, 494, 494, 494, 494, 0,
3087 -1, -1, 3, 4, 5, 6, -1, 8, 9, 10,
3088 11, 12, 13, 14, -1, -1, 17, 18, 19, 20,
3089 21, 22, 23, 24, -1, -1, 27, 28, -1, -1,
3090 39, -1, -1, -1, 35, -1, 37, 38, -1, 40,
3091 -1, 42, -1, 44, -1, 46, 47, 48, -1, -1,
3092 51, 52, -1, 54, 55, -1, -1, 66, 67, 68,
3093 -1, 62, 63, -1, -1, 74, 75, -1, 69, -1,
3094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3095 -1, 90, 91, 92, -1, 94, 95, 96, -1, 90,
3096 91, -1, -1, -1, -1, -1, -1, -1, 99, 108,
3097 109, -1, 111, 112, 113, 114, 115, -1, -1, -1,
3098 111, -1, 121, -1, 123, 116, 117, 126, -1, -1,
3099 121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
3100 131, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3101 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3102 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3103 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3104 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3105 52, -1, 54, 55, 90, 91, 92, -1, -1, -1,
3106 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3107 -1, -1, -1, -1, -1, -1, -1, 113, 114, 115,
3108 -1, -1, -1, -1, -1, 121, -1, 123, 90, 91,
3109 126, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3110 -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
3111 -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
3112 -1, 123, -1, 125, -1, 127, -1, -1, -1, 131,
3113 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3114 13, 14, -1, -1, -1, 18, 19, 20, 21, 22,
3115 23, 24, 25, -1, 27, 28, 29, -1, 31, -1,
3116 -1, -1, 35, 36, 37, 38, -1, 40, 41, 42,
3117 -1, 44, 45, 46, 47, 48, -1, -1, 51, 52,
3118 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
3119 63, -1, 65, -1, -1, -1, 69, -1, -1, -1,
3120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3121 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3122 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3123 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
3124 -1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
3125 123, -1, 125, -1, 127, -1, -1, -1, 131, 3,
3126 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3127 14, -1, -1, -1, 18, 19, 20, 21, 22, 23,
3128 24, 25, -1, 27, 28, 29, -1, 31, -1, -1,
3129 -1, 35, 36, 37, 38, -1, 40, 41, 42, -1,
3130 44, 45, 46, 47, 48, -1, -1, 51, 52, -1,
3131 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3132 -1, 65, -1, -1, -1, 69, -1, -1, -1, -1,
3133 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3134 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3135 -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
3136 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3137 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3138 -1, 125, -1, 127, -1, -1, -1, 131, 3, 4,
3139 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3140 -1, -1, 17, 18, 19, 20, 21, 22, 23, 24,
3141 -1, -1, 27, 28, -1, -1, -1, -1, -1, -1,
3142 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
3143 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
3144 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
3145 -1, -1, -1, -1, 69, -1, -1, -1, -1, -1,
3146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3147 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3148 -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
3149 -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
3150 -1, 116, 117, -1, -1, -1, 121, -1, 123, -1,
3151 125, -1, 127, -1, -1, -1, 131, 3, 4, 5,
3152 6, -1, 8, 9, 10, 11, 12, 13, 14, -1,
3153 -1, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3154 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3155 -1, 37, 38, -1, 40, -1, 42, -1, 44, -1,
3156 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3157 -1, -1, -1, -1, -1, -1, 62, 63, -1, -1,
3158 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3159 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3160 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3161 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3162 -1, -1, -1, -1, -1, 111, -1, -1, -1, -1,
3163 116, 117, -1, -1, -1, 121, -1, 123, -1, 125,
3164 -1, 127, -1, -1, -1, 131, 3, 4, 5, 6,
3165 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3166 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3167 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
3168 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
3169 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
3170 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
3171 -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
3172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3173 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3174 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3175 -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
3176 117, -1, -1, -1, 121, -1, 123, -1, 125, -1,
3177 127, -1, -1, -1, 131, 3, 4, 5, 6, -1,
3178 8, 9, 10, 11, 12, 13, 14, -1, -1, -1,
3179 18, 19, 20, 21, 22, 23, 24, -1, -1, 27,
3180 28, -1, -1, -1, -1, -1, -1, 35, -1, 37,
3181 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
3182 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
3183 -1, -1, -1, -1, 62, 63, -1, -1, -1, -1,
3184 -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
3185 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3186 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3187 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3188 -1, -1, -1, 111, -1, -1, -1, -1, 116, 117,
3189 -1, -1, -1, 121, -1, 123, -1, 125, -1, 127,
3190 -1, -1, -1, 131, 3, 4, 5, 6, -1, 8,
3191 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
3192 19, 20, 21, 22, 23, 24, -1, -1, 27, 28,
3193 -1, -1, -1, -1, -1, -1, 35, -1, 37, 38,
3194 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
3195 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3196 -1, -1, -1, 62, 63, -1, -1, -1, -1, -1,
3197 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3198 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3199 -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
3200 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3201 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3202 -1, -1, 121, -1, 123, -1, 125, -1, 127, -1,
3203 0, -1, 131, 3, 4, 5, 6, -1, 8, 9,
3204 10, 11, 12, 13, 14, -1, -1, 17, 18, 19,
3205 20, 21, 22, 23, 24, -1, -1, 27, 28, -1,
3206 -1, -1, -1, -1, -1, 35, -1, 37, 38, -1,
3207 40, -1, 42, -1, 44, -1, 46, 47, 48, -1,
3208 -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
3209 -1, -1, 62, 63, -1, -1, -1, -1, -1, 69,
3210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3212 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3214 -1, 111, -1, -1, -1, -1, 116, 117, -1, -1,
3215 -1, 121, -1, 123, -1, 125, -1, 127, 3, 4,
3216 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3217 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3218 25, -1, 27, 28, 29, -1, 31, -1, -1, -1,
3219 35, 36, 37, 38, -1, 40, 41, 42, -1, 44,
3220 45, 46, 47, 48, -1, -1, 51, 52, -1, 54,
3221 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
3222 65, -1, -1, -1, 69, -1, -1, -1, -1, -1,
3223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3224 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3225 -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
3226 -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
3227 -1, 116, 117, -1, -1, -1, 121, -1, 123, -1,
3228 125, -1, 127, 3, 4, 5, 6, -1, 8, 9,
3229 10, 11, 12, 13, 14, -1, -1, -1, 18, 19,
3230 20, 21, 22, 23, 24, 25, -1, 27, 28, 29,
3231 -1, 31, -1, -1, -1, 35, 36, 37, 38, -1,
3232 40, 41, 42, -1, 44, 45, 46, 47, 48, -1,
3233 -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
3234 -1, -1, 62, 63, -1, 65, -1, -1, -1, 69,
3235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3236 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3237 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3239 -1, 111, -1, -1, -1, -1, 116, 117, -1, -1,
3240 -1, 121, -1, 123, -1, 125, 3, 127, 5, 6,
3241 -1, 8, 9, 10, -1, -1, -1, -1, -1, -1,
3242 -1, -1, -1, -1, -1, -1, 23, -1, 25, -1,
3243 27, 28, -1, -1, 31, -1, -1, -1, 35, -1,
3244 -1, -1, -1, -1, -1, 42, -1, 44, 45, -1,
3245 -1, -1, -1, -1, -1, 52, -1, 54, 55, -1,
3246 -1, -1, -1, -1, -1, 62, -1, -1, -1, -1,
3247 -1, -1, 69, -1, -1, -1, 3, -1, 5, 6,
3248 -1, 8, 9, 10, -1, -1, -1, -1, -1, -1,
3249 -1, -1, -1, 90, 91, -1, 23, -1, 25, -1,
3250 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
3251 -1, -1, -1, -1, 111, 42, -1, 44, -1, 116,
3252 117, -1, -1, -1, 121, 52, 123, 54, 55, -1,
3253 127, 3, -1, 5, 6, 62, 8, 9, 10, -1,
3254 -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
3255 -1, 23, -1, 25, -1, 27, 28, -1, -1, -1,
3256 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3257 -1, -1, 44, -1, -1, -1, -1, -1, -1, -1,
3258 52, -1, 54, 55, 111, -1, -1, -1, -1, 116,
3259 117, -1, -1, -1, 121, -1, 123, 69, -1, -1,
3260 127, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3261 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3262 -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
3263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3264 -1, -1, -1, -1, -1, -1, -1, -1, -1, 121,
3265 -1, 123, 66, 67, 68, 127, 70, 71, 72, 73,
3266 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3267 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3268 94, 95, 96, -1, -1, -1, -1, -1, 102, 103,
3269 -1, 105, 106, 107, 108, 109, 39, 111, 112, 113,
3270 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3271 -1, -1, 126, -1, -1, -1, -1, -1, 132, -1,
3272 -1, -1, -1, 66, 67, 68, -1, 70, 71, 72,
3273 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3274 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3275 -1, 94, 95, 96, -1, -1, -1, -1, -1, 102,
3276 103, -1, 105, 106, 107, 108, 109, 39, 111, 112,
3277 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3278 123, -1, -1, 126, -1, -1, -1, -1, -1, 132,
3279 -1, -1, -1, -1, 66, 67, 68, -1, 70, 71,
3280 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3281 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3282 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
3283 102, 103, -1, 105, 106, 107, 108, 109, 39, 111,
3284 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3285 -1, 123, -1, -1, 126, -1, -1, -1, -1, -1,
3286 132, -1, -1, -1, -1, 66, 67, 68, -1, 70,
3287 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3288 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3289 91, 92, -1, 94, 95, 96, -1, -1, -1, 39,
3290 -1, 102, 103, 104, 105, 106, 107, 108, 109, -1,
3291 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3292 121, -1, 123, -1, -1, 126, 66, 67, 68, -1,
3293 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3294 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3295 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3296 39, -1, 102, 103, -1, 105, 106, 107, 108, 109,
3297 -1, 111, 112, 113, 114, 115, -1, -1, -1, -1,
3298 -1, 121, -1, 123, 124, -1, 126, 66, 67, 68,
3299 -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3300 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3301 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3302 -1, 39, -1, 102, 103, 104, 105, 106, 107, 108,
3303 109, -1, 111, 112, 113, 114, 115, -1, -1, -1,
3304 -1, -1, 121, -1, 123, -1, -1, 126, 66, 67,
3305 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
3306 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3307 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3308 -1, -1, 39, -1, 102, 103, -1, 105, 106, 107,
3309 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3310 -1, -1, -1, 121, -1, 123, -1, -1, 126, 66,
3311 67, 68, -1, 70, 71, 72, 73, 74, 75, -1,
3312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3313 -1, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3314 -1, -1, -1, 39, -1, -1, -1, -1, 105, 106,
3315 107, 108, 109, -1, 111, 112, 113, 114, 115, -1,
3316 -1, -1, -1, -1, 121, -1, 123, -1, -1, 126,
3317 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3319 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3320 96, -1, -1, -1, 39, -1, -1, -1, -1, 105,
3321 106, 107, 108, 109, -1, 111, 112, 113, 114, 115,
3322 -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
3323 126, 66, 67, 68, -1, 70, 71, 72, 73, 74,
3324 75, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3325 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3326 95, 96, -1, -1, -1, 39, -1, -1, -1, -1,
3327 -1, 106, 107, 108, 109, -1, 111, 112, 113, 114,
3328 115, -1, -1, -1, -1, -1, 121, -1, 123, -1,
3329 -1, 126, 66, 67, 68, -1, 70, 71, 72, 73,
3330 74, 75, -1, -1, -1, -1, -1, -1, -1, -1,
3331 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3332 94, 95, 96, -1, -1, -1, 39, -1, -1, -1,
3333 -1, -1, -1, 107, 108, 109, -1, 111, 112, 113,
3334 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3335 -1, -1, 126, 66, 67, 68, -1, 70, 71, 72,
3336 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3337 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3338 -1, 94, 95, 96, -1, -1, -1, 39, -1, -1,
3339 -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
3340 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3341 123, -1, -1, 126, 66, 67, 68, -1, 70, 71,
3342 72, 73, 74, 75, -1, -1, -1, -1, -1, -1,
3343 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3344 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
3345 -1, -1, -1, -1, -1, -1, 108, 109, -1, 111,
3346 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3347 -1, 123, -1, -1, 126
3350 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3351 symbol of state STATE-NUM. */
3352 static const yytype_uint8 yystos[] =
3354 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3355 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
3356 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
3357 47, 48, 51, 52, 54, 55, 62, 63, 69, 90,
3358 91, 99, 111, 116, 117, 121, 123, 125, 127, 134,
3359 135, 136, 137, 143, 146, 147, 153, 157, 158, 159,
3360 160, 162, 170, 178, 181, 182, 185, 188, 189, 190,
3361 191, 195, 197, 206, 211, 216, 219, 232, 233, 234,
3362 238, 241, 242, 243, 245, 246, 89, 49, 121, 121,
3363 163, 121, 3, 4, 17, 125, 183, 184, 16, 3,
3364 241, 3, 218, 241, 121, 184, 222, 121, 125, 121,
3365 126, 241, 121, 236, 239, 240, 241, 241, 241, 241,
3366 241, 241, 237, 241, 228, 229, 230, 236, 29, 31,
3367 36, 41, 45, 65, 99, 131, 142, 143, 144, 147,
3368 149, 164, 165, 180, 189, 235, 3, 0, 137, 125,
3369 3, 45, 149, 155, 156, 238, 144, 145, 16, 25,
3370 30, 31, 43, 45, 205, 244, 191, 100, 39, 66,
3371 67, 68, 70, 71, 72, 73, 74, 75, 76, 77,
3372 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3373 88, 90, 91, 92, 94, 95, 96, 102, 103, 105,
3374 106, 107, 108, 109, 111, 112, 113, 114, 115, 121,
3375 123, 126, 3, 121, 161, 145, 171, 187, 125, 126,
3376 183, 184, 221, 222, 223, 231, 121, 237, 126, 241,
3377 179, 228, 3, 154, 104, 131, 100, 100, 132, 124,
3378 100, 236, 3, 3, 150, 151, 237, 237, 150, 3,
3379 131, 144, 125, 135, 3, 99, 67, 99, 3, 34,
3380 50, 215, 3, 3, 207, 241, 241, 241, 241, 241,
3381 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
3382 241, 241, 241, 241, 241, 241, 241, 241, 241, 3,
3383 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
3384 241, 241, 241, 241, 241, 228, 241, 3, 121, 127,
3385 237, 12, 241, 99, 138, 139, 140, 146, 147, 195,
3386 197, 206, 216, 186, 183, 126, 121, 227, 3, 93,
3387 212, 213, 214, 132, 114, 183, 132, 141, 142, 132,
3388 237, 236, 236, 241, 104, 226, 100, 142, 131, 226,
3389 237, 237, 102, 3, 53, 192, 53, 193, 3, 208,
3390 209, 104, 132, 124, 89, 241, 3, 132, 121, 132,
3391 131, 140, 125, 138, 228, 102, 104, 210, 214, 132,
3392 100, 131, 132, 104, 35, 114, 223, 225, 102, 148,
3393 151, 131, 99, 132, 3, 5, 121, 223, 15, 194,
3394 223, 224, 125, 226, 100, 241, 3, 132, 145, 237,
3395 125, 138, 131, 132, 211, 225, 226, 93, 214, 26,
3396 32, 172, 174, 176, 177, 145, 236, 236, 238, 145,
3397 212, 224, 125, 100, 198, 148, 209, 132, 33, 61,
3398 166, 167, 168, 169, 131, 210, 125, 214, 125, 121,
3399 172, 174, 64, 152, 132, 132, 196, 223, 45, 99,
3400 189, 202, 203, 204, 241, 104, 131, 168, 169, 220,
3401 175, 3, 145, 145, 226, 99, 143, 147, 189, 199,
3402 200, 201, 206, 216, 3, 25, 131, 204, 104, 141,
3403 141, 141, 226, 125, 125, 131, 201, 215, 141, 131,
3404 131, 132, 217, 199, 3, 173, 141, 131, 121, 125,
3405 131, 212, 141, 132, 131, 226
3408 #define yyerrok (yyerrstatus = 0)
3409 #define yyclearin (yychar = YYEMPTY)
3410 #define YYEMPTY (-2)
3413 #define YYACCEPT goto yyacceptlab
3414 #define YYABORT goto yyabortlab
3415 #define YYERROR goto yyerrorlab
3418 /* Like YYERROR except do call yyerror. This remains here temporarily
3419 to ease the transition to the new meaning of YYERROR, for GCC.
3420 Once GCC version 2 has supplanted version 1, this can go. */
3422 #define YYFAIL goto yyerrlab
3424 #define YYRECOVERING() (!!yyerrstatus)
3426 #define YYBACKUP(Token, Value) \
3428 if (yychar == YYEMPTY && yylen == 1) \
3432 yytoken = YYTRANSLATE (yychar); \
3438 yyerror (YY_("syntax error: cannot back up")); \
3445 #define YYERRCODE 256
3448 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3449 If N is 0, then set CURRENT to the empty location which ends
3450 the previous symbol: RHS[0] (always defined). */
3452 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3453 #ifndef YYLLOC_DEFAULT
3454 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3458 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3459 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3460 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3461 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3465 (Current).first_line = (Current).last_line = \
3466 YYRHSLOC (Rhs, 0).last_line; \
3467 (Current).first_column = (Current).last_column = \
3468 YYRHSLOC (Rhs, 0).last_column; \
3474 /* YY_LOCATION_PRINT -- Print the location on the stream.
3475 This macro was not mandated originally: define only if we know
3476 we won't break user code: when these are the locations we know. */
3478 #ifndef YY_LOCATION_PRINT
3479 # if YYLTYPE_IS_TRIVIAL
3480 # define YY_LOCATION_PRINT(File, Loc) \
3481 fprintf (File, "%d.%d-%d.%d", \
3482 (Loc).first_line, (Loc).first_column, \
3483 (Loc).last_line, (Loc).last_column)
3485 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3490 /* YYLEX -- calling `yylex' with the right arguments. */
3493 # define YYLEX yylex (YYLEX_PARAM)
3495 # define YYLEX yylex ()
3498 /* Enable debugging if requested. */
3502 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3503 # define YYFPRINTF fprintf
3506 # define YYDPRINTF(Args) \
3512 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3516 YYFPRINTF (stderr, "%s ", Title); \
3517 yy_symbol_print (stderr, \
3519 YYFPRINTF (stderr, "\n"); \
3524 /*--------------------------------.
3525 | Print this symbol on YYOUTPUT. |
3526 `--------------------------------*/
3529 #if (defined __STDC__ || defined __C99__FUNC__ \
3530 || defined __cplusplus || defined _MSC_VER)
3532 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3535 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3538 YYSTYPE const * const yyvaluep;
3544 if (yytype < YYNTOKENS)
3545 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3557 /*--------------------------------.
3558 | Print this symbol on YYOUTPUT. |
3559 `--------------------------------*/
3561 #if (defined __STDC__ || defined __C99__FUNC__ \
3562 || defined __cplusplus || defined _MSC_VER)
3564 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3567 yy_symbol_print (yyoutput, yytype, yyvaluep)
3570 YYSTYPE const * const yyvaluep;
3573 if (yytype < YYNTOKENS)
3574 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3576 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3578 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3579 YYFPRINTF (yyoutput, ")");
3582 /*------------------------------------------------------------------.
3583 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3585 `------------------------------------------------------------------*/
3587 #if (defined __STDC__ || defined __C99__FUNC__ \
3588 || defined __cplusplus || defined _MSC_VER)
3590 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3593 yy_stack_print (yybottom, yytop)
3594 yytype_int16 *yybottom;
3595 yytype_int16 *yytop;
3598 YYFPRINTF (stderr, "Stack now");
3599 for (; yybottom <= yytop; yybottom++)
3601 int yybot = *yybottom;
3602 YYFPRINTF (stderr, " %d", yybot);
3604 YYFPRINTF (stderr, "\n");
3607 # define YY_STACK_PRINT(Bottom, Top) \
3610 yy_stack_print ((Bottom), (Top)); \
3614 /*------------------------------------------------.
3615 | Report that the YYRULE is going to be reduced. |
3616 `------------------------------------------------*/
3618 #if (defined __STDC__ || defined __C99__FUNC__ \
3619 || defined __cplusplus || defined _MSC_VER)
3621 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3624 yy_reduce_print (yyvsp, yyrule)
3629 int yynrhs = yyr2[yyrule];
3631 unsigned long int yylno = yyrline[yyrule];
3632 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3634 /* The symbols being reduced. */
3635 for (yyi = 0; yyi < yynrhs; yyi++)
3637 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3638 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3639 &(yyvsp[(yyi + 1) - (yynrhs)])
3641 YYFPRINTF (stderr, "\n");
3645 # define YY_REDUCE_PRINT(Rule) \
3648 yy_reduce_print (yyvsp, Rule); \
3651 /* Nonzero means print parse trace. It is left uninitialized so that
3652 multiple parsers can coexist. */
3654 #else /* !YYDEBUG */
3655 # define YYDPRINTF(Args)
3656 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3657 # define YY_STACK_PRINT(Bottom, Top)
3658 # define YY_REDUCE_PRINT(Rule)
3659 #endif /* !YYDEBUG */
3662 /* YYINITDEPTH -- initial size of the parser's stacks. */
3664 # define YYINITDEPTH 200
3667 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3668 if the built-in stack extension method is used).
3670 Do not make this value too large; the results are undefined if
3671 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3672 evaluated with infinite-precision integer arithmetic. */
3675 # define YYMAXDEPTH 10000
3683 # if defined __GLIBC__ && defined _STRING_H
3684 # define yystrlen strlen
3686 /* Return the length of YYSTR. */
3687 #if (defined __STDC__ || defined __C99__FUNC__ \
3688 || defined __cplusplus || defined _MSC_VER)
3690 yystrlen (const char *yystr)
3698 for (yylen = 0; yystr[yylen]; yylen++)
3706 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3707 # define yystpcpy stpcpy
3709 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3711 #if (defined __STDC__ || defined __C99__FUNC__ \
3712 || defined __cplusplus || defined _MSC_VER)
3714 yystpcpy (char *yydest, const char *yysrc)
3717 yystpcpy (yydest, yysrc)
3723 const char *yys = yysrc;
3725 while ((*yyd++ = *yys++) != '\0')
3734 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3735 quotes and backslashes, so that it's suitable for yyerror. The
3736 heuristic is that double-quoting is unnecessary unless the string
3737 contains an apostrophe, a comma, or backslash (other than
3738 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3739 null, do not copy; instead, return the length of what the result
3742 yytnamerr (char *yyres, const char *yystr)
3747 char const *yyp = yystr;
3754 goto do_not_strip_quotes;
3758 goto do_not_strip_quotes;
3771 do_not_strip_quotes: ;
3775 return yystrlen (yystr);
3777 return yystpcpy (yyres, yystr) - yyres;
3781 /* Copy into YYRESULT an error message about the unexpected token
3782 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3783 including the terminating null byte. If YYRESULT is null, do not
3784 copy anything; just return the number of bytes that would be
3785 copied. As a special case, return 0 if an ordinary "syntax error"
3786 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3787 size calculation. */
3789 yysyntax_error (char *yyresult, int yystate, int yychar)
3791 int yyn = yypact[yystate];
3793 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3797 int yytype = YYTRANSLATE (yychar);
3798 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3799 YYSIZE_T yysize = yysize0;
3801 int yysize_overflow = 0;
3802 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3803 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3807 /* This is so xgettext sees the translatable formats that are
3808 constructed on the fly. */
3809 YY_("syntax error, unexpected %s");
3810 YY_("syntax error, unexpected %s, expecting %s");
3811 YY_("syntax error, unexpected %s, expecting %s or %s");
3812 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3813 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3817 static char const yyunexpected[] = "syntax error, unexpected %s";
3818 static char const yyexpecting[] = ", expecting %s";
3819 static char const yyor[] = " or %s";
3820 char yyformat[sizeof yyunexpected
3821 + sizeof yyexpecting - 1
3822 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3823 * (sizeof yyor - 1))];
3824 char const *yyprefix = yyexpecting;
3826 /* Start YYX at -YYN if negative to avoid negative indexes in
3828 int yyxbegin = yyn < 0 ? -yyn : 0;
3830 /* Stay within bounds of both yycheck and yytname. */
3831 int yychecklim = YYLAST - yyn + 1;
3832 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3835 yyarg[0] = yytname[yytype];
3836 yyfmt = yystpcpy (yyformat, yyunexpected);
3838 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3839 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3841 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3845 yyformat[sizeof yyunexpected - 1] = '\0';
3848 yyarg[yycount++] = yytname[yyx];
3849 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3850 yysize_overflow |= (yysize1 < yysize);
3852 yyfmt = yystpcpy (yyfmt, yyprefix);
3856 yyf = YY_(yyformat);
3857 yysize1 = yysize + yystrlen (yyf);
3858 yysize_overflow |= (yysize1 < yysize);
3861 if (yysize_overflow)
3862 return YYSIZE_MAXIMUM;
3866 /* Avoid sprintf, as that infringes on the user's name space.
3867 Don't have undefined behavior even if the translation
3868 produced a string with the wrong number of "%s"s. */
3869 char *yyp = yyresult;
3871 while ((*yyp = *yyf) != '\0')
3873 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3875 yyp += yytnamerr (yyp, yyarg[yyi++]);
3888 #endif /* YYERROR_VERBOSE */
3891 /*-----------------------------------------------.
3892 | Release the memory associated to this symbol. |
3893 `-----------------------------------------------*/
3896 #if (defined __STDC__ || defined __C99__FUNC__ \
3897 || defined __cplusplus || defined _MSC_VER)
3899 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3902 yydestruct (yymsg, yytype, yyvaluep)
3912 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3922 /* Prevent warnings from -Wmissing-prototypes. */
3923 #ifdef YYPARSE_PARAM
3924 #if defined __STDC__ || defined __cplusplus
3925 int yyparse (void *YYPARSE_PARAM);
3929 #else /* ! YYPARSE_PARAM */
3930 #if defined __STDC__ || defined __cplusplus
3935 #endif /* ! YYPARSE_PARAM */
3938 /* The lookahead symbol. */
3941 /* The semantic value of the lookahead symbol. */
3944 /* Number of syntax errors so far. */
3949 /*-------------------------.
3950 | yyparse or yypush_parse. |
3951 `-------------------------*/
3953 #ifdef YYPARSE_PARAM
3954 #if (defined __STDC__ || defined __C99__FUNC__ \
3955 || defined __cplusplus || defined _MSC_VER)
3957 yyparse (void *YYPARSE_PARAM)
3960 yyparse (YYPARSE_PARAM)
3961 void *YYPARSE_PARAM;
3963 #else /* ! YYPARSE_PARAM */
3964 #if (defined __STDC__ || defined __C99__FUNC__ \
3965 || defined __cplusplus || defined _MSC_VER)
3978 /* Number of tokens to shift before error messages enabled. */
3981 /* The stacks and their tools:
3982 `yyss': related to states.
3983 `yyvs': related to semantic values.
3985 Refer to the stacks thru separate pointers, to allow yyoverflow
3986 to reallocate them elsewhere. */
3988 /* The state stack. */
3989 yytype_int16 yyssa[YYINITDEPTH];
3991 yytype_int16 *yyssp;
3993 /* The semantic value stack. */
3994 YYSTYPE yyvsa[YYINITDEPTH];
3998 YYSIZE_T yystacksize;
4002 /* Lookahead token as an internal (translated) token number. */
4004 /* The variables used to return semantic value and location from the
4009 /* Buffer for error messages, and its allocated size. */
4011 char *yymsg = yymsgbuf;
4012 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4015 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4017 /* The number of symbols on the RHS of the reduced rule.
4018 Keep to zero when no symbol should be popped. */
4024 yystacksize = YYINITDEPTH;
4026 YYDPRINTF ((stderr, "Starting parse\n"));
4031 yychar = YYEMPTY; /* Cause a token to be read. */
4033 /* Initialize stack pointers.
4034 Waste one element of value and location stack
4035 so that they stay on the same level as the state stack.
4036 The wasted elements are never initialized. */
4042 /*------------------------------------------------------------.
4043 | yynewstate -- Push a new state, which is found in yystate. |
4044 `------------------------------------------------------------*/
4046 /* In all cases, when you get here, the value and location stacks
4047 have just been pushed. So pushing a state here evens the stacks. */
4053 if (yyss + yystacksize - 1 <= yyssp)
4055 /* Get the current used size of the three stacks, in elements. */
4056 YYSIZE_T yysize = yyssp - yyss + 1;
4060 /* Give user a chance to reallocate the stack. Use copies of
4061 these so that the &'s don't force the real ones into
4063 YYSTYPE *yyvs1 = yyvs;
4064 yytype_int16 *yyss1 = yyss;
4066 /* Each stack pointer address is followed by the size of the
4067 data in use in that stack, in bytes. This used to be a
4068 conditional around just the two extra args, but that might
4069 be undefined if yyoverflow is a macro. */
4070 yyoverflow (YY_("memory exhausted"),
4071 &yyss1, yysize * sizeof (*yyssp),
4072 &yyvs1, yysize * sizeof (*yyvsp),
4078 #else /* no yyoverflow */
4079 # ifndef YYSTACK_RELOCATE
4080 goto yyexhaustedlab;
4082 /* Extend the stack our own way. */
4083 if (YYMAXDEPTH <= yystacksize)
4084 goto yyexhaustedlab;
4086 if (YYMAXDEPTH < yystacksize)
4087 yystacksize = YYMAXDEPTH;
4090 yytype_int16 *yyss1 = yyss;
4091 union yyalloc *yyptr =
4092 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4094 goto yyexhaustedlab;
4095 YYSTACK_RELOCATE (yyss_alloc, yyss);
4096 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4097 # undef YYSTACK_RELOCATE
4099 YYSTACK_FREE (yyss1);
4102 #endif /* no yyoverflow */
4104 yyssp = yyss + yysize - 1;
4105 yyvsp = yyvs + yysize - 1;
4107 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4108 (unsigned long int) yystacksize));
4110 if (yyss + yystacksize - 1 <= yyssp)
4114 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4116 if (yystate == YYFINAL)
4126 /* Do appropriate processing given the current state. Read a
4127 lookahead token if we need one and don't already have one. */
4129 /* First try to decide what to do without reference to lookahead token. */
4130 yyn = yypact[yystate];
4131 if (yyn == YYPACT_NINF)
4134 /* Not known => get a lookahead token if don't already have one. */
4136 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4137 if (yychar == YYEMPTY)
4139 YYDPRINTF ((stderr, "Reading a token: "));
4143 if (yychar <= YYEOF)
4145 yychar = yytoken = YYEOF;
4146 YYDPRINTF ((stderr, "Now at end of input.\n"));
4150 yytoken = YYTRANSLATE (yychar);
4151 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4154 /* If the proper action on seeing token YYTOKEN is to reduce or to
4155 detect an error, take that action. */
4157 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4162 if (yyn == 0 || yyn == YYTABLE_NINF)
4168 /* Count tokens shifted since error; after three, turn off error
4173 /* Shift the lookahead token. */
4174 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4176 /* Discard the shifted token. */
4185 /*-----------------------------------------------------------.
4186 | yydefault -- do the default action for the current state. |
4187 `-----------------------------------------------------------*/
4189 yyn = yydefact[yystate];
4195 /*-----------------------------.
4196 | yyreduce -- Do a reduction. |
4197 `-----------------------------*/
4199 /* yyn is the number of a rule to reduce with. */
4202 /* If YYLEN is nonzero, implement the default value of the action:
4205 Otherwise, the following line sets YYVAL to garbage.
4206 This behavior is undocumented and Bison
4207 users should not rely upon it. Assigning to YYVAL
4208 unconditionally makes the parser a bit smaller, and it avoids a
4209 GCC warning that YYVAL may be used uninitialized. */
4210 yyval = yyvsp[1-yylen];
4213 YY_REDUCE_PRINT (yyn);
4220 /* Line 1464 of skeleton.m4 */
4221 #line 1890 "parser.y"
4222 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4231 /* Line 1464 of skeleton.m4 */
4232 #line 1902 "parser.y"
4233 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4242 /* Line 1464 of skeleton.m4 */
4243 #line 1905 "parser.y"
4244 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4253 /* Line 1464 of skeleton.m4 */
4254 #line 1906 "parser.y"
4255 {(yyval.code)=code_new();}
4264 /* Line 1464 of skeleton.m4 */
4265 #line 1908 "parser.y"
4266 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4275 /* Line 1464 of skeleton.m4 */
4276 #line 1909 "parser.y"
4277 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4286 /* Line 1464 of skeleton.m4 */
4287 #line 1924 "parser.y"
4288 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4297 /* Line 1464 of skeleton.m4 */
4298 #line 1925 "parser.y"
4308 /* Line 1464 of skeleton.m4 */
4309 #line 1928 "parser.y"
4319 /* Line 1464 of skeleton.m4 */
4320 #line 1935 "parser.y"
4321 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4330 /* Line 1464 of skeleton.m4 */
4331 #line 1939 "parser.y"
4332 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4341 /* Line 1464 of skeleton.m4 */
4342 #line 1940 "parser.y"
4343 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4352 /* Line 1464 of skeleton.m4 */
4353 #line 1944 "parser.y"
4355 code_t**cc = &global->init->method->body->code;
4356 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4366 /* Line 1464 of skeleton.m4 */
4367 #line 1951 "parser.y"
4370 (yyval.number_int)=as3_pass;
4371 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4372 if(!definitions || !dict_contains(definitions, key)) {
4385 /* Line 1464 of skeleton.m4 */
4386 #line 1970 "parser.y"
4387 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4396 /* Line 1464 of skeleton.m4 */
4397 #line 1971 "parser.y"
4398 {(yyval.value).c=abc_pushundefined(0);
4399 (yyval.value).t=TYPE_ANY;
4409 /* Line 1464 of skeleton.m4 */
4410 #line 1975 "parser.y"
4411 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4420 /* Line 1464 of skeleton.m4 */
4421 #line 1976 "parser.y"
4422 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4431 /* Line 1464 of skeleton.m4 */
4432 #line 1978 "parser.y"
4433 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4442 /* Line 1464 of skeleton.m4 */
4443 #line 1979 "parser.y"
4444 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4453 /* Line 1464 of skeleton.m4 */
4454 #line 1982 "parser.y"
4457 if(variable_exists((yyvsp[(1) - (3)].id)))
4458 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4460 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4463 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4464 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4465 (yyvsp[(2) - (3)].classinfo)->name);
4470 if(state->method->uses_slots) {
4471 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4473 // this variable is stored in a slot
4475 v->type = (yyvsp[(2) - (3)].classinfo);
4481 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4484 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4486 if((yyvsp[(2) - (3)].classinfo)) {
4487 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4488 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4489 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4491 code_free((yyvsp[(3) - (3)].value).c);
4492 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4495 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4496 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4497 (yyval.code) = abc_coerce_a((yyval.code));
4499 // don't do anything
4500 code_free((yyvsp[(3) - (3)].value).c);
4501 code_free((yyval.code));
4507 (yyval.code) = abc_setslot((yyval.code), index);
4509 (yyval.code) = abc_setlocal((yyval.code), index);
4520 /* Line 1464 of skeleton.m4 */
4521 #line 2042 "parser.y"
4522 {(yyval.code) = code_new();}
4531 /* Line 1464 of skeleton.m4 */
4532 #line 2043 "parser.y"
4533 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4542 /* Line 1464 of skeleton.m4 */
4543 #line 2046 "parser.y"
4544 {PASS12 new_state();}
4553 /* Line 1464 of skeleton.m4 */
4554 #line 2046 "parser.y"
4557 (yyval.code) = code_new();
4558 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4559 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4561 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4562 if((yyvsp[(7) - (7)].code)) {
4563 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4565 myif->branch = (yyval.code) = abc_nop((yyval.code));
4566 if((yyvsp[(7) - (7)].code)) {
4567 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4568 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4570 (yyval.code) = var_block((yyval.code));
4581 /* Line 1464 of skeleton.m4 */
4582 #line 2065 "parser.y"
4583 {(yyval.code)=code_new();}
4592 /* Line 1464 of skeleton.m4 */
4593 #line 2072 "parser.y"
4595 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4596 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4606 /* Line 1464 of skeleton.m4 */
4607 #line 2076 "parser.y"
4610 (yyval.id)=(yyvsp[(1) - (1)].id);
4620 /* Line 1464 of skeleton.m4 */
4621 #line 2081 "parser.y"
4622 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4631 /* Line 1464 of skeleton.m4 */
4632 #line 2082 "parser.y"
4633 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4642 /* Line 1464 of skeleton.m4 */
4643 #line 2084 "parser.y"
4645 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4646 (yyval.code) = code_new();
4647 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4648 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4649 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4650 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4651 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4652 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4653 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4654 (yyval.code) = abc_jump((yyval.code), loopstart);
4655 code_t*out = (yyval.code) = abc_nop((yyval.code));
4656 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4657 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4660 (yyval.code) = var_block((yyval.code));
4671 /* Line 1464 of skeleton.m4 */
4672 #line 2104 "parser.y"
4674 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4676 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4679 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4680 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4681 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4682 int array = new_variable(tmp1name, 0, 0, 0);
4684 (yyval.code) = code_new();
4685 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4686 (yyval.code) = abc_coerce_a((yyval.code));
4687 (yyval.code) = abc_setlocal((yyval.code), array);
4688 (yyval.code) = abc_pushbyte((yyval.code), 0);
4689 (yyval.code) = abc_setlocal((yyval.code), it);
4691 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4693 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4694 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4695 (yyval.code) = abc_getlocal((yyval.code), array);
4696 (yyval.code) = abc_getlocal((yyval.code), it);
4697 if(!(yyvsp[(1) - (6)].for_start).each)
4698 (yyval.code) = abc_nextname((yyval.code));
4700 (yyval.code) = abc_nextvalue((yyval.code));
4701 (yyval.code) = converttype((yyval.code), 0, var->type);
4702 (yyval.code) = abc_setlocal((yyval.code), var->index);
4704 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4705 (yyval.code) = abc_jump((yyval.code), loopstart);
4707 code_t*out = (yyval.code) = abc_nop((yyval.code));
4708 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4709 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4713 (yyval.code) = var_block((yyval.code));
4728 /* Line 1464 of skeleton.m4 */
4729 #line 2152 "parser.y"
4730 {PASS12 new_state();}
4739 /* Line 1464 of skeleton.m4 */
4740 #line 2152 "parser.y"
4743 (yyval.code) = code_new();
4745 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4746 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4747 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4748 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4749 myjmp->branch = cont;
4750 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4751 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4752 code_t*out = (yyval.code) = abc_nop((yyval.code));
4753 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4754 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4756 (yyval.code) = var_block((yyval.code));
4767 /* Line 1464 of skeleton.m4 */
4768 #line 2171 "parser.y"
4769 {PASS12 new_state();}
4778 /* Line 1464 of skeleton.m4 */
4779 #line 2171 "parser.y"
4781 (yyval.code) = code_new();
4782 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4783 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4784 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4785 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4786 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4787 code_t*out = (yyval.code) = abc_nop((yyval.code));
4788 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4789 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4791 (yyval.code) = var_block((yyval.code));
4802 /* Line 1464 of skeleton.m4 */
4803 #line 2186 "parser.y"
4805 (yyval.code) = abc___break__(0, "");
4815 /* Line 1464 of skeleton.m4 */
4816 #line 2189 "parser.y"
4818 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4828 /* Line 1464 of skeleton.m4 */
4829 #line 2192 "parser.y"
4831 (yyval.code) = abc___continue__(0, "");
4841 /* Line 1464 of skeleton.m4 */
4842 #line 2195 "parser.y"
4844 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4854 /* Line 1464 of skeleton.m4 */
4855 #line 2199 "parser.y"
4865 /* Line 1464 of skeleton.m4 */
4866 #line 2200 "parser.y"
4867 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4876 /* Line 1464 of skeleton.m4 */
4877 #line 2201 "parser.y"
4878 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4887 /* Line 1464 of skeleton.m4 */
4888 #line 2202 "parser.y"
4889 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4898 /* Line 1464 of skeleton.m4 */
4899 #line 2203 "parser.y"
4900 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4909 /* Line 1464 of skeleton.m4 */
4910 #line 2204 "parser.y"
4911 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4920 /* Line 1464 of skeleton.m4 */
4921 #line 2206 "parser.y"
4923 (yyval.code) = abc_getlocal(0, state->switch_var);
4924 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
4925 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4926 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4927 if((yyval.code)->opcode != OPCODE___BREAK__) {
4928 (yyval.code) = abc___fallthrough__((yyval.code), "");
4930 code_t*e = (yyval.code) = abc_nop((yyval.code));
4941 /* Line 1464 of skeleton.m4 */
4942 #line 2217 "parser.y"
4944 (yyval.code) = (yyvsp[(3) - (3)].code);
4954 /* Line 1464 of skeleton.m4 */
4955 #line 2220 "parser.y"
4956 {PASS12 new_state();state->switch_var=alloc_local();}
4965 /* Line 1464 of skeleton.m4 */
4966 #line 2220 "parser.y"
4968 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
4969 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
4970 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4972 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
4973 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4975 code_t*c = (yyval.code),*lastblock=0;
4977 if(c->opcode == OPCODE_IFNE) {
4978 if(!c->next) syntaxerror("internal error in fallthrough handling");
4980 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4982 c->opcode = OPCODE_JUMP;
4983 c->branch = lastblock;
4985 /* fall through end of switch */
4986 c->opcode = OPCODE_NOP;
4992 (yyval.code) = var_block((yyval.code));
5003 /* Line 1464 of skeleton.m4 */
5004 #line 2251 "parser.y"
5005 {PASS12 new_state();
5006 state->exception_name=(yyvsp[(3) - (5)].id);
5007 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5008 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5018 /* Line 1464 of skeleton.m4 */
5019 #line 2256 "parser.y"
5021 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5022 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5024 NEW(abc_exception_t, e)
5025 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5026 e->var_name = multiname_clone(&name);
5027 (yyval.exception) = e;
5030 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5031 e->target = c = abc_nop(0);
5032 c = abc_setlocal(c, i);
5033 c = code_append(c, code_dup(state->method->scope_code));
5034 c = code_append(c, (yyvsp[(8) - (9)].code));
5048 /* Line 1464 of skeleton.m4 */
5049 #line 2276 "parser.y"
5050 {PASS12 new_state();state->exception_name=0;}
5059 /* Line 1464 of skeleton.m4 */
5060 #line 2276 "parser.y"
5062 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5063 if(!(yyvsp[(4) - (5)].code)) {
5064 (yyval.exception)=0;
5066 NEW(abc_exception_t, e)
5067 e->exc_type = 0; //all exceptions
5068 e->var_name = 0; //no name
5071 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5072 (yyval.exception) = e;
5084 /* Line 1464 of skeleton.m4 */
5085 #line 2292 "parser.y"
5086 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5095 /* Line 1464 of skeleton.m4 */
5096 #line 2293 "parser.y"
5097 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5106 /* Line 1464 of skeleton.m4 */
5107 #line 2294 "parser.y"
5108 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5117 /* Line 1464 of skeleton.m4 */
5118 #line 2295 "parser.y"
5120 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5121 (yyval.catch_list).finally = 0;
5122 if((yyvsp[(2) - (2)].exception)) {
5123 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5124 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5135 /* Line 1464 of skeleton.m4 */
5136 #line 2303 "parser.y"
5138 (yyval.catch_list).l=list_new();
5139 (yyval.catch_list).finally = 0;
5140 if((yyvsp[(1) - (1)].exception)) {
5141 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5142 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5153 /* Line 1464 of skeleton.m4 */
5154 #line 2312 "parser.y"
5155 {PASS12 new_state();
5156 state->method->has_exceptions=1;
5157 state->method->late_binding=1;//for invariant scope_code
5167 /* Line 1464 of skeleton.m4 */
5168 #line 2315 "parser.y"
5170 code_t*out = abc_nop(0);
5172 code_t*start = abc_nop(0);
5173 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5174 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5175 (yyval.code) = abc_jump((yyval.code), out);
5177 code_t*end = (yyval.code) = abc_nop((yyval.code));
5180 if((yyvsp[(6) - (6)].catch_list).finally)
5181 tmp = new_variable("__finally__", 0, 0, 0);
5183 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5186 abc_exception_t*e = l->abc_exception;
5188 (yyval.code) = code_append((yyval.code), e->target);
5189 (yyval.code) = abc_jump((yyval.code), out);
5191 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5193 e->target = (yyval.code) = abc_nop((yyval.code));
5194 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5195 (yyval.code) = abc___rethrow__((yyval.code));
5203 (yyval.code) = code_append((yyval.code), out);
5205 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5207 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5209 (yyval.code) = var_block((yyval.code));
5220 /* Line 1464 of skeleton.m4 */
5221 #line 2361 "parser.y"
5223 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5224 (yyval.code)=abc_throw((yyval.code));
5234 /* Line 1464 of skeleton.m4 */
5235 #line 2365 "parser.y"
5237 if(!state->exception_name)
5238 syntaxerror("re-throw only possible within a catch block");
5239 variable_t*v = find_variable(state, state->exception_name);
5240 (yyval.code)=code_new();
5241 (yyval.code)=abc_getlocal((yyval.code), v->index);
5242 (yyval.code)=abc_throw((yyval.code));
5252 /* Line 1464 of skeleton.m4 */
5253 #line 2376 "parser.y"
5256 if(state->method->has_exceptions) {
5257 int v = alloc_local();
5258 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5259 state->method->scope_code = abc_pushwith(state->method->scope_code);
5260 (yyval.value_list).number = v;
5262 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5272 /* Line 1464 of skeleton.m4 */
5273 #line 2386 "parser.y"
5275 /* remove getlocal;pushwith from scope code again */
5276 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5278 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5279 if(state->method->has_exceptions) {
5280 (yyval.code) = abc_dup((yyval.code));
5281 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5283 (yyval.code) = abc_pushwith((yyval.code));
5284 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5285 (yyval.code) = abc_popscope((yyval.code));
5296 /* Line 1464 of skeleton.m4 */
5297 #line 2404 "parser.y"
5298 {PASS12 (yyval.id)="package";}
5307 /* Line 1464 of skeleton.m4 */
5308 #line 2405 "parser.y"
5309 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5318 /* Line 1464 of skeleton.m4 */
5319 #line 2407 "parser.y"
5320 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5329 /* Line 1464 of skeleton.m4 */
5330 #line 2408 "parser.y"
5331 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5340 /* Line 1464 of skeleton.m4 */
5341 #line 2410 "parser.y"
5342 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5351 /* Line 1464 of skeleton.m4 */
5352 #line 2411 "parser.y"
5353 {PASS12 endpackage();(yyval.code)=0;}
5362 /* Line 1464 of skeleton.m4 */
5363 #line 2412 "parser.y"
5364 {PASS12 startpackage("");}
5373 /* Line 1464 of skeleton.m4 */
5374 #line 2413 "parser.y"
5375 {PASS12 endpackage();(yyval.code)=0;}
5384 /* Line 1464 of skeleton.m4 */
5385 #line 2435 "parser.y"
5388 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5389 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5390 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5392 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5394 syntaxerror("Couldn't import class\n");
5395 state_has_imports();
5396 dict_put(state->imports, c->name, c);
5397 import_toplevel(c->package);
5408 /* Line 1464 of skeleton.m4 */
5409 #line 2449 "parser.y"
5412 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5413 as3_schedule_package((yyvsp[(2) - (4)].id));
5417 i->package = (yyvsp[(2) - (4)].id);
5418 state_has_imports();
5419 list_append(state->wildcard_imports, i);
5420 import_toplevel(i->package);
5431 /* Line 1464 of skeleton.m4 */
5432 #line 2465 "parser.y"
5433 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5442 /* Line 1464 of skeleton.m4 */
5443 #line 2466 "parser.y"
5444 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5453 /* Line 1464 of skeleton.m4 */
5454 #line 2467 "parser.y"
5455 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5464 /* Line 1464 of skeleton.m4 */
5465 #line 2468 "parser.y"
5468 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5469 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5470 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5481 /* Line 1464 of skeleton.m4 */
5482 #line 2475 "parser.y"
5483 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5492 /* Line 1464 of skeleton.m4 */
5493 #line 2476 "parser.y"
5494 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5503 /* Line 1464 of skeleton.m4 */
5504 #line 2477 "parser.y"
5505 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5514 /* Line 1464 of skeleton.m4 */
5515 #line 2478 "parser.y"
5516 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5525 /* Line 1464 of skeleton.m4 */
5526 #line 2479 "parser.y"
5527 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5536 /* Line 1464 of skeleton.m4 */
5537 #line 2480 "parser.y"
5538 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5547 /* Line 1464 of skeleton.m4 */
5548 #line 2481 "parser.y"
5549 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5558 /* Line 1464 of skeleton.m4 */
5559 #line 2482 "parser.y"
5560 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5569 /* Line 1464 of skeleton.m4 */
5570 #line 2483 "parser.y"
5571 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5580 /* Line 1464 of skeleton.m4 */
5581 #line 2484 "parser.y"
5582 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5583 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5593 /* Line 1464 of skeleton.m4 */
5594 #line 2488 "parser.y"
5595 {PASS12 (yyval.classinfo)=0;}
5604 /* Line 1464 of skeleton.m4 */
5605 #line 2489 "parser.y"
5606 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5615 /* Line 1464 of skeleton.m4 */
5616 #line 2491 "parser.y"
5617 {PASS12 (yyval.classinfo_list)=list_new();}
5626 /* Line 1464 of skeleton.m4 */
5627 #line 2492 "parser.y"
5628 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5637 /* Line 1464 of skeleton.m4 */
5638 #line 2494 "parser.y"
5639 {PASS12 (yyval.classinfo_list)=list_new();}
5648 /* Line 1464 of skeleton.m4 */
5649 #line 2495 "parser.y"
5650 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5659 /* Line 1464 of skeleton.m4 */
5660 #line 2499 "parser.y"
5661 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5670 /* Line 1464 of skeleton.m4 */
5671 #line 2501 "parser.y"
5672 {PASS12 endclass();(yyval.code)=0;}
5681 /* Line 1464 of skeleton.m4 */
5682 #line 2505 "parser.y"
5683 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5684 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5693 /* Line 1464 of skeleton.m4 */
5694 #line 2508 "parser.y"
5695 {PASS12 endclass();(yyval.code)=0;}
5704 /* Line 1464 of skeleton.m4 */
5705 #line 2517 "parser.y"
5706 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
5715 /* Line 1464 of skeleton.m4 */
5716 #line 2521 "parser.y"
5718 code_t*c = state->cls->static_init->header;
5719 c = code_append(c, (yyvsp[(1) - (1)].code));
5720 state->cls->static_init->header = c;
5730 /* Line 1464 of skeleton.m4 */
5731 #line 2532 "parser.y"
5733 syntaxerror("variable declarations not allowed in interfaces");
5743 /* Line 1464 of skeleton.m4 */
5744 #line 2535 "parser.y"
5747 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5748 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5749 syntaxerror("invalid method modifiers: interface methods always need to be public");
5751 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5752 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5753 list_deep_free((yyvsp[(6) - (8)].params).list);
5763 /* Line 1464 of skeleton.m4 */
5764 #line 2569 "parser.y"
5765 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5774 /* Line 1464 of skeleton.m4 */
5775 #line 2569 "parser.y"
5776 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5785 /* Line 1464 of skeleton.m4 */
5786 #line 2571 "parser.y"
5787 {PASS12 (yyval.code)=0;}
5796 /* Line 1464 of skeleton.m4 */
5797 #line 2572 "parser.y"
5798 {PASS12 (yyval.code)=0;}
5807 /* Line 1464 of skeleton.m4 */
5808 #line 2575 "parser.y"
5811 int flags = slotstate_flags->flags;
5812 namespace_t ns = modifiers2access(slotstate_flags);
5816 varinfo_t* info = 0;
5818 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5820 check_override(i, flags);
5822 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5824 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5826 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5828 if(ns.name && ns.name[0]) {
5829 syntaxerror("namespaces not allowed on package-level variables");
5831 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5834 info->type = (yyvsp[(2) - (3)].classinfo);
5835 info->flags = flags;
5837 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
5841 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
5844 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5846 trait_list_t**traits;
5850 ns.name = state->package;
5851 traits = &global->init->traits;
5852 code = &global->init->method->body->code;
5853 } else if(flags&FLAG_STATIC) {
5855 traits = &state->cls->abc->static_traits;
5856 code = &state->cls->static_init->header;
5858 // instance variable
5859 traits = &state->cls->abc->traits;
5860 code = &state->cls->init->header;
5864 if((yyvsp[(2) - (3)].classinfo)) {
5865 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5866 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5868 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5870 info->slot = t->slot_id;
5872 /* initalization code (if needed) */
5874 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5875 c = abc_getlocal_0(c);
5876 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5877 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5878 c = abc_setslot(c, t->slot_id);
5881 *code = code_append(*code, c);
5883 if(slotstate_varconst==KW_CONST) {
5884 t->kind= TRAIT_CONST;
5898 /* Line 1464 of skeleton.m4 */
5899 #line 2659 "parser.y"
5900 {(yyval.constant)=0;}
5909 /* Line 1464 of skeleton.m4 */
5910 #line 2660 "parser.y"
5911 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5920 /* Line 1464 of skeleton.m4 */
5921 #line 2663 "parser.y"
5922 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5931 /* Line 1464 of skeleton.m4 */
5932 #line 2664 "parser.y"
5934 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
5944 /* Line 1464 of skeleton.m4 */
5945 #line 2667 "parser.y"
5946 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5955 /* Line 1464 of skeleton.m4 */
5956 #line 2668 "parser.y"
5957 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5966 /* Line 1464 of skeleton.m4 */
5967 #line 2669 "parser.y"
5968 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5977 /* Line 1464 of skeleton.m4 */
5978 #line 2670 "parser.y"
5979 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5988 /* Line 1464 of skeleton.m4 */
5989 #line 2671 "parser.y"
5990 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5999 /* Line 1464 of skeleton.m4 */
6000 #line 2672 "parser.y"
6001 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6010 /* Line 1464 of skeleton.m4 */
6011 #line 2673 "parser.y"
6012 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6021 /* Line 1464 of skeleton.m4 */
6022 #line 2688 "parser.y"
6025 memset(&(yyval.params),0,sizeof((yyval.params)));
6035 /* Line 1464 of skeleton.m4 */
6036 #line 2692 "parser.y"
6039 (yyval.params)=(yyvsp[(1) - (1)].params);
6049 /* Line 1464 of skeleton.m4 */
6050 #line 2698 "parser.y"
6053 memset(&(yyval.params),0,sizeof((yyval.params)));
6054 (yyval.params).varargs=1;
6055 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6065 /* Line 1464 of skeleton.m4 */
6066 #line 2704 "parser.y"
6069 (yyval.params) =(yyvsp[(1) - (4)].params);
6070 (yyval.params).varargs=1;
6071 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6081 /* Line 1464 of skeleton.m4 */
6082 #line 2712 "parser.y"
6085 (yyval.params) = (yyvsp[(1) - (3)].params);
6086 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6096 /* Line 1464 of skeleton.m4 */
6097 #line 2717 "parser.y"
6100 memset(&(yyval.params),0,sizeof((yyval.params)));
6101 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6111 /* Line 1464 of skeleton.m4 */
6112 #line 2723 "parser.y"
6115 (yyval.param) = rfx_calloc(sizeof(param_t));
6116 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6117 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6119 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6129 /* Line 1464 of skeleton.m4 */
6130 #line 2731 "parser.y"
6133 (yyval.param) = rfx_calloc(sizeof(param_t));
6134 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6135 (yyval.param)->type = TYPE_ANY;
6137 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6147 /* Line 1464 of skeleton.m4 */
6148 #line 2741 "parser.y"
6149 {PASS12 (yyval.token)=0;}
6158 /* Line 1464 of skeleton.m4 */
6159 #line 2744 "parser.y"
6160 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6169 /* Line 1464 of skeleton.m4 */
6170 #line 2745 "parser.y"
6173 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6175 if(!state->method->info) syntaxerror("internal error");
6177 code_t*c = method_header(state->method);
6178 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6180 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6182 list_deep_free((yyvsp[(6) - (12)].params).list);
6193 /* Line 1464 of skeleton.m4 */
6194 #line 2761 "parser.y"
6195 {PASS12 (yyval.id)=0;}
6204 /* Line 1464 of skeleton.m4 */
6205 #line 2763 "parser.y"
6206 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6215 /* Line 1464 of skeleton.m4 */
6216 #line 2764 "parser.y"
6219 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6221 methodinfo_t*f = state->method->info;
6222 if(!f || !f->kind) syntaxerror("internal error");
6224 code_t*c = method_header(state->method);
6225 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6227 int index = state->method->var_index;
6228 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6230 (yyval.value).c = abc_getlocal(0, index);
6231 (yyval.value).t = TYPE_FUNCTION(f);
6233 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6243 /* Line 1464 of skeleton.m4 */
6244 #line 2786 "parser.y"
6246 PASS1 NEW(unresolvedinfo_t,c);
6247 memset(c, 0, sizeof(*c));
6248 c->kind = INFOTYPE_UNRESOLVED;
6249 c->name = (yyvsp[(1) - (1)].id);
6250 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6252 c->nsset = get_current_imports();
6253 /* make the compiler look for this class in the current directory,
6255 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6257 (yyval.classinfo) = (classinfo_t*)c;
6259 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6260 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6261 (yyval.classinfo) = (classinfo_t*)s;
6271 /* Line 1464 of skeleton.m4 */
6272 #line 2805 "parser.y"
6274 PASS1 NEW(unresolvedinfo_t,c);
6275 memset(c, 0, sizeof(*c));
6276 c->kind = INFOTYPE_UNRESOLVED;
6277 c->package = (yyvsp[(1) - (3)].id);
6278 c->name = (yyvsp[(3) - (3)].id);
6279 (yyval.classinfo) = (classinfo_t*)c;
6281 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6282 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6283 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6284 (yyval.classinfo) = (classinfo_t*)s;
6294 /* Line 1464 of skeleton.m4 */
6295 #line 2822 "parser.y"
6296 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6305 /* Line 1464 of skeleton.m4 */
6306 #line 2823 "parser.y"
6307 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6316 /* Line 1464 of skeleton.m4 */
6317 #line 2825 "parser.y"
6318 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6327 /* Line 1464 of skeleton.m4 */
6328 #line 2826 "parser.y"
6329 {PASS12 (yyval.classinfo)=registry_getanytype();}
6338 /* Line 1464 of skeleton.m4 */
6339 #line 2827 "parser.y"
6340 {PASS12 (yyval.classinfo)=registry_getanytype();}
6349 /* Line 1464 of skeleton.m4 */
6350 #line 2836 "parser.y"
6351 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6360 /* Line 1464 of skeleton.m4 */
6361 #line 2837 "parser.y"
6362 {PASS12 (yyval.classinfo)=0;}
6371 /* Line 1464 of skeleton.m4 */
6372 #line 2841 "parser.y"
6373 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6382 /* Line 1464 of skeleton.m4 */
6383 #line 2842 "parser.y"
6384 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6393 /* Line 1464 of skeleton.m4 */
6394 #line 2844 "parser.y"
6395 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6404 /* Line 1464 of skeleton.m4 */
6405 #line 2848 "parser.y"
6406 {(yyval.value_list).number=1;
6407 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6417 /* Line 1464 of skeleton.m4 */
6418 #line 2852 "parser.y"
6419 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6428 /* Line 1464 of skeleton.m4 */
6429 #line 2853 "parser.y"
6431 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6432 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6442 /* Line 1464 of skeleton.m4 */
6443 #line 2859 "parser.y"
6445 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
6446 (yyval.value).c = v.c;
6447 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6449 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6450 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6451 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6452 (yyval.value).c = code_cutlast((yyval.value).c);
6453 (yyval.value).c = code_append((yyval.value).c, paramcode);
6454 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6455 multiname_destroy(name);
6456 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6457 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6458 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6459 multiname_t*name = t->name;
6460 (yyval.value).c = code_cutlast((yyval.value).c);
6461 (yyval.value).c = code_append((yyval.value).c, paramcode);
6462 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6464 (yyval.value).c = code_append((yyval.value).c, paramcode);
6465 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6468 (yyval.value).t = TYPE_ANY;
6469 if(TYPE_IS_CLASS(v.t) && v.t->data) {
6470 (yyval.value).t = v.t->data;
6472 (yyval.value).c = abc_coerce_a((yyval.value).c);
6473 (yyval.value).t = TYPE_ANY;
6484 /* Line 1464 of skeleton.m4 */
6485 #line 2896 "parser.y"
6488 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
6489 (yyval.value).c = v.c;
6490 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6491 (yyval.value).c = code_cutlast((yyval.value).c);
6493 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6495 (yyval.value).t = TYPE_ANY;
6496 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6497 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6498 (yyval.value).c = code_cutlast((yyval.value).c);
6499 (yyval.value).c = code_append((yyval.value).c, paramcode);
6500 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6501 multiname_destroy(name);
6502 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6503 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6504 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6505 if(t->kind!=TRAIT_METHOD) {
6506 //ok: flash allows to assign closures to members.
6508 multiname_t*name = t->name;
6509 (yyval.value).c = code_cutlast((yyval.value).c);
6510 (yyval.value).c = code_append((yyval.value).c, paramcode);
6511 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6512 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6513 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6514 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6515 (yyval.value).c = code_cutlast((yyval.value).c);
6516 (yyval.value).c = code_append((yyval.value).c, paramcode);
6517 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6518 multiname_destroy(name);
6520 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6521 (yyval.value).c = code_append((yyval.value).c, paramcode);
6522 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6525 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
6526 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
6528 (yyval.value).c = abc_coerce_a((yyval.value).c);
6529 (yyval.value).t = TYPE_ANY;
6540 /* Line 1464 of skeleton.m4 */
6541 #line 2943 "parser.y"
6543 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6544 if(!state->method) syntaxerror("super() not allowed outside of a function");
6545 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6547 (yyval.value).c = code_new();
6548 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6550 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6552 this is dependent on the control path, check this somewhere else
6553 if(state->method->has_super)
6554 syntaxerror("constructor may call super() only once");
6556 state->method->has_super = 1;
6558 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6559 (yyval.value).c = abc_pushundefined((yyval.value).c);
6560 (yyval.value).t = TYPE_ANY;
6570 /* Line 1464 of skeleton.m4 */
6571 #line 2964 "parser.y"
6573 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
6574 (yyval.value).c = v.c;
6575 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6576 (yyval.value).c = code_cutlast((yyval.value).c);
6578 multiname_t*name = 0;
6579 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6580 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6581 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6582 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6583 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6584 (yyval.value).c = code_cutlast((yyval.value).c);
6585 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6587 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6588 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
6589 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6591 (yyval.value).t = TYPE_BOOLEAN;
6601 /* Line 1464 of skeleton.m4 */
6602 #line 2986 "parser.y"
6604 (yyval.code) = abc_returnvoid(0);
6614 /* Line 1464 of skeleton.m4 */
6615 #line 2989 "parser.y"
6617 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6618 (yyval.code) = abc_returnvalue((yyval.code));
6628 /* Line 1464 of skeleton.m4 */
6629 #line 2996 "parser.y"
6630 {(yyval.value) = node_read((yyvsp[(1) - (1)].node));}
6639 /* Line 1464 of skeleton.m4 */
6640 #line 2997 "parser.y"
6641 {(yyval.value) = node_read((yyvsp[(1) - (1)].node));}
6650 /* Line 1464 of skeleton.m4 */
6651 #line 2998 "parser.y"
6653 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6654 (yyval.value).c = cut_last_push((yyval.value).c);
6655 typedcode_t v = node_read((yyvsp[(3) - (3)].node));
6656 (yyval.value).c = code_append((yyval.value).c,v.c);
6657 (yyval.value).t = v.t;
6667 /* Line 1464 of skeleton.m4 */
6668 #line 3005 "parser.y"
6669 { (yyval.code)=node_exec((yyvsp[(1) - (1)].node)); }
6678 /* Line 1464 of skeleton.m4 */
6679 #line 3006 "parser.y"
6681 (yyval.code) = (yyvsp[(1) - (3)].code);
6682 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
6692 /* Line 1464 of skeleton.m4 */
6693 #line 3011 "parser.y"
6694 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6703 /* Line 1464 of skeleton.m4 */
6704 #line 3012 "parser.y"
6705 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6714 /* Line 1464 of skeleton.m4 */
6715 #line 3014 "parser.y"
6717 (yyval.value_list).cc = 0;
6718 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6719 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6720 (yyval.value_list).number = 2;
6730 /* Line 1464 of skeleton.m4 */
6731 #line 3020 "parser.y"
6733 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6734 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
6735 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6736 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6746 /* Line 1464 of skeleton.m4 */
6747 #line 3029 "parser.y"
6748 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6757 /* Line 1464 of skeleton.m4 */
6758 #line 3030 "parser.y"
6759 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6768 /* Line 1464 of skeleton.m4 */
6769 #line 3031 "parser.y"
6770 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6779 /* Line 1464 of skeleton.m4 */
6780 #line 3032 "parser.y"
6781 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6790 /* Line 1464 of skeleton.m4 */
6791 #line 3033 "parser.y"
6792 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6801 /* Line 1464 of skeleton.m4 */
6802 #line 3034 "parser.y"
6803 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6812 /* Line 1464 of skeleton.m4 */
6813 #line 3036 "parser.y"
6815 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
6825 /* Line 1464 of skeleton.m4 */
6826 #line 3041 "parser.y"
6830 namespace_t ns = {ACCESS_PACKAGE, ""};
6831 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6832 if(!(yyvsp[(1) - (1)].regexp).options) {
6833 v.c = abc_getlex2(v.c, &m);
6834 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
6835 v.c = abc_construct(v.c, 1);
6837 v.c = abc_getlex2(v.c, &m);
6838 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
6839 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
6840 v.c = abc_construct(v.c, 2);
6843 (yyval.node) = mkcodenode(v);
6853 /* Line 1464 of skeleton.m4 */
6854 #line 3061 "parser.y"
6858 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
6859 v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
6860 v.t = registry_getarrayclass();
6861 (yyval.node) = mkcodenode(v);
6871 /* Line 1464 of skeleton.m4 */
6872 #line 3071 "parser.y"
6876 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
6877 v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
6878 v.t = registry_getobjectclass();
6879 (yyval.node) = mkcodenode(v);
6889 /* Line 1464 of skeleton.m4 */
6890 #line 3080 "parser.y"
6891 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6900 /* Line 1464 of skeleton.m4 */
6901 #line 3081 "parser.y"
6902 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6911 /* Line 1464 of skeleton.m4 */
6912 #line 3082 "parser.y"
6913 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6922 /* Line 1464 of skeleton.m4 */
6923 #line 3083 "parser.y"
6924 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6933 /* Line 1464 of skeleton.m4 */
6934 #line 3084 "parser.y"
6935 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6944 /* Line 1464 of skeleton.m4 */
6945 #line 3085 "parser.y"
6946 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6955 /* Line 1464 of skeleton.m4 */
6956 #line 3086 "parser.y"
6957 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6966 /* Line 1464 of skeleton.m4 */
6967 #line 3087 "parser.y"
6968 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6977 /* Line 1464 of skeleton.m4 */
6978 #line 3088 "parser.y"
6979 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6988 /* Line 1464 of skeleton.m4 */
6989 #line 3089 "parser.y"
6990 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6999 /* Line 1464 of skeleton.m4 */
7000 #line 3090 "parser.y"
7001 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
7010 /* Line 1464 of skeleton.m4 */
7011 #line 3091 "parser.y"
7012 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
7021 /* Line 1464 of skeleton.m4 */
7022 #line 3092 "parser.y"
7023 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7032 /* Line 1464 of skeleton.m4 */
7033 #line 3093 "parser.y"
7034 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7043 /* Line 1464 of skeleton.m4 */
7044 #line 3094 "parser.y"
7045 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7054 /* Line 1464 of skeleton.m4 */
7055 #line 3095 "parser.y"
7056 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7065 /* Line 1464 of skeleton.m4 */
7066 #line 3096 "parser.y"
7067 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7076 /* Line 1464 of skeleton.m4 */
7077 #line 3097 "parser.y"
7078 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7087 /* Line 1464 of skeleton.m4 */
7088 #line 3098 "parser.y"
7089 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7098 /* Line 1464 of skeleton.m4 */
7099 #line 3099 "parser.y"
7100 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7109 /* Line 1464 of skeleton.m4 */
7110 #line 3100 "parser.y"
7111 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7120 /* Line 1464 of skeleton.m4 */
7121 #line 3101 "parser.y"
7122 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7131 /* Line 1464 of skeleton.m4 */
7132 #line 3102 "parser.y"
7133 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7142 /* Line 1464 of skeleton.m4 */
7143 #line 3103 "parser.y"
7144 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7153 /* Line 1464 of skeleton.m4 */
7154 #line 3104 "parser.y"
7155 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7164 /* Line 1464 of skeleton.m4 */
7165 #line 3105 "parser.y"
7166 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7175 /* Line 1464 of skeleton.m4 */
7176 #line 3106 "parser.y"
7177 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7186 /* Line 1464 of skeleton.m4 */
7187 #line 3107 "parser.y"
7188 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
7197 /* Line 1464 of skeleton.m4 */
7198 #line 3108 "parser.y"
7199 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
7208 /* Line 1464 of skeleton.m4 */
7209 #line 3109 "parser.y"
7210 { (yyval.node) = mkconstnode(constant_new_undefined());}
7219 /* Line 1464 of skeleton.m4 */
7220 #line 3110 "parser.y"
7221 { /*allow commas in here, too */ (yyval.node)=mkcodenode((yyvsp[(2) - (3)].value));}
7230 /* Line 1464 of skeleton.m4 */
7231 #line 3111 "parser.y"
7232 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
7241 /* Line 1464 of skeleton.m4 */
7242 #line 3112 "parser.y"
7243 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
7252 /* Line 1464 of skeleton.m4 */
7253 #line 3113 "parser.y"
7254 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7263 /* Line 1464 of skeleton.m4 */
7264 #line 3114 "parser.y"
7265 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7274 /* Line 1464 of skeleton.m4 */
7275 #line 3115 "parser.y"
7276 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7285 /* Line 1464 of skeleton.m4 */
7286 #line 3116 "parser.y"
7287 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7296 /* Line 1464 of skeleton.m4 */
7297 #line 3117 "parser.y"
7298 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7307 /* Line 1464 of skeleton.m4 */
7308 #line 3118 "parser.y"
7309 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7318 /* Line 1464 of skeleton.m4 */
7319 #line 3119 "parser.y"
7320 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7329 /* Line 1464 of skeleton.m4 */
7330 #line 3120 "parser.y"
7331 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7340 /* Line 1464 of skeleton.m4 */
7341 #line 3121 "parser.y"
7342 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7351 /* Line 1464 of skeleton.m4 */
7352 #line 3122 "parser.y"
7353 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7362 /* Line 1464 of skeleton.m4 */
7363 #line 3123 "parser.y"
7364 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7373 /* Line 1464 of skeleton.m4 */
7374 #line 3124 "parser.y"
7375 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7384 /* Line 1464 of skeleton.m4 */
7385 #line 3125 "parser.y"
7386 { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
7395 /* Line 1464 of skeleton.m4 */
7396 #line 3127 "parser.y"
7397 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
7406 /* Line 1464 of skeleton.m4 */
7407 #line 3128 "parser.y"
7408 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
7417 /* Line 1464 of skeleton.m4 */
7418 #line 3129 "parser.y"
7419 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
7428 /* Line 1464 of skeleton.m4 */
7429 #line 3130 "parser.y"
7430 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
7439 /* Line 1464 of skeleton.m4 */
7440 #line 3133 "parser.y"
7441 { if(!state->cls->info)
7442 syntaxerror("super keyword not allowed outside a class");
7443 classinfo_t*t = state->cls->info->superclass;
7444 if(!t) t = TYPE_OBJECT;
7445 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7446 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7449 v.c = abc_getlocal_0(v.c);
7450 v.c = abc_getsuper2(v.c, &m);
7451 v.t = slotinfo_gettype((slotinfo_t*)f);
7452 (yyval.node) = mkcodenode(v);
7462 /* Line 1464 of skeleton.m4 */
7463 #line 3147 "parser.y"
7466 (yyval.node) = mkdummynode();
7467 as3_warning("ignored @ operator");
7477 /* Line 1464 of skeleton.m4 */
7478 #line 3153 "parser.y"
7480 // child attribute TODO
7481 (yyval.node) = mkdummynode();
7482 as3_warning("ignored .@ operator");
7492 /* Line 1464 of skeleton.m4 */
7493 #line 3159 "parser.y"
7495 // namespace declaration TODO
7496 (yyval.node) = mkdummynode();
7497 as3_warning("ignored :: operator");
7507 /* Line 1464 of skeleton.m4 */
7508 #line 3165 "parser.y"
7511 (yyval.node) = mkdummynode();
7512 as3_warning("ignored .. operator");
7522 /* Line 1464 of skeleton.m4 */
7523 #line 3171 "parser.y"
7526 (yyval.node) = mkdummynode();
7527 as3_warning("ignored .() operator");
7537 /* Line 1464 of skeleton.m4 */
7538 #line 3184 "parser.y"
7540 typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
7541 (yyval.value).c = v1.c;
7542 classinfo_t*t = v1.t;
7544 if(TYPE_IS_CLASS(t) && t->data) {
7549 if(t->subtype==INFOTYPE_UNRESOLVED) {
7550 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7552 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7554 if(f && !is_static != !(f->flags&FLAG_STATIC))
7556 if(f && f->slot && !noslot) {
7557 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7560 as3_warning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
7563 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7564 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7566 /* determine type */
7567 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7568 if(!(yyval.value).t)
7569 (yyval.value).c = abc_coerce_a((yyval.value).c);
7570 } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
7571 string_t*package = v1.c->data[0];
7572 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7574 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7576 (yyval.value) = push_class(a);
7577 } else if(dict_contains(state->import_toplevel_packages, package2) ||
7578 registry_ispackage(package2)) {
7579 (yyval.value).c = v1.c;
7580 (yyval.value).c->data[0] = string_new4(package2);
7581 (yyval.value).t = 0;
7583 syntaxerror("couldn't resolve %s", package2);
7586 /* when resolving a property on an unknown type, we do know the
7587 name of the property (and don't seem to need the package), but
7588 we need to make avm2 try out all access modes */
7589 as3_warning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
7590 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7591 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7592 (yyval.value).c = abc_coerce_a((yyval.value).c);
7593 (yyval.value).t = registry_getanytype();
7604 /* Line 1464 of skeleton.m4 */
7605 #line 3242 "parser.y"
7608 /* Queue unresolved identifiers for checking against the parent
7609 function's variables.
7610 We consider everything which is not a local variable "unresolved".
7611 This encompasses class names, members of the surrounding class
7612 etc. which is *correct* because local variables of the parent function
7615 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7616 unknown_variable((yyvsp[(1) - (1)].id));
7619 /* let the compiler know that it might want to check the current directory/package
7620 for this identifier- maybe there's a file $1.as defining $1. */
7621 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7624 (yyval.value).t = 0;
7625 (yyval.value).c = 0;
7630 /* look at variables */
7631 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7632 // $1 is a local variable
7633 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7634 (yyval.value).t = v->type;
7637 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7638 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7639 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7640 (yyval.value).t = v->type;
7644 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7646 /* look at current class' members */
7647 if(!state->method->inner &&
7649 (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7650 (f->flags&FLAG_STATIC) >= i_am_static)
7652 // $1 is a function in this class
7653 int var_is_static = (f->flags&FLAG_STATIC);
7655 if(f->kind == INFOTYPE_METHOD) {
7656 (yyval.value).t = TYPE_FUNCTION(f);
7658 (yyval.value).t = f->type;
7660 if(var_is_static && !i_am_static) {
7661 /* access to a static member from a non-static location.
7662 do this via findpropstrict:
7663 there doesn't seem to be any non-lookup way to access
7664 static properties of a class */
7665 state->method->late_binding = 1;
7666 (yyval.value).t = f->type;
7667 namespace_t ns = {f->access, f->package};
7668 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7669 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7670 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7672 } else if(f->slot>0) {
7673 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7674 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7677 namespace_t ns = {f->access, f->package};
7678 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7679 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7680 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7685 /* look at actual classes, in the current package and imported */
7686 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7687 (yyval.value) = push_class(a);
7691 /* look through package prefixes */
7692 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id)) ||
7693 registry_ispackage((yyvsp[(1) - (1)].id))) {
7694 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
7695 (yyval.value).t = 0;
7699 /* unknown object, let the avm2 resolve it */
7701 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
7702 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7703 state->method->late_binding = 1;
7705 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7707 (yyval.value).t = 0;
7708 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7709 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7720 /* Line 1464 of skeleton.m4 */
7721 #line 3351 "parser.y"
7724 NEW(namespace_decl_t,n);
7725 n->name = (yyvsp[(2) - (2)].id);
7726 n->url = (yyvsp[(2) - (2)].id);
7727 (yyval.namespace_decl)=n;
7737 /* Line 1464 of skeleton.m4 */
7738 #line 3358 "parser.y"
7741 NEW(namespace_decl_t,n);
7742 n->name = (yyvsp[(2) - (4)].id);
7743 n->url = (yyvsp[(4) - (4)].id);
7744 (yyval.namespace_decl)=n;
7754 /* Line 1464 of skeleton.m4 */
7755 #line 3365 "parser.y"
7758 NEW(namespace_decl_t,n);
7759 n->name = (yyvsp[(2) - (4)].id);
7760 n->url = (yyvsp[(4) - (4)].str).str;
7761 (yyval.namespace_decl)=n;
7771 /* Line 1464 of skeleton.m4 */
7772 #line 3372 "parser.y"
7775 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
7777 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
7778 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
7779 var->type = TYPE_NAMESPACE;
7781 ns.access = ACCESS_NAMESPACE;
7782 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
7783 var->value = constant_new_namespace(&ns);
7795 /* Line 1464 of skeleton.m4 */
7796 #line 3396 "parser.y"
7799 const char*url = (yyvsp[(3) - (3)].classinfo)->name;
7801 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
7802 if(s->kind == INFOTYPE_UNRESOLVED) {
7803 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
7805 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
7808 if(!s || s->kind != INFOTYPE_SLOT)
7809 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
7810 if(!s->value || !NS_TYPE(s->value->type))
7811 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
7812 url = s->value->ns->name;
7814 trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
7815 add_active_url(url);
7824 /* Line 1464 of skeleton.m4 */
7825 #line 7826 "parser.tab.c"
7828 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7832 YY_STACK_PRINT (yyss, yyssp);
7836 /* Now `shift' the result of the reduction. Determine what state
7837 that goes to, based on the state we popped back to and the rule
7838 number reduced by. */
7842 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7843 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7844 yystate = yytable[yystate];
7846 yystate = yydefgoto[yyn - YYNTOKENS];
7851 /*------------------------------------.
7852 | yyerrlab -- here on detecting error |
7853 `------------------------------------*/
7855 /* If not already recovering from an error, report this error. */
7859 #if ! YYERROR_VERBOSE
7860 yyerror (YY_("syntax error"));
7863 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7864 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7866 YYSIZE_T yyalloc = 2 * yysize;
7867 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7868 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7869 if (yymsg != yymsgbuf)
7870 YYSTACK_FREE (yymsg);
7871 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7873 yymsg_alloc = yyalloc;
7877 yymsg_alloc = sizeof yymsgbuf;
7881 if (0 < yysize && yysize <= yymsg_alloc)
7883 (void) yysyntax_error (yymsg, yystate, yychar);
7888 yyerror (YY_("syntax error"));
7890 goto yyexhaustedlab;
7898 if (yyerrstatus == 3)
7900 /* If just tried and failed to reuse lookahead token after an
7901 error, discard it. */
7903 if (yychar <= YYEOF)
7905 /* Return failure if at end of input. */
7906 if (yychar == YYEOF)
7911 yydestruct ("Error: discarding",
7917 /* Else will try to reuse lookahead token after shifting the error
7922 /*---------------------------------------------------.
7923 | yyerrorlab -- error raised explicitly by YYERROR. |
7924 `---------------------------------------------------*/
7927 /* Pacify compilers like GCC when the user code never invokes
7928 YYERROR and the label yyerrorlab therefore never appears in user
7930 if (/*CONSTCOND*/ 0)
7933 /* Do not reclaim the symbols of the rule which action triggered
7937 YY_STACK_PRINT (yyss, yyssp);
7942 /*-------------------------------------------------------------.
7943 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7944 `-------------------------------------------------------------*/
7946 yyerrstatus = 3; /* Each real token shifted decrements this. */
7950 yyn = yypact[yystate];
7951 if (yyn != YYPACT_NINF)
7954 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7962 /* Pop the current state because it cannot handle the error token. */
7967 yydestruct ("Error: popping",
7968 yystos[yystate], yyvsp);
7971 YY_STACK_PRINT (yyss, yyssp);
7977 /* Shift the error token. */
7978 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7984 /*-------------------------------------.
7985 | yyacceptlab -- YYACCEPT comes here. |
7986 `-------------------------------------*/
7991 /*-----------------------------------.
7992 | yyabortlab -- YYABORT comes here. |
7993 `-----------------------------------*/
7998 #if !defined(yyoverflow) || YYERROR_VERBOSE
7999 /*-------------------------------------------------.
8000 | yyexhaustedlab -- memory exhaustion comes here. |
8001 `-------------------------------------------------*/
8003 yyerror (YY_("memory exhausted"));
8009 if (yychar != YYEMPTY)
8010 yydestruct ("Cleanup: discarding lookahead",
8012 /* Do not reclaim the symbols of the rule which action triggered
8013 this YYABORT or YYACCEPT. */
8015 YY_STACK_PRINT (yyss, yyssp);
8016 while (yyssp != yyss)
8018 yydestruct ("Cleanup: popping",
8019 yystos[*yyssp], yyvsp);
8024 YYSTACK_FREE (yyss);
8027 if (yymsg != yymsgbuf)
8028 YYSTACK_FREE (yymsg);
8030 /* Make sure YYID is used. */
8031 return YYID (yyresult);