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 3392 "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 303
2190 /* YYNRULES -- Number of states. */
2191 #define YYNSTATES 517
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, 617, 621, 623, 627, 628, 630,
2270 634, 640, 642, 644, 646, 648, 650, 652, 654, 656,
2271 660, 664, 668, 672, 676, 680, 684, 688, 692, 696,
2272 700, 704, 707, 710, 714, 718, 722, 726, 730, 734,
2273 738, 742, 746, 750, 754, 758, 762, 766, 770, 775,
2274 778, 780, 784, 787, 792, 796, 800, 804, 808, 812,
2275 816, 820, 824, 828, 832, 836, 840, 846, 849, 852,
2276 855, 858, 862, 865, 870, 876, 880, 886, 890, 892,
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, 239, -1, 247, -1, 246, -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, 239, -1, 45, 3, 226, -1, 3, -1,
2300 11, 121, -1, 11, 49, 121, -1, 157, 155, 99,
2301 237, 99, 239, 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, 242, 104, 141, -1, 61, 104,
2307 141, -1, -1, 14, 121, 171, 242, 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, 242,
2342 231, 227, -1, 242, 121, 228, 132, -1, 52, 121,
2343 228, 132, -1, 62, 242, -1, 41, -1, 41, 237,
2344 -1, 242, -1, 238, -1, 242, -1, 238, 100, 242,
2345 -1, 242, -1, 239, 100, 242, -1, -1, 241, -1,
2346 236, 104, 236, -1, 241, 100, 236, 104, 236, -1,
2347 219, -1, 244, -1, 243, -1, 232, -1, 234, -1,
2348 233, -1, 211, -1, 6, -1, 123, 228, 124, -1,
2349 69, 240, 131, -1, 242, 108, 242, -1, 242, 109,
2350 242, -1, 242, 74, 242, -1, 242, 75, 242, -1,
2351 242, 70, 242, -1, 242, 71, 242, -1, 242, 73,
2352 242, -1, 242, 72, 242, -1, 242, 87, 242, -1,
2353 242, 88, 242, -1, 117, 242, -1, 116, 242, -1,
2354 242, 107, 242, -1, 242, 106, 242, -1, 242, 105,
2355 242, -1, 242, 96, 242, -1, 242, 95, 242, -1,
2356 242, 94, 242, -1, 242, 113, 242, -1, 242, 115,
2357 242, -1, 242, 112, 242, -1, 242, 111, 242, -1,
2358 242, 114, 242, -1, 242, 67, 242, -1, 242, 68,
2359 242, -1, 242, 39, 242, -1, 242, 66, 242, -1,
2360 42, 121, 242, 132, -1, 35, 242, -1, 35, -1,
2361 121, 238, 132, -1, 111, 242, -1, 242, 123, 242,
2362 124, -1, 242, 79, 242, -1, 242, 78, 242, -1,
2363 242, 85, 242, -1, 242, 84, 242, -1, 242, 86,
2364 242, -1, 242, 77, 242, -1, 242, 76, 242, -1,
2365 242, 83, 242, -1, 242, 80, 242, -1, 242, 81,
2366 242, -1, 242, 82, 242, -1, 242, 102, 242, -1,
2367 242, 103, 242, 104, 242, -1, 242, 91, -1, 242,
2368 90, -1, 91, 242, -1, 90, 242, -1, 52, 126,
2369 3, -1, 127, 3, -1, 242, 126, 127, 3, -1,
2370 242, 126, 3, 89, 3, -1, 242, 92, 3, -1,
2371 242, 126, 121, 242, 132, -1, 242, 126, 3, -1,
2372 3, -1, 16, 3, -1, 16, 3, 102, 3, -1,
2373 16, 3, 102, 5, -1, 189, 245, -1, 21, 16,
2377 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2378 static const yytype_uint16 yyrline[] =
2380 0, 1878, 1878, 1880, 1880, 1881, 1882, 1884, 1885, 1886,
2381 1887, 1888, 1889, 1890, 1891, 1893, 1893, 1894, 1895, 1897,
2382 1898, 1899, 1900, 1901, 1902, 1903, 1905, 1906, 1908, 1909,
2383 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921,
2384 1922, 1923, 1924, 1925, 1928, 1929, 1930, 1931, 1932, 1933,
2385 1934, 1935, 1939, 1940, 1944, 1951, 1970, 1971, 1975, 1976,
2386 1978, 1979, 1981, 2042, 2043, 2046, 2046, 2065, 2066, 2067,
2387 2072, 2076, 2081, 2082, 2084, 2104, 2152, 2152, 2171, 2171,
2388 2186, 2189, 2192, 2195, 2199, 2200, 2201, 2202, 2203, 2204,
2389 2206, 2217, 2220, 2220, 2251, 2251, 2276, 2276, 2292, 2293,
2390 2294, 2295, 2303, 2312, 2312, 2361, 2365, 2376, 2386, 2403,
2391 2404, 2405, 2407, 2408, 2410, 2410, 2412, 2412, 2435, 2449,
2392 2465, 2466, 2467, 2468, 2475, 2476, 2477, 2478, 2479, 2480,
2393 2481, 2482, 2483, 2484, 2488, 2489, 2491, 2492, 2494, 2495,
2394 2499, 2497, 2505, 2503, 2512, 2513, 2514, 2515, 2516, 2517,
2395 2518, 2519, 2521, 2527, 2528, 2529, 2530, 2531, 2532, 2535,
2396 2567, 2567, 2569, 2569, 2571, 2572, 2574, 2659, 2660, 2663,
2397 2664, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2688, 2692,
2398 2698, 2704, 2712, 2717, 2723, 2731, 2739, 2740, 2741, 2744,
2399 2743, 2760, 2761, 2763, 2762, 2786, 2805, 2819, 2820, 2822,
2400 2823, 2825, 2826, 2827, 2836, 2837, 2841, 2842, 2844, 2845,
2401 2846, 2848, 2852, 2853, 2858, 2859, 2896, 2943, 2964, 2986,
2402 2989, 2996, 2999, 3002, 3005, 3008, 3011, 3016, 3017, 3019,
2403 3025, 3034, 3035, 3036, 3037, 3038, 3039, 3041, 3046, 3066,
2404 3076, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093,
2405 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103,
2406 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113,
2407 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123,
2408 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3132, 3133, 3134,
2409 3135, 3137, 3152, 3158, 3164, 3170, 3176, 3189, 3247, 3356,
2410 3363, 3370, 3377, 3401
2414 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2415 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2416 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2417 static const char *const yytname[] =
2419 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2420 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
2421 "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
2422 "\"namespace\"", "\"package\"", "\"protected\"", "\"public\"",
2423 "\"private\"", "\"use\"", "\"internal\"", "\"new\"", "\"native\"",
2424 "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
2425 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2426 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2427 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2428 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2429 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2430 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2431 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2432 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2433 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2434 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"", "\"+=\"",
2435 "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"",
2436 "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"",
2437 "\">>\"", "prec_none", "below_semicolon", "';'", "','",
2438 "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'",
2439 "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'",
2440 "minusminus_prefix", "plusplus_prefix", "below_curly", "'('", "new2",
2441 "'['", "']'", "'{'", "'.'", "'@'", "above_identifier", "below_else",
2442 "above_function", "'}'", "')'", "$accept", "PROGRAM",
2443 "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
2444 "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
2445 "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
2446 "PACKAGE_INITCODE", "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION",
2447 "VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
2448 "IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
2449 "WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
2450 "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
2451 "CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
2452 "TRY", "$@7", "THROW", "WITH_HEAD", "WITH", "X_IDENTIFIER", "PACKAGE",
2453 "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
2454 "MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
2455 "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
2456 "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
2457 "MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
2458 "SLOT_DECLARATION", "$@12", "SLOT_LIST", "ONE_SLOT", "MAYBECONSTANT",
2459 "CONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
2460 "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
2461 "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
2462 "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
2463 "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
2464 "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
2465 "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_EXPRPAIR_LIST",
2466 "EXPRPAIR_LIST", "E", "MEMBER", "VAR_READ", "NAMESPACE_ID",
2467 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2472 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2474 static const yytype_uint16 yytoknum[] =
2476 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2477 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2478 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2479 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2480 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2481 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2482 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2483 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2484 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2485 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2486 44, 354, 61, 63, 58, 124, 94, 38, 60, 62,
2487 355, 45, 43, 47, 42, 37, 126, 33, 356, 357,
2488 358, 40, 359, 91, 93, 123, 46, 64, 360, 361,
2493 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2494 static const yytype_uint8 yyr1[] =
2496 0, 133, 134, 135, 135, 136, 136, 137, 137, 137,
2497 137, 137, 137, 137, 137, 138, 138, 139, 139, 140,
2498 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
2499 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
2500 143, 143, 143, 143, 144, 144, 144, 144, 144, 144,
2501 144, 144, 145, 145, 146, 147, 148, 148, 149, 149,
2502 150, 150, 151, 152, 152, 154, 153, 155, 155, 155,
2503 156, 156, 157, 157, 158, 159, 161, 160, 163, 162,
2504 164, 164, 165, 165, 166, 166, 166, 166, 167, 167,
2505 168, 169, 171, 170, 173, 172, 175, 174, 176, 176,
2506 177, 177, 177, 179, 178, 180, 180, 181, 182, 183,
2507 183, 183, 184, 184, 186, 185, 187, 185, 188, 188,
2508 189, 189, 190, 190, 191, 191, 191, 191, 191, 191,
2509 191, 191, 191, 191, 192, 192, 193, 193, 194, 194,
2510 196, 195, 198, 197, 199, 199, 200, 200, 201, 201,
2511 201, 201, 201, 202, 202, 203, 203, 204, 204, 204,
2512 205, 205, 207, 206, 208, 208, 209, 210, 210, 211,
2513 211, 211, 211, 211, 211, 211, 211, 211, 212, 212,
2514 212, 212, 213, 213, 214, 214, 215, 215, 215, 217,
2515 216, 218, 218, 220, 219, 221, 222, 223, 223, 224,
2516 224, 225, 225, 225, 226, 226, 227, 227, 228, 228,
2517 228, 229, 230, 229, 231, 232, 233, 233, 234, 235,
2518 235, 236, 237, 238, 238, 239, 239, 240, 240, 241,
2519 241, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2520 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2521 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2522 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2523 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2524 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
2525 242, 242, 242, 242, 242, 242, 242, 243, 244, 245,
2529 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2530 static const yytype_uint8 yyr2[] =
2532 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2533 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2534 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2535 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2536 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
2537 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
2538 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2539 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2540 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2541 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2542 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
2543 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
2544 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
2545 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
2546 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
2547 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
2548 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
2549 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
2550 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
2551 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
2552 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
2553 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
2554 2, 1, 1, 1, 3, 1, 3, 0, 1, 3,
2555 5, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2556 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2557 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
2558 3, 3, 3, 3, 3, 3, 3, 3, 4, 2,
2559 1, 3, 2, 4, 3, 3, 3, 3, 3, 3,
2560 3, 3, 3, 3, 3, 3, 5, 2, 2, 2,
2561 2, 3, 2, 4, 5, 3, 5, 3, 1, 2,
2565 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2566 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2567 means the default is an error. */
2568 static const yytype_uint16 yydefact[] =
2570 120, 298, 133, 172, 238, 169, 170, 171, 0, 0,
2571 78, 0, 0, 126, 124, 125, 0, 132, 0, 131,
2572 192, 176, 177, 270, 127, 0, 0, 0, 175, 128,
2573 130, 129, 0, 0, 174, 173, 0, 0, 227, 0,
2574 0, 14, 0, 0, 0, 0, 208, 120, 0, 0,
2575 2, 120, 5, 54, 12, 0, 36, 67, 31, 32,
2576 33, 34, 35, 38, 120, 37, 7, 30, 0, 121,
2577 122, 9, 8, 11, 237, 10, 231, 234, 236, 235,
2578 39, 225, 233, 232, 41, 40, 0, 0, 72, 76,
2579 120, 92, 109, 111, 110, 116, 113, 0, 0, 298,
2580 214, 191, 0, 269, 0, 0, 118, 0, 103, 208,
2581 0, 218, 65, 0, 0, 228, 221, 290, 289, 272,
2582 252, 251, 0, 223, 0, 209, 210, 211, 82, 0,
2583 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
2584 46, 47, 48, 50, 0, 49, 292, 1, 6, 120,
2585 298, 0, 68, 0, 0, 69, 53, 108, 0, 188,
2586 0, 161, 0, 160, 162, 302, 123, 0, 0, 0,
2587 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2589 0, 288, 287, 0, 0, 0, 0, 0, 0, 0,
2590 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
2591 0, 0, 55, 73, 0, 0, 0, 120, 114, 0,
2592 195, 0, 198, 197, 303, 206, 178, 0, 222, 0,
2593 0, 27, 0, 291, 0, 0, 240, 0, 0, 271,
2594 239, 212, 213, 83, 205, 59, 60, 105, 220, 58,
2595 81, 42, 28, 120, 0, 205, 0, 0, 52, 299,
2596 187, 186, 0, 134, 136, 0, 226, 266, 267, 264,
2597 265, 245, 246, 248, 247, 243, 244, 280, 279, 275,
2598 274, 282, 283, 284, 281, 277, 276, 278, 249, 250,
2599 295, 258, 257, 256, 285, 0, 255, 254, 253, 241,
2600 242, 262, 261, 259, 263, 260, 0, 0, 297, 0,
2601 0, 0, 0, 0, 25, 0, 120, 17, 23, 0,
2602 20, 19, 22, 21, 120, 112, 0, 208, 215, 167,
2603 0, 0, 179, 183, 107, 119, 196, 268, 0, 26,
2604 217, 0, 229, 0, 224, 0, 57, 0, 120, 13,
2605 57, 0, 0, 0, 0, 0, 138, 0, 0, 205,
2606 163, 164, 0, 216, 273, 0, 0, 293, 120, 0,
2607 0, 117, 18, 120, 0, 0, 0, 0, 185, 180,
2608 205, 0, 0, 120, 0, 203, 202, 201, 204, 0,
2609 62, 61, 51, 0, 120, 300, 301, 178, 135, 0,
2610 0, 199, 137, 142, 57, 0, 286, 294, 296, 77,
2611 0, 84, 0, 115, 207, 168, 167, 0, 0, 182,
2612 0, 0, 98, 102, 100, 104, 63, 230, 56, 0,
2613 75, 0, 139, 140, 0, 120, 166, 165, 79, 0,
2614 0, 0, 85, 88, 86, 24, 184, 193, 181, 96,
2615 0, 99, 101, 120, 66, 120, 205, 120, 200, 0,
2616 157, 0, 0, 120, 155, 0, 27, 93, 89, 87,
2617 27, 27, 205, 64, 74, 0, 148, 152, 0, 0,
2618 0, 120, 146, 150, 151, 158, 188, 143, 156, 27,
2619 91, 0, 0, 0, 189, 120, 141, 147, 0, 90,
2620 194, 97, 94, 27, 0, 0, 0, 0, 149, 178,
2621 27, 190, 0, 0, 205, 95, 159
2624 /* YYDEFGOTO[NTERM-NUM]. */
2625 static const yytype_int16 yydefgoto[] =
2627 -1, 49, 50, 51, 52, 315, 316, 317, 338, 339,
2628 137, 138, 157, 318, 139, 390, 140, 249, 246, 454,
2629 56, 234, 153, 154, 57, 58, 59, 60, 214, 61,
2630 90, 141, 142, 441, 442, 443, 444, 62, 216, 422,
2631 506, 423, 471, 424, 425, 63, 231, 143, 64, 65,
2632 220, 221, 66, 324, 217, 67, 144, 69, 70, 356,
2633 358, 400, 320, 457, 321, 435, 480, 481, 482, 462,
2634 463, 464, 164, 322, 265, 360, 361, 378, 74, 331,
2635 332, 333, 262, 323, 503, 102, 76, 470, 222, 223,
2636 387, 402, 388, 346, 328, 124, 125, 126, 225, 77,
2637 78, 79, 145, 127, 227, 228, 80, 114, 115, 81,
2641 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2643 #define YYPACT_NINF -406
2644 static const yytype_int16 yypact[] =
2646 1661, -65, -406, -406, -406, -406, -406, -406, -10, -85,
2647 -406, -59, 54, -406, -406, -406, 66, -406, 2104, -406,
2648 101, -406, -406, 2159, -406, -9, 89, -6, -406, -406,
2649 -406, -406, -3, -51, -406, -406, 2104, 7, 2104, 2104,
2650 2104, -406, 2104, 2104, 2104, 2104, 2104, 629, 120, 130,
2651 -406, 500, -406, -406, -406, -1, -406, 2034, -406, -406,
2652 -406, -406, -406, -406, 1911, -406, -406, -406, 244, 364,
2653 -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
2654 31, 2613, -406, -406, -406, -406, 129, 12, -406, -406,
2655 1911, -406, -406, -406, -406, -406, -406, -81, 89, -406,
2656 -54, -406, 18, 119, 2104, 8, -406, 2104, -406, 2104,
2657 132, 119, -406, 36, 5, 43, 2613, 119, 119, 595,
2658 119, 119, -53, 2613, 21, 46, 2104, -406, 144, 145,
2659 2104, 2104, 145, 177, -406, -406, 758, -406, -406, 77,
2660 -406, -406, -406, -406, 188, -406, -406, -406, -406, 1016,
2661 140, 209, -406, 115, 148, 31, 117, -406, 217, 14,
2662 223, -406, 224, -406, -406, -406, -406, 2104, 2104, 2104,
2663 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2664 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2665 2104, -406, -406, 227, 2104, 2104, 2104, 2104, 2104, 2104,
2666 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2667 2104, 17, -406, -406, 2104, 219, 2104, 1145, -406, 89,
2668 107, 108, -406, -406, -406, 118, 15, 104, 141, 64,
2669 2217, 1786, 116, -406, 2104, 2104, -406, 2104, 2104, -406,
2670 -406, -406, -406, -406, 143, 156, -406, -406, -406, 156,
2671 -406, -406, -406, 1911, 126, 143, 2104, 2104, -406, 157,
2672 -406, -406, 255, 208, 211, 259, 2613, 492, 328, 328,
2673 328, 2979, 2979, 2979, 2979, 492, 492, 2613, 2613, 2613,
2674 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2674, 2735,
2675 -406, 354, 354, 354, 2613, 2430, 2796, 2857, 2918, 492,
2676 492, 595, 595, 119, 119, 119, 135, 2491, 181, 2104,
2677 269, 149, 152, 2288, -406, 151, 1274, -406, -406, 155,
2678 -406, -406, -406, -406, 1145, -406, 89, 2104, -406, -19,
2679 281, 154, 191, -406, -406, -406, 162, -406, 163, 1786,
2680 -406, 161, -406, 193, 2613, 86, 196, 145, 887, -406,
2681 -24, 200, 169, 124, 174, 89, 287, 89, 178, 143,
2682 213, -406, 2104, -406, -406, 306, 2359, -406, 1911, 2104,
2683 190, -406, -406, 1145, 189, 187, 32, 86, -406, -406,
2684 143, 16, 94, 1911, 2104, -406, -406, -406, -406, 2104,
2685 -406, -406, -406, 2104, 1911, -406, -406, 15, -406, 89,
2686 197, -406, 228, -406, 196, 259, 2613, -406, -406, -406,
2687 204, 13, 198, -406, -406, -406, 235, 214, 281, -406,
2688 215, 220, -406, -406, 94, -406, 257, -406, -406, -37,
2689 -406, 212, 228, -406, 89, 231, -406, -406, -406, 2104,
2690 239, 222, 13, -406, -406, -406, -406, -406, -406, -406,
2691 342, -406, -406, 1911, -406, 1911, 143, 1403, -406, 343,
2692 -406, 323, 226, 286, -406, 2552, 1786, -406, -406, -406,
2693 1786, 1786, 143, -406, -406, 225, -406, -406, 229, 221,
2694 230, 1532, -406, -406, -406, -406, 14, -406, -406, 1786,
2695 -406, 232, 233, 234, -406, 1403, -406, -406, 348, -406,
2696 -406, -406, -406, 1786, 238, 237, 240, 246, -406, 15,
2697 1786, -406, 247, 249, 143, -406, -406
2700 /* YYPGOTO[NTERM-NUM]. */
2701 static const yytype_int16 yypgoto[] =
2703 -406, -406, 203, -406, 308, -296, -406, 62, -405, -30,
2704 1, -56, -83, 49, 2, -23, 330, 260, 44, -406,
2705 -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
2706 -406, -406, -406, -406, -406, -52, -50, -406, -406, -31,
2707 -406, -26, -406, -406, -406, -406, -406, -406, -406, -406,
2708 9, 76, -406, -406, -406, -406, 0, -406, 331, -406,
2709 -406, -406, 50, -406, 56, -406, -91, -406, -76, -406,
2710 -406, -57, -406, 3, -406, -406, 10, -8, 33, -384,
2711 -406, -308, -79, 4, -406, -406, -406, -406, -406, 387,
2712 -92, 22, 37, -243, -406, -95, -406, -406, -406, -406,
2713 -406, -406, -406, -29, -115, 371, -46, -406, -406, -13,
2714 -406, -406, -406, -406, -406
2717 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2718 positive, shift that token. If negative, reduce the rule which
2719 number is the opposite. If zero, do what YYDEFACT says.
2720 If YYTABLE_NINF, syntax error. */
2721 #define YYTABLE_NINF -155
2722 static const yytype_int16 yytable[] =
2724 68, 53, 55, 73, 75, 100, 224, 215, 156, 113,
2725 103, 155, 350, 431, 232, 247, 248, 136, 329, 329,
2726 308, 96, 379, 111, 86, 116, 117, 118, 374, 119,
2727 120, 121, 123, 116, 156, 96, 89, 3, 193, 87,
2728 5, 6, 7, -70, 218, 219, 439, 238, 260, 54,
2729 71, 68, 53, 55, 73, 75, 72, 92, 93, 21,
2730 22, 490, 91, 167, 261, 491, 492, 92, 93, 210,
2731 109, 94, 211, 419, 440, 110, 28, 412, 389, 239,
2732 252, 94, 98, 376, 499, 377, 34, 35, 97, 92,
2733 93, 123, 92, 93, 230, 455, 116, 242, 507, 311,
2734 54, 71, 105, 94, 101, 513, 94, 72, 330, 418,
2735 448, 88, 104, 116, 306, 107, 404, 123, 123, 341,
2736 420, 385, 108, 146, 149, 512, 421, 395, 112, 396,
2737 147, 167, 212, 213, 229, 233, 236, 417, 309, 226,
2738 235, 351, 352, 237, 310, 240, 241, 243, 244, 68,
2739 53, 55, 73, 75, 266, 267, 268, 269, 270, 271,
2740 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
2741 282, 283, 284, 285, 286, 287, 288, 289, 335, 95,
2742 250, 291, 292, 293, 294, 295, 296, 297, 298, 299,
2743 300, 301, 302, 303, 304, 305, 116, 307, 54, 71,
2744 386, 123, 253, 313, 158, 72, 342, -71, 343, 191,
2745 192, 193, 255, 475, 256, 257, 258, 68, 53, 319,
2746 259, 123, 116, 348, 116, 344, 263, 264, 325, 493,
2747 290, 312, 375, -113, 326, 2, 334, 158, 336, 327,
2748 209, 238, 210, 123, 123, 211, 159, 345, 340, 13,
2749 14, 15, 161, 17, 410, 19, 347, 349, 354, 353,
2750 158, 355, 359, 398, 357, 401, 163, 363, 24, 159,
2751 365, 516, 367, 369, 160, 161, 459, 29, 30, 31,
2752 373, 368, 371, 252, 329, 409, 380, 162, -112, 163,
2753 2, 381, 252, 383, 382, 397, 366, 384, 389, 393,
2754 426, 394, 399, 403, 13, 14, 15, 401, 17, 407,
2755 19, 430, 156, 405, 116, 411, 68, 53, 319, 414,
2756 413, 453, 433, 24, 68, 53, 319, 156, 434, 445,
2757 460, 459, 29, 30, 31, 336, 438, 376, 156, 447,
2758 449, 450, 458, 466, 456, 472, 485, 429, 486, 406,
2759 494, 505, 254, 467, 495, 427, 123, 487, 509, 148,
2760 428, 496, -153, 500, 501, 510, 502, 168, 2, 508,
2761 473, 116, 474, 68, 53, 319, 116, 511, 372, 514,
2762 515, 436, 13, 14, 15, 460, 17, 152, 19, 245,
2763 468, 391, 469, 451, -155, -155, -155, 156, 452, 156,
2764 166, 24, 176, 177, 504, 497, 488, 498, 446, 415,
2765 29, 30, 31, 106, 416, 437, 122, -154, 191, 192,
2766 193, 432, 194, 195, 196, 0, 465, 0, 0, 0,
2767 0, 0, 0, 0, 0, 461, 202, 203, 0, 204,
2768 205, 206, 207, 208, 191, 192, 193, 0, 0, 209,
2769 0, 210, 0, 0, 211, 0, 0, 479, 477, 478,
2770 483, 484, 0, 461, 0, 204, 205, 206, 207, 208,
2771 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
2772 211, 479, 477, 478, 483, 484, 0, 0, 0, 0,
2773 0, 0, 0, 0, 0, 479, 477, 478, 483, 484,
2774 -4, 0, 0, 1, 2, 3, 4, 0, 5, 6,
2775 7, 8, 9, 10, 11, 0, 0, 12, 13, 14,
2776 15, 16, 17, 18, 19, 0, 0, 21, 22, 0,
2777 0, -155, 0, 0, 0, 23, 0, 24, 25, 0,
2778 26, 0, 27, 0, 28, 0, 29, 30, 31, 0,
2779 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
2780 0, 0, 36, 37, 0, 0, -155, -155, 0, 38,
2781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2782 0, 0, 191, 192, 193, 0, 194, 195, 196, 0,
2783 39, 40, 0, 0, 0, 0, 0, 0, 0, 41,
2784 -155, -155, 0, 204, 205, 206, 207, 208, 0, 0,
2785 0, 42, 0, 209, 0, 210, 43, 44, 211, 0,
2786 0, 45, 0, 46, 0, 47, 0, 48, 0, 0,
2787 0, -4, 1, 2, 3, 4, 0, 5, 6, 7,
2788 8, 9, 10, 11, 0, 0, 0, 13, 14, 15,
2789 16, 17, 18, 19, 20, 0, 21, 22, 128, 0,
2790 129, 0, 0, 0, 23, 130, 24, 25, 0, 26,
2791 131, 27, 0, 28, 132, 29, 30, 31, 0, 0,
2792 32, 33, 0, 34, 35, 191, 192, 193, 0, 0,
2793 0, 36, 37, 0, 133, 0, 0, 0, 38, 0,
2794 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
2795 208, 0, 0, 0, 0, 0, 209, 0, 210, 39,
2796 40, 211, 0, 0, 0, 0, 0, 0, 134, 0,
2797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2798 42, 0, 0, 0, 0, 43, 44, 0, 0, 0,
2799 45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
2800 135, 1, 2, 3, 4, 0, 5, 6, 7, 8,
2801 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
2802 17, 18, 19, 20, 0, 21, 22, 128, 0, 129,
2803 0, 0, 0, 23, 130, 24, 25, 0, 26, 131,
2804 27, 0, 28, 132, 29, 30, 31, 0, 0, 32,
2805 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
2806 36, 37, 0, 133, 0, 0, 0, 38, 0, 0,
2807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2808 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
2809 0, 0, 0, 0, 0, 0, 0, 134, 0, 0,
2810 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
2811 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
2812 0, 46, 0, 47, 0, 48, 0, 0, 0, 251,
2813 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2814 10, 11, 0, 0, 0, 13, 14, 15, 16, 17,
2815 18, 19, 20, 0, 21, 22, 128, 0, 129, 0,
2816 0, 0, 23, 130, 24, 25, 0, 26, 131, 27,
2817 0, 28, 132, 29, 30, 31, 0, 0, 32, 33,
2818 0, 34, 35, 0, 0, 0, 0, 0, 0, 36,
2819 37, 0, 133, 0, 0, 0, 38, 0, 0, 0,
2820 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2821 0, 0, 0, 0, 0, 0, 0, 39, 40, 0,
2822 0, 0, 0, 0, 0, 0, 134, 0, 0, 0,
2823 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
2824 0, 0, 0, 43, 44, 0, 0, 0, 45, 0,
2825 46, 0, 47, 0, 48, 0, 0, 0, 392, 1,
2826 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2827 11, 0, 0, 12, 13, 14, 15, 16, 17, 18,
2828 19, 0, 0, 21, 22, 0, 0, 0, 0, 0,
2829 0, 23, 0, 24, 25, 0, 26, 0, 27, 0,
2830 28, 0, 29, 30, 31, 0, 0, 32, 33, 0,
2831 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
2832 0, 0, 0, 0, 0, 38, 0, 0, 0, 0,
2833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2834 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2835 0, 0, 0, 0, 0, 41, 0, 0, 0, 0,
2836 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2837 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2838 0, 47, 0, 48, 0, 0, 0, -3, 1, 2,
2839 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
2840 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
2841 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
2842 23, 0, 24, 25, 0, 26, 0, 27, 0, 28,
2843 0, 29, 30, 31, 0, 0, 32, 33, 0, 34,
2844 35, 0, 0, 0, 0, 0, 0, 36, 37, 0,
2845 0, 0, 0, 0, 38, 0, 0, 0, 0, 0,
2846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2847 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
2848 0, 0, 0, 0, 314, 0, 0, 0, 0, 0,
2849 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2850 0, 43, 44, 0, 0, 0, 45, 0, 46, 0,
2851 47, 0, 48, 0, 0, 0, -15, 1, 2, 3,
2852 4, 0, 5, 6, 7, 8, 9, 10, 11, 0,
2853 0, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2854 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
2855 0, 24, 25, 0, 26, 0, 27, 0, 28, 0,
2856 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
2857 0, 0, 0, 0, 0, 0, 36, 37, 0, 0,
2858 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
2859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2860 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2861 0, 0, 0, 314, 0, 0, 0, 0, 0, 0,
2862 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
2863 43, 44, 0, 0, 0, 45, 0, 46, 0, 47,
2864 0, 48, 0, 0, 0, -16, 1, 2, 3, 4,
2865 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
2866 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2867 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
2868 24, 25, 0, 26, 0, 27, 0, 28, 0, 29,
2869 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
2870 0, 0, 0, 0, 0, 36, 37, 0, 0, 0,
2871 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
2872 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2873 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
2874 0, 0, 476, 0, 0, 0, 0, 0, 0, 0,
2875 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
2876 44, 0, 0, 0, 45, 0, 46, 0, 47, 0,
2877 48, 0, 0, 0, -144, 1, 2, 3, 4, 0,
2878 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
2879 13, 14, 15, 16, 17, 18, 19, 0, 0, 21,
2880 22, 0, 0, 0, 0, 0, 0, 23, 0, 24,
2881 25, 0, 26, 0, 27, 0, 28, 0, 29, 30,
2882 31, 0, 0, 32, 33, 0, 34, 35, 0, 0,
2883 0, 0, 0, 0, 36, 37, 0, 0, 0, 0,
2884 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
2885 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2886 0, 0, 39, 40, 0, 0, 0, 0, 0, 0,
2887 0, 476, 0, 0, 0, 0, 0, 0, 0, 0,
2888 0, 0, 0, 42, 0, 0, 0, 0, 43, 44,
2889 0, 0, 0, 45, 0, 46, 0, 47, 0, 48,
2890 0, -3, 0, -145, 1, 2, 3, 4, 0, 5,
2891 6, 7, 8, 9, 10, 11, 0, 0, 12, 13,
2892 14, 15, 16, 17, 18, 19, 0, 0, 21, 22,
2893 0, 0, 0, 0, 0, 0, 23, 0, 24, 25,
2894 0, 26, 0, 27, 0, 28, 0, 29, 30, 31,
2895 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
2896 0, 0, 0, 36, 37, 0, 0, 0, 0, 0,
2897 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2899 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2900 41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2901 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2902 0, 0, 45, 0, 46, 0, 47, 0, 48, 1,
2903 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
2904 11, 0, -120, 0, 13, 14, 15, 16, 17, 18,
2905 19, 20, 0, 21, 22, 128, 0, 129, 0, 0,
2906 0, 23, 130, 24, 25, 0, 26, 131, 27, 0,
2907 28, 132, 29, 30, 31, 0, 0, 32, 33, 0,
2908 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
2909 0, 133, 0, 0, 0, 38, 0, 0, 0, 0,
2910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2911 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
2912 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
2913 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
2914 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
2915 0, 47, 0, 48, 1, 2, 3, 4, 0, 5,
2916 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
2917 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
2918 128, 0, 129, 0, 0, 0, 23, 130, 24, 25,
2919 0, 26, 131, 27, 0, 28, 132, 29, 30, 31,
2920 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
2921 0, 0, 0, 36, 37, 0, 133, 0, 0, 0,
2922 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2923 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2924 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
2925 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2926 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
2927 0, 0, 45, 0, 46, 0, 47, 150, 48, 3,
2928 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
2929 0, 0, 0, 0, 0, 0, 0, 18, 0, 20,
2930 0, 21, 22, 0, 0, 129, 0, 0, 0, 23,
2931 0, 0, 0, 0, 0, 0, 27, 0, 28, 151,
2932 0, 0, 0, 0, 0, 0, 33, 0, 34, 35,
2933 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
2934 0, 0, 0, 38, 0, 0, 0, 99, 0, 3,
2935 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
2936 0, 0, 0, 0, 39, 40, 0, 18, 0, 20,
2937 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
2938 0, 0, 0, 0, 0, 42, 27, 0, 28, 0,
2939 43, 44, 0, 0, 0, 45, 33, 46, 34, 35,
2940 0, 48, 99, 0, 3, 4, 36, 5, 6, 7,
2941 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
2942 0, 0, 18, 0, 20, 0, 21, 22, 0, 0,
2943 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
2944 0, 0, 0, 28, 0, 0, 0, 0, 0, 0,
2945 0, 33, 0, 34, 35, 42, 0, 0, 0, 0,
2946 43, 44, 0, 0, 0, 45, 0, 46, 38, 0,
2947 0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
2948 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
2949 40, 0, 0, 0, 0, 0, 168, 0, 0, 0,
2950 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2952 45, 0, 46, 169, 170, 171, 48, 172, 173, 174,
2953 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
2954 185, 186, 187, 188, 189, 190, 0, 191, 192, 193,
2955 0, 194, 195, 196, 0, 0, 0, 0, 0, 197,
2956 198, 0, 199, 200, 201, 202, 203, 168, 204, 205,
2957 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
2958 210, 0, 0, 211, 0, 0, 0, 0, 0, 337,
2959 0, 0, 0, 0, 169, 170, 171, 0, 172, 173,
2960 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2961 184, 185, 186, 187, 188, 189, 190, 0, 191, 192,
2962 193, 0, 194, 195, 196, 0, 0, 0, 0, 0,
2963 197, 198, 0, 199, 200, 201, 202, 203, 168, 204,
2964 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
2965 0, 210, 0, 0, 211, 0, 0, 0, 0, 0,
2966 370, 0, 0, 0, 0, 169, 170, 171, 0, 172,
2967 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2968 183, 184, 185, 186, 187, 188, 189, 190, 0, 191,
2969 192, 193, 0, 194, 195, 196, 0, 0, 0, 0,
2970 0, 197, 198, 0, 199, 200, 201, 202, 203, 168,
2971 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
2972 209, 0, 210, 0, 0, 211, 0, 0, 0, 0,
2973 0, 408, 0, 0, 0, 0, 169, 170, 171, 0,
2974 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2975 182, 183, 184, 185, 186, 187, 188, 189, 190, 0,
2976 191, 192, 193, 0, 194, 195, 196, 0, 0, 0,
2977 168, 0, 197, 198, 362, 199, 200, 201, 202, 203,
2978 0, 204, 205, 206, 207, 208, 0, 0, 0, 0,
2979 0, 209, 0, 210, 0, 0, 211, 169, 170, 171,
2980 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
2981 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
2982 0, 191, 192, 193, 0, 194, 195, 196, 0, 0,
2983 0, 168, 0, 197, 198, 0, 199, 200, 201, 202,
2984 203, 0, 204, 205, 206, 207, 208, 0, 0, 0,
2985 0, 0, 209, 0, 210, 364, 0, 211, 169, 170,
2986 171, 0, 172, 173, 174, 175, 176, 177, 178, 179,
2987 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
2988 190, 0, 191, 192, 193, 0, 194, 195, 196, 0,
2989 0, 0, 168, 0, 197, 198, 489, 199, 200, 201,
2990 202, 203, 0, 204, 205, 206, 207, 208, 0, 0,
2991 0, 0, 0, 209, 0, 210, 0, 0, 211, 169,
2992 170, 171, 0, 172, 173, 174, 175, 176, 177, 178,
2993 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
2994 189, 190, 0, 191, 192, 193, 0, 194, 195, 196,
2995 0, 0, 0, 168, 0, 197, 198, 0, 199, 200,
2996 201, 202, 203, 0, 204, 205, 206, 207, 208, 0,
2997 0, 0, 0, 0, 209, 0, 210, 0, 0, 211,
2998 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
2999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3000 0, 0, 190, 0, 191, 192, 193, 0, 194, 195,
3001 196, 0, 0, 0, 168, 0, 0, 0, 0, 199,
3002 200, 201, 202, 203, 0, 204, 205, 206, 207, 208,
3003 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
3004 211, 169, 170, 171, 0, 172, 173, 174, 175, 176,
3005 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3006 0, 0, 0, 0, 0, 191, 192, 193, 0, 194,
3007 195, 196, 0, 0, 0, 168, 0, 0, 0, 0,
3008 199, 200, 201, 202, 203, 0, 204, 205, 206, 207,
3009 208, 0, 0, 0, 0, 0, 209, 0, 210, 0,
3010 0, 211, 169, 170, 171, 0, 172, 173, 174, 175,
3011 176, 177, 0, 0, 0, 0, 0, 0, 0, 0,
3012 0, 0, 0, 0, 0, 0, 191, 192, 193, 0,
3013 194, 195, 196, 0, 0, 0, 168, 0, 0, 0,
3014 0, 0, 200, 201, 202, 203, 0, 204, 205, 206,
3015 207, 208, 0, 0, 0, 0, 0, 209, 0, 210,
3016 0, 0, 211, 169, 170, 171, 0, 172, 173, 174,
3017 175, 176, 177, 0, 0, 0, 0, 0, 0, 0,
3018 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
3019 0, 194, 195, 196, 0, 0, 0, 168, 0, 0,
3020 0, 0, 0, 0, 201, 202, 203, 0, 204, 205,
3021 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
3022 210, 0, 0, 211, 169, 170, 171, 0, 172, 173,
3023 174, 175, 176, 177, 0, 0, 0, 0, 0, 0,
3024 0, 0, 0, 0, 0, 0, 0, 0, 191, 192,
3025 193, 0, 194, 195, 196, 0, 0, 0, 168, 0,
3026 0, 0, 0, 0, 0, -155, 202, 203, 0, 204,
3027 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
3028 0, 210, 0, 0, 211, 169, 170, 171, 0, -155,
3029 -155, -155, -155, 176, 177, 0, 0, 0, 0, 0,
3030 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
3031 192, 193, 0, 194, 195, 196, 0, 0, 0, 0,
3032 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
3033 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
3034 209, 0, 210, 0, 0, 211
3037 static const yytype_int16 yycheck[] =
3039 0, 0, 0, 0, 0, 18, 98, 90, 64, 38,
3040 23, 57, 255, 397, 109, 130, 131, 47, 3, 3,
3041 3, 12, 330, 36, 89, 38, 39, 40, 324, 42,
3042 43, 44, 45, 46, 90, 26, 121, 5, 92, 49,
3043 8, 9, 10, 67, 125, 126, 33, 100, 34, 0,
3044 0, 51, 51, 51, 51, 51, 0, 3, 4, 27,
3045 28, 466, 121, 100, 50, 470, 471, 3, 4, 123,
3046 121, 17, 126, 381, 61, 126, 44, 373, 102, 132,
3047 136, 17, 16, 102, 489, 104, 54, 55, 12, 3,
3048 4, 104, 3, 4, 107, 132, 109, 126, 503, 214,
3049 51, 51, 26, 17, 3, 510, 17, 51, 93, 93,
3050 418, 121, 121, 126, 209, 121, 359, 130, 131, 234,
3051 26, 35, 125, 3, 125, 509, 32, 3, 121, 5,
3052 0, 100, 3, 121, 126, 3, 131, 380, 121, 121,
3053 104, 256, 257, 100, 127, 124, 100, 3, 3, 149,
3054 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
3055 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
3056 183, 184, 185, 186, 187, 188, 189, 190, 114, 125,
3057 3, 194, 195, 196, 197, 198, 199, 200, 201, 202,
3058 203, 204, 205, 206, 207, 208, 209, 210, 149, 149,
3059 114, 214, 125, 216, 16, 149, 235, 67, 237, 90,
3060 91, 92, 3, 456, 99, 67, 99, 217, 217, 217,
3061 3, 234, 235, 253, 237, 238, 3, 3, 219, 472,
3062 3, 12, 327, 126, 126, 4, 132, 16, 229, 121,
3063 121, 100, 123, 256, 257, 126, 25, 104, 132, 18,
3064 19, 20, 31, 22, 369, 24, 100, 131, 3, 102,
3065 16, 53, 3, 355, 53, 357, 45, 132, 37, 25,
3066 89, 514, 3, 121, 30, 31, 45, 46, 47, 48,
3067 125, 132, 131, 339, 3, 368, 132, 43, 126, 45,
3068 4, 100, 348, 132, 131, 121, 309, 104, 102, 99,
3069 383, 132, 15, 125, 18, 19, 20, 399, 22, 3,
3070 24, 394, 368, 100, 327, 125, 316, 316, 316, 132,
3071 131, 64, 125, 37, 324, 324, 324, 383, 100, 131,
3072 99, 45, 46, 47, 48, 326, 132, 102, 394, 125,
3073 125, 121, 434, 104, 132, 3, 3, 393, 25, 362,
3074 125, 3, 149, 131, 125, 384, 369, 131, 121, 51,
3075 389, 131, 131, 131, 131, 125, 132, 39, 4, 131,
3076 453, 384, 455, 373, 373, 373, 389, 131, 316, 132,
3077 131, 404, 18, 19, 20, 99, 22, 57, 24, 129,
3078 442, 347, 442, 424, 66, 67, 68, 453, 424, 455,
3079 69, 37, 74, 75, 495, 481, 463, 486, 416, 376,
3080 46, 47, 48, 26, 377, 405, 45, 131, 90, 91,
3081 92, 399, 94, 95, 96, -1, 439, -1, -1, -1,
3082 -1, -1, -1, -1, -1, 435, 108, 109, -1, 111,
3083 112, 113, 114, 115, 90, 91, 92, -1, -1, 121,
3084 -1, 123, -1, -1, 126, -1, -1, 457, 457, 457,
3085 457, 457, -1, 463, -1, 111, 112, 113, 114, 115,
3086 -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
3087 126, 481, 481, 481, 481, 481, -1, -1, -1, -1,
3088 -1, -1, -1, -1, -1, 495, 495, 495, 495, 495,
3089 0, -1, -1, 3, 4, 5, 6, -1, 8, 9,
3090 10, 11, 12, 13, 14, -1, -1, 17, 18, 19,
3091 20, 21, 22, 23, 24, -1, -1, 27, 28, -1,
3092 -1, 39, -1, -1, -1, 35, -1, 37, 38, -1,
3093 40, -1, 42, -1, 44, -1, 46, 47, 48, -1,
3094 -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
3095 -1, -1, 62, 63, -1, -1, 74, 75, -1, 69,
3096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3097 -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3098 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
3099 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3100 -1, 111, -1, 121, -1, 123, 116, 117, 126, -1,
3101 -1, 121, -1, 123, -1, 125, -1, 127, -1, -1,
3102 -1, 131, 3, 4, 5, 6, -1, 8, 9, 10,
3103 11, 12, 13, 14, -1, -1, -1, 18, 19, 20,
3104 21, 22, 23, 24, 25, -1, 27, 28, 29, -1,
3105 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
3106 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
3107 51, 52, -1, 54, 55, 90, 91, 92, -1, -1,
3108 -1, 62, 63, -1, 65, -1, -1, -1, 69, -1,
3109 -1, -1, -1, -1, -1, -1, -1, -1, 113, 114,
3110 115, -1, -1, -1, -1, -1, 121, -1, 123, 90,
3111 91, 126, -1, -1, -1, -1, -1, -1, 99, -1,
3112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3113 111, -1, -1, -1, -1, 116, 117, -1, -1, -1,
3114 121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
3115 131, 3, 4, 5, 6, -1, 8, 9, 10, 11,
3116 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
3117 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
3118 -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
3119 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
3120 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
3121 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
3122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3123 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3124 -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
3125 -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
3126 -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
3127 -1, 123, -1, 125, -1, 127, -1, -1, -1, 131,
3128 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3129 13, 14, -1, -1, -1, 18, 19, 20, 21, 22,
3130 23, 24, 25, -1, 27, 28, 29, -1, 31, -1,
3131 -1, -1, 35, 36, 37, 38, -1, 40, 41, 42,
3132 -1, 44, 45, 46, 47, 48, -1, -1, 51, 52,
3133 -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
3134 63, -1, 65, -1, -1, -1, 69, -1, -1, -1,
3135 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3136 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3137 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3138 -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
3139 -1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
3140 123, -1, 125, -1, 127, -1, -1, -1, 131, 3,
3141 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3142 14, -1, -1, 17, 18, 19, 20, 21, 22, 23,
3143 24, -1, -1, 27, 28, -1, -1, -1, -1, -1,
3144 -1, 35, -1, 37, 38, -1, 40, -1, 42, -1,
3145 44, -1, 46, 47, 48, -1, -1, 51, 52, -1,
3146 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3147 -1, -1, -1, -1, -1, 69, -1, -1, -1, -1,
3148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3149 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3150 -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
3151 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3152 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3153 -1, 125, -1, 127, -1, -1, -1, 131, 3, 4,
3154 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
3155 -1, -1, -1, 18, 19, 20, 21, 22, 23, 24,
3156 -1, -1, 27, 28, -1, -1, -1, -1, -1, -1,
3157 35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
3158 -1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
3159 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
3160 -1, -1, -1, -1, 69, -1, -1, -1, -1, -1,
3161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3162 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
3163 -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
3164 -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
3165 -1, 116, 117, -1, -1, -1, 121, -1, 123, -1,
3166 125, -1, 127, -1, -1, -1, 131, 3, 4, 5,
3167 6, -1, 8, 9, 10, 11, 12, 13, 14, -1,
3168 -1, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3169 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3170 -1, 37, 38, -1, 40, -1, 42, -1, 44, -1,
3171 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
3172 -1, -1, -1, -1, -1, -1, 62, 63, -1, -1,
3173 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3175 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3176 -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
3177 -1, -1, -1, -1, -1, 111, -1, -1, -1, -1,
3178 116, 117, -1, -1, -1, 121, -1, 123, -1, 125,
3179 -1, 127, -1, -1, -1, 131, 3, 4, 5, 6,
3180 -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
3181 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3182 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
3183 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
3184 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
3185 -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
3186 -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
3187 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3188 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3189 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3190 -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
3191 117, -1, -1, -1, 121, -1, 123, -1, 125, -1,
3192 127, -1, -1, -1, 131, 3, 4, 5, 6, -1,
3193 8, 9, 10, 11, 12, 13, 14, -1, -1, -1,
3194 18, 19, 20, 21, 22, 23, 24, -1, -1, 27,
3195 28, -1, -1, -1, -1, -1, -1, 35, -1, 37,
3196 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
3197 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
3198 -1, -1, -1, -1, 62, 63, -1, -1, -1, -1,
3199 -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
3200 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3201 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
3202 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
3203 -1, -1, -1, 111, -1, -1, -1, -1, 116, 117,
3204 -1, -1, -1, 121, -1, 123, -1, 125, -1, 127,
3205 -1, 0, -1, 131, 3, 4, 5, 6, -1, 8,
3206 9, 10, 11, 12, 13, 14, -1, -1, 17, 18,
3207 19, 20, 21, 22, 23, 24, -1, -1, 27, 28,
3208 -1, -1, -1, -1, -1, -1, 35, -1, 37, 38,
3209 -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
3210 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3211 -1, -1, -1, 62, 63, -1, -1, -1, -1, -1,
3212 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3214 -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
3215 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3216 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3217 -1, -1, 121, -1, 123, -1, 125, -1, 127, 3,
3218 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
3219 14, -1, 16, -1, 18, 19, 20, 21, 22, 23,
3220 24, 25, -1, 27, 28, 29, -1, 31, -1, -1,
3221 -1, 35, 36, 37, 38, -1, 40, 41, 42, -1,
3222 44, 45, 46, 47, 48, -1, -1, 51, 52, -1,
3223 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
3224 -1, 65, -1, -1, -1, 69, -1, -1, -1, -1,
3225 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3226 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
3227 -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
3228 -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
3229 -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
3230 -1, 125, -1, 127, 3, 4, 5, 6, -1, 8,
3231 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
3232 19, 20, 21, 22, 23, 24, 25, -1, 27, 28,
3233 29, -1, 31, -1, -1, -1, 35, 36, 37, 38,
3234 -1, 40, 41, 42, -1, 44, 45, 46, 47, 48,
3235 -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
3236 -1, -1, -1, 62, 63, -1, 65, -1, -1, -1,
3237 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3239 -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
3240 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3241 -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
3242 -1, -1, 121, -1, 123, -1, 125, 3, 127, 5,
3243 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
3244 -1, -1, -1, -1, -1, -1, -1, 23, -1, 25,
3245 -1, 27, 28, -1, -1, 31, -1, -1, -1, 35,
3246 -1, -1, -1, -1, -1, -1, 42, -1, 44, 45,
3247 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55,
3248 -1, -1, -1, -1, -1, -1, 62, -1, -1, -1,
3249 -1, -1, -1, 69, -1, -1, -1, 3, -1, 5,
3250 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
3251 -1, -1, -1, -1, 90, 91, -1, 23, -1, 25,
3252 -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
3253 -1, -1, -1, -1, -1, 111, 42, -1, 44, -1,
3254 116, 117, -1, -1, -1, 121, 52, 123, 54, 55,
3255 -1, 127, 3, -1, 5, 6, 62, 8, 9, 10,
3256 -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
3257 -1, -1, 23, -1, 25, -1, 27, 28, -1, -1,
3258 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
3259 -1, -1, -1, 44, -1, -1, -1, -1, -1, -1,
3260 -1, 52, -1, 54, 55, 111, -1, -1, -1, -1,
3261 116, 117, -1, -1, -1, 121, -1, 123, 69, -1,
3262 -1, 127, -1, -1, -1, -1, -1, -1, -1, -1,
3263 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3264 91, -1, -1, -1, -1, -1, 39, -1, -1, -1,
3265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3266 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3267 121, -1, 123, 66, 67, 68, 127, 70, 71, 72,
3268 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3269 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
3270 -1, 94, 95, 96, -1, -1, -1, -1, -1, 102,
3271 103, -1, 105, 106, 107, 108, 109, 39, 111, 112,
3272 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3273 123, -1, -1, 126, -1, -1, -1, -1, -1, 132,
3274 -1, -1, -1, -1, 66, 67, 68, -1, 70, 71,
3275 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
3276 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
3277 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
3278 102, 103, -1, 105, 106, 107, 108, 109, 39, 111,
3279 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3280 -1, 123, -1, -1, 126, -1, -1, -1, -1, -1,
3281 132, -1, -1, -1, -1, 66, 67, 68, -1, 70,
3282 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3283 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3284 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3285 -1, 102, 103, -1, 105, 106, 107, 108, 109, 39,
3286 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3287 121, -1, 123, -1, -1, 126, -1, -1, -1, -1,
3288 -1, 132, -1, -1, -1, -1, 66, 67, 68, -1,
3289 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3290 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3291 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3292 39, -1, 102, 103, 104, 105, 106, 107, 108, 109,
3293 -1, 111, 112, 113, 114, 115, -1, -1, -1, -1,
3294 -1, 121, -1, 123, -1, -1, 126, 66, 67, 68,
3295 -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3296 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3297 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3298 -1, 39, -1, 102, 103, -1, 105, 106, 107, 108,
3299 109, -1, 111, 112, 113, 114, 115, -1, -1, -1,
3300 -1, -1, 121, -1, 123, 124, -1, 126, 66, 67,
3301 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
3302 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3303 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3304 -1, -1, 39, -1, 102, 103, 104, 105, 106, 107,
3305 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
3306 -1, -1, -1, 121, -1, 123, -1, -1, 126, 66,
3307 67, 68, -1, 70, 71, 72, 73, 74, 75, 76,
3308 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3309 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3310 -1, -1, -1, 39, -1, 102, 103, -1, 105, 106,
3311 107, 108, 109, -1, 111, 112, 113, 114, 115, -1,
3312 -1, -1, -1, -1, 121, -1, 123, -1, -1, 126,
3313 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
3314 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3315 -1, -1, 88, -1, 90, 91, 92, -1, 94, 95,
3316 96, -1, -1, -1, 39, -1, -1, -1, -1, 105,
3317 106, 107, 108, 109, -1, 111, 112, 113, 114, 115,
3318 -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
3319 126, 66, 67, 68, -1, 70, 71, 72, 73, 74,
3320 75, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3321 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3322 95, 96, -1, -1, -1, 39, -1, -1, -1, -1,
3323 105, 106, 107, 108, 109, -1, 111, 112, 113, 114,
3324 115, -1, -1, -1, -1, -1, 121, -1, 123, -1,
3325 -1, 126, 66, 67, 68, -1, 70, 71, 72, 73,
3326 74, 75, -1, -1, -1, -1, -1, -1, -1, -1,
3327 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3328 94, 95, 96, -1, -1, -1, 39, -1, -1, -1,
3329 -1, -1, 106, 107, 108, 109, -1, 111, 112, 113,
3330 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
3331 -1, -1, 126, 66, 67, 68, -1, 70, 71, 72,
3332 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
3333 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3334 -1, 94, 95, 96, -1, -1, -1, 39, -1, -1,
3335 -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
3336 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
3337 123, -1, -1, 126, 66, 67, 68, -1, 70, 71,
3338 72, 73, 74, 75, -1, -1, -1, -1, -1, -1,
3339 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3340 92, -1, 94, 95, 96, -1, -1, -1, 39, -1,
3341 -1, -1, -1, -1, -1, 107, 108, 109, -1, 111,
3342 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
3343 -1, 123, -1, -1, 126, 66, 67, 68, -1, 70,
3344 71, 72, 73, 74, 75, -1, -1, -1, -1, -1,
3345 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3346 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3347 -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
3348 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
3349 121, -1, 123, -1, -1, 126
3352 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3353 symbol of state STATE-NUM. */
3354 static const yytype_uint8 yystos[] =
3356 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3357 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
3358 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
3359 47, 48, 51, 52, 54, 55, 62, 63, 69, 90,
3360 91, 99, 111, 116, 117, 121, 123, 125, 127, 134,
3361 135, 136, 137, 143, 146, 147, 153, 157, 158, 159,
3362 160, 162, 170, 178, 181, 182, 185, 188, 189, 190,
3363 191, 195, 197, 206, 211, 216, 219, 232, 233, 234,
3364 239, 242, 243, 244, 246, 247, 89, 49, 121, 121,
3365 163, 121, 3, 4, 17, 125, 183, 184, 16, 3,
3366 242, 3, 218, 242, 121, 184, 222, 121, 125, 121,
3367 126, 242, 121, 236, 240, 241, 242, 242, 242, 242,
3368 242, 242, 238, 242, 228, 229, 230, 236, 29, 31,
3369 36, 41, 45, 65, 99, 131, 142, 143, 144, 147,
3370 149, 164, 165, 180, 189, 235, 3, 0, 137, 125,
3371 3, 45, 149, 155, 156, 239, 144, 145, 16, 25,
3372 30, 31, 43, 45, 205, 245, 191, 100, 39, 66,
3373 67, 68, 70, 71, 72, 73, 74, 75, 76, 77,
3374 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3375 88, 90, 91, 92, 94, 95, 96, 102, 103, 105,
3376 106, 107, 108, 109, 111, 112, 113, 114, 115, 121,
3377 123, 126, 3, 121, 161, 145, 171, 187, 125, 126,
3378 183, 184, 221, 222, 223, 231, 121, 237, 238, 126,
3379 242, 179, 228, 3, 154, 104, 131, 100, 100, 132,
3380 124, 100, 236, 3, 3, 150, 151, 237, 237, 150,
3381 3, 131, 144, 125, 135, 3, 99, 67, 99, 3,
3382 34, 50, 215, 3, 3, 207, 242, 242, 242, 242,
3383 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
3384 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
3385 3, 242, 242, 242, 242, 242, 242, 242, 242, 242,
3386 242, 242, 242, 242, 242, 242, 228, 242, 3, 121,
3387 127, 237, 12, 242, 99, 138, 139, 140, 146, 147,
3388 195, 197, 206, 216, 186, 183, 126, 121, 227, 3,
3389 93, 212, 213, 214, 132, 114, 183, 132, 141, 142,
3390 132, 237, 236, 236, 242, 104, 226, 100, 142, 131,
3391 226, 237, 237, 102, 3, 53, 192, 53, 193, 3,
3392 208, 209, 104, 132, 124, 89, 242, 3, 132, 121,
3393 132, 131, 140, 125, 138, 228, 102, 104, 210, 214,
3394 132, 100, 131, 132, 104, 35, 114, 223, 225, 102,
3395 148, 151, 131, 99, 132, 3, 5, 121, 223, 15,
3396 194, 223, 224, 125, 226, 100, 242, 3, 132, 145,
3397 237, 125, 138, 131, 132, 211, 225, 226, 93, 214,
3398 26, 32, 172, 174, 176, 177, 145, 236, 236, 239,
3399 145, 212, 224, 125, 100, 198, 148, 209, 132, 33,
3400 61, 166, 167, 168, 169, 131, 210, 125, 214, 125,
3401 121, 172, 174, 64, 152, 132, 132, 196, 223, 45,
3402 99, 189, 202, 203, 204, 242, 104, 131, 168, 169,
3403 220, 175, 3, 145, 145, 226, 99, 143, 147, 189,
3404 199, 200, 201, 206, 216, 3, 25, 131, 204, 104,
3405 141, 141, 141, 226, 125, 125, 131, 201, 215, 141,
3406 131, 131, 132, 217, 199, 3, 173, 141, 131, 121,
3407 125, 131, 212, 141, 132, 131, 226
3410 #define yyerrok (yyerrstatus = 0)
3411 #define yyclearin (yychar = YYEMPTY)
3412 #define YYEMPTY (-2)
3415 #define YYACCEPT goto yyacceptlab
3416 #define YYABORT goto yyabortlab
3417 #define YYERROR goto yyerrorlab
3420 /* Like YYERROR except do call yyerror. This remains here temporarily
3421 to ease the transition to the new meaning of YYERROR, for GCC.
3422 Once GCC version 2 has supplanted version 1, this can go. */
3424 #define YYFAIL goto yyerrlab
3426 #define YYRECOVERING() (!!yyerrstatus)
3428 #define YYBACKUP(Token, Value) \
3430 if (yychar == YYEMPTY && yylen == 1) \
3434 yytoken = YYTRANSLATE (yychar); \
3440 yyerror (YY_("syntax error: cannot back up")); \
3447 #define YYERRCODE 256
3450 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3451 If N is 0, then set CURRENT to the empty location which ends
3452 the previous symbol: RHS[0] (always defined). */
3454 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3455 #ifndef YYLLOC_DEFAULT
3456 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3460 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3461 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3462 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3463 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3467 (Current).first_line = (Current).last_line = \
3468 YYRHSLOC (Rhs, 0).last_line; \
3469 (Current).first_column = (Current).last_column = \
3470 YYRHSLOC (Rhs, 0).last_column; \
3476 /* YY_LOCATION_PRINT -- Print the location on the stream.
3477 This macro was not mandated originally: define only if we know
3478 we won't break user code: when these are the locations we know. */
3480 #ifndef YY_LOCATION_PRINT
3481 # if YYLTYPE_IS_TRIVIAL
3482 # define YY_LOCATION_PRINT(File, Loc) \
3483 fprintf (File, "%d.%d-%d.%d", \
3484 (Loc).first_line, (Loc).first_column, \
3485 (Loc).last_line, (Loc).last_column)
3487 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3492 /* YYLEX -- calling `yylex' with the right arguments. */
3495 # define YYLEX yylex (YYLEX_PARAM)
3497 # define YYLEX yylex ()
3500 /* Enable debugging if requested. */
3504 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3505 # define YYFPRINTF fprintf
3508 # define YYDPRINTF(Args) \
3514 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3518 YYFPRINTF (stderr, "%s ", Title); \
3519 yy_symbol_print (stderr, \
3521 YYFPRINTF (stderr, "\n"); \
3526 /*--------------------------------.
3527 | Print this symbol on YYOUTPUT. |
3528 `--------------------------------*/
3531 #if (defined __STDC__ || defined __C99__FUNC__ \
3532 || defined __cplusplus || defined _MSC_VER)
3534 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3537 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3540 YYSTYPE const * const yyvaluep;
3546 if (yytype < YYNTOKENS)
3547 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3559 /*--------------------------------.
3560 | Print this symbol on YYOUTPUT. |
3561 `--------------------------------*/
3563 #if (defined __STDC__ || defined __C99__FUNC__ \
3564 || defined __cplusplus || defined _MSC_VER)
3566 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3569 yy_symbol_print (yyoutput, yytype, yyvaluep)
3572 YYSTYPE const * const yyvaluep;
3575 if (yytype < YYNTOKENS)
3576 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3578 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3580 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3581 YYFPRINTF (yyoutput, ")");
3584 /*------------------------------------------------------------------.
3585 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3587 `------------------------------------------------------------------*/
3589 #if (defined __STDC__ || defined __C99__FUNC__ \
3590 || defined __cplusplus || defined _MSC_VER)
3592 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3595 yy_stack_print (yybottom, yytop)
3596 yytype_int16 *yybottom;
3597 yytype_int16 *yytop;
3600 YYFPRINTF (stderr, "Stack now");
3601 for (; yybottom <= yytop; yybottom++)
3603 int yybot = *yybottom;
3604 YYFPRINTF (stderr, " %d", yybot);
3606 YYFPRINTF (stderr, "\n");
3609 # define YY_STACK_PRINT(Bottom, Top) \
3612 yy_stack_print ((Bottom), (Top)); \
3616 /*------------------------------------------------.
3617 | Report that the YYRULE is going to be reduced. |
3618 `------------------------------------------------*/
3620 #if (defined __STDC__ || defined __C99__FUNC__ \
3621 || defined __cplusplus || defined _MSC_VER)
3623 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3626 yy_reduce_print (yyvsp, yyrule)
3631 int yynrhs = yyr2[yyrule];
3633 unsigned long int yylno = yyrline[yyrule];
3634 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3636 /* The symbols being reduced. */
3637 for (yyi = 0; yyi < yynrhs; yyi++)
3639 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3640 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3641 &(yyvsp[(yyi + 1) - (yynrhs)])
3643 YYFPRINTF (stderr, "\n");
3647 # define YY_REDUCE_PRINT(Rule) \
3650 yy_reduce_print (yyvsp, Rule); \
3653 /* Nonzero means print parse trace. It is left uninitialized so that
3654 multiple parsers can coexist. */
3656 #else /* !YYDEBUG */
3657 # define YYDPRINTF(Args)
3658 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3659 # define YY_STACK_PRINT(Bottom, Top)
3660 # define YY_REDUCE_PRINT(Rule)
3661 #endif /* !YYDEBUG */
3664 /* YYINITDEPTH -- initial size of the parser's stacks. */
3666 # define YYINITDEPTH 200
3669 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3670 if the built-in stack extension method is used).
3672 Do not make this value too large; the results are undefined if
3673 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3674 evaluated with infinite-precision integer arithmetic. */
3677 # define YYMAXDEPTH 10000
3685 # if defined __GLIBC__ && defined _STRING_H
3686 # define yystrlen strlen
3688 /* Return the length of YYSTR. */
3689 #if (defined __STDC__ || defined __C99__FUNC__ \
3690 || defined __cplusplus || defined _MSC_VER)
3692 yystrlen (const char *yystr)
3700 for (yylen = 0; yystr[yylen]; yylen++)
3708 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3709 # define yystpcpy stpcpy
3711 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3713 #if (defined __STDC__ || defined __C99__FUNC__ \
3714 || defined __cplusplus || defined _MSC_VER)
3716 yystpcpy (char *yydest, const char *yysrc)
3719 yystpcpy (yydest, yysrc)
3725 const char *yys = yysrc;
3727 while ((*yyd++ = *yys++) != '\0')
3736 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3737 quotes and backslashes, so that it's suitable for yyerror. The
3738 heuristic is that double-quoting is unnecessary unless the string
3739 contains an apostrophe, a comma, or backslash (other than
3740 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3741 null, do not copy; instead, return the length of what the result
3744 yytnamerr (char *yyres, const char *yystr)
3749 char const *yyp = yystr;
3756 goto do_not_strip_quotes;
3760 goto do_not_strip_quotes;
3773 do_not_strip_quotes: ;
3777 return yystrlen (yystr);
3779 return yystpcpy (yyres, yystr) - yyres;
3783 /* Copy into YYRESULT an error message about the unexpected token
3784 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3785 including the terminating null byte. If YYRESULT is null, do not
3786 copy anything; just return the number of bytes that would be
3787 copied. As a special case, return 0 if an ordinary "syntax error"
3788 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3789 size calculation. */
3791 yysyntax_error (char *yyresult, int yystate, int yychar)
3793 int yyn = yypact[yystate];
3795 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3799 int yytype = YYTRANSLATE (yychar);
3800 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3801 YYSIZE_T yysize = yysize0;
3803 int yysize_overflow = 0;
3804 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3805 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3809 /* This is so xgettext sees the translatable formats that are
3810 constructed on the fly. */
3811 YY_("syntax error, unexpected %s");
3812 YY_("syntax error, unexpected %s, expecting %s");
3813 YY_("syntax error, unexpected %s, expecting %s or %s");
3814 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3815 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3819 static char const yyunexpected[] = "syntax error, unexpected %s";
3820 static char const yyexpecting[] = ", expecting %s";
3821 static char const yyor[] = " or %s";
3822 char yyformat[sizeof yyunexpected
3823 + sizeof yyexpecting - 1
3824 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3825 * (sizeof yyor - 1))];
3826 char const *yyprefix = yyexpecting;
3828 /* Start YYX at -YYN if negative to avoid negative indexes in
3830 int yyxbegin = yyn < 0 ? -yyn : 0;
3832 /* Stay within bounds of both yycheck and yytname. */
3833 int yychecklim = YYLAST - yyn + 1;
3834 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3837 yyarg[0] = yytname[yytype];
3838 yyfmt = yystpcpy (yyformat, yyunexpected);
3840 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3841 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3843 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3847 yyformat[sizeof yyunexpected - 1] = '\0';
3850 yyarg[yycount++] = yytname[yyx];
3851 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3852 yysize_overflow |= (yysize1 < yysize);
3854 yyfmt = yystpcpy (yyfmt, yyprefix);
3858 yyf = YY_(yyformat);
3859 yysize1 = yysize + yystrlen (yyf);
3860 yysize_overflow |= (yysize1 < yysize);
3863 if (yysize_overflow)
3864 return YYSIZE_MAXIMUM;
3868 /* Avoid sprintf, as that infringes on the user's name space.
3869 Don't have undefined behavior even if the translation
3870 produced a string with the wrong number of "%s"s. */
3871 char *yyp = yyresult;
3873 while ((*yyp = *yyf) != '\0')
3875 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3877 yyp += yytnamerr (yyp, yyarg[yyi++]);
3890 #endif /* YYERROR_VERBOSE */
3893 /*-----------------------------------------------.
3894 | Release the memory associated to this symbol. |
3895 `-----------------------------------------------*/
3898 #if (defined __STDC__ || defined __C99__FUNC__ \
3899 || defined __cplusplus || defined _MSC_VER)
3901 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3904 yydestruct (yymsg, yytype, yyvaluep)
3914 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3924 /* Prevent warnings from -Wmissing-prototypes. */
3925 #ifdef YYPARSE_PARAM
3926 #if defined __STDC__ || defined __cplusplus
3927 int yyparse (void *YYPARSE_PARAM);
3931 #else /* ! YYPARSE_PARAM */
3932 #if defined __STDC__ || defined __cplusplus
3937 #endif /* ! YYPARSE_PARAM */
3940 /* The lookahead symbol. */
3943 /* The semantic value of the lookahead symbol. */
3946 /* Number of syntax errors so far. */
3951 /*-------------------------.
3952 | yyparse or yypush_parse. |
3953 `-------------------------*/
3955 #ifdef YYPARSE_PARAM
3956 #if (defined __STDC__ || defined __C99__FUNC__ \
3957 || defined __cplusplus || defined _MSC_VER)
3959 yyparse (void *YYPARSE_PARAM)
3962 yyparse (YYPARSE_PARAM)
3963 void *YYPARSE_PARAM;
3965 #else /* ! YYPARSE_PARAM */
3966 #if (defined __STDC__ || defined __C99__FUNC__ \
3967 || defined __cplusplus || defined _MSC_VER)
3980 /* Number of tokens to shift before error messages enabled. */
3983 /* The stacks and their tools:
3984 `yyss': related to states.
3985 `yyvs': related to semantic values.
3987 Refer to the stacks thru separate pointers, to allow yyoverflow
3988 to reallocate them elsewhere. */
3990 /* The state stack. */
3991 yytype_int16 yyssa[YYINITDEPTH];
3993 yytype_int16 *yyssp;
3995 /* The semantic value stack. */
3996 YYSTYPE yyvsa[YYINITDEPTH];
4000 YYSIZE_T yystacksize;
4004 /* Lookahead token as an internal (translated) token number. */
4006 /* The variables used to return semantic value and location from the
4011 /* Buffer for error messages, and its allocated size. */
4013 char *yymsg = yymsgbuf;
4014 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4017 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4019 /* The number of symbols on the RHS of the reduced rule.
4020 Keep to zero when no symbol should be popped. */
4026 yystacksize = YYINITDEPTH;
4028 YYDPRINTF ((stderr, "Starting parse\n"));
4033 yychar = YYEMPTY; /* Cause a token to be read. */
4035 /* Initialize stack pointers.
4036 Waste one element of value and location stack
4037 so that they stay on the same level as the state stack.
4038 The wasted elements are never initialized. */
4044 /*------------------------------------------------------------.
4045 | yynewstate -- Push a new state, which is found in yystate. |
4046 `------------------------------------------------------------*/
4048 /* In all cases, when you get here, the value and location stacks
4049 have just been pushed. So pushing a state here evens the stacks. */
4055 if (yyss + yystacksize - 1 <= yyssp)
4057 /* Get the current used size of the three stacks, in elements. */
4058 YYSIZE_T yysize = yyssp - yyss + 1;
4062 /* Give user a chance to reallocate the stack. Use copies of
4063 these so that the &'s don't force the real ones into
4065 YYSTYPE *yyvs1 = yyvs;
4066 yytype_int16 *yyss1 = yyss;
4068 /* Each stack pointer address is followed by the size of the
4069 data in use in that stack, in bytes. This used to be a
4070 conditional around just the two extra args, but that might
4071 be undefined if yyoverflow is a macro. */
4072 yyoverflow (YY_("memory exhausted"),
4073 &yyss1, yysize * sizeof (*yyssp),
4074 &yyvs1, yysize * sizeof (*yyvsp),
4080 #else /* no yyoverflow */
4081 # ifndef YYSTACK_RELOCATE
4082 goto yyexhaustedlab;
4084 /* Extend the stack our own way. */
4085 if (YYMAXDEPTH <= yystacksize)
4086 goto yyexhaustedlab;
4088 if (YYMAXDEPTH < yystacksize)
4089 yystacksize = YYMAXDEPTH;
4092 yytype_int16 *yyss1 = yyss;
4093 union yyalloc *yyptr =
4094 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4096 goto yyexhaustedlab;
4097 YYSTACK_RELOCATE (yyss_alloc, yyss);
4098 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4099 # undef YYSTACK_RELOCATE
4101 YYSTACK_FREE (yyss1);
4104 #endif /* no yyoverflow */
4106 yyssp = yyss + yysize - 1;
4107 yyvsp = yyvs + yysize - 1;
4109 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4110 (unsigned long int) yystacksize));
4112 if (yyss + yystacksize - 1 <= yyssp)
4116 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4118 if (yystate == YYFINAL)
4128 /* Do appropriate processing given the current state. Read a
4129 lookahead token if we need one and don't already have one. */
4131 /* First try to decide what to do without reference to lookahead token. */
4132 yyn = yypact[yystate];
4133 if (yyn == YYPACT_NINF)
4136 /* Not known => get a lookahead token if don't already have one. */
4138 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4139 if (yychar == YYEMPTY)
4141 YYDPRINTF ((stderr, "Reading a token: "));
4145 if (yychar <= YYEOF)
4147 yychar = yytoken = YYEOF;
4148 YYDPRINTF ((stderr, "Now at end of input.\n"));
4152 yytoken = YYTRANSLATE (yychar);
4153 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4156 /* If the proper action on seeing token YYTOKEN is to reduce or to
4157 detect an error, take that action. */
4159 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4164 if (yyn == 0 || yyn == YYTABLE_NINF)
4170 /* Count tokens shifted since error; after three, turn off error
4175 /* Shift the lookahead token. */
4176 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4178 /* Discard the shifted token. */
4187 /*-----------------------------------------------------------.
4188 | yydefault -- do the default action for the current state. |
4189 `-----------------------------------------------------------*/
4191 yyn = yydefact[yystate];
4197 /*-----------------------------.
4198 | yyreduce -- Do a reduction. |
4199 `-----------------------------*/
4201 /* yyn is the number of a rule to reduce with. */
4204 /* If YYLEN is nonzero, implement the default value of the action:
4207 Otherwise, the following line sets YYVAL to garbage.
4208 This behavior is undocumented and Bison
4209 users should not rely upon it. Assigning to YYVAL
4210 unconditionally makes the parser a bit smaller, and it avoids a
4211 GCC warning that YYVAL may be used uninitialized. */
4212 yyval = yyvsp[1-yylen];
4215 YY_REDUCE_PRINT (yyn);
4222 /* Line 1464 of skeleton.m4 */
4223 #line 1890 "parser.y"
4224 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4233 /* Line 1464 of skeleton.m4 */
4234 #line 1902 "parser.y"
4235 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4244 /* Line 1464 of skeleton.m4 */
4245 #line 1905 "parser.y"
4246 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4255 /* Line 1464 of skeleton.m4 */
4256 #line 1906 "parser.y"
4257 {(yyval.code)=code_new();}
4266 /* Line 1464 of skeleton.m4 */
4267 #line 1908 "parser.y"
4268 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4277 /* Line 1464 of skeleton.m4 */
4278 #line 1909 "parser.y"
4279 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4288 /* Line 1464 of skeleton.m4 */
4289 #line 1924 "parser.y"
4290 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4299 /* Line 1464 of skeleton.m4 */
4300 #line 1925 "parser.y"
4310 /* Line 1464 of skeleton.m4 */
4311 #line 1928 "parser.y"
4321 /* Line 1464 of skeleton.m4 */
4322 #line 1935 "parser.y"
4323 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
4332 /* Line 1464 of skeleton.m4 */
4333 #line 1939 "parser.y"
4334 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4343 /* Line 1464 of skeleton.m4 */
4344 #line 1940 "parser.y"
4345 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4354 /* Line 1464 of skeleton.m4 */
4355 #line 1944 "parser.y"
4357 code_t**cc = &global->init->method->body->code;
4358 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4368 /* Line 1464 of skeleton.m4 */
4369 #line 1951 "parser.y"
4372 (yyval.number_int)=as3_pass;
4373 char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
4374 if(!definitions || !dict_contains(definitions, key)) {
4387 /* Line 1464 of skeleton.m4 */
4388 #line 1970 "parser.y"
4389 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4398 /* Line 1464 of skeleton.m4 */
4399 #line 1971 "parser.y"
4400 {(yyval.value).c=abc_pushundefined(0);
4401 (yyval.value).t=TYPE_ANY;
4411 /* Line 1464 of skeleton.m4 */
4412 #line 1975 "parser.y"
4413 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4422 /* Line 1464 of skeleton.m4 */
4423 #line 1976 "parser.y"
4424 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4433 /* Line 1464 of skeleton.m4 */
4434 #line 1978 "parser.y"
4435 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4444 /* Line 1464 of skeleton.m4 */
4445 #line 1979 "parser.y"
4446 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4455 /* Line 1464 of skeleton.m4 */
4456 #line 1982 "parser.y"
4459 if(variable_exists((yyvsp[(1) - (3)].id)))
4460 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4462 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4465 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4466 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4467 (yyvsp[(2) - (3)].classinfo)->name);
4472 if(state->method->uses_slots) {
4473 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4475 // this variable is stored in a slot
4477 v->type = (yyvsp[(2) - (3)].classinfo);
4483 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4486 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4488 if((yyvsp[(2) - (3)].classinfo)) {
4489 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4490 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4491 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4493 code_free((yyvsp[(3) - (3)].value).c);
4494 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4497 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4498 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4499 (yyval.code) = abc_coerce_a((yyval.code));
4501 // don't do anything
4502 code_free((yyvsp[(3) - (3)].value).c);
4503 code_free((yyval.code));
4509 (yyval.code) = abc_setslot((yyval.code), index);
4511 (yyval.code) = abc_setlocal((yyval.code), index);
4522 /* Line 1464 of skeleton.m4 */
4523 #line 2042 "parser.y"
4524 {(yyval.code) = code_new();}
4533 /* Line 1464 of skeleton.m4 */
4534 #line 2043 "parser.y"
4535 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4544 /* Line 1464 of skeleton.m4 */
4545 #line 2046 "parser.y"
4546 {PASS12 new_state();}
4555 /* Line 1464 of skeleton.m4 */
4556 #line 2046 "parser.y"
4559 (yyval.code) = code_new();
4560 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4561 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4563 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4564 if((yyvsp[(7) - (7)].code)) {
4565 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4567 myif->branch = (yyval.code) = abc_nop((yyval.code));
4568 if((yyvsp[(7) - (7)].code)) {
4569 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4570 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4572 (yyval.code) = var_block((yyval.code));
4583 /* Line 1464 of skeleton.m4 */
4584 #line 2065 "parser.y"
4585 {(yyval.code)=code_new();}
4594 /* Line 1464 of skeleton.m4 */
4595 #line 2072 "parser.y"
4597 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4598 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4608 /* Line 1464 of skeleton.m4 */
4609 #line 2076 "parser.y"
4612 (yyval.id)=(yyvsp[(1) - (1)].id);
4622 /* Line 1464 of skeleton.m4 */
4623 #line 2081 "parser.y"
4624 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4633 /* Line 1464 of skeleton.m4 */
4634 #line 2082 "parser.y"
4635 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4644 /* Line 1464 of skeleton.m4 */
4645 #line 2084 "parser.y"
4647 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4648 (yyval.code) = code_new();
4649 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4650 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4651 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4652 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4653 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4654 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4655 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4656 (yyval.code) = abc_jump((yyval.code), loopstart);
4657 code_t*out = (yyval.code) = abc_nop((yyval.code));
4658 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4659 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4662 (yyval.code) = var_block((yyval.code));
4673 /* Line 1464 of skeleton.m4 */
4674 #line 2104 "parser.y"
4676 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4678 syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
4681 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4682 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4683 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4684 int array = new_variable(tmp1name, 0, 0, 0);
4686 (yyval.code) = code_new();
4687 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4688 (yyval.code) = abc_coerce_a((yyval.code));
4689 (yyval.code) = abc_setlocal((yyval.code), array);
4690 (yyval.code) = abc_pushbyte((yyval.code), 0);
4691 (yyval.code) = abc_setlocal((yyval.code), it);
4693 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4695 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4696 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4697 (yyval.code) = abc_getlocal((yyval.code), array);
4698 (yyval.code) = abc_getlocal((yyval.code), it);
4699 if(!(yyvsp[(1) - (6)].for_start).each)
4700 (yyval.code) = abc_nextname((yyval.code));
4702 (yyval.code) = abc_nextvalue((yyval.code));
4703 (yyval.code) = converttype((yyval.code), 0, var->type);
4704 (yyval.code) = abc_setlocal((yyval.code), var->index);
4706 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4707 (yyval.code) = abc_jump((yyval.code), loopstart);
4709 code_t*out = (yyval.code) = abc_nop((yyval.code));
4710 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4711 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4715 (yyval.code) = var_block((yyval.code));
4730 /* Line 1464 of skeleton.m4 */
4731 #line 2152 "parser.y"
4732 {PASS12 new_state();}
4741 /* Line 1464 of skeleton.m4 */
4742 #line 2152 "parser.y"
4745 (yyval.code) = code_new();
4747 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4748 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4749 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4750 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4751 myjmp->branch = cont;
4752 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4753 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4754 code_t*out = (yyval.code) = abc_nop((yyval.code));
4755 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4756 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4758 (yyval.code) = var_block((yyval.code));
4769 /* Line 1464 of skeleton.m4 */
4770 #line 2171 "parser.y"
4771 {PASS12 new_state();}
4780 /* Line 1464 of skeleton.m4 */
4781 #line 2171 "parser.y"
4783 (yyval.code) = code_new();
4784 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4785 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4786 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4787 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4788 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4789 code_t*out = (yyval.code) = abc_nop((yyval.code));
4790 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4791 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4793 (yyval.code) = var_block((yyval.code));
4804 /* Line 1464 of skeleton.m4 */
4805 #line 2186 "parser.y"
4807 (yyval.code) = abc___break__(0, "");
4817 /* Line 1464 of skeleton.m4 */
4818 #line 2189 "parser.y"
4820 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4830 /* Line 1464 of skeleton.m4 */
4831 #line 2192 "parser.y"
4833 (yyval.code) = abc___continue__(0, "");
4843 /* Line 1464 of skeleton.m4 */
4844 #line 2195 "parser.y"
4846 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4856 /* Line 1464 of skeleton.m4 */
4857 #line 2199 "parser.y"
4867 /* Line 1464 of skeleton.m4 */
4868 #line 2200 "parser.y"
4869 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4878 /* Line 1464 of skeleton.m4 */
4879 #line 2201 "parser.y"
4880 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4889 /* Line 1464 of skeleton.m4 */
4890 #line 2202 "parser.y"
4891 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4900 /* Line 1464 of skeleton.m4 */
4901 #line 2203 "parser.y"
4902 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4911 /* Line 1464 of skeleton.m4 */
4912 #line 2204 "parser.y"
4913 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4922 /* Line 1464 of skeleton.m4 */
4923 #line 2206 "parser.y"
4925 (yyval.code) = abc_getlocal(0, state->switch_var);
4926 (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
4927 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4928 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4929 if((yyval.code)->opcode != OPCODE___BREAK__) {
4930 (yyval.code) = abc___fallthrough__((yyval.code), "");
4932 code_t*e = (yyval.code) = abc_nop((yyval.code));
4943 /* Line 1464 of skeleton.m4 */
4944 #line 2217 "parser.y"
4946 (yyval.code) = (yyvsp[(3) - (3)].code);
4956 /* Line 1464 of skeleton.m4 */
4957 #line 2220 "parser.y"
4958 {PASS12 new_state();state->switch_var=alloc_local();}
4967 /* Line 1464 of skeleton.m4 */
4968 #line 2220 "parser.y"
4970 (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
4971 (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
4972 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4974 code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
4975 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4977 code_t*c = (yyval.code),*lastblock=0;
4979 if(c->opcode == OPCODE_IFNE) {
4980 if(!c->next) syntaxerror("internal error in fallthrough handling");
4982 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4984 c->opcode = OPCODE_JUMP;
4985 c->branch = lastblock;
4987 /* fall through end of switch */
4988 c->opcode = OPCODE_NOP;
4994 (yyval.code) = var_block((yyval.code));
5005 /* Line 1464 of skeleton.m4 */
5006 #line 2251 "parser.y"
5007 {PASS12 new_state();
5008 state->exception_name=(yyvsp[(3) - (5)].id);
5009 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
5010 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
5020 /* Line 1464 of skeleton.m4 */
5021 #line 2256 "parser.y"
5023 namespace_t name_ns = {ACCESS_PACKAGE, ""};
5024 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
5026 NEW(abc_exception_t, e)
5027 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
5028 e->var_name = multiname_clone(&name);
5029 (yyval.exception) = e;
5032 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
5033 e->target = c = abc_nop(0);
5034 c = abc_setlocal(c, i);
5035 c = code_append(c, code_dup(state->method->scope_code));
5036 c = code_append(c, (yyvsp[(8) - (9)].code));
5050 /* Line 1464 of skeleton.m4 */
5051 #line 2276 "parser.y"
5052 {PASS12 new_state();state->exception_name=0;}
5061 /* Line 1464 of skeleton.m4 */
5062 #line 2276 "parser.y"
5064 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
5065 if(!(yyvsp[(4) - (5)].code)) {
5066 (yyval.exception)=0;
5068 NEW(abc_exception_t, e)
5069 e->exc_type = 0; //all exceptions
5070 e->var_name = 0; //no name
5073 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
5074 (yyval.exception) = e;
5086 /* Line 1464 of skeleton.m4 */
5087 #line 2292 "parser.y"
5088 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
5097 /* Line 1464 of skeleton.m4 */
5098 #line 2293 "parser.y"
5099 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
5108 /* Line 1464 of skeleton.m4 */
5109 #line 2294 "parser.y"
5110 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
5119 /* Line 1464 of skeleton.m4 */
5120 #line 2295 "parser.y"
5122 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
5123 (yyval.catch_list).finally = 0;
5124 if((yyvsp[(2) - (2)].exception)) {
5125 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
5126 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5137 /* Line 1464 of skeleton.m4 */
5138 #line 2303 "parser.y"
5140 (yyval.catch_list).l=list_new();
5141 (yyval.catch_list).finally = 0;
5142 if((yyvsp[(1) - (1)].exception)) {
5143 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5144 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5155 /* Line 1464 of skeleton.m4 */
5156 #line 2312 "parser.y"
5157 {PASS12 new_state();
5158 state->method->has_exceptions=1;
5159 state->method->late_binding=1;//for invariant scope_code
5169 /* Line 1464 of skeleton.m4 */
5170 #line 2315 "parser.y"
5172 code_t*out = abc_nop(0);
5174 code_t*start = abc_nop(0);
5175 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5176 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5177 (yyval.code) = abc_jump((yyval.code), out);
5179 code_t*end = (yyval.code) = abc_nop((yyval.code));
5182 if((yyvsp[(6) - (6)].catch_list).finally)
5183 tmp = new_variable("__finally__", 0, 0, 0);
5185 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5188 abc_exception_t*e = l->abc_exception;
5190 (yyval.code) = code_append((yyval.code), e->target);
5191 (yyval.code) = abc_jump((yyval.code), out);
5193 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5195 e->target = (yyval.code) = abc_nop((yyval.code));
5196 (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
5197 (yyval.code) = abc___rethrow__((yyval.code));
5205 (yyval.code) = code_append((yyval.code), out);
5207 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5209 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5211 (yyval.code) = var_block((yyval.code));
5222 /* Line 1464 of skeleton.m4 */
5223 #line 2361 "parser.y"
5225 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5226 (yyval.code)=abc_throw((yyval.code));
5236 /* Line 1464 of skeleton.m4 */
5237 #line 2365 "parser.y"
5239 if(!state->exception_name)
5240 syntaxerror("re-throw only possible within a catch block");
5241 variable_t*v = find_variable(state, state->exception_name);
5242 (yyval.code)=code_new();
5243 (yyval.code)=abc_getlocal((yyval.code), v->index);
5244 (yyval.code)=abc_throw((yyval.code));
5254 /* Line 1464 of skeleton.m4 */
5255 #line 2376 "parser.y"
5258 if(state->method->has_exceptions) {
5259 int v = alloc_local();
5260 state->method->scope_code = abc_getlocal(state->method->scope_code, v);
5261 state->method->scope_code = abc_pushwith(state->method->scope_code);
5262 (yyval.value_list).number = v;
5264 (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
5274 /* Line 1464 of skeleton.m4 */
5275 #line 2386 "parser.y"
5277 /* remove getlocal;pushwith from scope code again */
5278 state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
5280 (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
5281 if(state->method->has_exceptions) {
5282 (yyval.code) = abc_dup((yyval.code));
5283 (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
5285 (yyval.code) = abc_pushwith((yyval.code));
5286 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
5287 (yyval.code) = abc_popscope((yyval.code));
5298 /* Line 1464 of skeleton.m4 */
5299 #line 2404 "parser.y"
5300 {PASS12 (yyval.id)="package";}
5309 /* Line 1464 of skeleton.m4 */
5310 #line 2405 "parser.y"
5311 {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
5320 /* Line 1464 of skeleton.m4 */
5321 #line 2407 "parser.y"
5322 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5331 /* Line 1464 of skeleton.m4 */
5332 #line 2408 "parser.y"
5333 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5342 /* Line 1464 of skeleton.m4 */
5343 #line 2410 "parser.y"
5344 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5353 /* Line 1464 of skeleton.m4 */
5354 #line 2411 "parser.y"
5355 {PASS12 endpackage();(yyval.code)=0;}
5364 /* Line 1464 of skeleton.m4 */
5365 #line 2412 "parser.y"
5366 {PASS12 startpackage("");}
5375 /* Line 1464 of skeleton.m4 */
5376 #line 2413 "parser.y"
5377 {PASS12 endpackage();(yyval.code)=0;}
5386 /* Line 1464 of skeleton.m4 */
5387 #line 2435 "parser.y"
5390 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5391 if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
5392 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5394 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5396 syntaxerror("Couldn't import class\n");
5397 state_has_imports();
5398 dict_put(state->imports, c->name, c);
5399 import_toplevel(c->package);
5410 /* Line 1464 of skeleton.m4 */
5411 #line 2449 "parser.y"
5414 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
5415 as3_schedule_package((yyvsp[(2) - (4)].id));
5419 i->package = (yyvsp[(2) - (4)].id);
5420 state_has_imports();
5421 list_append(state->wildcard_imports, i);
5422 import_toplevel(i->package);
5433 /* Line 1464 of skeleton.m4 */
5434 #line 2465 "parser.y"
5435 {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
5444 /* Line 1464 of skeleton.m4 */
5445 #line 2466 "parser.y"
5446 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5455 /* Line 1464 of skeleton.m4 */
5456 #line 2467 "parser.y"
5457 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5466 /* Line 1464 of skeleton.m4 */
5467 #line 2468 "parser.y"
5470 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
5471 if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
5472 (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
5483 /* Line 1464 of skeleton.m4 */
5484 #line 2475 "parser.y"
5485 {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
5494 /* Line 1464 of skeleton.m4 */
5495 #line 2476 "parser.y"
5496 {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
5505 /* Line 1464 of skeleton.m4 */
5506 #line 2477 "parser.y"
5507 {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
5516 /* Line 1464 of skeleton.m4 */
5517 #line 2478 "parser.y"
5518 {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
5527 /* Line 1464 of skeleton.m4 */
5528 #line 2479 "parser.y"
5529 {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
5538 /* Line 1464 of skeleton.m4 */
5539 #line 2480 "parser.y"
5540 {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
5549 /* Line 1464 of skeleton.m4 */
5550 #line 2481 "parser.y"
5551 {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
5560 /* Line 1464 of skeleton.m4 */
5561 #line 2482 "parser.y"
5562 {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
5571 /* Line 1464 of skeleton.m4 */
5572 #line 2483 "parser.y"
5573 {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
5582 /* Line 1464 of skeleton.m4 */
5583 #line 2484 "parser.y"
5584 {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
5585 (yyval.flags).ns=(yyvsp[(1) - (1)].id);
5595 /* Line 1464 of skeleton.m4 */
5596 #line 2488 "parser.y"
5597 {PASS12 (yyval.classinfo)=0;}
5606 /* Line 1464 of skeleton.m4 */
5607 #line 2489 "parser.y"
5608 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5617 /* Line 1464 of skeleton.m4 */
5618 #line 2491 "parser.y"
5619 {PASS12 (yyval.classinfo_list)=list_new();}
5628 /* Line 1464 of skeleton.m4 */
5629 #line 2492 "parser.y"
5630 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5639 /* Line 1464 of skeleton.m4 */
5640 #line 2494 "parser.y"
5641 {PASS12 (yyval.classinfo_list)=list_new();}
5650 /* Line 1464 of skeleton.m4 */
5651 #line 2495 "parser.y"
5652 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5661 /* Line 1464 of skeleton.m4 */
5662 #line 2499 "parser.y"
5663 {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5672 /* Line 1464 of skeleton.m4 */
5673 #line 2501 "parser.y"
5674 {PASS12 endclass();(yyval.code)=0;}
5683 /* Line 1464 of skeleton.m4 */
5684 #line 2505 "parser.y"
5685 {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
5686 startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5695 /* Line 1464 of skeleton.m4 */
5696 #line 2508 "parser.y"
5697 {PASS12 endclass();(yyval.code)=0;}
5706 /* Line 1464 of skeleton.m4 */
5707 #line 2517 "parser.y"
5708 {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
5717 /* Line 1464 of skeleton.m4 */
5718 #line 2521 "parser.y"
5720 code_t*c = state->cls->static_init->header;
5721 c = code_append(c, (yyvsp[(1) - (1)].code));
5722 state->cls->static_init->header = c;
5732 /* Line 1464 of skeleton.m4 */
5733 #line 2532 "parser.y"
5735 syntaxerror("variable declarations not allowed in interfaces");
5745 /* Line 1464 of skeleton.m4 */
5746 #line 2535 "parser.y"
5749 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
5750 if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5751 syntaxerror("invalid method modifiers: interface methods always need to be public");
5753 startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5754 endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5755 list_deep_free((yyvsp[(6) - (8)].params).list);
5765 /* Line 1464 of skeleton.m4 */
5766 #line 2569 "parser.y"
5767 {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
5776 /* Line 1464 of skeleton.m4 */
5777 #line 2569 "parser.y"
5778 {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
5787 /* Line 1464 of skeleton.m4 */
5788 #line 2571 "parser.y"
5789 {PASS12 (yyval.code)=0;}
5798 /* Line 1464 of skeleton.m4 */
5799 #line 2572 "parser.y"
5800 {PASS12 (yyval.code)=0;}
5809 /* Line 1464 of skeleton.m4 */
5810 #line 2575 "parser.y"
5813 int flags = slotstate_flags->flags;
5814 namespace_t ns = modifiers2access(slotstate_flags);
5818 varinfo_t* info = 0;
5820 memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
5822 check_override(i, flags);
5824 info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
5826 slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
5828 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
5830 if(ns.name && ns.name[0]) {
5831 syntaxerror("namespaces not allowed on package-level variables");
5833 info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
5836 info->type = (yyvsp[(2) - (3)].classinfo);
5837 info->flags = flags;
5839 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
5843 varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
5846 multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
5848 trait_list_t**traits;
5852 ns.name = state->package;
5853 traits = &global->init->traits;
5854 code = &global->init->method->body->code;
5855 } else if(flags&FLAG_STATIC) {
5857 traits = &state->cls->abc->static_traits;
5858 code = &state->cls->static_init->header;
5860 // instance variable
5861 traits = &state->cls->abc->traits;
5862 code = &state->cls->init->header;
5866 if((yyvsp[(2) - (3)].classinfo)) {
5867 MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
5868 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5870 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5872 info->slot = t->slot_id;
5874 /* initalization code (if needed) */
5876 if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
5877 c = abc_getlocal_0(c);
5878 c = code_append(c, (yyvsp[(3) - (3)].value).c);
5879 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
5880 c = abc_setslot(c, t->slot_id);
5883 *code = code_append(*code, c);
5885 if(slotstate_varconst==KW_CONST) {
5886 t->kind= TRAIT_CONST;
5900 /* Line 1464 of skeleton.m4 */
5901 #line 2659 "parser.y"
5902 {(yyval.constant)=0;}
5911 /* Line 1464 of skeleton.m4 */
5912 #line 2660 "parser.y"
5913 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5922 /* Line 1464 of skeleton.m4 */
5923 #line 2663 "parser.y"
5924 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5933 /* Line 1464 of skeleton.m4 */
5934 #line 2664 "parser.y"
5936 (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
5946 /* Line 1464 of skeleton.m4 */
5947 #line 2667 "parser.y"
5948 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5957 /* Line 1464 of skeleton.m4 */
5958 #line 2668 "parser.y"
5959 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5968 /* Line 1464 of skeleton.m4 */
5969 #line 2669 "parser.y"
5970 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5979 /* Line 1464 of skeleton.m4 */
5980 #line 2670 "parser.y"
5981 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5990 /* Line 1464 of skeleton.m4 */
5991 #line 2671 "parser.y"
5992 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
6001 /* Line 1464 of skeleton.m4 */
6002 #line 2672 "parser.y"
6003 {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
6012 /* Line 1464 of skeleton.m4 */
6013 #line 2673 "parser.y"
6014 {(yyval.constant) = constant_new_float(__builtin_nan(""));}
6023 /* Line 1464 of skeleton.m4 */
6024 #line 2688 "parser.y"
6027 memset(&(yyval.params),0,sizeof((yyval.params)));
6037 /* Line 1464 of skeleton.m4 */
6038 #line 2692 "parser.y"
6041 (yyval.params)=(yyvsp[(1) - (1)].params);
6051 /* Line 1464 of skeleton.m4 */
6052 #line 2698 "parser.y"
6055 memset(&(yyval.params),0,sizeof((yyval.params)));
6056 (yyval.params).varargs=1;
6057 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
6067 /* Line 1464 of skeleton.m4 */
6068 #line 2704 "parser.y"
6071 (yyval.params) =(yyvsp[(1) - (4)].params);
6072 (yyval.params).varargs=1;
6073 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
6083 /* Line 1464 of skeleton.m4 */
6084 #line 2712 "parser.y"
6087 (yyval.params) = (yyvsp[(1) - (3)].params);
6088 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
6098 /* Line 1464 of skeleton.m4 */
6099 #line 2717 "parser.y"
6102 memset(&(yyval.params),0,sizeof((yyval.params)));
6103 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
6113 /* Line 1464 of skeleton.m4 */
6114 #line 2723 "parser.y"
6117 (yyval.param) = rfx_calloc(sizeof(param_t));
6118 (yyval.param)->name=(yyvsp[(1) - (4)].id);
6119 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
6121 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
6131 /* Line 1464 of skeleton.m4 */
6132 #line 2731 "parser.y"
6135 (yyval.param) = rfx_calloc(sizeof(param_t));
6136 (yyval.param)->name=(yyvsp[(1) - (2)].id);
6137 (yyval.param)->type = TYPE_ANY;
6139 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
6149 /* Line 1464 of skeleton.m4 */
6150 #line 2741 "parser.y"
6151 {PASS12 (yyval.token)=0;}
6160 /* Line 1464 of skeleton.m4 */
6161 #line 2744 "parser.y"
6162 {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
6171 /* Line 1464 of skeleton.m4 */
6172 #line 2745 "parser.y"
6175 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
6177 if(!state->method->info) syntaxerror("internal error");
6179 code_t*c = method_header(state->method);
6180 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
6182 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
6184 list_deep_free((yyvsp[(6) - (12)].params).list);
6195 /* Line 1464 of skeleton.m4 */
6196 #line 2761 "parser.y"
6197 {PASS12 (yyval.id)=0;}
6206 /* Line 1464 of skeleton.m4 */
6207 #line 2763 "parser.y"
6208 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
6217 /* Line 1464 of skeleton.m4 */
6218 #line 2764 "parser.y"
6221 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
6223 methodinfo_t*f = state->method->info;
6224 if(!f || !f->kind) syntaxerror("internal error");
6226 code_t*c = method_header(state->method);
6227 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
6229 int index = state->method->var_index;
6230 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
6232 (yyval.value).c = abc_getlocal(0, index);
6233 (yyval.value).t = TYPE_FUNCTION(f);
6235 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6245 /* Line 1464 of skeleton.m4 */
6246 #line 2786 "parser.y"
6248 PASS1 NEW(unresolvedinfo_t,c);
6249 memset(c, 0, sizeof(*c));
6250 c->kind = INFOTYPE_UNRESOLVED;
6251 c->name = (yyvsp[(1) - (1)].id);
6252 c->package = get_package_from_name((yyvsp[(1) - (1)].id));
6254 c->nsset = get_current_imports();
6255 /* make the compiler look for this class in the current directory,
6257 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
6259 (yyval.classinfo) = (classinfo_t*)c;
6261 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6262 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6263 (yyval.classinfo) = (classinfo_t*)s;
6273 /* Line 1464 of skeleton.m4 */
6274 #line 2805 "parser.y"
6276 PASS1 NEW(unresolvedinfo_t,c);
6277 memset(c, 0, sizeof(*c));
6278 c->kind = INFOTYPE_UNRESOLVED;
6279 c->package = (yyvsp[(1) - (3)].id);
6280 c->name = (yyvsp[(3) - (3)].id);
6281 (yyval.classinfo) = (classinfo_t*)c;
6283 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6284 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6285 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6286 (yyval.classinfo) = (classinfo_t*)s;
6296 /* Line 1464 of skeleton.m4 */
6297 #line 2822 "parser.y"
6298 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6307 /* Line 1464 of skeleton.m4 */
6308 #line 2823 "parser.y"
6309 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6318 /* Line 1464 of skeleton.m4 */
6319 #line 2825 "parser.y"
6320 {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6329 /* Line 1464 of skeleton.m4 */
6330 #line 2826 "parser.y"
6331 {PASS12 (yyval.classinfo)=registry_getanytype();}
6340 /* Line 1464 of skeleton.m4 */
6341 #line 2827 "parser.y"
6342 {PASS12 (yyval.classinfo)=registry_getanytype();}
6351 /* Line 1464 of skeleton.m4 */
6352 #line 2836 "parser.y"
6353 {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6362 /* Line 1464 of skeleton.m4 */
6363 #line 2837 "parser.y"
6364 {PASS12 (yyval.classinfo)=0;}
6373 /* Line 1464 of skeleton.m4 */
6374 #line 2841 "parser.y"
6375 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6384 /* Line 1464 of skeleton.m4 */
6385 #line 2842 "parser.y"
6386 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6395 /* Line 1464 of skeleton.m4 */
6396 #line 2844 "parser.y"
6397 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6406 /* Line 1464 of skeleton.m4 */
6407 #line 2848 "parser.y"
6408 {(yyval.value_list).number=1;
6409 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6419 /* Line 1464 of skeleton.m4 */
6420 #line 2852 "parser.y"
6421 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6430 /* Line 1464 of skeleton.m4 */
6431 #line 2853 "parser.y"
6433 (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
6434 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6444 /* Line 1464 of skeleton.m4 */
6445 #line 2859 "parser.y"
6447 typedcode_t v = node_read((yyvsp[(2) - (4)].node));
6448 (yyval.value).c = v.c;
6449 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6451 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6452 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6453 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6454 (yyval.value).c = code_cutlast((yyval.value).c);
6455 (yyval.value).c = code_append((yyval.value).c, paramcode);
6456 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6457 multiname_destroy(name);
6458 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6459 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6460 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6461 multiname_t*name = t->name;
6462 (yyval.value).c = code_cutlast((yyval.value).c);
6463 (yyval.value).c = code_append((yyval.value).c, paramcode);
6464 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
6466 (yyval.value).c = code_append((yyval.value).c, paramcode);
6467 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
6470 (yyval.value).t = TYPE_ANY;
6471 if(TYPE_IS_CLASS(v.t) && v.t->data) {
6472 (yyval.value).t = v.t->data;
6474 (yyval.value).c = abc_coerce_a((yyval.value).c);
6475 (yyval.value).t = TYPE_ANY;
6486 /* Line 1464 of skeleton.m4 */
6487 #line 2896 "parser.y"
6490 typedcode_t v = node_read((yyvsp[(1) - (4)].node));
6491 (yyval.value).c = v.c;
6492 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6493 (yyval.value).c = code_cutlast((yyval.value).c);
6495 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6497 (yyval.value).t = TYPE_ANY;
6498 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6499 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6500 (yyval.value).c = code_cutlast((yyval.value).c);
6501 (yyval.value).c = code_append((yyval.value).c, paramcode);
6502 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6503 multiname_destroy(name);
6504 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6505 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6506 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6507 if(t->kind!=TRAIT_METHOD) {
6508 //ok: flash allows to assign closures to members.
6510 multiname_t*name = t->name;
6511 (yyval.value).c = code_cutlast((yyval.value).c);
6512 (yyval.value).c = code_append((yyval.value).c, paramcode);
6513 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6514 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6515 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6516 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6517 (yyval.value).c = code_cutlast((yyval.value).c);
6518 (yyval.value).c = code_append((yyval.value).c, paramcode);
6519 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
6520 multiname_destroy(name);
6522 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6523 (yyval.value).c = code_append((yyval.value).c, paramcode);
6524 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6527 if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
6528 (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
6530 (yyval.value).c = abc_coerce_a((yyval.value).c);
6531 (yyval.value).t = TYPE_ANY;
6542 /* Line 1464 of skeleton.m4 */
6543 #line 2943 "parser.y"
6545 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6546 if(!state->method) syntaxerror("super() not allowed outside of a function");
6547 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6549 (yyval.value).c = code_new();
6550 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6552 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6554 this is dependent on the control path, check this somewhere else
6555 if(state->method->has_super)
6556 syntaxerror("constructor may call super() only once");
6558 state->method->has_super = 1;
6560 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
6561 (yyval.value).c = abc_pushundefined((yyval.value).c);
6562 (yyval.value).t = TYPE_ANY;
6572 /* Line 1464 of skeleton.m4 */
6573 #line 2964 "parser.y"
6575 typedcode_t v = node_read((yyvsp[(2) - (2)].node));
6576 (yyval.value).c = v.c;
6577 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6578 (yyval.value).c = code_cutlast((yyval.value).c);
6580 multiname_t*name = 0;
6581 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6582 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6583 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6584 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6585 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6586 (yyval.value).c = code_cutlast((yyval.value).c);
6587 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6589 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6590 MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
6591 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6593 (yyval.value).t = TYPE_BOOLEAN;
6603 /* Line 1464 of skeleton.m4 */
6604 #line 2986 "parser.y"
6606 (yyval.code) = abc_returnvoid(0);
6616 /* Line 1464 of skeleton.m4 */
6617 #line 2989 "parser.y"
6619 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6620 (yyval.code) = abc_returnvalue((yyval.code));
6630 /* Line 1464 of skeleton.m4 */
6631 #line 2996 "parser.y"
6633 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
6643 /* Line 1464 of skeleton.m4 */
6644 #line 2999 "parser.y"
6646 (yyval.value) = node_read((yyvsp[(1) - (1)].node));
6656 /* Line 1464 of skeleton.m4 */
6657 #line 3002 "parser.y"
6659 (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
6669 /* Line 1464 of skeleton.m4 */
6670 #line 3005 "parser.y"
6672 (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
6682 /* Line 1464 of skeleton.m4 */
6683 #line 3008 "parser.y"
6685 (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
6695 /* Line 1464 of skeleton.m4 */
6696 #line 3011 "parser.y"
6698 (yyval.code) = (yyvsp[(1) - (3)].code);
6699 (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
6709 /* Line 1464 of skeleton.m4 */
6710 #line 3016 "parser.y"
6711 {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
6720 /* Line 1464 of skeleton.m4 */
6721 #line 3017 "parser.y"
6722 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
6731 /* Line 1464 of skeleton.m4 */
6732 #line 3019 "parser.y"
6734 (yyval.value_list).cc = 0;
6735 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
6736 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
6737 (yyval.value_list).number = 2;
6747 /* Line 1464 of skeleton.m4 */
6748 #line 3025 "parser.y"
6750 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
6751 (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
6752 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
6753 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
6763 /* Line 1464 of skeleton.m4 */
6764 #line 3034 "parser.y"
6765 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6774 /* Line 1464 of skeleton.m4 */
6775 #line 3035 "parser.y"
6776 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6785 /* Line 1464 of skeleton.m4 */
6786 #line 3036 "parser.y"
6787 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6796 /* Line 1464 of skeleton.m4 */
6797 #line 3037 "parser.y"
6798 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6807 /* Line 1464 of skeleton.m4 */
6808 #line 3038 "parser.y"
6809 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6818 /* Line 1464 of skeleton.m4 */
6819 #line 3039 "parser.y"
6820 {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
6829 /* Line 1464 of skeleton.m4 */
6830 #line 3041 "parser.y"
6832 (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
6842 /* Line 1464 of skeleton.m4 */
6843 #line 3046 "parser.y"
6847 namespace_t ns = {ACCESS_PACKAGE, ""};
6848 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6849 if(!(yyvsp[(1) - (1)].regexp).options) {
6850 v.c = abc_getlex2(v.c, &m);
6851 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
6852 v.c = abc_construct(v.c, 1);
6854 v.c = abc_getlex2(v.c, &m);
6855 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
6856 v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
6857 v.c = abc_construct(v.c, 2);
6860 (yyval.node) = mkcodenode(v);
6870 /* Line 1464 of skeleton.m4 */
6871 #line 3066 "parser.y"
6875 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
6876 v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
6877 v.t = registry_getarrayclass();
6878 (yyval.node) = mkcodenode(v);
6888 /* Line 1464 of skeleton.m4 */
6889 #line 3076 "parser.y"
6893 v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
6894 v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
6895 v.t = registry_getobjectclass();
6896 (yyval.node) = mkcodenode(v);
6906 /* Line 1464 of skeleton.m4 */
6907 #line 3085 "parser.y"
6908 {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6917 /* Line 1464 of skeleton.m4 */
6918 #line 3086 "parser.y"
6919 {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6928 /* Line 1464 of skeleton.m4 */
6929 #line 3087 "parser.y"
6930 {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6939 /* Line 1464 of skeleton.m4 */
6940 #line 3088 "parser.y"
6941 {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6950 /* Line 1464 of skeleton.m4 */
6951 #line 3089 "parser.y"
6952 {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6961 /* Line 1464 of skeleton.m4 */
6962 #line 3090 "parser.y"
6963 {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6972 /* Line 1464 of skeleton.m4 */
6973 #line 3091 "parser.y"
6974 {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6983 /* Line 1464 of skeleton.m4 */
6984 #line 3092 "parser.y"
6985 {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
6994 /* Line 1464 of skeleton.m4 */
6995 #line 3093 "parser.y"
6996 {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7005 /* Line 1464 of skeleton.m4 */
7006 #line 3094 "parser.y"
7007 {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
7016 /* Line 1464 of skeleton.m4 */
7017 #line 3095 "parser.y"
7018 {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
7027 /* Line 1464 of skeleton.m4 */
7028 #line 3096 "parser.y"
7029 {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
7038 /* Line 1464 of skeleton.m4 */
7039 #line 3097 "parser.y"
7040 {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7049 /* Line 1464 of skeleton.m4 */
7050 #line 3098 "parser.y"
7051 {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7060 /* Line 1464 of skeleton.m4 */
7061 #line 3099 "parser.y"
7062 {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7071 /* Line 1464 of skeleton.m4 */
7072 #line 3100 "parser.y"
7073 {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7082 /* Line 1464 of skeleton.m4 */
7083 #line 3101 "parser.y"
7084 {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7093 /* Line 1464 of skeleton.m4 */
7094 #line 3102 "parser.y"
7095 {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7104 /* Line 1464 of skeleton.m4 */
7105 #line 3103 "parser.y"
7106 {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7115 /* Line 1464 of skeleton.m4 */
7116 #line 3104 "parser.y"
7117 {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7126 /* Line 1464 of skeleton.m4 */
7127 #line 3105 "parser.y"
7128 {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7137 /* Line 1464 of skeleton.m4 */
7138 #line 3106 "parser.y"
7139 {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7148 /* Line 1464 of skeleton.m4 */
7149 #line 3107 "parser.y"
7150 {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7159 /* Line 1464 of skeleton.m4 */
7160 #line 3108 "parser.y"
7161 {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7170 /* Line 1464 of skeleton.m4 */
7171 #line 3109 "parser.y"
7172 {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7181 /* Line 1464 of skeleton.m4 */
7182 #line 3110 "parser.y"
7183 {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7192 /* Line 1464 of skeleton.m4 */
7193 #line 3111 "parser.y"
7194 {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7203 /* Line 1464 of skeleton.m4 */
7204 #line 3112 "parser.y"
7205 {(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
7214 /* Line 1464 of skeleton.m4 */
7215 #line 3113 "parser.y"
7216 {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
7225 /* Line 1464 of skeleton.m4 */
7226 #line 3114 "parser.y"
7227 { (yyval.node) = mkconstnode(constant_new_undefined());}
7236 /* Line 1464 of skeleton.m4 */
7237 #line 3115 "parser.y"
7238 { (yyval.node)=(yyvsp[(2) - (3)].node);}
7247 /* Line 1464 of skeleton.m4 */
7248 #line 3116 "parser.y"
7249 {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
7258 /* Line 1464 of skeleton.m4 */
7259 #line 3117 "parser.y"
7260 {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
7269 /* Line 1464 of skeleton.m4 */
7270 #line 3118 "parser.y"
7271 {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7280 /* Line 1464 of skeleton.m4 */
7281 #line 3119 "parser.y"
7282 {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7291 /* Line 1464 of skeleton.m4 */
7292 #line 3120 "parser.y"
7293 {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7302 /* Line 1464 of skeleton.m4 */
7303 #line 3121 "parser.y"
7304 {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7313 /* Line 1464 of skeleton.m4 */
7314 #line 3122 "parser.y"
7315 {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7324 /* Line 1464 of skeleton.m4 */
7325 #line 3123 "parser.y"
7326 { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7335 /* Line 1464 of skeleton.m4 */
7336 #line 3124 "parser.y"
7337 { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7346 /* Line 1464 of skeleton.m4 */
7347 #line 3125 "parser.y"
7348 { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7357 /* Line 1464 of skeleton.m4 */
7358 #line 3126 "parser.y"
7359 { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7368 /* Line 1464 of skeleton.m4 */
7369 #line 3127 "parser.y"
7370 { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7379 /* Line 1464 of skeleton.m4 */
7380 #line 3128 "parser.y"
7381 { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7390 /* Line 1464 of skeleton.m4 */
7391 #line 3129 "parser.y"
7392 { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
7401 /* Line 1464 of skeleton.m4 */
7402 #line 3130 "parser.y"
7403 { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
7412 /* Line 1464 of skeleton.m4 */
7413 #line 3132 "parser.y"
7414 { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
7423 /* Line 1464 of skeleton.m4 */
7424 #line 3133 "parser.y"
7425 { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
7434 /* Line 1464 of skeleton.m4 */
7435 #line 3134 "parser.y"
7436 {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
7445 /* Line 1464 of skeleton.m4 */
7446 #line 3135 "parser.y"
7447 {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
7456 /* Line 1464 of skeleton.m4 */
7457 #line 3138 "parser.y"
7458 { if(!state->cls->info)
7459 syntaxerror("super keyword not allowed outside a class");
7460 classinfo_t*t = state->cls->info->superclass;
7461 if(!t) t = TYPE_OBJECT;
7462 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7463 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7466 v.c = abc_getlocal_0(v.c);
7467 v.c = abc_getsuper2(v.c, &m);
7468 v.t = slotinfo_gettype((slotinfo_t*)f);
7469 (yyval.node) = mkcodenode(v);
7479 /* Line 1464 of skeleton.m4 */
7480 #line 3152 "parser.y"
7483 (yyval.node) = mkdummynode();
7484 as3_warning("ignored @ operator");
7494 /* Line 1464 of skeleton.m4 */
7495 #line 3158 "parser.y"
7497 // child attribute TODO
7498 (yyval.node) = mkdummynode();
7499 as3_warning("ignored .@ operator");
7509 /* Line 1464 of skeleton.m4 */
7510 #line 3164 "parser.y"
7512 // namespace declaration TODO
7513 (yyval.node) = mkdummynode();
7514 as3_warning("ignored :: operator");
7524 /* Line 1464 of skeleton.m4 */
7525 #line 3170 "parser.y"
7528 (yyval.node) = mkdummynode();
7529 as3_warning("ignored .. operator");
7539 /* Line 1464 of skeleton.m4 */
7540 #line 3176 "parser.y"
7543 (yyval.node) = mkdummynode();
7544 as3_warning("ignored .() operator");
7554 /* Line 1464 of skeleton.m4 */
7555 #line 3189 "parser.y"
7557 typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
7558 (yyval.value).c = v1.c;
7559 classinfo_t*t = v1.t;
7561 if(TYPE_IS_CLASS(t) && t->data) {
7566 if(t->subtype==INFOTYPE_UNRESOLVED) {
7567 syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
7569 memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
7571 if(f && !is_static != !(f->flags&FLAG_STATIC))
7573 if(f && f->slot && !noslot) {
7574 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7577 as3_warning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
7580 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7581 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7583 /* determine type */
7584 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7585 if(!(yyval.value).t)
7586 (yyval.value).c = abc_coerce_a((yyval.value).c);
7587 } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
7588 string_t*package = v1.c->data[0];
7589 char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
7591 slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
7593 (yyval.value) = push_class(a);
7594 } else if(dict_contains(state->import_toplevel_packages, package2) ||
7595 registry_ispackage(package2)) {
7596 (yyval.value).c = v1.c;
7597 (yyval.value).c->data[0] = string_new4(package2);
7598 (yyval.value).t = 0;
7600 syntaxerror("couldn't resolve %s", package2);
7603 /* when resolving a property on an unknown type, we do know the
7604 name of the property (and don't seem to need the package), but
7605 we need to make avm2 try out all access modes */
7606 as3_warning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
7607 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7608 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7609 (yyval.value).c = abc_coerce_a((yyval.value).c);
7610 (yyval.value).t = registry_getanytype();
7621 /* Line 1464 of skeleton.m4 */
7622 #line 3247 "parser.y"
7625 /* Queue unresolved identifiers for checking against the parent
7626 function's variables.
7627 We consider everything which is not a local variable "unresolved".
7628 This encompasses class names, members of the surrounding class
7629 etc. which is *correct* because local variables of the parent function
7632 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7633 unknown_variable((yyvsp[(1) - (1)].id));
7636 /* let the compiler know that it might want to check the current directory/package
7637 for this identifier- maybe there's a file $1.as defining $1. */
7638 as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
7641 (yyval.value).t = 0;
7642 (yyval.value).c = 0;
7647 /* look at variables */
7648 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7649 // $1 is a local variable
7650 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7651 (yyval.value).t = v->type;
7654 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7655 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7656 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7657 (yyval.value).t = v->type;
7661 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7663 /* look at current class' members */
7664 if(!state->method->inner &&
7666 (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7667 (f->flags&FLAG_STATIC) >= i_am_static)
7669 // $1 is a function in this class
7670 int var_is_static = (f->flags&FLAG_STATIC);
7672 if(f->kind == INFOTYPE_METHOD) {
7673 (yyval.value).t = TYPE_FUNCTION(f);
7675 (yyval.value).t = f->type;
7677 if(var_is_static && !i_am_static) {
7678 /* access to a static member from a non-static location.
7679 do this via findpropstrict:
7680 there doesn't seem to be any non-lookup way to access
7681 static properties of a class */
7682 state->method->late_binding = 1;
7683 (yyval.value).t = f->type;
7684 namespace_t ns = {f->access, f->package};
7685 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7686 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7687 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7689 } else if(f->slot>0) {
7690 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7691 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7694 namespace_t ns = {f->access, f->package};
7695 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7696 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7697 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7702 /* look at actual classes, in the current package and imported */
7703 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7704 (yyval.value) = push_class(a);
7708 /* look through package prefixes */
7709 if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id)) ||
7710 registry_ispackage((yyvsp[(1) - (1)].id))) {
7711 (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
7712 (yyval.value).t = 0;
7716 /* unknown object, let the avm2 resolve it */
7718 //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
7719 as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7720 state->method->late_binding = 1;
7722 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7724 (yyval.value).t = 0;
7725 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7726 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7737 /* Line 1464 of skeleton.m4 */
7738 #line 3356 "parser.y"
7741 NEW(namespace_decl_t,n);
7742 n->name = (yyvsp[(2) - (2)].id);
7743 n->url = (yyvsp[(2) - (2)].id);
7744 (yyval.namespace_decl)=n;
7754 /* Line 1464 of skeleton.m4 */
7755 #line 3363 "parser.y"
7758 NEW(namespace_decl_t,n);
7759 n->name = (yyvsp[(2) - (4)].id);
7760 n->url = (yyvsp[(4) - (4)].id);
7761 (yyval.namespace_decl)=n;
7771 /* Line 1464 of skeleton.m4 */
7772 #line 3370 "parser.y"
7775 NEW(namespace_decl_t,n);
7776 n->name = (yyvsp[(2) - (4)].id);
7777 n->url = (yyvsp[(4) - (4)].str).str;
7778 (yyval.namespace_decl)=n;
7788 /* Line 1464 of skeleton.m4 */
7789 #line 3377 "parser.y"
7792 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
7794 namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
7795 varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
7796 var->type = TYPE_NAMESPACE;
7798 ns.access = ACCESS_NAMESPACE;
7799 ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
7800 var->value = constant_new_namespace(&ns);
7812 /* Line 1464 of skeleton.m4 */
7813 #line 3401 "parser.y"
7816 const char*url = (yyvsp[(3) - (3)].classinfo)->name;
7818 varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
7819 if(s->kind == INFOTYPE_UNRESOLVED) {
7820 s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
7822 syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
7825 if(!s || s->kind != INFOTYPE_SLOT)
7826 syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
7827 if(!s->value || !NS_TYPE(s->value->type))
7828 syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
7829 url = s->value->ns->name;
7831 trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
7832 add_active_url(url);
7841 /* Line 1464 of skeleton.m4 */
7842 #line 7843 "parser.tab.c"
7845 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7849 YY_STACK_PRINT (yyss, yyssp);
7853 /* Now `shift' the result of the reduction. Determine what state
7854 that goes to, based on the state we popped back to and the rule
7855 number reduced by. */
7859 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7860 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7861 yystate = yytable[yystate];
7863 yystate = yydefgoto[yyn - YYNTOKENS];
7868 /*------------------------------------.
7869 | yyerrlab -- here on detecting error |
7870 `------------------------------------*/
7872 /* If not already recovering from an error, report this error. */
7876 #if ! YYERROR_VERBOSE
7877 yyerror (YY_("syntax error"));
7880 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7881 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7883 YYSIZE_T yyalloc = 2 * yysize;
7884 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7885 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7886 if (yymsg != yymsgbuf)
7887 YYSTACK_FREE (yymsg);
7888 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7890 yymsg_alloc = yyalloc;
7894 yymsg_alloc = sizeof yymsgbuf;
7898 if (0 < yysize && yysize <= yymsg_alloc)
7900 (void) yysyntax_error (yymsg, yystate, yychar);
7905 yyerror (YY_("syntax error"));
7907 goto yyexhaustedlab;
7915 if (yyerrstatus == 3)
7917 /* If just tried and failed to reuse lookahead token after an
7918 error, discard it. */
7920 if (yychar <= YYEOF)
7922 /* Return failure if at end of input. */
7923 if (yychar == YYEOF)
7928 yydestruct ("Error: discarding",
7934 /* Else will try to reuse lookahead token after shifting the error
7939 /*---------------------------------------------------.
7940 | yyerrorlab -- error raised explicitly by YYERROR. |
7941 `---------------------------------------------------*/
7944 /* Pacify compilers like GCC when the user code never invokes
7945 YYERROR and the label yyerrorlab therefore never appears in user
7947 if (/*CONSTCOND*/ 0)
7950 /* Do not reclaim the symbols of the rule which action triggered
7954 YY_STACK_PRINT (yyss, yyssp);
7959 /*-------------------------------------------------------------.
7960 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7961 `-------------------------------------------------------------*/
7963 yyerrstatus = 3; /* Each real token shifted decrements this. */
7967 yyn = yypact[yystate];
7968 if (yyn != YYPACT_NINF)
7971 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7979 /* Pop the current state because it cannot handle the error token. */
7984 yydestruct ("Error: popping",
7985 yystos[yystate], yyvsp);
7988 YY_STACK_PRINT (yyss, yyssp);
7994 /* Shift the error token. */
7995 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8001 /*-------------------------------------.
8002 | yyacceptlab -- YYACCEPT comes here. |
8003 `-------------------------------------*/
8008 /*-----------------------------------.
8009 | yyabortlab -- YYABORT comes here. |
8010 `-----------------------------------*/
8015 #if !defined(yyoverflow) || YYERROR_VERBOSE
8016 /*-------------------------------------------------.
8017 | yyexhaustedlab -- memory exhaustion comes here. |
8018 `-------------------------------------------------*/
8020 yyerror (YY_("memory exhausted"));
8026 if (yychar != YYEMPTY)
8027 yydestruct ("Cleanup: discarding lookahead",
8029 /* Do not reclaim the symbols of the rule which action triggered
8030 this YYABORT or YYACCEPT. */
8032 YY_STACK_PRINT (yyss, yyssp);
8033 while (yyssp != yyss)
8035 yydestruct ("Cleanup: popping",
8036 yystos[*yyssp], yyvsp);
8041 YYSTACK_FREE (yyss);
8044 if (yymsg != yymsgbuf)
8045 YYSTACK_FREE (yymsg);
8047 /* Make sure YYID is used. */
8048 return YYID (yyresult);