2 /* A Bison parser, made by GNU Bison 2.4. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4"
52 #define YYSKELETON_NAME "./skeleton.m4"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse a3_parse
69 #define yyerror a3_error
70 #define yylval a3_lval
71 #define yychar a3_char
72 #define yydebug a3_debug
73 #define yynerrs a3_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 198 of skeleton.m4 */
87 #include "tokenizer.h"
97 /* Line 198 of skeleton.m4 */
98 #line 99 "parser.tab.c"
100 /* Enabling traces. */
105 /* Enabling verbose error messages. */
106 #ifdef YYERROR_VERBOSE
107 # undef YYERROR_VERBOSE
108 # define YYERROR_VERBOSE 1
110 # define YYERROR_VERBOSE 1
113 /* Enabling the token table. */
114 #ifndef YYTOKEN_TABLE
115 # define YYTOKEN_TABLE 0
122 /* Put the tokens into the symbol table, so that GDB and other debuggers
220 below_semicolon = 353,
221 below_assignment = 354,
223 minusminus_prefix = 357,
224 plusplus_prefix = 358,
227 above_identifier = 361,
235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
237 /* Line 223 of skeleton.m4 */
242 /* Line 223 of skeleton.m4 */
245 enum yytokentype token;
248 classinfo_t*classinfo;
249 classinfo_list_t*classinfo_list;
252 unsigned int number_uint;
256 //typedcode_list_t*value_list;
257 codeandnumber_t value_list;
263 for_start_t for_start;
264 abc_exception_t *exception;
267 abc_exception_list_t *l;
273 /* Line 223 of skeleton.m4 */
274 #line 275 "parser.tab.c"
276 # define YYSTYPE_IS_TRIVIAL 1
277 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
278 # define YYSTYPE_IS_DECLARED 1
282 /* Copy the second part of user declarations. */
284 /* Line 273 of skeleton.m4 */
288 static int a3_error(char*s)
290 syntaxerror("%s", s);
291 return 0; //make gcc happy
295 static char* concat2(const char* t1, const char* t2)
299 char*text = malloc(l1+l2+1);
300 memcpy(text , t1, l1);
301 memcpy(text+l1, t2, l2);
305 static char* concat3(const char* t1, const char* t2, const char* t3)
310 char*text = malloc(l1+l2+l3+1);
311 memcpy(text , t1, l1);
312 memcpy(text+l1, t2, l2);
313 memcpy(text+l1+l2, t3, l3);
318 typedef struct _import {
322 DECLARE_LIST(import);
324 DECLARE(methodstate);
325 DECLARE_LIST(methodstate);
327 typedef struct _classstate {
333 methodstate_t*static_init;
335 //code_t*static_init;
337 char has_constructor;
340 struct _methodstate {
349 dict_t*unresolved_variables;
352 char uses_parent_function;
357 int var_index; // for inner methods
358 int slot_index; // for inner methods
359 char is_a_slot; // for inner methods
362 abc_exception_list_t*exceptions;
364 methodstate_list_t*innerfunctions;
367 typedef struct _state {
372 import_list_t*wildcard_imports;
374 char has_own_imports;
375 char new_vars; // e.g. transition between two functions
378 methodstate_t*method;
385 typedef struct _global {
389 dict_t*file2token2info;
392 static global_t*global = 0;
393 static state_t* state = 0;
397 #define MULTINAME(m,x) \
401 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
403 #define MEMBER_MULTINAME(m,f,n) \
407 if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
408 m##_ns.name = ((slotinfo_t*)(f))->package; \
413 m.namespace_set = 0; \
414 m.name = ((slotinfo_t*)(f))->name; \
416 m.type = MULTINAME; \
418 m.namespace_set = &nopackage_namespace_set; \
422 /* warning: list length of namespace set is undefined */
423 #define MULTINAME_LATE(m, access, package) \
424 namespace_t m##_ns = {access, package}; \
425 namespace_set_t m##_nsset; \
426 namespace_list_t m##_l;m##_l.next = 0; \
427 m##_nsset.namespaces = &m##_l; \
428 m##_nsset = m##_nsset; \
429 m##_l.namespace = &m##_ns; \
430 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
432 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
433 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
434 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
435 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
436 static namespace_list_t nl4 = {&ns4,0};
437 static namespace_list_t nl3 = {&ns3,&nl4};
438 static namespace_list_t nl2 = {&ns2,&nl3};
439 static namespace_list_t nl1 = {&ns1,&nl2};
440 static namespace_set_t nopackage_namespace_set = {&nl1};
442 static void new_state()
445 state_t*oldstate = state;
447 memcpy(s, state, sizeof(state_t)); //shallow copy
449 s->imports = dict_new();
453 state->has_own_imports = 0;
454 state->vars = dict_new();
455 state->old = oldstate;
458 static void state_has_imports()
460 state->wildcard_imports = list_clone(state->wildcard_imports);
461 state->imports = dict_clone(state->imports);
462 state->has_own_imports = 1;
465 static void state_destroy(state_t*state)
467 if(state->has_own_imports) {
468 list_free(state->wildcard_imports);
469 dict_destroy(state->imports);state->imports=0;
471 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
472 dict_destroy(state->imports);state->imports=0;
476 for(t=0;t<state->vars->hashsize;t++) {
477 dictentry_t*e =state->vars->slots[t];
479 free(e->data);e->data=0;
483 dict_destroy(state->vars);state->vars=0;
489 static void old_state()
491 if(!state || !state->old)
492 syntaxerror("invalid nesting");
493 state_t*leaving = state;
497 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
498 free(leaving->method);
501 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
506 state_destroy(leaving);
509 static code_t* method_header(methodstate_t*m);
510 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
511 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
514 static char* internal_filename_package = 0;
515 void initialize_file(char*filename)
518 syntaxerror("invalid call to initialize_file during parsing of another file");
521 state->package = internal_filename_package = strdup(filename);
523 global->token2info = dict_lookup(global->file2token2info,
524 current_filename // use long version
526 if(!global->token2info) {
527 global->token2info = dict_new2(&ptr_type);
528 dict_put(global->file2token2info, current_filename, global->token2info);
532 state->method = rfx_calloc(sizeof(methodstate_t));
533 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
535 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
536 function_initvars(state->method, 0, 0, 1);
537 global->init = abc_initscript(global->file);
538 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
544 if(!state || state->level!=1) {
545 syntaxerror("unexpected end of file in pass %d", as3_pass);
549 code_t*header = method_header(state->method);
550 code_t*c = wrap_function(header, 0, global->init->method->body->code);
551 global->init->method->body->code = c;
552 free(state->method);state->method=0;
555 //free(state->package);state->package=0; // used in registry
556 state_destroy(state);state=0;
559 void initialize_parser()
561 global = rfx_calloc(sizeof(global_t));
562 global->file = abc_file_new();
563 global->file->flags &= ~ABCFILE_LAZY;
564 global->file2token2info = dict_new();
565 global->token2info = 0;
568 void* finish_parser()
570 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
572 global->token2info=0;
578 static void xx_scopetest()
580 /* findpropstrict doesn't just return a scope object- it
581 also makes it "active" somehow. Push local_0 on the
582 scope stack and read it back with findpropstrict, it'll
583 contain properties like "trace". Trying to find the same
584 property on a "vanilla" local_0 yields only a "undefined" */
585 //c = abc_findpropstrict(c, "[package]::trace");
587 /*c = abc_getlocal_0(c);
588 c = abc_findpropstrict(c, "[package]::trace");
590 c = abc_setlocal_1(c);
592 c = abc_pushbyte(c, 0);
593 c = abc_setlocal_2(c);
595 code_t*xx = c = abc_label(c);
596 c = abc_findpropstrict(c, "[package]::trace");
597 c = abc_pushstring(c, "prop:");
598 c = abc_hasnext2(c, 1, 2);
600 c = abc_setlocal_3(c);
601 c = abc_callpropvoid(c, "[package]::trace", 2);
602 c = abc_getlocal_3(c);
604 c = abc_iftrue(c,xx);*/
607 typedef struct _variable {
611 methodstate_t*is_inner_method;
614 static variable_t* find_variable(state_t*s, char*name)
618 v = dict_lookup(s->vars, name);
620 if(s->new_vars) break;
625 static variable_t* find_slot(state_t*s, const char*name)
627 if(s->method && s->method->slots)
628 return dict_lookup(s->method->slots, name);
632 static variable_t* find_variable_safe(state_t*s, char*name)
634 variable_t* v = find_variable(s, name);
636 syntaxerror("undefined variable: %s", name);
639 static char variable_exists(char*name)
641 return dict_contains(state->vars, name);
643 code_t*defaultvalue(code_t*c, classinfo_t*type);
645 static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
648 variable_t*v = find_slot(state, name);
654 v->index = state->method->variable_count++;
658 dict_put(state->vars, name, v);
662 static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
664 return new_variable2(name, type, init, maybeslot)->index;
667 #define TEMPVARNAME "__as3_temp__"
668 static int gettempvar()
670 variable_t*v = find_variable(state, TEMPVARNAME);
673 return new_variable(TEMPVARNAME, 0, 0, 0);
676 code_t* var_block(code_t*body)
682 for(t=0;t<state->vars->hashsize;t++) {
683 dictentry_t*e = state->vars->slots[t];
685 variable_t*v = (variable_t*)e->data;
686 if(v->type && v->init) {
687 c = defaultvalue(c, v->type);
688 c = abc_setlocal(c, v->index);
689 k = abc_kill(k, v->index);
699 if(x->opcode== OPCODE___BREAK__ ||
700 x->opcode== OPCODE___CONTINUE__) {
701 /* link kill code before break/continue */
702 code_t*e = code_dup(k);
703 code_t*s = code_start(e);
715 c = code_append(c, body);
716 c = code_append(c, k);
720 void unknown_variable(char*name)
722 if(!state->method->unresolved_variables)
723 state->method->unresolved_variables = dict_new();
724 if(!dict_contains(state->method->unresolved_variables, name))
725 dict_put(state->method->unresolved_variables, name, 0);
728 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
730 static void parsererror(const char*file, int line, const char*f)
732 syntaxerror("internal error in %s, %s:%d", f, file, line);
736 static code_t* method_header(methodstate_t*m)
739 if(m->uses_slots || (m->late_binding && !m->inner)) {
740 c = abc_getlocal_0(c);
741 c = abc_pushscope(c);
744 c = abc_newactivation(c);
745 c = abc_pushscope(c);
747 methodstate_list_t*l = m->innerfunctions;
749 parserassert(l->methodstate->abc);
750 if(m->uses_slots && l->methodstate->is_a_slot) {
751 c = abc_getscopeobject(c, 1);
752 c = abc_newfunction(c, l->methodstate->abc);
754 c = abc_setlocal(c, l->methodstate->var_index);
755 c = abc_setslot(c, l->methodstate->slot_index);
757 c = abc_newfunction(c, l->methodstate->abc);
758 c = abc_setlocal(c, l->methodstate->var_index);
760 free(l->methodstate);l->methodstate=0;
764 c = code_append(c, m->header);
767 if(m->is_constructor && !m->has_super) {
768 // call default constructor
769 c = abc_getlocal_0(c);
770 c = abc_constructsuper(c, 0);
772 list_free(m->innerfunctions);
773 m->innerfunctions = 0;
778 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
780 c = code_append(c, header);
781 c = code_append(c, var_block(body));
782 /* append return if necessary */
783 if(!c || (c->opcode != OPCODE_RETURNVOID &&
784 c->opcode != OPCODE_RETURNVALUE)) {
785 c = abc_returnvoid(c);
791 static void startpackage(char*name)
794 /*printf("entering package \"%s\"\n", name);*/
795 state->package = strdup(name);
797 static void endpackage()
799 /*printf("leaving package \"%s\"\n", state->package);*/
801 //used e.g. in classinfo_register:
802 //free(state->package);state->package=0;
807 #define FLAG_PUBLIC 256
808 #define FLAG_PROTECTED 512
809 #define FLAG_PRIVATE 1024
810 #define FLAG_PACKAGEINTERNAL 2048
811 #define FLAG_NAMESPACE 4096
813 static int flags2access(int flags)
816 if(flags&FLAG_PUBLIC) {
817 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
818 syntaxerror("invalid combination of access levels");
819 access = ACCESS_PACKAGE;
820 } else if(flags&FLAG_PRIVATE) {
821 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
822 syntaxerror("invalid combination of access levels");
823 access = ACCESS_PRIVATE;
824 } else if(flags&FLAG_PROTECTED) {
825 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
826 syntaxerror("invalid combination of access levels");
827 access = ACCESS_PROTECTED;
829 access = ACCESS_PACKAGEINTERNAL;
834 static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
839 index = new_variable("this", 0, 0, 0);
840 else if(!m->is_global)
841 index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
843 index = new_variable("globalscope", 0, 0, 0);
846 parserassert(!index);
849 /* as variables and slots share the same number, make sure
850 that those variable indices are reserved. It's up to the
851 optimizer to later shuffle the variables down to lower
853 m->variable_count = m->uses_slots;
858 for(p=params->list;p;p=p->next) {
859 new_variable(p->param->name, p->param->type, 0, 1);
863 methodstate_list_t*l = m->innerfunctions;
865 methodstate_t*m = l->methodstate;
866 variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
867 m->var_index = v->index;
868 m->slot_index = v->index;
869 v->is_inner_method = m;
875 char*as3_globalclass=0;
876 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements)
879 syntaxerror("inner classes now allowed");
883 classinfo_list_t*mlist=0;
885 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
886 syntaxerror("invalid modifier(s)");
888 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
889 syntaxerror("public and internal not supported at the same time.");
891 /* create the class name, together with the proper attributes */
895 if(!(flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
896 access = ACCESS_PRIVATE; package = internal_filename_package;
897 } else if(!(flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
898 access = ACCESS_PACKAGEINTERNAL; package = state->package;
899 } else if(state->package!=internal_filename_package) {
900 access = ACCESS_PACKAGE; package = state->package;
902 syntaxerror("public classes only allowed inside a package");
906 state->cls = rfx_calloc(sizeof(classstate_t));
907 state->cls->init = rfx_calloc(sizeof(methodstate_t));
908 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
909 /* notice: we make no effort to initialize the top variable (local0) here,
910 even though it has special meaning. We just rely on the facat
911 that pass 1 won't do anything with variables */
913 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
915 /* set current method to constructor- all code within the class-level (except
916 static variable initializations) will be executed during construction time */
917 state->method = state->cls->init;
919 if(registry_find(package, classname)) {
920 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
922 /* build info struct */
923 int num_interfaces = (list_length(implements));
924 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
925 state->cls->info->flags |= flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
929 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
931 state->method = state->cls->init;
932 parserassert(state->cls && state->cls->info);
934 function_initvars(state->cls->init, 0, 0, 1);
935 function_initvars(state->cls->static_init, 0, 0, 0);
937 if(extends && (extends->flags & FLAG_FINAL))
938 syntaxerror("Can't extend final class '%s'", extends->name);
940 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
941 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
943 classinfo_list_t*l = implements;
944 for(l=implements;l;l=l->next) {
945 if(!(l->classinfo->flags & FLAG_INTERFACE))
946 syntaxerror("'%s' is not an interface", l->classinfo->name);
947 state->cls->info->interfaces[pos++] = l->classinfo;
950 /* generate the abc code for this class */
951 MULTINAME(classname2,state->cls->info);
952 multiname_t*extends2 = sig2mname(extends);
954 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
955 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
956 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
957 if(state->cls->info->flags&FLAG_INTERFACE) {
958 abc_class_interface(state->cls->abc);
961 abc_class_protectedNS(state->cls->abc, classname);
963 for(mlist=implements;mlist;mlist=mlist->next) {
964 MULTINAME(m, mlist->classinfo);
965 abc_class_add_interface(state->cls->abc, &m);
968 /* write the construction code for this class to the global init
970 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
972 abc_method_body_t*m = global->init->method->body;
973 __ getglobalscope(m);
974 classinfo_t*s = extends;
979 //TODO: take a look at the current scope stack, maybe
980 // we can re-use something
985 multiname_t*s2 = sig2mname(s);
987 multiname_destroy(s2);
989 __ pushscope(m); count++;
990 m->code = m->code->prev->prev; // invert
992 /* continue appending after last op end */
993 while(m->code && m->code->next) m->code = m->code->next;
995 /* TODO: if this is one of *our* classes, we can also
996 do a getglobalscope/getslot <nr> (which references
997 the init function's slots) */
999 __ getlex2(m, extends2);
1001 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
1002 stack is not the superclass */
1003 __ pushscope(m);count++;
1006 /* notice: we get a verify error #1107 if the top element on the scope
1007 stack is not the global object */
1009 __ pushscope(m);count++;
1011 __ newclass(m,state->cls->abc);
1015 __ setslot(m, slotindex);
1016 multiname_destroy(extends2);
1018 /* flash.display.MovieClip handling */
1020 if(!as3_globalclass && (flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
1021 if(state->package && state->package[0]) {
1022 as3_globalclass = concat3(state->package, ".", classname);
1024 as3_globalclass = strdup(classname);
1030 static void setstaticfunction(int x)
1034 state->method = state->cls->static_init;
1036 state->method = state->cls->init;
1039 parserassert(state->method);
1043 static void endclass()
1046 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
1048 c = abc_getlocal_0(c);
1049 c = abc_constructsuper(c, 0);
1050 state->cls->init->header = code_append(state->cls->init->header, c);
1051 state->cls->has_constructor=1;
1053 if(state->cls->init) {
1054 if(state->cls->info->flags&FLAG_INTERFACE) {
1055 if(state->cls->init->header)
1056 syntaxerror("interface can not have class-level code");
1058 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1059 code_t*c = method_header(state->cls->init);
1060 m->body->code = wrap_function(c, 0, m->body->code);
1063 if(state->cls->static_init) {
1064 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1065 code_t*c = method_header(state->cls->static_init);
1066 m->body->code = wrap_function(c, 0, m->body->code);
1073 void check_code_for_break(code_t*c)
1076 if(c->opcode == OPCODE___BREAK__) {
1077 char*name = string_cstr(c->data[0]);
1078 syntaxerror("Unresolved \"break %s\"", name);
1080 if(c->opcode == OPCODE___CONTINUE__) {
1081 char*name = string_cstr(c->data[0]);
1082 syntaxerror("Unresolved \"continue %s\"", name);
1089 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1091 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1092 if(TYPE_IS_NUMBER(t)) {
1093 xassert(c->type == CONSTANT_FLOAT
1094 || c->type == CONSTANT_INT
1095 || c->type == CONSTANT_UINT);
1096 } else if(TYPE_IS_UINT(t)) {
1097 xassert(c->type == CONSTANT_UINT ||
1098 (c->type == CONSTANT_INT && c->i>=0));
1099 } else if(TYPE_IS_INT(t)) {
1100 xassert(c->type == CONSTANT_INT);
1101 } else if(TYPE_IS_BOOLEAN(t)) {
1102 xassert(c->type == CONSTANT_TRUE
1103 || c->type == CONSTANT_FALSE);
1107 static void check_override(memberinfo_t*m, int flags)
1111 if(m->parent == state->cls->info)
1112 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1114 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1115 if(m->access==ACCESS_PRIVATE)
1117 if(m->flags & FLAG_FINAL)
1118 syntaxerror("can't override final member %s", m->name);
1119 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1120 syntaxerror("can't override static member %s", m->name);
1121 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1122 syntaxerror("can't override non-static member %s with static declaration", m->name);
1124 if(!(flags&FLAG_OVERRIDE)) {
1125 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1126 if(m->kind == INFOTYPE_METHOD)
1127 syntaxerror("can't override without explicit 'override' declaration");
1129 syntaxerror("can't override '%s'", m->name);
1134 static methodinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
1136 methodinfo_t*minfo = 0;
1137 U8 access = flags2access(flags);
1140 minfo = methodinfo_register_global(access, state->package, name);
1141 minfo->return_type = return_type;
1142 } else if(getset != KW_GET && getset != KW_SET) {
1144 memberinfo_t* m = registry_findmember(state->cls->info, name, 0);
1146 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1148 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1149 minfo->return_type = return_type;
1150 // getslot on a member slot only returns "undefined", so no need
1151 // to actually store these
1152 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1154 //class getter/setter
1155 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1157 if(getset == KW_GET)
1159 else if(params->list && params->list->param)
1160 type = params->list->param->type;
1161 // not sure wether to look into superclasses here, too
1162 minfo = (methodinfo_t*)registry_findmember(state->cls->info, name, 1);
1164 if(minfo->kind!=INFOTYPE_SLOT)
1165 syntaxerror("class already contains a method called '%s'", name);
1166 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1167 syntaxerror("class already contains a field called '%s'", name);
1168 if(minfo->subtype & gs)
1169 syntaxerror("getter/setter for '%s' already defined", name);
1170 /* make a setter or getter into a getset */
1171 minfo->subtype |= gs;
1172 if(!minfo->return_type) {
1173 minfo->return_type = type;
1175 if(minfo && minfo->return_type != type)
1176 syntaxerror("different type in getter and setter");
1179 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1180 minfo->kind = INFOTYPE_SLOT; //hack
1181 minfo->subtype = gs;
1182 minfo->return_type = type;
1184 /* can't assign a slot as getter and setter might have different slots */
1185 //minfo->slot = slot;
1187 if(flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1188 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1189 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1193 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1195 //parserassert(state->method && state->method->info);
1197 methodstate_t*parent_method = state->method;
1200 return_type = 0; // not valid in pass 1
1204 state->new_vars = 1;
1207 state->method = rfx_calloc(sizeof(methodstate_t));
1208 state->method->inner = 1;
1209 state->method->variable_count = 0;
1210 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1212 NEW(methodinfo_t,minfo);
1213 minfo->kind = INFOTYPE_METHOD;
1214 minfo->access = ACCESS_PACKAGEINTERNAL;
1216 state->method->info = minfo;
1219 list_append(parent_method->innerfunctions, state->method);
1221 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1223 function_initvars(state->method, params, 0, 1);
1227 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1228 state->method->variable_count = 0;
1229 parserassert(state->method);
1231 state->method->info->return_type = return_type;
1232 function_initvars(state->method, params, 0, 1);
1236 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1237 params_t*params, classinfo_t*return_type)
1239 if(state->method && state->method->info) {
1240 syntaxerror("not able to start another method scope");
1243 state->new_vars = 1;
1246 state->method = rfx_calloc(sizeof(methodstate_t));
1247 state->method->has_super = 0;
1250 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1252 state->method->is_global = 1;
1253 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1255 if(state->method->is_constructor)
1256 name = "__as3_constructor__";
1259 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1261 function_initvars(state->method, params, flags, 1);
1263 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1267 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1268 state->method->variable_count = 0;
1269 parserassert(state->method);
1272 memberinfo_t*m = registry_findmember(state->cls->info, name, 2);
1273 check_override(m, flags);
1277 state->cls->has_constructor |= state->method->is_constructor;
1280 state->method->info->return_type = return_type;
1281 function_initvars(state->method, params, flags, 1);
1285 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1286 params_t*params, classinfo_t*return_type, code_t*body)
1289 // store inner methods in variables
1290 function_initvars(state->method, 0, 0, 0);
1292 methodstate_list_t*ml = state->method->innerfunctions;
1293 dict_t*xvars = dict_new();
1295 methodstate_t*m = ml->methodstate;
1296 parserassert(m->inner);
1297 if(m->unresolved_variables) {
1298 dict_t*d = m->unresolved_variables;
1300 for(t=0;t<d->hashsize;t++) {
1301 dictentry_t*l = d->slots[t];
1303 /* check parent method's variables */
1304 if(find_variable(state, l->key)) {
1305 m->uses_parent_function = 1;
1306 state->method->uses_slots = 1;
1307 dict_put(xvars, l->key, 0);
1314 dict_destroy(m->unresolved_variables);
1315 m->unresolved_variables = 0;
1319 if(state->method->uses_slots) {
1320 state->method->slots = dict_new();
1322 DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
1323 if(v->index && dict_contains(xvars, name)) {
1326 if(v->is_inner_method) {
1327 v->is_inner_method->is_a_slot = 1;
1330 dict_put(state->method->slots, name, v);
1333 state->method->uses_slots = i;
1334 dict_destroy(state->vars);state->vars = 0;
1336 dict_destroy(xvars);
1343 /*if(state->method->uses_parent_function){
1344 syntaxerror("accessing variables of parent function from inner functions not supported yet");
1349 multiname_t*type2 = sig2mname(return_type);
1351 if(state->method->inner) {
1352 f = state->method->abc;
1353 abc_method_init(f, global->file, type2, 1);
1354 } else if(state->method->is_constructor) {
1355 f = abc_class_getconstructor(state->cls->abc, type2);
1356 } else if(!state->method->is_global) {
1357 namespace_t mname_ns = {state->method->info->access, ""};
1358 multiname_t mname = {QNAME, &mname_ns, 0, name};
1360 if(flags&FLAG_STATIC)
1361 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1363 f = abc_class_method(state->cls->abc, type2, &mname);
1364 slot = f->trait->slot_id;
1366 namespace_t mname_ns = {state->method->info->access, state->package};
1367 multiname_t mname = {QNAME, &mname_ns, 0, name};
1369 f = abc_method_new(global->file, type2, 1);
1370 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1371 //abc_code_t*c = global->init->method->body->code;
1373 //flash doesn't seem to allow us to access function slots
1374 //state->method->info->slot = slot;
1376 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1377 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1378 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1379 if(params->varargs) f->flags |= METHOD_NEED_REST;
1383 for(p=params->list;p;p=p->next) {
1384 if(params->varargs && !p->next) {
1385 break; //varargs: omit last parameter in function signature
1387 multiname_t*m = sig2mname(p->param->type);
1388 list_append(f->parameters, m);
1389 if(p->param->value) {
1390 check_constant_against_type(p->param->type, p->param->value);
1391 opt=1;list_append(f->optional_parameters, p->param->value);
1393 syntaxerror("non-optional parameter not allowed after optional parameters");
1396 if(state->method->slots) {
1397 DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
1399 multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
1400 multiname_t*type = sig2mname(v->type);
1401 trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
1402 t->slot_id = v->index;
1407 check_code_for_break(body);
1410 f->body->code = body;
1411 f->body->exceptions = state->method->exceptions;
1412 } else { //interface
1414 syntaxerror("interface methods can't have a method body");
1424 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1429 void breakjumpsto(code_t*c, char*name, code_t*jump)
1432 if(c->opcode == OPCODE___BREAK__) {
1433 string_t*name2 = c->data[0];
1434 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1435 c->opcode = OPCODE_JUMP;
1442 void continuejumpsto(code_t*c, char*name, code_t*jump)
1445 if(c->opcode == OPCODE___CONTINUE__) {
1446 string_t*name2 = c->data[0];
1447 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1448 c->opcode = OPCODE_JUMP;
1456 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1457 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1458 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1460 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1462 if(!type1 || !type2)
1463 return registry_getanytype();
1464 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1465 return registry_getanytype();
1468 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1477 return registry_getanytype();
1479 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1484 return abc_coerce_a(c);
1488 // cast an "any" type to a specific type. subject to
1489 // runtime exceptions
1490 return abc_coerce2(c, &m);
1493 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1494 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1495 // allow conversion between number types
1496 return abc_coerce2(c, &m);
1498 //printf("%s.%s\n", from.package, from.name);
1499 //printf("%s.%s\n", to.package, to.name);
1501 classinfo_t*supertype = from;
1503 if(supertype == to) {
1504 // target type is one of from's superclasses
1505 return abc_coerce2(c, &m);
1508 while(supertype->interfaces[t]) {
1509 if(supertype->interfaces[t]==to) {
1510 // target type is one of from's interfaces
1511 return abc_coerce2(c, &m);
1515 supertype = supertype->superclass;
1517 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1519 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1521 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1524 as3_error("can't convert type %s%s%s to %s%s%s",
1525 from->package, from->package?".":"", from->name,
1526 to->package, to->package?".":"", to->name);
1530 code_t*defaultvalue(code_t*c, classinfo_t*type)
1532 if(TYPE_IS_INT(type)) {
1533 c = abc_pushbyte(c, 0);
1534 } else if(TYPE_IS_UINT(type)) {
1535 c = abc_pushuint(c, 0);
1536 } else if(TYPE_IS_FLOAT(type)) {
1538 } else if(TYPE_IS_BOOLEAN(type)) {
1539 c = abc_pushfalse(c);
1541 //c = abc_pushundefined(c);
1543 c = abc_pushnull(c);
1545 c = abc_coerce2(c, &m);
1550 char is_pushundefined(code_t*c)
1552 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1555 static slotinfo_t* find_class(char*name)
1559 c = registry_find(state->package, name);
1562 /* try explicit imports */
1563 dictentry_t* e = dict_get_slot(state->imports, name);
1566 if(!strcmp(e->key, name)) {
1567 c = (slotinfo_t*)e->data;
1573 /* try package.* imports */
1574 import_list_t*l = state->wildcard_imports;
1576 //printf("does package %s contain a class %s?\n", l->import->package, name);
1577 c = registry_find(l->import->package, name);
1582 /* try global package */
1583 c = registry_find("", name);
1586 /* try local "filename" package */
1587 c = registry_find(internal_filename_package, name);
1593 static char is_getlocal(code_t*c)
1595 if(!c || c->prev || c->next)
1597 return(c->opcode == OPCODE_GETLOCAL
1598 || c->opcode == OPCODE_GETLOCAL_0
1599 || c->opcode == OPCODE_GETLOCAL_1
1600 || c->opcode == OPCODE_GETLOCAL_2
1601 || c->opcode == OPCODE_GETLOCAL_3);
1603 static int getlocalnr(code_t*c)
1605 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1606 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1607 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1608 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1609 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1610 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1614 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1618 [prefix code] [read instruction]
1622 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1624 if(in && in->opcode == OPCODE_COERCE_A) {
1625 in = code_cutlast(in);
1628 syntaxerror("internal error");
1630 /* chop off read instruction */
1634 prefix = r->prev;r->prev = 0;
1640 char use_temp_var = readbefore;
1642 /* generate the write instruction, and maybe append a dup to the prefix code */
1643 code_t* write = abc_nop(0);
1644 if(r->opcode == OPCODE_GETPROPERTY) {
1645 write->opcode = OPCODE_SETPROPERTY;
1646 multiname_t*m = (multiname_t*)r->data[0];
1647 write->data[0] = multiname_clone(m);
1648 if(m->type == QNAME || m->type == MULTINAME) {
1650 prefix = abc_dup(prefix); // we need the object, too
1653 } else if(m->type == MULTINAMEL) {
1655 /* dupping two values on the stack requires 5 operations and one register-
1656 couldn't adobe just have given us a dup2? */
1657 int temp = gettempvar();
1658 prefix = abc_setlocal(prefix, temp);
1659 prefix = abc_dup(prefix);
1660 prefix = abc_getlocal(prefix, temp);
1661 prefix = abc_swap(prefix);
1662 prefix = abc_getlocal(prefix, temp);
1664 prefix = abc_kill(prefix, temp);
1668 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1670 } else if(r->opcode == OPCODE_GETSLOT) {
1671 write->opcode = OPCODE_SETSLOT;
1672 write->data[0] = r->data[0];
1674 prefix = abc_dup(prefix); // we need the object, too
1677 } else if(r->opcode == OPCODE_GETLOCAL) {
1678 write->opcode = OPCODE_SETLOCAL;
1679 write->data[0] = r->data[0];
1680 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1681 write->opcode = OPCODE_SETLOCAL_0;
1682 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1683 write->opcode = OPCODE_SETLOCAL_1;
1684 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1685 write->opcode = OPCODE_SETLOCAL_2;
1686 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1687 write->opcode = OPCODE_SETLOCAL_3;
1690 syntaxerror("illegal lvalue: can't assign a value to this expression");
1697 /* with getproperty/getslot, we have to be extra careful not
1698 to execute the read code twice, as it might have side-effects
1699 (e.g. if the property is in fact a setter/getter combination)
1701 So read the value, modify it, and write it again,
1702 using prefix only once and making sure (by using a temporary
1703 register) that the return value is what we just wrote */
1704 temp = gettempvar();
1705 c = code_append(c, prefix);
1706 c = code_append(c, r);
1709 c = abc_setlocal(c, temp);
1711 c = code_append(c, middlepart);
1714 c = abc_setlocal(c, temp);
1716 c = code_append(c, write);
1717 c = abc_getlocal(c, temp);
1718 c = abc_kill(c, temp);
1720 /* if we're allowed to execute the read code twice *and*
1721 the middlepart doesn't modify the code, things are easier.
1723 code_t* r2 = code_dup(r);
1724 //c = code_append(c, prefix);
1725 parserassert(!prefix);
1726 c = code_append(c, r);
1727 c = code_append(c, middlepart);
1728 c = code_append(c, write);
1729 c = code_append(c, r2);
1732 /* even smaller version: overwrite the value without reading
1736 c = code_append(c, prefix);
1739 c = code_append(c, middlepart);
1740 c = code_append(c, write);
1741 c = code_append(c, r);
1744 temp = gettempvar();
1746 c = code_append(c, prefix);
1748 c = code_append(c, middlepart);
1750 c = abc_setlocal(c, temp);
1751 c = code_append(c, write);
1752 c = abc_getlocal(c, temp);
1753 c = abc_kill(c, temp);
1759 char is_break_or_jump(code_t*c)
1763 if(c->opcode == OPCODE_JUMP ||
1764 c->opcode == OPCODE___BREAK__ ||
1765 c->opcode == OPCODE___CONTINUE__ ||
1766 c->opcode == OPCODE_THROW ||
1767 c->opcode == OPCODE_RETURNVOID ||
1768 c->opcode == OPCODE_RETURNVALUE) {
1775 #define IS_FINALLY_TARGET(op) \
1776 ((op) == OPCODE___CONTINUE__ || \
1777 (op) == OPCODE___BREAK__ || \
1778 (op) == OPCODE_RETURNVOID || \
1779 (op) == OPCODE_RETURNVALUE || \
1780 (op) == OPCODE___RETHROW__)
1782 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1784 #define NEED_EXTRA_STACK_ARG
1785 code_t*finally_label = abc_nop(0);
1786 NEW(lookupswitch_t, l);
1792 code_t*prev = i->prev;
1793 if(IS_FINALLY_TARGET(i->opcode)) {
1796 if(i->opcode == OPCODE___RETHROW__ ||
1797 i->opcode == OPCODE_RETURNVALUE) {
1798 if(i->opcode == OPCODE___RETHROW__)
1799 i->opcode = OPCODE_THROW;
1801 p = abc_coerce_a(p);
1802 p = abc_setlocal(p, tempvar);
1804 p = abc_pushbyte(p, count++);
1805 p = abc_jump(p, finally_label);
1806 code_t*target = p = abc_label(p);
1807 #ifdef NEED_EXTRA_STACK_ARG
1811 p = abc_getlocal(p, tempvar);
1814 p->next = i;i->prev = p;
1815 list_append(l->targets, target);
1821 c = abc_pushbyte(c, -1);
1822 c = code_append(c, finally_label);
1823 c = code_append(c, finally);
1825 #ifdef NEED_EXTRA_STACK_ARG
1828 c = abc_lookupswitch(c, l);
1829 c = l->def = abc_label(c);
1830 #ifdef NEED_EXTRA_STACK_ARG
1837 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1841 code_t*prev = i->prev;
1842 if(IS_FINALLY_TARGET(i->opcode)) {
1843 if(i->opcode == OPCODE___RETHROW__)
1844 i->opcode = OPCODE_THROW;
1845 code_t*end = code_dup(finally);
1846 code_t*start = code_start(end);
1847 if(prev) prev->next = start;
1854 return code_append(c, finally);
1857 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1863 int num_insertion_points=0;
1865 if(IS_FINALLY_TARGET(i->opcode))
1866 num_insertion_points++;
1873 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1878 int simple_version_cost = (1+num_insertion_points)*code_size;
1879 int lookup_version_cost = 4*num_insertion_points + 5;
1881 if(cantdup || simple_version_cost > lookup_version_cost) {
1882 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1883 return insert_finally_lookup(c, finally, tempvar);
1885 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1886 return insert_finally_simple(c, finally, tempvar);
1890 #define PASS1 }} if(as3_pass == 1) {{
1891 #define PASS1END }} if(as3_pass == 2) {{
1892 #define PASS2 }} if(as3_pass == 2) {{
1893 #define PASS12 }} {{
1894 #define PASS12END }} if(as3_pass == 2) {{
1898 /* Line 273 of skeleton.m4 */
1899 #line 1900 "parser.tab.c"
1906 typedef YYTYPE_UINT8 yytype_uint8;
1908 typedef unsigned char yytype_uint8;
1912 typedef YYTYPE_INT8 yytype_int8;
1913 #elif (defined __STDC__ || defined __C99__FUNC__ \
1914 || defined __cplusplus || defined _MSC_VER)
1915 typedef signed char yytype_int8;
1917 typedef short int yytype_int8;
1920 #ifdef YYTYPE_UINT16
1921 typedef YYTYPE_UINT16 yytype_uint16;
1923 typedef unsigned short int yytype_uint16;
1927 typedef YYTYPE_INT16 yytype_int16;
1929 typedef short int yytype_int16;
1933 # ifdef __SIZE_TYPE__
1934 # define YYSIZE_T __SIZE_TYPE__
1935 # elif defined size_t
1936 # define YYSIZE_T size_t
1937 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1938 || defined __cplusplus || defined _MSC_VER)
1939 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1940 # define YYSIZE_T size_t
1942 # define YYSIZE_T unsigned int
1946 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1951 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1952 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1956 # define YY_(msgid) msgid
1960 /* Suppress unused-variable warnings by "using" E. */
1961 #if ! defined lint || defined __GNUC__
1962 # define YYUSE(e) ((void) (e))
1964 # define YYUSE(e) /* empty */
1967 /* Identity function, used to suppress warnings about constant conditions. */
1969 # define YYID(n) (n)
1971 #if (defined __STDC__ || defined __C99__FUNC__ \
1972 || defined __cplusplus || defined _MSC_VER)
1985 #if ! defined yyoverflow || YYERROR_VERBOSE
1987 /* The parser invokes alloca or malloc; define the necessary symbols. */
1989 # ifdef YYSTACK_USE_ALLOCA
1990 # if YYSTACK_USE_ALLOCA
1992 # define YYSTACK_ALLOC __builtin_alloca
1993 # elif defined __BUILTIN_VA_ARG_INCR
1994 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1996 # define YYSTACK_ALLOC __alloca
1997 # elif defined _MSC_VER
1998 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1999 # define alloca _alloca
2001 # define YYSTACK_ALLOC alloca
2002 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2003 || defined __cplusplus || defined _MSC_VER)
2004 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2006 # define _STDLIB_H 1
2013 # ifdef YYSTACK_ALLOC
2014 /* Pacify GCC's `empty if-body' warning. */
2015 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2016 # ifndef YYSTACK_ALLOC_MAXIMUM
2017 /* The OS might guarantee only one guard page at the bottom of the stack,
2018 and a page size can be as small as 4096 bytes. So we cannot safely
2019 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2020 to allow for a few compiler-allocated temporary stack slots. */
2021 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2024 # define YYSTACK_ALLOC YYMALLOC
2025 # define YYSTACK_FREE YYFREE
2026 # ifndef YYSTACK_ALLOC_MAXIMUM
2027 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2029 # if (defined __cplusplus && ! defined _STDLIB_H \
2030 && ! ((defined YYMALLOC || defined malloc) \
2031 && (defined YYFREE || defined free)))
2032 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2034 # define _STDLIB_H 1
2038 # define YYMALLOC malloc
2039 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2040 || defined __cplusplus || defined _MSC_VER)
2041 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2045 # define YYFREE free
2046 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
2047 || defined __cplusplus || defined _MSC_VER)
2048 void free (void *); /* INFRINGES ON USER NAME SPACE */
2052 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2055 #if (! defined yyoverflow \
2056 && (! defined __cplusplus \
2057 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2059 /* A type that is properly aligned for any stack member. */
2062 yytype_int16 yyss_alloc;
2066 /* The size of the maximum gap between one aligned stack and the next. */
2067 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2069 /* The size of an array large to enough to hold all stacks, each with
2071 # define YYSTACK_BYTES(N) \
2072 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2073 + YYSTACK_GAP_MAXIMUM)
2075 /* Copy COUNT objects from FROM to TO. The source and destination do
2078 # if defined __GNUC__ && 1 < __GNUC__
2079 # define YYCOPY(To, From, Count) \
2080 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2082 # define YYCOPY(To, From, Count) \
2086 for (yyi = 0; yyi < (Count); yyi++) \
2087 (To)[yyi] = (From)[yyi]; \
2093 /* Relocate STACK from its old location to the new one. The
2094 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2095 elements in the stack, and YYPTR gives the new location of the
2096 stack. Advance YYPTR to a properly aligned location for the next
2098 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2101 YYSIZE_T yynewbytes; \
2102 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2103 Stack = &yyptr->Stack_alloc; \
2104 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2105 yyptr += yynewbytes / sizeof (*yyptr); \
2111 /* YYFINAL -- State number of the termination state. */
2113 /* YYLAST -- Last index in YYTABLE. */
2116 /* YYNTOKENS -- Number of terminals. */
2117 #define YYNTOKENS 134
2118 /* YYNNTS -- Number of nonterminals. */
2120 /* YYNRULES -- Number of rules. */
2121 #define YYNRULES 303
2122 /* YYNRULES -- Number of states. */
2123 #define YYNSTATES 514
2125 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2126 #define YYUNDEFTOK 2
2127 #define YYMAXUTOK 363
2129 #define YYTRANSLATE(YYX) \
2130 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2132 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2133 static const yytype_uint8 yytranslate[] =
2135 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2137 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2138 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2139 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2140 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2141 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2144 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2146 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2147 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2148 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2149 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2150 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2151 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2152 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2153 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2154 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2155 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2156 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2157 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2158 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2159 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2160 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2161 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2162 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2163 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2164 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2165 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2166 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2167 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2168 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2169 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2170 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2175 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2177 static const yytype_uint16 yyprhs[] =
2179 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2180 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2181 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2182 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2183 85, 87, 91, 94, 96, 98, 100, 102, 104, 106,
2184 108, 113, 115, 118, 120, 122, 126, 129, 130, 133,
2185 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2186 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2187 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2188 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2189 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2190 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2191 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2192 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2193 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2194 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2195 442, 443, 450, 451, 454, 456, 458, 460, 462, 464,
2196 466, 468, 470, 472, 473, 475, 478, 483, 487, 489,
2197 494, 497, 499, 501, 502, 503, 516, 518, 519, 520,
2198 531, 533, 537, 539, 541, 543, 547, 549, 551, 553,
2199 556, 557, 558, 562, 563, 565, 567, 569, 572, 575,
2200 576, 581, 586, 591, 594, 596, 599, 601, 603, 607,
2201 609, 611, 613, 615, 617, 619, 621, 623, 625, 627,
2202 629, 631, 633, 635, 637, 639, 641, 643, 647, 651,
2203 655, 659, 663, 667, 671, 675, 679, 683, 686, 689,
2204 693, 697, 701, 705, 709, 713, 717, 721, 725, 729,
2205 733, 737, 741, 745, 749, 754, 757, 759, 763, 766,
2206 771, 775, 776, 778, 782, 788, 792, 796, 800, 804,
2207 808, 812, 816, 820, 824, 828, 832, 836, 842, 845,
2208 848, 851, 854, 858, 861, 866, 872, 876, 882, 886,
2212 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2213 static const yytype_int16 yyrhs[] =
2215 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2216 137, 138, -1, 185, -1, 197, -1, 195, -1, 214,
2217 -1, 206, -1, 147, -1, 148, 126, 136, 132, -1,
2218 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2219 197, -1, 195, -1, 214, -1, 206, -1, 147, -1,
2220 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2221 143, 145, -1, 145, -1, 188, -1, 159, -1, 160,
2222 -1, 161, -1, 163, -1, 171, -1, 154, -1, 182,
2223 -1, 179, -1, 236, -1, 243, -1, 126, 143, 132,
2224 -1, 126, 132, -1, 99, -1, 144, -1, 150, -1,
2225 165, -1, 166, -1, 233, -1, 181, -1, 148, 126,
2226 143, 132, -1, 242, -1, 145, 99, -1, 145, -1,
2227 144, -1, 3, 89, 3, -1, 102, 234, -1, -1,
2228 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2229 152, -1, 3, 224, 149, -1, -1, 65, 146, -1,
2230 -1, 64, 122, 155, 235, 133, 146, 153, -1, -1,
2231 150, -1, 236, -1, 46, 3, 224, -1, 3, -1,
2232 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2233 235, 99, 236, 133, 146, -1, 158, 157, 68, 235,
2234 133, 146, -1, -1, 14, 122, 162, 235, 133, 146,
2235 -1, -1, 15, 164, 146, 14, 122, 235, 133, -1,
2236 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2237 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2238 168, 169, -1, 34, 237, 105, 142, -1, 62, 105,
2239 142, -1, -1, 16, 122, 172, 237, 133, 126, 167,
2240 132, -1, -1, 33, 122, 3, 224, 133, 174, 126,
2241 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2242 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2243 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2244 37, 235, -1, 37, -1, 39, 122, 235, 133, 146,
2245 -1, 3, -1, 19, -1, 184, 127, 183, -1, 183,
2246 -1, -1, 19, 184, 126, 186, 139, 132, -1, -1,
2247 19, 126, 187, 139, 132, -1, 41, 220, -1, 41,
2248 184, 127, 115, -1, -1, 190, -1, 191, -1, 190,
2249 191, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2250 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2251 4, -1, -1, 54, 221, -1, -1, 54, 222, -1,
2252 -1, 17, 222, -1, -1, 189, 31, 3, 192, 194,
2253 126, 196, 199, 132, -1, -1, 189, 44, 3, 193,
2254 126, 198, 202, 132, -1, -1, 200, -1, 201, -1,
2255 200, 201, -1, 99, -1, 148, 126, 199, 132, -1,
2256 206, -1, 214, -1, 144, -1, -1, 203, -1, 204,
2257 -1, 203, 204, -1, 99, -1, 46, 3, -1, 189,
2258 27, 213, 3, 122, 210, 133, 224, -1, 46, -1,
2259 32, -1, -1, 189, 205, 3, 207, 224, 149, -1,
2260 -1, 102, 209, -1, 10, -1, 8, -1, 9, -1,
2261 12, -1, 5, -1, 56, -1, 55, -1, 45, -1,
2262 3, -1, -1, 211, -1, 93, 212, -1, 211, 100,
2263 93, 212, -1, 211, 100, 212, -1, 212, -1, 3,
2264 105, 223, 208, -1, 3, 208, -1, 51, -1, 35,
2265 -1, -1, -1, 189, 27, 213, 3, 122, 210, 133,
2266 224, 126, 215, 142, 132, -1, 3, -1, -1, -1,
2267 27, 216, 122, 210, 133, 224, 126, 218, 142, 132,
2268 -1, 3, -1, 184, 127, 3, -1, 220, -1, 219,
2269 -1, 221, -1, 222, 100, 221, -1, 221, -1, 115,
2270 -1, 36, -1, 105, 223, -1, -1, -1, 122, 226,
2271 133, -1, -1, 227, -1, 228, -1, 234, -1, 227,
2272 100, -1, 228, 234, -1, -1, 25, 237, 229, 225,
2273 -1, 237, 122, 226, 133, -1, 53, 122, 226, 133,
2274 -1, 63, 237, -1, 42, -1, 42, 235, -1, 237,
2275 -1, 237, -1, 235, 100, 237, -1, 235, -1, 217,
2276 -1, 238, -1, 241, -1, 230, -1, 232, -1, 231,
2277 -1, 6, -1, 10, -1, 11, -1, 8, -1, 9,
2278 -1, 12, -1, 5, -1, 29, -1, 56, -1, 55,
2279 -1, 45, -1, 237, 109, 237, -1, 237, 110, 237,
2280 -1, 237, 75, 237, -1, 237, 76, 237, -1, 237,
2281 71, 237, -1, 237, 72, 237, -1, 237, 74, 237,
2282 -1, 237, 73, 237, -1, 237, 87, 237, -1, 237,
2283 88, 237, -1, 118, 237, -1, 117, 237, -1, 237,
2284 108, 237, -1, 237, 107, 237, -1, 237, 106, 237,
2285 -1, 237, 96, 237, -1, 237, 95, 237, -1, 237,
2286 94, 237, -1, 237, 114, 237, -1, 237, 116, 237,
2287 -1, 237, 113, 237, -1, 237, 112, 237, -1, 237,
2288 115, 237, -1, 237, 68, 237, -1, 237, 69, 237,
2289 -1, 237, 40, 237, -1, 237, 67, 237, -1, 43,
2290 122, 237, 133, -1, 36, 237, -1, 36, -1, 122,
2291 235, 133, -1, 112, 237, -1, 237, 124, 237, 125,
2292 -1, 124, 226, 125, -1, -1, 240, -1, 234, 105,
2293 234, -1, 240, 100, 234, 105, 234, -1, 70, 239,
2294 132, -1, 237, 80, 237, -1, 237, 79, 237, -1,
2295 237, 85, 237, -1, 237, 84, 237, -1, 237, 86,
2296 237, -1, 237, 78, 237, -1, 237, 77, 237, -1,
2297 237, 83, 237, -1, 237, 81, 237, -1, 237, 82,
2298 237, -1, 237, 102, 237, -1, 237, 104, 237, 105,
2299 237, -1, 237, 91, -1, 237, 90, -1, 91, 237,
2300 -1, 90, 237, -1, 53, 127, 3, -1, 128, 3,
2301 -1, 237, 127, 128, 3, -1, 237, 127, 3, 89,
2302 3, -1, 237, 92, 3, -1, 237, 127, 122, 237,
2303 133, -1, 237, 127, 3, -1, 3, -1, 189, 18,
2304 3, -1, 189, 18, 3, 102, 3, -1, 189, 18,
2305 3, 102, 5, -1, 23, 18, 3, -1
2308 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2309 static const yytype_uint16 yyrline[] =
2311 0, 1875, 1875, 1877, 1877, 1878, 1879, 1881, 1882, 1883,
2312 1884, 1885, 1886, 1887, 1888, 1890, 1890, 1891, 1892, 1894,
2313 1895, 1896, 1897, 1898, 1899, 1900, 1902, 1903, 1905, 1906,
2314 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918,
2315 1919, 1920, 1921, 1924, 1925, 1926, 1927, 1928, 1929, 1930,
2316 1931, 1933, 1937, 1938, 1942, 1949, 1953, 1954, 1958, 1959,
2317 1961, 1962, 1964, 2025, 2026, 2029, 2029, 2048, 2049, 2050,
2318 2055, 2059, 2064, 2065, 2067, 2087, 2131, 2131, 2150, 2150,
2319 2165, 2168, 2171, 2174, 2178, 2179, 2180, 2181, 2182, 2183,
2320 2185, 2196, 2199, 2199, 2228, 2228, 2252, 2252, 2268, 2269,
2321 2270, 2271, 2279, 2288, 2288, 2333, 2337, 2348, 2357, 2358,
2322 2360, 2361, 2363, 2363, 2365, 2365, 2368, 2383, 2399, 2400,
2323 2401, 2402, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411,
2324 2412, 2413, 2415, 2416, 2418, 2419, 2421, 2422, 2426, 2424,
2325 2432, 2430, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445,
2326 2447, 2453, 2454, 2455, 2456, 2457, 2458, 2461, 2474, 2474,
2327 2476, 2476, 2549, 2550, 2552, 2553, 2554, 2555, 2556, 2558,
2328 2559, 2560, 2561, 2570, 2574, 2580, 2586, 2594, 2599, 2605,
2329 2613, 2621, 2622, 2623, 2626, 2625, 2642, 2643, 2645, 2644,
2330 2668, 2676, 2689, 2690, 2692, 2693, 2695, 2696, 2697, 2706,
2331 2707, 2711, 2712, 2714, 2715, 2716, 2718, 2722, 2723, 2728,
2332 2729, 2765, 2811, 2832, 2853, 2856, 2863, 2864, 2865, 2871,
2333 2877, 2879, 2881, 2883, 2885, 2887, 2889, 2906, 2911, 2914,
2334 2917, 2920, 2923, 2926, 2929, 2932, 2935, 2939, 2942, 2945,
2335 2948, 2951, 2954, 2957, 2960, 2964, 2975, 2993, 2998, 3003,
2336 3008, 3013, 3018, 3022, 3026, 3031, 3035, 3039, 3048, 3057,
2337 3067, 3072, 3084, 3090, 3095, 3101, 3107, 3111, 3113, 3124,
2338 3133, 3140, 3141, 3143, 3149, 3158, 3165, 3177, 3183, 3189,
2339 3195, 3201, 3207, 3213, 3219, 3232, 3243, 3250, 3263, 3290,
2340 3304, 3318, 3332, 3346, 3353, 3360, 3367, 3374, 3385, 3419,
2341 3540, 3541, 3542, 3544
2345 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2346 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2347 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2348 static const char *const yytname[] =
2350 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2351 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2352 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2353 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2354 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2355 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2356 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2357 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2358 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2359 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2360 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2361 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2362 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2363 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2364 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2365 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2366 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2367 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2368 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2369 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2370 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2371 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2372 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2373 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2374 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2375 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2376 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2377 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2378 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2379 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2380 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2381 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2382 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2383 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2384 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2385 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2386 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2387 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2388 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12",
2389 "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2390 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2391 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2392 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2393 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2394 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2395 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2396 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2397 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2402 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2404 static const yytype_uint16 yytoknum[] =
2406 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2407 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2408 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2409 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2410 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2411 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2412 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2413 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2414 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2415 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2416 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2417 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2418 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2423 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2424 static const yytype_uint8 yyr1[] =
2426 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2427 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2428 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2429 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2430 144, 144, 144, 145, 145, 145, 145, 145, 145, 145,
2431 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2432 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2433 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2434 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2435 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2436 178, 178, 178, 180, 179, 181, 181, 182, 183, 183,
2437 184, 184, 186, 185, 187, 185, 188, 188, 189, 189,
2438 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
2439 191, 191, 192, 192, 193, 193, 194, 194, 196, 195,
2440 198, 197, 199, 199, 200, 200, 201, 201, 201, 201,
2441 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
2442 207, 206, 208, 208, 209, 209, 209, 209, 209, 209,
2443 209, 209, 209, 210, 210, 210, 210, 211, 211, 212,
2444 212, 213, 213, 213, 215, 214, 216, 216, 218, 217,
2445 219, 220, 221, 221, 222, 222, 223, 223, 223, 224,
2446 224, 225, 225, 226, 226, 226, 227, 228, 227, 229,
2447 230, 231, 231, 232, 233, 233, 234, 235, 235, 236,
2448 237, 237, 237, 237, 237, 237, 237, 238, 238, 238,
2449 238, 238, 238, 238, 238, 238, 238, 237, 237, 237,
2450 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2451 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2452 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2453 237, 239, 239, 240, 240, 237, 237, 237, 237, 237,
2454 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2455 237, 237, 237, 237, 237, 237, 237, 237, 237, 241,
2459 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2460 static const yytype_uint8 yyr2[] =
2462 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2463 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2464 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2466 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
2467 4, 1, 2, 1, 1, 3, 2, 0, 2, 2,
2468 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2469 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2470 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2471 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2472 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2473 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2474 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2475 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2476 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2477 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2478 0, 6, 0, 2, 1, 1, 1, 1, 1, 1,
2479 1, 1, 1, 0, 1, 2, 4, 3, 1, 4,
2480 2, 1, 1, 0, 0, 12, 1, 0, 0, 10,
2481 1, 3, 1, 1, 1, 3, 1, 1, 1, 2,
2482 0, 0, 3, 0, 1, 1, 1, 2, 2, 0,
2483 4, 4, 4, 2, 1, 2, 1, 1, 3, 1,
2484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2485 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
2486 3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
2487 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2488 3, 3, 3, 3, 4, 2, 1, 3, 2, 4,
2489 3, 0, 1, 3, 5, 3, 3, 3, 3, 3,
2490 3, 3, 3, 3, 3, 3, 3, 5, 2, 2,
2491 2, 2, 3, 2, 4, 5, 3, 5, 3, 1,
2495 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2496 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2497 means the default is an error. */
2498 static const yytype_uint16 yydefact[] =
2500 118, 299, 131, 232, 226, 229, 230, 227, 228, 231,
2501 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2502 0, 129, 187, 233, 266, 125, 0, 0, 0, 236,
2503 126, 128, 127, 0, 0, 235, 234, 0, 0, 271,
2504 0, 0, 14, 0, 0, 0, 0, 203, 118, 0,
2505 0, 2, 118, 5, 54, 12, 0, 36, 67, 31,
2506 32, 33, 34, 35, 38, 37, 7, 30, 0, 119,
2507 120, 9, 8, 11, 10, 220, 223, 225, 224, 219,
2508 39, 217, 221, 222, 40, 0, 0, 72, 76, 118,
2509 92, 108, 109, 114, 111, 0, 0, 299, 209, 186,
2510 0, 265, 0, 0, 116, 0, 103, 203, 0, 213,
2511 65, 0, 216, 0, 272, 291, 290, 268, 248, 247,
2512 0, 0, 204, 205, 206, 82, 0, 106, 214, 0,
2513 80, 43, 42, 118, 44, 29, 0, 45, 46, 47,
2514 49, 0, 48, 51, 293, 1, 6, 118, 299, 0,
2515 68, 0, 0, 69, 183, 0, 159, 0, 158, 0,
2516 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2518 0, 0, 0, 0, 289, 288, 0, 0, 0, 0,
2519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2520 0, 0, 203, 0, 0, 55, 73, 0, 53, 0,
2521 0, 118, 112, 0, 303, 201, 173, 0, 0, 0,
2522 27, 0, 292, 0, 0, 275, 0, 267, 270, 207,
2523 208, 83, 200, 59, 60, 105, 215, 58, 81, 41,
2524 28, 118, 0, 0, 200, 0, 0, 182, 181, 0,
2525 132, 134, 160, 218, 262, 263, 260, 261, 241, 242,
2526 244, 243, 239, 240, 282, 281, 277, 276, 284, 285,
2527 283, 279, 278, 280, 245, 246, 296, 254, 253, 252,
2528 286, 0, 251, 250, 249, 237, 238, 258, 257, 255,
2529 259, 256, 0, 0, 298, 0, 0, 0, 52, 0,
2530 0, 25, 0, 118, 17, 23, 0, 20, 19, 22,
2531 21, 118, 110, 203, 210, 162, 0, 0, 174, 178,
2532 118, 191, 117, 264, 0, 26, 212, 0, 273, 0,
2533 0, 57, 0, 118, 300, 13, 57, 0, 0, 0,
2534 0, 136, 0, 0, 200, 0, 211, 269, 0, 0,
2535 294, 118, 0, 0, 115, 18, 118, 0, 0, 0,
2536 0, 180, 175, 200, 0, 107, 0, 118, 0, 190,
2537 198, 197, 0, 193, 192, 196, 199, 0, 62, 61,
2538 50, 0, 0, 118, 173, 133, 0, 0, 194, 135,
2539 140, 57, 287, 295, 297, 77, 0, 84, 0, 113,
2540 202, 172, 168, 165, 166, 164, 167, 171, 170, 169,
2541 163, 162, 0, 0, 177, 0, 0, 98, 102, 100,
2542 104, 63, 274, 0, 56, 301, 302, 0, 75, 0,
2543 137, 138, 0, 118, 161, 79, 0, 0, 0, 85,
2544 88, 86, 24, 179, 188, 176, 96, 0, 99, 101,
2545 118, 66, 118, 200, 118, 195, 0, 155, 0, 0,
2546 118, 153, 0, 27, 93, 89, 87, 27, 27, 200,
2547 64, 74, 0, 146, 150, 0, 0, 0, 118, 144,
2548 148, 149, 156, 183, 141, 154, 27, 91, 0, 0,
2549 0, 184, 118, 139, 145, 0, 90, 189, 97, 94,
2550 27, 0, 0, 0, 0, 147, 173, 27, 185, 0,
2554 /* YYDEFGOTO[NTERM-NUM]. */
2555 static const yytype_int16 yydefgoto[] =
2557 -1, 50, 51, 52, 53, 302, 303, 304, 324, 325,
2558 134, 135, 209, 305, 136, 378, 137, 237, 234, 451,
2559 57, 223, 151, 152, 58, 59, 60, 61, 207, 62,
2560 89, 138, 139, 438, 439, 440, 441, 63, 210, 417,
2561 503, 418, 468, 419, 420, 64, 220, 140, 65, 94,
2562 372, 66, 311, 211, 67, 141, 69, 70, 341, 343,
2563 387, 307, 454, 308, 433, 477, 478, 479, 459, 460,
2564 461, 159, 309, 344, 361, 410, 317, 318, 319, 249,
2565 310, 500, 100, 75, 467, 373, 374, 375, 389, 376,
2566 331, 314, 121, 122, 123, 215, 76, 77, 78, 142,
2567 124, 79, 80, 81, 82, 113, 114, 83, 143, 84
2570 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2572 #define YYPACT_NINF -374
2573 static const yytype_int16 yypact[] =
2575 1667, -68, -374, -374, -374, -374, -374, -374, -374, -374,
2576 -30, -97, -374, -57, 20, -374, -374, -374, 49, -374,
2577 2087, -374, 71, -374, 2157, -374, -37, 85, -35, -374,
2578 -374, -374, -374, 6, 8, -374, -374, 2087, 14, 2087,
2579 2087, 2087, -374, 2087, 2087, 2087, 2087, 2087, 627, 88,
2580 177, -374, 497, -374, -374, -374, 81, -374, 2017, -374,
2581 -374, -374, -374, -374, -374, -374, -374, -374, 308, 298,
2582 -374, -374, -374, -374, -374, -374, -374, -374, -374, 79,
2583 -374, 2562, -374, -374, -374, 197, 86, -374, -374, 1919,
2584 -374, -374, -374, -374, -374, -18, 206, -374, -46, -374,
2585 93, 133, 2087, 83, -374, 2087, -374, 2087, 215, 133,
2586 -374, 117, 2562, 94, 127, 133, 133, 201, 133, 133,
2587 -53, 103, 129, 2087, -374, 227, 228, 2087, 2087, 228,
2588 232, -374, -374, 757, -374, -374, 107, -374, -374, -374,
2589 -374, 219, -374, -374, -374, -374, -374, 1017, 170, 236,
2590 -374, 141, 176, -374, 70, 242, -374, 243, -374, 244,
2591 -374, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2592 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2593 2087, 2087, 2087, 2087, -374, -374, 245, 2087, 2087, 2087,
2594 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2595 2087, 2087, 2087, 2087, 11, -374, -374, 2087, 159, 247,
2596 2087, 1147, -374, 85, -374, 137, 24, -49, 16, 2182,
2597 1793, 130, -374, 2087, 2087, -374, 2087, -374, -374, -374,
2598 -374, -374, 157, 164, -374, 79, 79, 164, -374, -374,
2599 -374, 1919, 262, 134, 157, 2087, 2087, -374, -374, 269,
2600 226, 231, -374, 2562, 1009, 489, 489, 489, 2867, 2867,
2601 2867, 2867, 1009, 1009, 2562, 2562, 2562, 2562, 2562, 2562,
2602 2562, 2562, 2562, 2562, 304, 2623, -374, 349, 349, 349,
2603 2562, 2379, 2684, 2745, 2806, 1009, 1009, 201, 201, 133,
2604 133, 133, 148, 2440, 193, 2087, 281, -40, -374, 167,
2605 2253, -374, 154, 1277, -374, -374, 168, -374, -374, -374,
2606 -374, 1147, -374, 2087, -374, 96, 287, 174, 200, -374,
2607 1919, 181, -374, -374, 169, 1793, -374, -36, -374, 204,
2608 26, 208, 228, 887, 212, -374, -20, 53, -31, 199,
2609 125, 309, 125, 205, 157, 2087, -374, -374, 324, 2316,
2610 -374, 1919, 2087, 207, -374, -374, 1147, 202, 209, 67,
2611 26, -374, -374, 157, 25, -374, 110, 1919, 2087, 181,
2612 -374, -374, 210, -374, -374, -374, -374, 2087, -374, -374,
2613 -374, 39, 2087, 1919, 24, -374, 125, 217, -374, 251,
2614 -374, 208, 2562, -374, -374, -374, -14, 27, 221, -374,
2615 -374, -374, -374, -374, -374, -374, -374, -374, -374, -374,
2616 -374, 253, 233, 287, -374, 234, 241, -374, -374, 110,
2617 -374, 267, -374, 126, -374, -374, -374, 250, -374, 252,
2618 251, -374, 125, 230, -374, -374, 2087, 259, 235, 27,
2619 -374, -374, -374, -374, -374, -374, -374, 362, -374, -374,
2620 1919, -374, 1919, 157, 1407, -374, 366, -374, 347, 254,
2621 249, -374, 2501, 1793, -374, -374, -374, 1793, 1793, 157,
2622 -374, -374, 256, -374, -374, 258, 74, 255, 1537, -374,
2623 -374, -374, -374, 70, -374, -374, 1793, -374, 257, 261,
2624 264, -374, 1407, -374, -374, 385, -374, -374, -374, -374,
2625 1793, 270, 268, 265, 271, -374, 24, 1793, -374, 272,
2626 274, 157, -374, -374
2629 /* YYPGOTO[NTERM-NUM]. */
2630 static const yytype_int16 yypgoto[] =
2632 -374, -374, 260, -374, 352, -285, -374, 98, -373, -39,
2633 1, -84, -310, 31, 2, 17, 351, 289, 89, -374,
2634 -374, -374, -374, -374, -374, -374, -374, -374, -374, -374,
2635 -374, -374, -374, -374, -374, -17, -16, -374, -374, 5,
2636 -374, 13, -374, -374, -374, -374, -374, -374, -374, -202,
2637 36, -374, -374, -374, -374, 0, -374, 356, -374, -374,
2638 -374, 58, -374, 59, -374, -65, -374, -48, -374, -374,
2639 -26, -374, 3, -374, 32, -374, -369, -374, -298, -47,
2640 4, -374, -374, -374, -374, -374, 408, -318, 51, 78,
2641 -237, -374, -99, -374, -374, -374, -374, -374, -374, -374,
2642 -27, -3, -52, -7, -374, -374, -374, -374, -374, -374
2645 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2646 positive, shift that token. If negative, reduce the rule which
2647 number is the opposite. If zero, do what YYDEFACT says.
2648 If YYTABLE_NINF, syntax error. */
2649 #define YYTABLE_NINF -153
2650 static const yytype_int16 yytable[] =
2652 68, 54, 56, 73, 74, 208, 153, 336, 221, 133,
2653 365, 312, 111, 98, 294, 429, 312, 101, 362, 321,
2654 86, 85, 385, 91, 388, 88, 357, 315, 315, 369,
2655 109, 55, 112, 115, 116, 92, 117, 118, 119, 92,
2656 112, 395, 425, 120, 426, 92, 186, 161, -70, 240,
2657 95, 161, 68, 54, 56, 73, 74, 421, 71, 72,
2658 161, 436, 370, 103, 161, 90, 414, 96, 388, 161,
2659 401, 398, 402, 428, 99, 403, 404, 405, 203, 406,
2660 227, 204, 377, 55, 320, 102, 161, 105, 91, 437,
2661 487, 144, 87, 351, 488, 489, 230, 367, 219, 217,
2662 112, 154, 383, 292, 92, 247, 156, 391, 212, 213,
2663 71, 72, 407, 496, 455, 445, 112, 316, 413, 435,
2664 158, 248, 408, 409, 235, 236, 412, 504, 369, 321,
2665 107, 322, 106, 295, 510, 108, 110, 509, 415, 296,
2666 470, 371, 471, 416, 92, 92, 93, 68, 54, 56,
2667 73, 74, 382, 161, 253, 254, 255, 256, 257, 258,
2668 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
2669 269, 270, 271, 272, 273, 274, 275, 145, 55, 161,
2670 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
2671 287, 288, 289, 290, 291, 112, 293, 328, 359, 329,
2672 205, 360, 333, 300, 297, 71, 72, 147, 206, 214,
2673 218, 68, 54, 306, 358, 216, 472, 112, 222, 112,
2674 327, 312, 224, 184, 185, 186, 225, 226, 228, 229,
2675 231, 232, 490, 241, 2, 238, 208, 242, -71, 244,
2676 245, 240, 337, 338, 246, 250, 251, 252, 276, 240,
2677 15, 16, 17, 2, 19, 202, 21, 203, 298, 313,
2678 204, 299, 330, 326, 332, 334, 335, 208, 25, 15,
2679 16, 17, 339, 19, 513, 21, 456, 30, 31, 32,
2680 340, 346, 348, 208, 350, 342, 354, 25, 349, 352,
2681 315, 184, 185, 186, 356, 456, 30, 31, 32, 208,
2682 364, 366, 2, 68, 54, 306, 112, 363, -108, 368,
2683 377, 68, 54, 306, 381, 199, 200, 201, 15, 16,
2684 17, 384, 19, 202, 21, 203, 386, 393, 204, 457,
2685 427, 390, 450, 397, 399, 154, 25, 423, 392, 155,
2686 156, 422, 400, 431, 162, 30, 31, 32, 457, 396,
2687 424, 432, 157, 442, 158, 359, 68, 54, 306, 444,
2688 446, 112, -151, 447, 463, 469, 208, 464, 208, 482,
2689 112, 163, 164, 165, 483, 166, 167, 168, 169, 170,
2690 171, -152, 491, 452, 492, 453, 484, 493, 502, 497,
2691 506, 507, 183, 498, 184, 185, 186, 499, 187, 188,
2692 189, 355, 505, 508, 146, 511, 512, 243, 434, 150,
2693 192, 193, 194, 195, 196, 233, 197, 198, 199, 200,
2694 201, 379, 465, 466, 448, 160, 202, 501, 203, 462,
2695 494, 204, 449, 458, 485, 104, 495, 430, 411, 184,
2696 185, 186, 0, 443, 0, 0, 0, 0, 0, 0,
2697 0, 0, 0, 0, 476, 474, 475, 480, 481, 0,
2698 458, 197, 198, 199, 200, 201, 0, 0, 0, 0,
2699 0, 202, 0, 203, 0, 0, 204, 0, 476, 474,
2700 475, 480, 481, 0, 0, 0, 0, 0, 0, 0,
2701 0, 0, 476, 474, 475, 480, 481, -4, 0, 0,
2702 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2703 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2704 18, 19, 20, 21, 0, 0, 23, 0, 0, 162,
2705 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2706 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2707 34, 0, 35, 36, 0, 0, -153, -153, -153, 0,
2708 37, 38, 0, 0, 170, 171, 0, 39, 0, 0,
2709 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
2710 185, 186, 0, 187, 188, 189, 0, 40, 41, 0,
2711 0, 0, 0, 0, 0, 0, 42, 0, 195, 196,
2712 0, 197, 198, 199, 200, 201, 0, 0, 0, 43,
2713 0, 202, 0, 203, 44, 45, 204, 0, 0, 46,
2714 0, 47, 0, 48, 0, 49, 0, 0, 0, -4,
2715 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2716 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2717 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2718 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2719 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2720 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2721 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2723 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2724 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2725 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2726 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2727 0, 47, 0, 48, 0, 49, 0, 0, 0, 132,
2728 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2729 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2730 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2731 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2732 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2733 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2734 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2736 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2737 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2738 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2739 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2740 0, 47, 0, 48, 0, 49, 0, 0, 0, 239,
2741 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2742 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2743 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2744 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2745 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2746 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2747 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2749 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2750 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2751 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2752 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2753 0, 47, 0, 48, 0, 49, 0, 0, 0, 380,
2754 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2755 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2756 18, 19, 20, 21, 0, 0, 23, 0, 0, -153,
2757 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2758 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2759 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2760 37, 38, 0, 0, -153, -153, 0, 39, 0, 0,
2761 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
2762 185, 186, 0, 187, 188, 189, 0, 40, 41, 0,
2763 0, 0, 0, 0, 0, 0, 42, 0, -153, -153,
2764 0, 197, 198, 199, 200, 201, 0, 0, 0, 43,
2765 0, 202, 0, 203, 44, 45, 204, 0, 0, 46,
2766 0, 47, 0, 48, 0, 49, 0, 0, 0, -3,
2767 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2768 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2769 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2770 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2771 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2772 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2773 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2775 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2776 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
2777 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2778 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2779 0, 47, 0, 48, 0, 49, 0, 0, 0, -15,
2780 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2781 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2782 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2783 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2784 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2785 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2786 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2788 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2789 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
2790 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2791 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2792 0, 47, 0, 48, 0, 49, 0, 0, 0, -16,
2793 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2794 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2795 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2796 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2797 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2798 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2799 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2801 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2802 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2803 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2804 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2805 0, 47, 0, 48, 0, 49, 0, 0, 0, -142,
2806 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2807 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2808 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2809 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2810 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2811 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2812 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2814 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2815 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2816 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2817 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2818 0, 47, 0, 48, 0, 49, 0, -3, 0, -143,
2819 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2820 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2821 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2822 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2823 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2824 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2825 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2827 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2828 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2829 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2830 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2831 0, 47, 0, 48, 0, 49, 1, 2, 3, 4,
2832 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2833 0, -118, 0, 15, 16, 17, 18, 19, 20, 21,
2834 22, 0, 23, 125, 0, 126, 0, 0, 0, 24,
2835 127, 25, 26, 0, 27, 128, 28, 0, 29, 129,
2836 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2837 0, 0, 0, 0, 0, 0, 37, 38, 0, 130,
2838 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2840 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2841 0, 0, 131, 0, 0, 0, 0, 0, 0, 0,
2842 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2843 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2844 0, 49, 1, 2, 3, 4, 0, 5, 6, 7,
2845 8, 9, 10, 11, 12, 13, 0, 0, 0, 15,
2846 16, 17, 18, 19, 20, 21, 22, 0, 23, 125,
2847 0, 126, 0, 0, 0, 24, 127, 25, 26, 0,
2848 27, 128, 28, 0, 29, 129, 30, 31, 32, 0,
2849 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
2850 0, 0, 37, 38, 0, 130, 0, 0, 0, 39,
2851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2852 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2853 41, 0, 0, 0, 0, 0, 0, 0, 131, 0,
2854 148, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2855 0, 43, 0, 0, 0, 0, 44, 45, 0, 0,
2856 0, 46, 20, 47, 22, 48, 23, 49, 0, 126,
2857 0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
2858 28, 0, 29, 149, 0, 0, 0, 0, 0, 0,
2859 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2860 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2861 97, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2862 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2863 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2864 0, 0, 0, 24, 0, 0, 0, 0, 0, 43,
2865 28, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2866 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2867 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2868 97, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2869 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2870 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2871 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2872 0, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2873 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2874 0, 0, 162, 0, 0, 0, 0, 39, 0, 0,
2875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2876 0, 0, 0, 0, 0, 0, 0, 40, 41, 163,
2877 164, 165, 0, 166, 167, 168, 169, 170, 171, 172,
2878 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2879 183, 0, 184, 185, 186, 0, 187, 188, 189, 46,
2880 0, 47, 0, 0, 190, 49, 191, 0, 192, 193,
2881 194, 195, 196, 162, 197, 198, 199, 200, 201, 0,
2882 0, 0, 0, 0, 202, 0, 203, 0, 0, 204,
2883 0, 0, 0, 0, 0, 323, 0, 0, 0, 0,
2884 163, 164, 165, 0, 166, 167, 168, 169, 170, 171,
2885 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2886 182, 183, 0, 184, 185, 186, 0, 187, 188, 189,
2887 0, 0, 0, 0, 0, 190, 162, 191, 0, 192,
2888 193, 194, 195, 196, 0, 197, 198, 199, 200, 201,
2889 0, 0, 0, 0, 0, 202, 0, 203, 0, 0,
2890 204, 0, 0, 163, 164, 165, 353, 166, 167, 168,
2891 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
2892 179, 180, 181, 182, 183, 0, 184, 185, 186, 0,
2893 187, 188, 189, 0, 0, 0, 0, 0, 190, 162,
2894 191, 0, 192, 193, 194, 195, 196, 0, 197, 198,
2895 199, 200, 201, 0, 0, 0, 0, 0, 202, 0,
2896 203, 0, 0, 204, 0, 0, 163, 164, 165, 394,
2897 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
2898 176, 177, 178, 179, 180, 181, 182, 183, 0, 184,
2899 185, 186, 0, 187, 188, 189, 0, 0, 0, 0,
2900 162, 190, 0, 191, 345, 192, 193, 194, 195, 196,
2901 0, 197, 198, 199, 200, 201, 0, 0, 0, 0,
2902 0, 202, 0, 203, 0, 0, 204, 163, 164, 165,
2903 0, 166, 167, 168, 169, 170, 171, 172, 173, 174,
2904 175, 176, 177, 178, 179, 180, 181, 182, 183, 0,
2905 184, 185, 186, 0, 187, 188, 189, 0, 0, 0,
2906 0, 162, 190, 0, 191, 0, 192, 193, 194, 195,
2907 196, 0, 197, 198, 199, 200, 201, 0, 0, 0,
2908 0, 0, 202, 0, 203, 347, 0, 204, 163, 164,
2909 165, 0, 166, 167, 168, 169, 170, 171, 172, 173,
2910 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2911 0, 184, 185, 186, 0, 187, 188, 189, 0, 0,
2912 0, 0, 162, 190, 0, 191, 486, 192, 193, 194,
2913 195, 196, 0, 197, 198, 199, 200, 201, 0, 0,
2914 0, 0, 0, 202, 0, 203, 0, 0, 204, 163,
2915 164, 165, 0, 166, 167, 168, 169, 170, 171, 172,
2916 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2917 183, 0, 184, 185, 186, 0, 187, 188, 189, 0,
2918 0, 0, 0, 162, 190, 0, 191, 0, 192, 193,
2919 194, 195, 196, 0, 197, 198, 199, 200, 201, 0,
2920 0, 0, 0, 0, 202, 0, 203, 0, 0, 204,
2921 163, 164, 165, 0, 166, 167, 168, 169, 170, 171,
2922 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2923 0, 0, 0, 184, 185, 186, 0, 187, 188, 189,
2924 0, 0, 0, 0, 162, 0, 0, 0, 0, 192,
2925 193, 194, 195, 196, 0, 197, 198, 199, 200, 201,
2926 0, 0, 0, 0, 0, 202, 0, 203, 0, 0,
2927 204, 163, 164, 165, 0, 166, 167, 168, 169, 170,
2928 171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2929 0, 0, 0, 0, 184, 185, 186, 0, 187, 188,
2930 189, 0, 0, 0, 0, 162, 0, 0, 0, 0,
2931 0, 193, 194, 195, 196, 0, 197, 198, 199, 200,
2932 201, 0, 0, 0, 0, 0, 202, 0, 203, 0,
2933 0, 204, 163, 164, 165, 0, 166, 167, 168, 169,
2934 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
2935 0, 0, 0, 0, 0, 184, 185, 186, 0, 187,
2936 188, 189, 0, 0, 0, 0, 162, 0, 0, 0,
2937 0, 0, 0, 194, 195, 196, 0, 197, 198, 199,
2938 200, 201, 0, 0, 0, 0, 0, 202, 0, 203,
2939 0, 0, 204, 163, 164, 165, 0, 166, 167, 168,
2940 169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2941 0, 0, 0, 0, 0, 0, 184, 185, 186, 0,
2942 187, 188, 189, 0, 0, 0, 0, 162, 0, 0,
2943 0, 0, 0, 0, -153, 195, 196, 0, 197, 198,
2944 199, 200, 201, 0, 0, 0, 0, 0, 202, 0,
2945 203, 0, 0, 204, 163, 164, 165, 0, -153, -153,
2946 -153, -153, 170, 171, 0, 0, 0, 0, 0, 0,
2947 0, 0, 0, 0, 0, 0, 0, 184, 185, 186,
2948 0, 187, 188, 189, 0, 0, 0, 0, 0, 0,
2949 0, 0, 0, 0, 0, 0, 195, 196, 0, 197,
2950 198, 199, 200, 201, 0, 0, 0, 0, 0, 202,
2954 static const yytype_int16 yycheck[] =
2956 0, 0, 0, 0, 0, 89, 58, 244, 107, 48,
2957 320, 213, 39, 20, 3, 384, 218, 24, 316, 3,
2958 50, 89, 340, 3, 342, 122, 311, 3, 3, 3,
2959 37, 0, 39, 40, 41, 19, 43, 44, 45, 19,
2960 47, 351, 3, 46, 5, 19, 92, 100, 68, 133,
2961 14, 100, 52, 52, 52, 52, 52, 367, 0, 0,
2962 100, 34, 36, 27, 100, 122, 364, 18, 386, 100,
2963 3, 356, 5, 383, 3, 8, 9, 10, 124, 12,
2964 133, 127, 102, 52, 133, 122, 100, 122, 3, 62,
2965 463, 3, 122, 133, 467, 468, 123, 133, 105, 102,
2966 107, 27, 133, 202, 19, 35, 32, 344, 126, 127,
2967 52, 52, 45, 486, 432, 413, 123, 93, 93, 133,
2968 46, 51, 55, 56, 127, 128, 363, 500, 3, 3,
2969 122, 115, 126, 122, 507, 127, 122, 506, 28, 128,
2970 450, 115, 452, 33, 19, 19, 126, 147, 147, 147,
2971 147, 147, 99, 100, 161, 162, 163, 164, 165, 166,
2972 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2973 177, 178, 179, 180, 181, 182, 183, 0, 147, 100,
2974 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
2975 197, 198, 199, 200, 201, 202, 203, 224, 102, 226,
2976 3, 105, 241, 210, 207, 147, 147, 126, 122, 3,
2977 127, 211, 211, 211, 313, 122, 453, 224, 3, 226,
2978 223, 423, 105, 90, 91, 92, 132, 100, 125, 100,
2979 3, 3, 469, 126, 4, 3, 320, 18, 68, 3,
2980 99, 325, 245, 246, 68, 3, 3, 3, 3, 333,
2981 20, 21, 22, 4, 24, 122, 26, 124, 99, 122,
2982 127, 14, 105, 133, 100, 3, 132, 351, 38, 20,
2983 21, 22, 3, 24, 511, 26, 46, 47, 48, 49,
2984 54, 133, 89, 367, 3, 54, 132, 38, 295, 122,
2985 3, 90, 91, 92, 126, 46, 47, 48, 49, 383,
2986 100, 132, 4, 303, 303, 303, 313, 133, 127, 105,
2987 102, 311, 311, 311, 102, 114, 115, 116, 20, 21,
2988 22, 122, 24, 122, 26, 124, 17, 3, 127, 99,
2989 382, 126, 65, 126, 132, 27, 38, 127, 345, 31,
2990 32, 368, 133, 126, 40, 47, 48, 49, 99, 352,
2991 377, 100, 44, 132, 46, 102, 356, 356, 356, 126,
2992 126, 368, 132, 122, 105, 3, 450, 132, 452, 3,
2993 377, 67, 68, 69, 27, 71, 72, 73, 74, 75,
2994 76, 132, 126, 133, 126, 133, 132, 132, 3, 132,
2995 122, 126, 88, 132, 90, 91, 92, 133, 94, 95,
2996 96, 303, 132, 132, 52, 133, 132, 147, 391, 58,
2997 106, 107, 108, 109, 110, 126, 112, 113, 114, 115,
2998 116, 332, 439, 439, 419, 69, 122, 492, 124, 436,
2999 478, 127, 419, 433, 460, 27, 483, 386, 360, 90,
3000 91, 92, -1, 411, -1, -1, -1, -1, -1, -1,
3001 -1, -1, -1, -1, 454, 454, 454, 454, 454, -1,
3002 460, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3003 -1, 122, -1, 124, -1, -1, 127, -1, 478, 478,
3004 478, 478, 478, -1, -1, -1, -1, -1, -1, -1,
3005 -1, -1, 492, 492, 492, 492, 492, 0, -1, -1,
3006 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3007 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3008 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
3009 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3010 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3011 53, -1, 55, 56, -1, -1, 67, 68, 69, -1,
3012 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3013 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3014 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
3015 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
3016 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
3017 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
3018 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3019 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3020 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3021 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3022 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3023 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3024 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3025 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3027 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3028 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3029 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3030 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3031 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3032 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3033 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3034 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3035 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3036 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3037 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3038 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3039 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3040 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3041 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3042 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3043 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3044 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3045 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3046 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3047 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
3048 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
3049 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
3050 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3051 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
3052 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3053 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3054 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3055 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3056 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3057 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3058 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3059 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3060 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
3061 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3062 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3063 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3064 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
3065 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3066 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
3067 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
3068 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
3069 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
3070 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3071 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3072 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3073 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3074 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3075 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3076 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3077 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3078 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3079 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3080 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3081 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3082 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3083 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3084 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3085 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3086 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3087 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3088 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3089 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3090 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3091 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3092 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3093 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3094 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3095 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3096 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3097 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3098 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3099 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3100 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3101 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3102 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3103 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3104 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3105 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3106 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3107 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3108 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3109 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
3110 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3111 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
3112 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3113 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3114 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3115 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3116 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3118 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3119 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3120 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3121 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3122 -1, 124, -1, 126, -1, 128, -1, 0, -1, 132,
3123 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
3124 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
3125 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
3126 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
3127 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
3128 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3129 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
3130 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3131 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3132 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3133 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3134 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3135 -1, 124, -1, 126, -1, 128, 3, 4, 5, 6,
3136 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3137 -1, 18, -1, 20, 21, 22, 23, 24, 25, 26,
3138 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3139 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3140 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3141 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3142 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3143 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3144 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3145 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3146 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3147 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3148 -1, 128, 3, 4, 5, 6, -1, 8, 9, 10,
3149 11, 12, 13, 14, 15, 16, -1, -1, -1, 20,
3150 21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
3151 -1, 32, -1, -1, -1, 36, 37, 38, 39, -1,
3152 41, 42, 43, -1, 45, 46, 47, 48, 49, -1,
3153 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3154 -1, -1, 63, 64, -1, 66, -1, -1, -1, 70,
3155 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3156 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3157 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3158 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3159 -1, 112, -1, -1, -1, -1, 117, 118, -1, -1,
3160 -1, 122, 25, 124, 27, 126, 29, 128, -1, 32,
3161 -1, -1, -1, 36, -1, -1, -1, -1, -1, -1,
3162 43, -1, 45, 46, -1, -1, -1, -1, -1, -1,
3163 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3164 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3165 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3166 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3167 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3168 -1, -1, -1, 36, -1, -1, -1, -1, -1, 112,
3169 43, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3170 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3171 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3172 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3173 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3174 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3175 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3176 -1, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3177 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3178 -1, -1, 40, -1, -1, -1, -1, 70, -1, -1,
3179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3180 -1, -1, -1, -1, -1, -1, -1, 90, 91, 67,
3181 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3182 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3183 88, -1, 90, 91, 92, -1, 94, 95, 96, 122,
3184 -1, 124, -1, -1, 102, 128, 104, -1, 106, 107,
3185 108, 109, 110, 40, 112, 113, 114, 115, 116, -1,
3186 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3187 -1, -1, -1, -1, -1, 133, -1, -1, -1, -1,
3188 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3189 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3190 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3191 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3192 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3193 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3194 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3195 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3196 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3197 94, 95, 96, -1, -1, -1, -1, -1, 102, 40,
3198 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3199 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3200 124, -1, -1, 127, -1, -1, 67, 68, 69, 133,
3201 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3202 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3203 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3204 40, 102, -1, 104, 105, 106, 107, 108, 109, 110,
3205 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3206 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3207 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3208 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3209 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3210 -1, 40, 102, -1, 104, -1, 106, 107, 108, 109,
3211 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3212 -1, -1, 122, -1, 124, 125, -1, 127, 67, 68,
3213 69, -1, 71, 72, 73, 74, 75, 76, 77, 78,
3214 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3215 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3216 -1, -1, 40, 102, -1, 104, 105, 106, 107, 108,
3217 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3218 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3219 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3220 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3221 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3222 -1, -1, -1, 40, 102, -1, 104, -1, 106, 107,
3223 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3224 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3225 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3226 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3227 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3228 -1, -1, -1, -1, 40, -1, -1, -1, -1, 106,
3229 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3230 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3231 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3232 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3233 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3234 96, -1, -1, -1, -1, 40, -1, -1, -1, -1,
3235 -1, 107, 108, 109, 110, -1, 112, 113, 114, 115,
3236 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3237 -1, 127, 67, 68, 69, -1, 71, 72, 73, 74,
3238 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3239 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3240 95, 96, -1, -1, -1, -1, 40, -1, -1, -1,
3241 -1, -1, -1, 108, 109, 110, -1, 112, 113, 114,
3242 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3243 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3244 74, 75, 76, -1, -1, -1, -1, -1, -1, -1,
3245 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3246 94, 95, 96, -1, -1, -1, -1, 40, -1, -1,
3247 -1, -1, -1, -1, 108, 109, 110, -1, 112, 113,
3248 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3249 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3250 73, 74, 75, 76, -1, -1, -1, -1, -1, -1,
3251 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3252 -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
3253 -1, -1, -1, -1, -1, -1, 109, 110, -1, 112,
3254 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3255 -1, 124, -1, -1, 127
3258 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3259 symbol of state STATE-NUM. */
3260 static const yytype_uint8 yystos[] =
3262 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3263 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3264 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3265 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3266 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3267 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3268 160, 161, 163, 171, 179, 182, 185, 188, 189, 190,
3269 191, 195, 197, 206, 214, 217, 230, 231, 232, 235,
3270 236, 237, 238, 241, 243, 89, 50, 122, 122, 164,
3271 122, 3, 19, 126, 183, 184, 18, 3, 237, 3,
3272 216, 237, 122, 184, 220, 122, 126, 122, 127, 237,
3273 122, 234, 237, 239, 240, 237, 237, 237, 237, 237,
3274 235, 226, 227, 228, 234, 30, 32, 37, 42, 46,
3275 66, 99, 132, 143, 144, 145, 148, 150, 165, 166,
3276 181, 189, 233, 242, 3, 0, 138, 126, 3, 46,
3277 150, 156, 157, 236, 27, 31, 32, 44, 46, 205,
3278 191, 100, 40, 67, 68, 69, 71, 72, 73, 74,
3279 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3280 85, 86, 87, 88, 90, 91, 92, 94, 95, 96,
3281 102, 104, 106, 107, 108, 109, 110, 112, 113, 114,
3282 115, 116, 122, 124, 127, 3, 122, 162, 145, 146,
3283 172, 187, 126, 127, 3, 229, 122, 235, 127, 237,
3284 180, 226, 3, 155, 105, 132, 100, 133, 125, 100,
3285 234, 3, 3, 151, 152, 235, 235, 151, 3, 132,
3286 145, 126, 18, 136, 3, 99, 68, 35, 51, 213,
3287 3, 3, 3, 237, 237, 237, 237, 237, 237, 237,
3288 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3289 237, 237, 237, 237, 237, 237, 3, 237, 237, 237,
3290 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3291 237, 237, 226, 237, 3, 122, 128, 235, 99, 14,
3292 237, 99, 139, 140, 141, 147, 148, 195, 197, 206,
3293 214, 186, 183, 122, 225, 3, 93, 210, 211, 212,
3294 133, 3, 115, 133, 142, 143, 133, 235, 234, 234,
3295 105, 224, 100, 143, 3, 132, 224, 235, 235, 3,
3296 54, 192, 54, 193, 207, 105, 133, 125, 89, 237,
3297 3, 133, 122, 133, 132, 141, 126, 139, 226, 102,
3298 105, 208, 212, 133, 100, 146, 132, 133, 105, 3,
3299 36, 115, 184, 219, 220, 221, 223, 102, 149, 152,
3300 132, 102, 99, 133, 122, 221, 17, 194, 221, 222,
3301 126, 224, 237, 3, 133, 146, 235, 126, 139, 132,
3302 133, 3, 5, 8, 9, 10, 12, 45, 55, 56,
3303 209, 223, 224, 93, 212, 28, 33, 173, 175, 177,
3304 178, 146, 234, 127, 234, 3, 5, 236, 146, 210,
3305 222, 126, 100, 198, 149, 133, 34, 62, 167, 168,
3306 169, 170, 132, 208, 126, 212, 126, 122, 173, 175,
3307 65, 153, 133, 133, 196, 221, 46, 99, 189, 202,
3308 203, 204, 237, 105, 132, 169, 170, 218, 176, 3,
3309 146, 146, 224, 99, 144, 148, 189, 199, 200, 201,
3310 206, 214, 3, 27, 132, 204, 105, 142, 142, 142,
3311 224, 126, 126, 132, 201, 213, 142, 132, 132, 133,
3312 215, 199, 3, 174, 142, 132, 122, 126, 132, 210,
3316 #define yyerrok (yyerrstatus = 0)
3317 #define yyclearin (yychar = YYEMPTY)
3318 #define YYEMPTY (-2)
3321 #define YYACCEPT goto yyacceptlab
3322 #define YYABORT goto yyabortlab
3323 #define YYERROR goto yyerrorlab
3326 /* Like YYERROR except do call yyerror. This remains here temporarily
3327 to ease the transition to the new meaning of YYERROR, for GCC.
3328 Once GCC version 2 has supplanted version 1, this can go. */
3330 #define YYFAIL goto yyerrlab
3332 #define YYRECOVERING() (!!yyerrstatus)
3334 #define YYBACKUP(Token, Value) \
3336 if (yychar == YYEMPTY && yylen == 1) \
3340 yytoken = YYTRANSLATE (yychar); \
3346 yyerror (YY_("syntax error: cannot back up")); \
3353 #define YYERRCODE 256
3356 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3357 If N is 0, then set CURRENT to the empty location which ends
3358 the previous symbol: RHS[0] (always defined). */
3360 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3361 #ifndef YYLLOC_DEFAULT
3362 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3366 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3367 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3368 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3369 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3373 (Current).first_line = (Current).last_line = \
3374 YYRHSLOC (Rhs, 0).last_line; \
3375 (Current).first_column = (Current).last_column = \
3376 YYRHSLOC (Rhs, 0).last_column; \
3382 /* YY_LOCATION_PRINT -- Print the location on the stream.
3383 This macro was not mandated originally: define only if we know
3384 we won't break user code: when these are the locations we know. */
3386 #ifndef YY_LOCATION_PRINT
3387 # if YYLTYPE_IS_TRIVIAL
3388 # define YY_LOCATION_PRINT(File, Loc) \
3389 fprintf (File, "%d.%d-%d.%d", \
3390 (Loc).first_line, (Loc).first_column, \
3391 (Loc).last_line, (Loc).last_column)
3393 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3398 /* YYLEX -- calling `yylex' with the right arguments. */
3401 # define YYLEX yylex (YYLEX_PARAM)
3403 # define YYLEX yylex ()
3406 /* Enable debugging if requested. */
3410 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3411 # define YYFPRINTF fprintf
3414 # define YYDPRINTF(Args) \
3420 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3424 YYFPRINTF (stderr, "%s ", Title); \
3425 yy_symbol_print (stderr, \
3427 YYFPRINTF (stderr, "\n"); \
3432 /*--------------------------------.
3433 | Print this symbol on YYOUTPUT. |
3434 `--------------------------------*/
3437 #if (defined __STDC__ || defined __C99__FUNC__ \
3438 || defined __cplusplus || defined _MSC_VER)
3440 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3443 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3446 YYSTYPE const * const yyvaluep;
3452 if (yytype < YYNTOKENS)
3453 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3465 /*--------------------------------.
3466 | Print this symbol on YYOUTPUT. |
3467 `--------------------------------*/
3469 #if (defined __STDC__ || defined __C99__FUNC__ \
3470 || defined __cplusplus || defined _MSC_VER)
3472 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3475 yy_symbol_print (yyoutput, yytype, yyvaluep)
3478 YYSTYPE const * const yyvaluep;
3481 if (yytype < YYNTOKENS)
3482 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3484 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3486 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3487 YYFPRINTF (yyoutput, ")");
3490 /*------------------------------------------------------------------.
3491 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3493 `------------------------------------------------------------------*/
3495 #if (defined __STDC__ || defined __C99__FUNC__ \
3496 || defined __cplusplus || defined _MSC_VER)
3498 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3501 yy_stack_print (yybottom, yytop)
3502 yytype_int16 *yybottom;
3503 yytype_int16 *yytop;
3506 YYFPRINTF (stderr, "Stack now");
3507 for (; yybottom <= yytop; yybottom++)
3509 int yybot = *yybottom;
3510 YYFPRINTF (stderr, " %d", yybot);
3512 YYFPRINTF (stderr, "\n");
3515 # define YY_STACK_PRINT(Bottom, Top) \
3518 yy_stack_print ((Bottom), (Top)); \
3522 /*------------------------------------------------.
3523 | Report that the YYRULE is going to be reduced. |
3524 `------------------------------------------------*/
3526 #if (defined __STDC__ || defined __C99__FUNC__ \
3527 || defined __cplusplus || defined _MSC_VER)
3529 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3532 yy_reduce_print (yyvsp, yyrule)
3537 int yynrhs = yyr2[yyrule];
3539 unsigned long int yylno = yyrline[yyrule];
3540 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3542 /* The symbols being reduced. */
3543 for (yyi = 0; yyi < yynrhs; yyi++)
3545 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3546 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3547 &(yyvsp[(yyi + 1) - (yynrhs)])
3549 YYFPRINTF (stderr, "\n");
3553 # define YY_REDUCE_PRINT(Rule) \
3556 yy_reduce_print (yyvsp, Rule); \
3559 /* Nonzero means print parse trace. It is left uninitialized so that
3560 multiple parsers can coexist. */
3562 #else /* !YYDEBUG */
3563 # define YYDPRINTF(Args)
3564 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3565 # define YY_STACK_PRINT(Bottom, Top)
3566 # define YY_REDUCE_PRINT(Rule)
3567 #endif /* !YYDEBUG */
3570 /* YYINITDEPTH -- initial size of the parser's stacks. */
3572 # define YYINITDEPTH 200
3575 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3576 if the built-in stack extension method is used).
3578 Do not make this value too large; the results are undefined if
3579 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3580 evaluated with infinite-precision integer arithmetic. */
3583 # define YYMAXDEPTH 10000
3591 # if defined __GLIBC__ && defined _STRING_H
3592 # define yystrlen strlen
3594 /* Return the length of YYSTR. */
3595 #if (defined __STDC__ || defined __C99__FUNC__ \
3596 || defined __cplusplus || defined _MSC_VER)
3598 yystrlen (const char *yystr)
3606 for (yylen = 0; yystr[yylen]; yylen++)
3614 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3615 # define yystpcpy stpcpy
3617 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3619 #if (defined __STDC__ || defined __C99__FUNC__ \
3620 || defined __cplusplus || defined _MSC_VER)
3622 yystpcpy (char *yydest, const char *yysrc)
3625 yystpcpy (yydest, yysrc)
3631 const char *yys = yysrc;
3633 while ((*yyd++ = *yys++) != '\0')
3642 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3643 quotes and backslashes, so that it's suitable for yyerror. The
3644 heuristic is that double-quoting is unnecessary unless the string
3645 contains an apostrophe, a comma, or backslash (other than
3646 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3647 null, do not copy; instead, return the length of what the result
3650 yytnamerr (char *yyres, const char *yystr)
3655 char const *yyp = yystr;
3662 goto do_not_strip_quotes;
3666 goto do_not_strip_quotes;
3679 do_not_strip_quotes: ;
3683 return yystrlen (yystr);
3685 return yystpcpy (yyres, yystr) - yyres;
3689 /* Copy into YYRESULT an error message about the unexpected token
3690 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3691 including the terminating null byte. If YYRESULT is null, do not
3692 copy anything; just return the number of bytes that would be
3693 copied. As a special case, return 0 if an ordinary "syntax error"
3694 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3695 size calculation. */
3697 yysyntax_error (char *yyresult, int yystate, int yychar)
3699 int yyn = yypact[yystate];
3701 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3705 int yytype = YYTRANSLATE (yychar);
3706 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3707 YYSIZE_T yysize = yysize0;
3709 int yysize_overflow = 0;
3710 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3711 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3715 /* This is so xgettext sees the translatable formats that are
3716 constructed on the fly. */
3717 YY_("syntax error, unexpected %s");
3718 YY_("syntax error, unexpected %s, expecting %s");
3719 YY_("syntax error, unexpected %s, expecting %s or %s");
3720 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3721 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3725 static char const yyunexpected[] = "syntax error, unexpected %s";
3726 static char const yyexpecting[] = ", expecting %s";
3727 static char const yyor[] = " or %s";
3728 char yyformat[sizeof yyunexpected
3729 + sizeof yyexpecting - 1
3730 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3731 * (sizeof yyor - 1))];
3732 char const *yyprefix = yyexpecting;
3734 /* Start YYX at -YYN if negative to avoid negative indexes in
3736 int yyxbegin = yyn < 0 ? -yyn : 0;
3738 /* Stay within bounds of both yycheck and yytname. */
3739 int yychecklim = YYLAST - yyn + 1;
3740 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3743 yyarg[0] = yytname[yytype];
3744 yyfmt = yystpcpy (yyformat, yyunexpected);
3746 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3747 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3749 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3753 yyformat[sizeof yyunexpected - 1] = '\0';
3756 yyarg[yycount++] = yytname[yyx];
3757 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3758 yysize_overflow |= (yysize1 < yysize);
3760 yyfmt = yystpcpy (yyfmt, yyprefix);
3764 yyf = YY_(yyformat);
3765 yysize1 = yysize + yystrlen (yyf);
3766 yysize_overflow |= (yysize1 < yysize);
3769 if (yysize_overflow)
3770 return YYSIZE_MAXIMUM;
3774 /* Avoid sprintf, as that infringes on the user's name space.
3775 Don't have undefined behavior even if the translation
3776 produced a string with the wrong number of "%s"s. */
3777 char *yyp = yyresult;
3779 while ((*yyp = *yyf) != '\0')
3781 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3783 yyp += yytnamerr (yyp, yyarg[yyi++]);
3796 #endif /* YYERROR_VERBOSE */
3799 /*-----------------------------------------------.
3800 | Release the memory associated to this symbol. |
3801 `-----------------------------------------------*/
3804 #if (defined __STDC__ || defined __C99__FUNC__ \
3805 || defined __cplusplus || defined _MSC_VER)
3807 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3810 yydestruct (yymsg, yytype, yyvaluep)
3820 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3830 /* Prevent warnings from -Wmissing-prototypes. */
3831 #ifdef YYPARSE_PARAM
3832 #if defined __STDC__ || defined __cplusplus
3833 int yyparse (void *YYPARSE_PARAM);
3837 #else /* ! YYPARSE_PARAM */
3838 #if defined __STDC__ || defined __cplusplus
3843 #endif /* ! YYPARSE_PARAM */
3846 /* The lookahead symbol. */
3849 /* The semantic value of the lookahead symbol. */
3852 /* Number of syntax errors so far. */
3857 /*-------------------------.
3858 | yyparse or yypush_parse. |
3859 `-------------------------*/
3861 #ifdef YYPARSE_PARAM
3862 #if (defined __STDC__ || defined __C99__FUNC__ \
3863 || defined __cplusplus || defined _MSC_VER)
3865 yyparse (void *YYPARSE_PARAM)
3868 yyparse (YYPARSE_PARAM)
3869 void *YYPARSE_PARAM;
3871 #else /* ! YYPARSE_PARAM */
3872 #if (defined __STDC__ || defined __C99__FUNC__ \
3873 || defined __cplusplus || defined _MSC_VER)
3886 /* Number of tokens to shift before error messages enabled. */
3889 /* The stacks and their tools:
3890 `yyss': related to states.
3891 `yyvs': related to semantic values.
3893 Refer to the stacks thru separate pointers, to allow yyoverflow
3894 to reallocate them elsewhere. */
3896 /* The state stack. */
3897 yytype_int16 yyssa[YYINITDEPTH];
3899 yytype_int16 *yyssp;
3901 /* The semantic value stack. */
3902 YYSTYPE yyvsa[YYINITDEPTH];
3906 YYSIZE_T yystacksize;
3910 /* Lookahead token as an internal (translated) token number. */
3912 /* The variables used to return semantic value and location from the
3917 /* Buffer for error messages, and its allocated size. */
3919 char *yymsg = yymsgbuf;
3920 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3923 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3925 /* The number of symbols on the RHS of the reduced rule.
3926 Keep to zero when no symbol should be popped. */
3932 yystacksize = YYINITDEPTH;
3934 YYDPRINTF ((stderr, "Starting parse\n"));
3939 yychar = YYEMPTY; /* Cause a token to be read. */
3941 /* Initialize stack pointers.
3942 Waste one element of value and location stack
3943 so that they stay on the same level as the state stack.
3944 The wasted elements are never initialized. */
3950 /*------------------------------------------------------------.
3951 | yynewstate -- Push a new state, which is found in yystate. |
3952 `------------------------------------------------------------*/
3954 /* In all cases, when you get here, the value and location stacks
3955 have just been pushed. So pushing a state here evens the stacks. */
3961 if (yyss + yystacksize - 1 <= yyssp)
3963 /* Get the current used size of the three stacks, in elements. */
3964 YYSIZE_T yysize = yyssp - yyss + 1;
3968 /* Give user a chance to reallocate the stack. Use copies of
3969 these so that the &'s don't force the real ones into
3971 YYSTYPE *yyvs1 = yyvs;
3972 yytype_int16 *yyss1 = yyss;
3974 /* Each stack pointer address is followed by the size of the
3975 data in use in that stack, in bytes. This used to be a
3976 conditional around just the two extra args, but that might
3977 be undefined if yyoverflow is a macro. */
3978 yyoverflow (YY_("memory exhausted"),
3979 &yyss1, yysize * sizeof (*yyssp),
3980 &yyvs1, yysize * sizeof (*yyvsp),
3986 #else /* no yyoverflow */
3987 # ifndef YYSTACK_RELOCATE
3988 goto yyexhaustedlab;
3990 /* Extend the stack our own way. */
3991 if (YYMAXDEPTH <= yystacksize)
3992 goto yyexhaustedlab;
3994 if (YYMAXDEPTH < yystacksize)
3995 yystacksize = YYMAXDEPTH;
3998 yytype_int16 *yyss1 = yyss;
3999 union yyalloc *yyptr =
4000 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4002 goto yyexhaustedlab;
4003 YYSTACK_RELOCATE (yyss_alloc, yyss);
4004 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4005 # undef YYSTACK_RELOCATE
4007 YYSTACK_FREE (yyss1);
4010 #endif /* no yyoverflow */
4012 yyssp = yyss + yysize - 1;
4013 yyvsp = yyvs + yysize - 1;
4015 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4016 (unsigned long int) yystacksize));
4018 if (yyss + yystacksize - 1 <= yyssp)
4022 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4024 if (yystate == YYFINAL)
4034 /* Do appropriate processing given the current state. Read a
4035 lookahead token if we need one and don't already have one. */
4037 /* First try to decide what to do without reference to lookahead token. */
4038 yyn = yypact[yystate];
4039 if (yyn == YYPACT_NINF)
4042 /* Not known => get a lookahead token if don't already have one. */
4044 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4045 if (yychar == YYEMPTY)
4047 YYDPRINTF ((stderr, "Reading a token: "));
4051 if (yychar <= YYEOF)
4053 yychar = yytoken = YYEOF;
4054 YYDPRINTF ((stderr, "Now at end of input.\n"));
4058 yytoken = YYTRANSLATE (yychar);
4059 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4062 /* If the proper action on seeing token YYTOKEN is to reduce or to
4063 detect an error, take that action. */
4065 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4070 if (yyn == 0 || yyn == YYTABLE_NINF)
4076 /* Count tokens shifted since error; after three, turn off error
4081 /* Shift the lookahead token. */
4082 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4084 /* Discard the shifted token. */
4093 /*-----------------------------------------------------------.
4094 | yydefault -- do the default action for the current state. |
4095 `-----------------------------------------------------------*/
4097 yyn = yydefact[yystate];
4103 /*-----------------------------.
4104 | yyreduce -- Do a reduction. |
4105 `-----------------------------*/
4107 /* yyn is the number of a rule to reduce with. */
4110 /* If YYLEN is nonzero, implement the default value of the action:
4113 Otherwise, the following line sets YYVAL to garbage.
4114 This behavior is undocumented and Bison
4115 users should not rely upon it. Assigning to YYVAL
4116 unconditionally makes the parser a bit smaller, and it avoids a
4117 GCC warning that YYVAL may be used uninitialized. */
4118 yyval = yyvsp[1-yylen];
4121 YY_REDUCE_PRINT (yyn);
4128 /* Line 1464 of skeleton.m4 */
4129 #line 1902 "parser.y"
4130 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4139 /* Line 1464 of skeleton.m4 */
4140 #line 1903 "parser.y"
4141 {(yyval.code)=code_new();}
4150 /* Line 1464 of skeleton.m4 */
4151 #line 1905 "parser.y"
4152 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4161 /* Line 1464 of skeleton.m4 */
4162 #line 1906 "parser.y"
4163 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4172 /* Line 1464 of skeleton.m4 */
4173 #line 1920 "parser.y"
4174 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4183 /* Line 1464 of skeleton.m4 */
4184 #line 1921 "parser.y"
4194 /* Line 1464 of skeleton.m4 */
4195 #line 1924 "parser.y"
4205 /* Line 1464 of skeleton.m4 */
4206 #line 1931 "parser.y"
4207 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4216 /* Line 1464 of skeleton.m4 */
4217 #line 1933 "parser.y"
4218 {/*TODO*/(yyval.code)=0;}
4227 /* Line 1464 of skeleton.m4 */
4228 #line 1937 "parser.y"
4229 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4238 /* Line 1464 of skeleton.m4 */
4239 #line 1938 "parser.y"
4240 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4249 /* Line 1464 of skeleton.m4 */
4250 #line 1942 "parser.y"
4252 code_t**cc = &global->init->method->body->code;
4253 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4263 /* Line 1464 of skeleton.m4 */
4264 #line 1953 "parser.y"
4265 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4274 /* Line 1464 of skeleton.m4 */
4275 #line 1954 "parser.y"
4276 {(yyval.value).c=abc_pushundefined(0);
4277 (yyval.value).t=TYPE_ANY;
4287 /* Line 1464 of skeleton.m4 */
4288 #line 1958 "parser.y"
4289 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4298 /* Line 1464 of skeleton.m4 */
4299 #line 1959 "parser.y"
4300 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4309 /* Line 1464 of skeleton.m4 */
4310 #line 1961 "parser.y"
4311 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4320 /* Line 1464 of skeleton.m4 */
4321 #line 1962 "parser.y"
4322 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4331 /* Line 1464 of skeleton.m4 */
4332 #line 1965 "parser.y"
4335 if(variable_exists((yyvsp[(1) - (3)].id)))
4336 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4338 new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
4341 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4342 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4343 (yyvsp[(2) - (3)].classinfo)->name);
4348 if(state->method->uses_slots) {
4349 variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
4351 // this variable is stored in a slot
4353 v->type = (yyvsp[(2) - (3)].classinfo);
4359 index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
4362 (yyval.code) = slot?abc_getscopeobject(0, 1):0;
4364 if((yyvsp[(2) - (3)].classinfo)) {
4365 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4366 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4367 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4369 code_free((yyvsp[(3) - (3)].value).c);
4370 (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
4373 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4374 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
4375 (yyval.code) = abc_coerce_a((yyval.code));
4377 // don't do anything
4378 code_free((yyvsp[(3) - (3)].value).c);
4379 code_free((yyval.code));
4385 (yyval.code) = abc_setslot((yyval.code), index);
4387 (yyval.code) = abc_setlocal((yyval.code), index);
4398 /* Line 1464 of skeleton.m4 */
4399 #line 2025 "parser.y"
4400 {(yyval.code) = code_new();}
4409 /* Line 1464 of skeleton.m4 */
4410 #line 2026 "parser.y"
4411 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4420 /* Line 1464 of skeleton.m4 */
4421 #line 2029 "parser.y"
4422 {PASS12 new_state();}
4431 /* Line 1464 of skeleton.m4 */
4432 #line 2029 "parser.y"
4435 (yyval.code) = code_new();
4436 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4437 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4439 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4440 if((yyvsp[(7) - (7)].code)) {
4441 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4443 myif->branch = (yyval.code) = abc_nop((yyval.code));
4444 if((yyvsp[(7) - (7)].code)) {
4445 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4446 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4448 (yyval.code) = var_block((yyval.code));
4459 /* Line 1464 of skeleton.m4 */
4460 #line 2048 "parser.y"
4461 {(yyval.code)=code_new();}
4470 /* Line 1464 of skeleton.m4 */
4471 #line 2055 "parser.y"
4473 PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
4474 PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
4484 /* Line 1464 of skeleton.m4 */
4485 #line 2059 "parser.y"
4488 (yyval.id)=(yyvsp[(1) - (1)].id);
4498 /* Line 1464 of skeleton.m4 */
4499 #line 2064 "parser.y"
4500 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4509 /* Line 1464 of skeleton.m4 */
4510 #line 2065 "parser.y"
4511 {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4520 /* Line 1464 of skeleton.m4 */
4521 #line 2067 "parser.y"
4523 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4524 (yyval.code) = code_new();
4525 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4526 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4527 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4528 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4529 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4530 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4531 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4532 (yyval.code) = abc_jump((yyval.code), loopstart);
4533 code_t*out = (yyval.code) = abc_nop((yyval.code));
4534 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4535 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4538 (yyval.code) = var_block((yyval.code));
4549 /* Line 1464 of skeleton.m4 */
4550 #line 2087 "parser.y"
4552 variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
4553 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4554 int it = new_variable(tmp1name, TYPE_INT, 0, 0);
4555 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4556 int array = new_variable(tmp1name, 0, 0, 0);
4558 (yyval.code) = code_new();
4559 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4560 (yyval.code) = abc_coerce_a((yyval.code));
4561 (yyval.code) = abc_setlocal((yyval.code), array);
4562 (yyval.code) = abc_pushbyte((yyval.code), 0);
4563 (yyval.code) = abc_setlocal((yyval.code), it);
4565 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4567 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4568 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4569 (yyval.code) = abc_getlocal((yyval.code), array);
4570 (yyval.code) = abc_getlocal((yyval.code), it);
4571 if(!(yyvsp[(1) - (6)].for_start).each)
4572 (yyval.code) = abc_nextname((yyval.code));
4574 (yyval.code) = abc_nextvalue((yyval.code));
4575 (yyval.code) = converttype((yyval.code), 0, var->type);
4576 (yyval.code) = abc_setlocal((yyval.code), var->index);
4578 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4579 (yyval.code) = abc_jump((yyval.code), loopstart);
4581 code_t*out = (yyval.code) = abc_nop((yyval.code));
4582 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4583 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4587 (yyval.code) = var_block((yyval.code));
4602 /* Line 1464 of skeleton.m4 */
4603 #line 2131 "parser.y"
4604 {PASS12 new_state();}
4613 /* Line 1464 of skeleton.m4 */
4614 #line 2131 "parser.y"
4617 (yyval.code) = code_new();
4619 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4620 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4621 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4622 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4623 myjmp->branch = cont;
4624 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4625 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4626 code_t*out = (yyval.code) = abc_nop((yyval.code));
4627 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4628 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4630 (yyval.code) = var_block((yyval.code));
4641 /* Line 1464 of skeleton.m4 */
4642 #line 2150 "parser.y"
4643 {PASS12 new_state();}
4652 /* Line 1464 of skeleton.m4 */
4653 #line 2150 "parser.y"
4655 (yyval.code) = code_new();
4656 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4657 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4658 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4659 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4660 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4661 code_t*out = (yyval.code) = abc_nop((yyval.code));
4662 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4663 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4665 (yyval.code) = var_block((yyval.code));
4676 /* Line 1464 of skeleton.m4 */
4677 #line 2165 "parser.y"
4679 (yyval.code) = abc___break__(0, "");
4689 /* Line 1464 of skeleton.m4 */
4690 #line 2168 "parser.y"
4692 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4702 /* Line 1464 of skeleton.m4 */
4703 #line 2171 "parser.y"
4705 (yyval.code) = abc___continue__(0, "");
4715 /* Line 1464 of skeleton.m4 */
4716 #line 2174 "parser.y"
4718 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4728 /* Line 1464 of skeleton.m4 */
4729 #line 2178 "parser.y"
4739 /* Line 1464 of skeleton.m4 */
4740 #line 2179 "parser.y"
4741 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4750 /* Line 1464 of skeleton.m4 */
4751 #line 2180 "parser.y"
4752 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4761 /* Line 1464 of skeleton.m4 */
4762 #line 2181 "parser.y"
4763 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4772 /* Line 1464 of skeleton.m4 */
4773 #line 2182 "parser.y"
4774 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4783 /* Line 1464 of skeleton.m4 */
4784 #line 2183 "parser.y"
4785 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4794 /* Line 1464 of skeleton.m4 */
4795 #line 2185 "parser.y"
4797 (yyval.code) = abc_dup(0);
4798 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4799 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4800 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4801 if((yyval.code)->opcode != OPCODE___BREAK__) {
4802 (yyval.code) = abc___fallthrough__((yyval.code), "");
4804 code_t*e = (yyval.code) = abc_nop((yyval.code));
4815 /* Line 1464 of skeleton.m4 */
4816 #line 2196 "parser.y"
4818 (yyval.code) = (yyvsp[(3) - (3)].code);
4828 /* Line 1464 of skeleton.m4 */
4829 #line 2199 "parser.y"
4830 {PASS12 new_state();}
4839 /* Line 1464 of skeleton.m4 */
4840 #line 2199 "parser.y"
4842 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4843 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4844 code_t*out = (yyval.code) = abc_pop((yyval.code));
4845 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4847 code_t*c = (yyval.code),*lastblock=0;
4849 if(c->opcode == OPCODE_IFNE) {
4850 if(!c->next) syntaxerror("internal error in fallthrough handling");
4852 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4854 c->opcode = OPCODE_JUMP;
4855 c->branch = lastblock;
4857 /* fall through end of switch */
4858 c->opcode = OPCODE_NOP;
4864 (yyval.code) = var_block((yyval.code));
4875 /* Line 1464 of skeleton.m4 */
4876 #line 2228 "parser.y"
4877 {PASS12 new_state();
4878 state->exception_name=(yyvsp[(3) - (5)].id);
4879 PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
4880 PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
4890 /* Line 1464 of skeleton.m4 */
4891 #line 2233 "parser.y"
4893 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4894 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4896 NEW(abc_exception_t, e)
4897 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4898 e->var_name = multiname_clone(&name);
4899 (yyval.exception) = e;
4902 int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
4903 e->target = c = abc_nop(0);
4904 c = abc_setlocal(c, i);
4905 c = code_append(c, (yyvsp[(8) - (9)].code));
4919 /* Line 1464 of skeleton.m4 */
4920 #line 2252 "parser.y"
4921 {PASS12 new_state();state->exception_name=0;}
4930 /* Line 1464 of skeleton.m4 */
4931 #line 2252 "parser.y"
4933 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4934 if(!(yyvsp[(4) - (5)].code)) {
4935 (yyval.exception)=0;
4937 NEW(abc_exception_t, e)
4938 e->exc_type = 0; //all exceptions
4939 e->var_name = 0; //no name
4942 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4943 (yyval.exception) = e;
4955 /* Line 1464 of skeleton.m4 */
4956 #line 2268 "parser.y"
4957 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4966 /* Line 1464 of skeleton.m4 */
4967 #line 2269 "parser.y"
4968 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4977 /* Line 1464 of skeleton.m4 */
4978 #line 2270 "parser.y"
4979 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4988 /* Line 1464 of skeleton.m4 */
4989 #line 2271 "parser.y"
4991 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4992 (yyval.catch_list).finally = 0;
4993 if((yyvsp[(2) - (2)].exception)) {
4994 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4995 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
5006 /* Line 1464 of skeleton.m4 */
5007 #line 2279 "parser.y"
5009 (yyval.catch_list).l=list_new();
5010 (yyval.catch_list).finally = 0;
5011 if((yyvsp[(1) - (1)].exception)) {
5012 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
5013 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
5024 /* Line 1464 of skeleton.m4 */
5025 #line 2288 "parser.y"
5026 {PASS12 new_state();}
5035 /* Line 1464 of skeleton.m4 */
5036 #line 2288 "parser.y"
5038 code_t*out = abc_nop(0);
5040 code_t*start = abc_nop(0);
5041 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
5042 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
5043 (yyval.code) = abc_jump((yyval.code), out);
5045 code_t*end = (yyval.code) = abc_nop((yyval.code));
5048 if((yyvsp[(6) - (6)].catch_list).finally)
5049 tmp = new_variable("__finally__", 0, 0, 0);
5051 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
5054 abc_exception_t*e = l->abc_exception;
5056 (yyval.code) = code_append((yyval.code), e->target);
5057 (yyval.code) = abc_jump((yyval.code), out);
5059 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
5061 e->target = (yyval.code) = abc_nop((yyval.code));
5062 (yyval.code) = abc___rethrow__((yyval.code));
5070 (yyval.code) = code_append((yyval.code), out);
5072 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
5074 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
5076 (yyval.code) = var_block((yyval.code));
5087 /* Line 1464 of skeleton.m4 */
5088 #line 2333 "parser.y"
5090 (yyval.code)=(yyvsp[(2) - (2)].value).c;
5091 (yyval.code)=abc_throw((yyval.code));
5101 /* Line 1464 of skeleton.m4 */
5102 #line 2337 "parser.y"
5104 if(!state->exception_name)
5105 syntaxerror("re-throw only possible within a catch block");
5106 variable_t*v = find_variable(state, state->exception_name);
5107 (yyval.code)=code_new();
5108 (yyval.code)=abc_getlocal((yyval.code), v->index);
5109 (yyval.code)=abc_throw((yyval.code));
5119 /* Line 1464 of skeleton.m4 */
5120 #line 2348 "parser.y"
5122 (yyval.code) = (yyvsp[(3) - (5)].value).c;
5123 (yyval.code) = abc_pushscope((yyval.code));
5124 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
5125 (yyval.code) = abc_popscope((yyval.code));
5135 /* Line 1464 of skeleton.m4 */
5136 #line 2358 "parser.y"
5137 {PASS12 (yyval.id)="package";}
5146 /* Line 1464 of skeleton.m4 */
5147 #line 2360 "parser.y"
5148 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5157 /* Line 1464 of skeleton.m4 */
5158 #line 2361 "parser.y"
5159 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5168 /* Line 1464 of skeleton.m4 */
5169 #line 2363 "parser.y"
5170 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5179 /* Line 1464 of skeleton.m4 */
5180 #line 2364 "parser.y"
5181 {PASS12 endpackage();(yyval.code)=0;}
5190 /* Line 1464 of skeleton.m4 */
5191 #line 2365 "parser.y"
5192 {PASS12 startpackage("");}
5201 /* Line 1464 of skeleton.m4 */
5202 #line 2366 "parser.y"
5203 {PASS12 endpackage();(yyval.code)=0;}
5212 /* Line 1464 of skeleton.m4 */
5213 #line 2368 "parser.y"
5216 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5217 if(!s) {// || !(s->flags&FLAG_BUILTIN)) {
5218 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5222 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5224 syntaxerror("Couldn't import class\n");
5225 state_has_imports();
5226 dict_put(state->imports, c->name, c);
5237 /* Line 1464 of skeleton.m4 */
5238 #line 2383 "parser.y"
5241 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
5242 as3_schedule_package((yyvsp[(2) - (4)].id));
5247 i->package = (yyvsp[(2) - (4)].id);
5248 state_has_imports();
5249 list_append(state->wildcard_imports, i);
5260 /* Line 1464 of skeleton.m4 */
5261 #line 2399 "parser.y"
5262 {PASS12 (yyval.flags)=0;}
5271 /* Line 1464 of skeleton.m4 */
5272 #line 2400 "parser.y"
5273 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5282 /* Line 1464 of skeleton.m4 */
5283 #line 2401 "parser.y"
5284 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
5293 /* Line 1464 of skeleton.m4 */
5294 #line 2402 "parser.y"
5295 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
5304 /* Line 1464 of skeleton.m4 */
5305 #line 2404 "parser.y"
5306 {PASS12 (yyval.token)=FLAG_PUBLIC;}
5315 /* Line 1464 of skeleton.m4 */
5316 #line 2405 "parser.y"
5317 {PASS12 (yyval.token)=FLAG_PRIVATE;}
5326 /* Line 1464 of skeleton.m4 */
5327 #line 2406 "parser.y"
5328 {PASS12 (yyval.token)=FLAG_PROTECTED;}
5337 /* Line 1464 of skeleton.m4 */
5338 #line 2407 "parser.y"
5339 {PASS12 (yyval.token)=FLAG_STATIC;}
5348 /* Line 1464 of skeleton.m4 */
5349 #line 2408 "parser.y"
5350 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
5359 /* Line 1464 of skeleton.m4 */
5360 #line 2409 "parser.y"
5361 {PASS12 (yyval.token)=FLAG_FINAL;}
5370 /* Line 1464 of skeleton.m4 */
5371 #line 2410 "parser.y"
5372 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
5381 /* Line 1464 of skeleton.m4 */
5382 #line 2411 "parser.y"
5383 {PASS12 (yyval.token)=FLAG_NATIVE;}
5392 /* Line 1464 of skeleton.m4 */
5393 #line 2412 "parser.y"
5394 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
5403 /* Line 1464 of skeleton.m4 */
5404 #line 2413 "parser.y"
5405 {PASS12 (yyval.token)=FLAG_NAMESPACE;}
5414 /* Line 1464 of skeleton.m4 */
5415 #line 2415 "parser.y"
5416 {(yyval.classinfo)=registry_getobjectclass();}
5425 /* Line 1464 of skeleton.m4 */
5426 #line 2416 "parser.y"
5427 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5436 /* Line 1464 of skeleton.m4 */
5437 #line 2418 "parser.y"
5438 {PASS12 (yyval.classinfo_list)=list_new();}
5447 /* Line 1464 of skeleton.m4 */
5448 #line 2419 "parser.y"
5449 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5458 /* Line 1464 of skeleton.m4 */
5459 #line 2421 "parser.y"
5460 {PASS12 (yyval.classinfo_list)=list_new();}
5469 /* Line 1464 of skeleton.m4 */
5470 #line 2422 "parser.y"
5471 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5480 /* Line 1464 of skeleton.m4 */
5481 #line 2426 "parser.y"
5482 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5491 /* Line 1464 of skeleton.m4 */
5492 #line 2428 "parser.y"
5493 {PASS12 endclass();(yyval.code)=0;}
5502 /* Line 1464 of skeleton.m4 */
5503 #line 2432 "parser.y"
5504 {PASS12 startclass((yyvsp[(1) - (5)].flags)|FLAG_INTERFACE,(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5513 /* Line 1464 of skeleton.m4 */
5514 #line 2434 "parser.y"
5515 {PASS12 endclass();(yyval.code)=0;}
5524 /* Line 1464 of skeleton.m4 */
5525 #line 2447 "parser.y"
5527 code_t*c = state->cls->static_init->header;
5528 c = code_append(c, (yyvsp[(1) - (1)].code));
5529 state->cls->static_init->header = c;
5539 /* Line 1464 of skeleton.m4 */
5540 #line 2458 "parser.y"
5542 syntaxerror("variable declarations not allowed in interfaces");
5552 /* Line 1464 of skeleton.m4 */
5553 #line 2461 "parser.y"
5556 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5557 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5558 syntaxerror("invalid method modifiers: interface methods always need to be public");
5560 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5561 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5562 list_deep_free((yyvsp[(6) - (8)].params).list);
5572 /* Line 1464 of skeleton.m4 */
5573 #line 2476 "parser.y"
5574 {setstaticfunction((yyvsp[(1) - (3)].flags));}
5583 /* Line 1464 of skeleton.m4 */
5584 #line 2476 "parser.y"
5586 int flags = (yyvsp[(1) - (6)].flags);
5587 U8 access = flags2access((yyvsp[(1) - (6)].flags));
5589 varinfo_t* info = 0;
5591 memberinfo_t*i = registry_findmember(state->cls->info, (yyvsp[(3) - (6)].id), 1);
5593 check_override(i, flags);
5595 info = varinfo_register_onclass(state->cls->info, access, (yyvsp[(3) - (6)].id));
5597 slotinfo_t*i = registry_find(state->package, (yyvsp[(3) - (6)].id));
5599 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(3) - (6)].id));
5601 info = varinfo_register_global(access, state->package, (yyvsp[(3) - (6)].id));
5604 info->type = (yyvsp[(5) - (6)].classinfo);
5605 info->flags = flags;
5608 namespace_t mname_ns = {access, ""};
5609 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (6)].id)};
5611 trait_list_t**traits;
5615 mname_ns.name = state->package;
5616 traits = &global->init->traits;
5617 code = &global->init->method->body->code;
5618 } else if(flags&FLAG_STATIC) {
5620 traits = &state->cls->abc->static_traits;
5621 code = &state->cls->static_init->header;
5623 // instance variable
5624 traits = &state->cls->abc->traits;
5625 code = &state->cls->init->header;
5629 if((yyvsp[(5) - (6)].classinfo)) {
5630 MULTINAME(m, (yyvsp[(5) - (6)].classinfo));
5631 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5633 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5635 info->slot = t->slot_id;
5637 /* initalization code (if needed) */
5639 if((yyvsp[(6) - (6)].value).c && !is_pushundefined((yyvsp[(6) - (6)].value).c)) {
5640 c = abc_getlocal_0(c);
5641 c = code_append(c, (yyvsp[(6) - (6)].value).c);
5642 c = converttype(c, (yyvsp[(6) - (6)].value).t, (yyvsp[(5) - (6)].classinfo));
5643 c = abc_setslot(c, t->slot_id);
5646 *code = code_append(*code, c);
5648 if((yyvsp[(2) - (6)].token)==KW_CONST) {
5649 t->kind= TRAIT_CONST;
5653 setstaticfunction(0);
5663 /* Line 1464 of skeleton.m4 */
5664 #line 2549 "parser.y"
5665 {(yyval.constant)=0;}
5674 /* Line 1464 of skeleton.m4 */
5675 #line 2550 "parser.y"
5676 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5685 /* Line 1464 of skeleton.m4 */
5686 #line 2552 "parser.y"
5687 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5696 /* Line 1464 of skeleton.m4 */
5697 #line 2553 "parser.y"
5698 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5707 /* Line 1464 of skeleton.m4 */
5708 #line 2554 "parser.y"
5709 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5718 /* Line 1464 of skeleton.m4 */
5719 #line 2555 "parser.y"
5720 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5729 /* Line 1464 of skeleton.m4 */
5730 #line 2556 "parser.y"
5731 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5740 /* Line 1464 of skeleton.m4 */
5741 #line 2558 "parser.y"
5742 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5751 /* Line 1464 of skeleton.m4 */
5752 #line 2559 "parser.y"
5753 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5762 /* Line 1464 of skeleton.m4 */
5763 #line 2560 "parser.y"
5764 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5773 /* Line 1464 of skeleton.m4 */
5774 #line 2561 "parser.y"
5777 as3_warning("Couldn't resolve %s", (yyvsp[(1) - (1)].id));
5778 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5788 /* Line 1464 of skeleton.m4 */
5789 #line 2570 "parser.y"
5792 memset(&(yyval.params),0,sizeof((yyval.params)));
5802 /* Line 1464 of skeleton.m4 */
5803 #line 2574 "parser.y"
5806 (yyval.params)=(yyvsp[(1) - (1)].params);
5816 /* Line 1464 of skeleton.m4 */
5817 #line 2580 "parser.y"
5820 memset(&(yyval.params),0,sizeof((yyval.params)));
5821 (yyval.params).varargs=1;
5822 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5832 /* Line 1464 of skeleton.m4 */
5833 #line 2586 "parser.y"
5836 (yyval.params) =(yyvsp[(1) - (4)].params);
5837 (yyval.params).varargs=1;
5838 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5848 /* Line 1464 of skeleton.m4 */
5849 #line 2594 "parser.y"
5852 (yyval.params) = (yyvsp[(1) - (3)].params);
5853 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5863 /* Line 1464 of skeleton.m4 */
5864 #line 2599 "parser.y"
5867 memset(&(yyval.params),0,sizeof((yyval.params)));
5868 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5878 /* Line 1464 of skeleton.m4 */
5879 #line 2605 "parser.y"
5882 (yyval.param) = rfx_calloc(sizeof(param_t));
5883 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5884 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5886 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5896 /* Line 1464 of skeleton.m4 */
5897 #line 2613 "parser.y"
5900 (yyval.param) = rfx_calloc(sizeof(param_t));
5901 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5902 (yyval.param)->type = TYPE_ANY;
5904 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5914 /* Line 1464 of skeleton.m4 */
5915 #line 2623 "parser.y"
5916 {PASS12 (yyval.token)=0;}
5925 /* Line 1464 of skeleton.m4 */
5926 #line 2626 "parser.y"
5927 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5936 /* Line 1464 of skeleton.m4 */
5937 #line 2627 "parser.y"
5940 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
5942 if(!state->method->info) syntaxerror("internal error");
5944 code_t*c = method_header(state->method);
5945 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5947 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5949 list_deep_free((yyvsp[(6) - (12)].params).list);
5960 /* Line 1464 of skeleton.m4 */
5961 #line 2643 "parser.y"
5962 {PASS12 (yyval.id)=0;}
5971 /* Line 1464 of skeleton.m4 */
5972 #line 2645 "parser.y"
5973 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5982 /* Line 1464 of skeleton.m4 */
5983 #line 2646 "parser.y"
5986 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
5988 methodinfo_t*f = state->method->info;
5989 if(!f || !f->kind) syntaxerror("internal error");
5991 code_t*c = method_header(state->method);
5992 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5994 int index = state->method->var_index;
5995 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5997 (yyval.value).c = abc_getlocal(0, index);
5998 (yyval.value).t = TYPE_FUNCTION(f);
6000 PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
6010 /* Line 1464 of skeleton.m4 */
6011 #line 2668 "parser.y"
6013 PASS1 (yyval.classinfo)=0;
6015 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
6016 if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
6017 (yyval.classinfo) = (classinfo_t*)s;
6027 /* Line 1464 of skeleton.m4 */
6028 #line 2676 "parser.y"
6030 PASS1 static classinfo_t c;
6031 memset(&c, 0, sizeof(c));
6032 c.package = (yyvsp[(1) - (3)].id);
6033 c.name = (yyvsp[(3) - (3)].id);
6034 (yyval.classinfo)=&c;
6036 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6037 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
6038 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
6039 (yyval.classinfo) = (classinfo_t*)s;
6049 /* Line 1464 of skeleton.m4 */
6050 #line 2692 "parser.y"
6051 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
6060 /* Line 1464 of skeleton.m4 */
6061 #line 2693 "parser.y"
6062 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
6071 /* Line 1464 of skeleton.m4 */
6072 #line 2695 "parser.y"
6073 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
6082 /* Line 1464 of skeleton.m4 */
6083 #line 2696 "parser.y"
6084 {(yyval.classinfo)=registry_getanytype();}
6093 /* Line 1464 of skeleton.m4 */
6094 #line 2697 "parser.y"
6095 {(yyval.classinfo)=registry_getanytype();}
6104 /* Line 1464 of skeleton.m4 */
6105 #line 2706 "parser.y"
6106 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
6115 /* Line 1464 of skeleton.m4 */
6116 #line 2707 "parser.y"
6117 {(yyval.classinfo)=0;}
6126 /* Line 1464 of skeleton.m4 */
6127 #line 2711 "parser.y"
6128 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6137 /* Line 1464 of skeleton.m4 */
6138 #line 2712 "parser.y"
6139 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6148 /* Line 1464 of skeleton.m4 */
6149 #line 2714 "parser.y"
6150 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6159 /* Line 1464 of skeleton.m4 */
6160 #line 2718 "parser.y"
6161 {(yyval.value_list).len=1;
6162 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6172 /* Line 1464 of skeleton.m4 */
6173 #line 2722 "parser.y"
6174 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6183 /* Line 1464 of skeleton.m4 */
6184 #line 2723 "parser.y"
6186 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6187 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6197 /* Line 1464 of skeleton.m4 */
6198 #line 2729 "parser.y"
6200 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6201 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6203 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6204 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6205 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6206 (yyval.value).c = code_cutlast((yyval.value).c);
6207 (yyval.value).c = code_append((yyval.value).c, paramcode);
6208 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6209 multiname_destroy(name);
6210 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6211 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6212 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
6213 multiname_t*name = t->name;
6214 (yyval.value).c = code_cutlast((yyval.value).c);
6215 (yyval.value).c = code_append((yyval.value).c, paramcode);
6216 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6218 (yyval.value).c = code_append((yyval.value).c, paramcode);
6219 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6222 (yyval.value).t = TYPE_ANY;
6223 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6224 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6226 (yyval.value).c = abc_coerce_a((yyval.value).c);
6227 (yyval.value).t = TYPE_ANY;
6238 /* Line 1464 of skeleton.m4 */
6239 #line 2765 "parser.y"
6242 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6243 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6244 (yyval.value).c = code_cutlast((yyval.value).c);
6246 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6248 (yyval.value).t = TYPE_ANY;
6249 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6250 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6251 (yyval.value).c = code_cutlast((yyval.value).c);
6252 (yyval.value).c = code_append((yyval.value).c, paramcode);
6253 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6254 multiname_destroy(name);
6255 } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
6256 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6257 trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
6258 if(t->kind!=TRAIT_METHOD) {
6259 //ok: flash allows to assign closures to members.
6261 multiname_t*name = t->name;
6262 (yyval.value).c = code_cutlast((yyval.value).c);
6263 (yyval.value).c = code_append((yyval.value).c, paramcode);
6264 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6265 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6266 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6267 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6268 (yyval.value).c = code_cutlast((yyval.value).c);
6269 (yyval.value).c = code_append((yyval.value).c, paramcode);
6270 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6271 multiname_destroy(name);
6273 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6274 (yyval.value).c = code_append((yyval.value).c, paramcode);
6275 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6278 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6279 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6281 (yyval.value).c = abc_coerce_a((yyval.value).c);
6282 (yyval.value).t = TYPE_ANY;
6293 /* Line 1464 of skeleton.m4 */
6294 #line 2811 "parser.y"
6296 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6297 if(!state->method) syntaxerror("super() not allowed outside of a function");
6298 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6300 (yyval.value).c = code_new();
6301 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6303 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6305 this is dependent on the control path, check this somewhere else
6306 if(state->method->has_super)
6307 syntaxerror("constructor may call super() only once");
6309 state->method->has_super = 1;
6311 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6312 (yyval.value).c = abc_pushundefined((yyval.value).c);
6313 (yyval.value).t = TYPE_ANY;
6323 /* Line 1464 of skeleton.m4 */
6324 #line 2832 "parser.y"
6326 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6327 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6328 (yyval.value).c = code_cutlast((yyval.value).c);
6330 multiname_t*name = 0;
6331 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6332 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6333 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6334 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6335 multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
6336 (yyval.value).c = code_cutlast((yyval.value).c);
6337 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6339 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6340 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6341 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6343 (yyval.value).t = TYPE_BOOLEAN;
6353 /* Line 1464 of skeleton.m4 */
6354 #line 2853 "parser.y"
6356 (yyval.code) = abc_returnvoid(0);
6366 /* Line 1464 of skeleton.m4 */
6367 #line 2856 "parser.y"
6369 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6370 (yyval.code) = abc_returnvalue((yyval.code));
6380 /* Line 1464 of skeleton.m4 */
6381 #line 2863 "parser.y"
6382 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6391 /* Line 1464 of skeleton.m4 */
6392 #line 2864 "parser.y"
6393 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6402 /* Line 1464 of skeleton.m4 */
6403 #line 2865 "parser.y"
6405 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6406 (yyval.value).c = cut_last_push((yyval.value).c);
6407 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6408 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6418 /* Line 1464 of skeleton.m4 */
6419 #line 2871 "parser.y"
6421 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6431 /* Line 1464 of skeleton.m4 */
6432 #line 2877 "parser.y"
6433 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6442 /* Line 1464 of skeleton.m4 */
6443 #line 2881 "parser.y"
6444 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6453 /* Line 1464 of skeleton.m4 */
6454 #line 2883 "parser.y"
6455 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6464 /* Line 1464 of skeleton.m4 */
6465 #line 2885 "parser.y"
6466 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6475 /* Line 1464 of skeleton.m4 */
6476 #line 2889 "parser.y"
6478 (yyval.value).c = 0;
6479 namespace_t ns = {ACCESS_PACKAGE, ""};
6480 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6481 if(!(yyvsp[(1) - (1)].regexp).options) {
6482 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6483 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6484 (yyval.value).c = abc_construct((yyval.value).c, 1);
6486 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6487 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6488 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6489 (yyval.value).c = abc_construct((yyval.value).c, 2);
6491 (yyval.value).t = TYPE_REGEXP;
6501 /* Line 1464 of skeleton.m4 */
6502 #line 2906 "parser.y"
6503 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6504 //MULTINAME(m, registry_getintclass());
6505 //$$.c = abc_coerce2($$.c, &m); // FIXME
6506 (yyval.value).t = TYPE_INT;
6516 /* Line 1464 of skeleton.m4 */
6517 #line 2911 "parser.y"
6518 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6519 (yyval.value).t = TYPE_INT;
6529 /* Line 1464 of skeleton.m4 */
6530 #line 2914 "parser.y"
6531 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6532 (yyval.value).t = TYPE_INT;
6542 /* Line 1464 of skeleton.m4 */
6543 #line 2917 "parser.y"
6544 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6545 (yyval.value).t = TYPE_UINT;
6555 /* Line 1464 of skeleton.m4 */
6556 #line 2920 "parser.y"
6557 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6558 (yyval.value).t = TYPE_FLOAT;
6568 /* Line 1464 of skeleton.m4 */
6569 #line 2923 "parser.y"
6570 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6571 (yyval.value).t = TYPE_STRING;
6581 /* Line 1464 of skeleton.m4 */
6582 #line 2926 "parser.y"
6583 {(yyval.value).c = abc_pushundefined(0);
6584 (yyval.value).t = TYPE_ANY;
6594 /* Line 1464 of skeleton.m4 */
6595 #line 2929 "parser.y"
6596 {(yyval.value).c = abc_pushtrue(0);
6597 (yyval.value).t = TYPE_BOOLEAN;
6607 /* Line 1464 of skeleton.m4 */
6608 #line 2932 "parser.y"
6609 {(yyval.value).c = abc_pushfalse(0);
6610 (yyval.value).t = TYPE_BOOLEAN;
6620 /* Line 1464 of skeleton.m4 */
6621 #line 2935 "parser.y"
6622 {(yyval.value).c = abc_pushnull(0);
6623 (yyval.value).t = TYPE_NULL;
6633 /* Line 1464 of skeleton.m4 */
6634 #line 2939 "parser.y"
6635 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
6636 (yyval.value).t = TYPE_BOOLEAN;
6646 /* Line 1464 of skeleton.m4 */
6647 #line 2942 "parser.y"
6648 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6649 (yyval.value).t = TYPE_BOOLEAN;
6659 /* Line 1464 of skeleton.m4 */
6660 #line 2945 "parser.y"
6661 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
6662 (yyval.value).t = TYPE_BOOLEAN;
6672 /* Line 1464 of skeleton.m4 */
6673 #line 2948 "parser.y"
6674 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6675 (yyval.value).t = TYPE_BOOLEAN;
6685 /* Line 1464 of skeleton.m4 */
6686 #line 2951 "parser.y"
6687 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6688 (yyval.value).t = TYPE_BOOLEAN;
6698 /* Line 1464 of skeleton.m4 */
6699 #line 2954 "parser.y"
6700 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6701 (yyval.value).t = TYPE_BOOLEAN;
6711 /* Line 1464 of skeleton.m4 */
6712 #line 2957 "parser.y"
6713 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
6714 (yyval.value).t = TYPE_BOOLEAN;
6724 /* Line 1464 of skeleton.m4 */
6725 #line 2960 "parser.y"
6726 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
6727 (yyval.value).t = TYPE_BOOLEAN;
6737 /* Line 1464 of skeleton.m4 */
6738 #line 2964 "parser.y"
6739 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6740 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6741 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6742 (yyval.value).c = abc_dup((yyval.value).c);
6743 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6744 (yyval.value).c = cut_last_push((yyval.value).c);
6745 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6746 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6747 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6748 jmp->branch = label;
6758 /* Line 1464 of skeleton.m4 */
6759 #line 2975 "parser.y"
6761 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6762 /*printf("%08x:\n",$1.t);
6763 code_dump($1.c, 0, 0, "", stdout);
6764 printf("%08x:\n",$3.t);
6765 code_dump($3.c, 0, 0, "", stdout);
6766 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6767 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6768 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6769 (yyval.value).c = abc_dup((yyval.value).c);
6770 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6771 (yyval.value).c = cut_last_push((yyval.value).c);
6772 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6773 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6774 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6775 jmp->branch = label;
6785 /* Line 1464 of skeleton.m4 */
6786 #line 2993 "parser.y"
6787 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6788 (yyval.value).c = abc_not((yyval.value).c);
6789 (yyval.value).t = TYPE_BOOLEAN;
6799 /* Line 1464 of skeleton.m4 */
6800 #line 2998 "parser.y"
6801 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6802 (yyval.value).c = abc_bitnot((yyval.value).c);
6803 (yyval.value).t = TYPE_INT;
6813 /* Line 1464 of skeleton.m4 */
6814 #line 3003 "parser.y"
6815 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6816 (yyval.value).c = abc_bitand((yyval.value).c);
6817 (yyval.value).t = TYPE_INT;
6827 /* Line 1464 of skeleton.m4 */
6828 #line 3008 "parser.y"
6829 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6830 (yyval.value).c = abc_bitxor((yyval.value).c);
6831 (yyval.value).t = TYPE_INT;
6841 /* Line 1464 of skeleton.m4 */
6842 #line 3013 "parser.y"
6843 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6844 (yyval.value).c = abc_bitor((yyval.value).c);
6845 (yyval.value).t = TYPE_INT;
6855 /* Line 1464 of skeleton.m4 */
6856 #line 3018 "parser.y"
6857 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6858 (yyval.value).c = abc_rshift((yyval.value).c);
6859 (yyval.value).t = TYPE_INT;
6869 /* Line 1464 of skeleton.m4 */
6870 #line 3022 "parser.y"
6871 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6872 (yyval.value).c = abc_urshift((yyval.value).c);
6873 (yyval.value).t = TYPE_INT;
6883 /* Line 1464 of skeleton.m4 */
6884 #line 3026 "parser.y"
6885 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6886 (yyval.value).c = abc_lshift((yyval.value).c);
6887 (yyval.value).t = TYPE_INT;
6897 /* Line 1464 of skeleton.m4 */
6898 #line 3031 "parser.y"
6899 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6900 (yyval.value).c = abc_divide((yyval.value).c);
6901 (yyval.value).t = TYPE_NUMBER;
6911 /* Line 1464 of skeleton.m4 */
6912 #line 3035 "parser.y"
6913 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6914 (yyval.value).c = abc_modulo((yyval.value).c);
6915 (yyval.value).t = TYPE_NUMBER;
6925 /* Line 1464 of skeleton.m4 */
6926 #line 3039 "parser.y"
6927 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6928 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6929 (yyval.value).c = abc_add_i((yyval.value).c);
6930 (yyval.value).t = TYPE_INT;
6932 (yyval.value).c = abc_add((yyval.value).c);
6933 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6944 /* Line 1464 of skeleton.m4 */
6945 #line 3048 "parser.y"
6946 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6947 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6948 (yyval.value).c = abc_subtract_i((yyval.value).c);
6949 (yyval.value).t = TYPE_INT;
6951 (yyval.value).c = abc_subtract((yyval.value).c);
6952 (yyval.value).t = TYPE_NUMBER;
6963 /* Line 1464 of skeleton.m4 */
6964 #line 3057 "parser.y"
6965 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6966 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6967 (yyval.value).c = abc_multiply_i((yyval.value).c);
6968 (yyval.value).t = TYPE_INT;
6970 (yyval.value).c = abc_multiply((yyval.value).c);
6971 (yyval.value).t = TYPE_NUMBER;
6982 /* Line 1464 of skeleton.m4 */
6983 #line 3067 "parser.y"
6984 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6985 (yyval.value).c = abc_in((yyval.value).c);
6986 (yyval.value).t = TYPE_BOOLEAN;
6996 /* Line 1464 of skeleton.m4 */
6997 #line 3072 "parser.y"
6998 {char use_astype=0; // flash player's astype works differently than astypelate
6999 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
7000 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
7001 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
7002 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
7004 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7005 (yyval.value).c = abc_astypelate((yyval.value).c);
7006 (yyval.value).t = TYPE_ANY;
7017 /* Line 1464 of skeleton.m4 */
7018 #line 3085 "parser.y"
7019 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7020 (yyval.value).c = abc_instanceof((yyval.value).c);
7021 (yyval.value).t = TYPE_BOOLEAN;
7031 /* Line 1464 of skeleton.m4 */
7032 #line 3090 "parser.y"
7033 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
7034 (yyval.value).c = abc_istypelate((yyval.value).c);
7035 (yyval.value).t = TYPE_BOOLEAN;
7045 /* Line 1464 of skeleton.m4 */
7046 #line 3095 "parser.y"
7048 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
7049 (yyval.value).c = abc_typeof((yyval.value).c);
7050 (yyval.value).t = TYPE_STRING;
7060 /* Line 1464 of skeleton.m4 */
7061 #line 3101 "parser.y"
7063 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
7064 (yyval.value).c = abc_pushundefined((yyval.value).c);
7065 (yyval.value).t = TYPE_ANY;
7075 /* Line 1464 of skeleton.m4 */
7076 #line 3107 "parser.y"
7077 { (yyval.value).c = abc_pushundefined(0);
7078 (yyval.value).t = TYPE_ANY;
7088 /* Line 1464 of skeleton.m4 */
7089 #line 3111 "parser.y"
7090 {(yyval.value)=(yyvsp[(2) - (3)].value);}
7099 /* Line 1464 of skeleton.m4 */
7100 #line 3113 "parser.y"
7102 (yyval.value)=(yyvsp[(2) - (2)].value);
7103 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
7104 (yyval.value).c=abc_negate_i((yyval.value).c);
7105 (yyval.value).t = TYPE_INT;
7107 (yyval.value).c=abc_negate((yyval.value).c);
7108 (yyval.value).t = TYPE_NUMBER;
7119 /* Line 1464 of skeleton.m4 */
7120 #line 3124 "parser.y"
7122 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
7123 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
7125 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
7126 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7127 (yyval.value).t = 0; // array elements have unknown type
7137 /* Line 1464 of skeleton.m4 */
7138 #line 3133 "parser.y"
7140 (yyval.value).c = code_new();
7141 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7142 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
7143 (yyval.value).t = registry_getarrayclass();
7153 /* Line 1464 of skeleton.m4 */
7154 #line 3140 "parser.y"
7155 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7164 /* Line 1464 of skeleton.m4 */
7165 #line 3141 "parser.y"
7166 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7175 /* Line 1464 of skeleton.m4 */
7176 #line 3143 "parser.y"
7178 (yyval.value_list).cc = 0;
7179 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7180 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7181 (yyval.value_list).len = 2;
7191 /* Line 1464 of skeleton.m4 */
7192 #line 3149 "parser.y"
7194 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7195 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7196 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7197 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7207 /* Line 1464 of skeleton.m4 */
7208 #line 3158 "parser.y"
7210 (yyval.value).c = code_new();
7211 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7212 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7213 (yyval.value).t = registry_getobjectclass();
7223 /* Line 1464 of skeleton.m4 */
7224 #line 3165 "parser.y"
7226 code_t*c = (yyvsp[(3) - (3)].value).c;
7227 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7228 c=abc_multiply_i(c);
7232 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7233 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7234 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7244 /* Line 1464 of skeleton.m4 */
7245 #line 3177 "parser.y"
7247 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7248 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7249 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7250 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7260 /* Line 1464 of skeleton.m4 */
7261 #line 3183 "parser.y"
7263 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7264 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7265 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7266 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7276 /* Line 1464 of skeleton.m4 */
7277 #line 3189 "parser.y"
7279 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7280 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7281 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7282 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7292 /* Line 1464 of skeleton.m4 */
7293 #line 3195 "parser.y"
7295 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7296 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7297 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7298 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7308 /* Line 1464 of skeleton.m4 */
7309 #line 3201 "parser.y"
7311 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7312 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7313 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7314 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7324 /* Line 1464 of skeleton.m4 */
7325 #line 3207 "parser.y"
7327 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7328 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7329 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7330 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7340 /* Line 1464 of skeleton.m4 */
7341 #line 3213 "parser.y"
7343 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7344 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7345 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7346 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7356 /* Line 1464 of skeleton.m4 */
7357 #line 3219 "parser.y"
7359 code_t*c = (yyvsp[(3) - (3)].value).c;
7361 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7365 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7368 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7369 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7379 /* Line 1464 of skeleton.m4 */
7380 #line 3232 "parser.y"
7381 { code_t*c = (yyvsp[(3) - (3)].value).c;
7382 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7383 c=abc_subtract_i(c);
7386 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7389 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7390 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7400 /* Line 1464 of skeleton.m4 */
7401 #line 3243 "parser.y"
7403 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7404 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7405 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7406 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7416 /* Line 1464 of skeleton.m4 */
7417 #line 3250 "parser.y"
7419 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7420 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7421 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7422 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7423 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7424 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7425 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7426 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7427 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
7428 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7438 /* Line 1464 of skeleton.m4 */
7439 #line 3263 "parser.y"
7441 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7442 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7443 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7444 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7445 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7446 (yyval.value).c = abc_getlocal(0, nr);
7447 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7448 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7449 (yyval.value).c = abc_getlocal(0, nr);
7450 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7451 } else syntaxerror("internal error");
7453 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7454 c=abc_increment_i(c);
7460 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7461 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7462 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7473 /* Line 1464 of skeleton.m4 */
7474 #line 3290 "parser.y"
7476 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7477 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7478 c=abc_decrement_i(c);
7484 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7485 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7486 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7496 /* Line 1464 of skeleton.m4 */
7497 #line 3304 "parser.y"
7499 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7500 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7501 c=abc_increment_i(c);
7507 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7508 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7509 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7519 /* Line 1464 of skeleton.m4 */
7520 #line 3318 "parser.y"
7522 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7523 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7524 c=abc_decrement_i(c);
7530 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7531 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7532 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7542 /* Line 1464 of skeleton.m4 */
7543 #line 3333 "parser.y"
7544 { if(!state->cls->info)
7545 syntaxerror("super keyword not allowed outside a class");
7546 classinfo_t*t = state->cls->info->superclass;
7547 if(!t) t = TYPE_OBJECT;
7549 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7550 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7551 (yyval.value).c = 0;
7552 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7553 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7554 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7564 /* Line 1464 of skeleton.m4 */
7565 #line 3346 "parser.y"
7568 (yyval.value).c = abc_pushundefined(0);
7569 (yyval.value).t = 0;
7570 as3_warning("ignored @ operator");
7580 /* Line 1464 of skeleton.m4 */
7581 #line 3353 "parser.y"
7583 // child attribute TODO
7584 (yyval.value).c = abc_pushundefined(0);
7585 (yyval.value).t = 0;
7586 as3_warning("ignored .@ operator");
7596 /* Line 1464 of skeleton.m4 */
7597 #line 3360 "parser.y"
7599 // namespace declaration TODO
7600 (yyval.value).c = abc_pushundefined(0);
7601 (yyval.value).t = 0;
7602 as3_warning("ignored :: operator");
7612 /* Line 1464 of skeleton.m4 */
7613 #line 3367 "parser.y"
7616 (yyval.value).c = abc_pushundefined(0);
7617 (yyval.value).t = 0;
7618 as3_warning("ignored .. operator");
7628 /* Line 1464 of skeleton.m4 */
7629 #line 3374 "parser.y"
7632 (yyval.value).c = abc_pushundefined(0);
7633 (yyval.value).t = 0;
7634 as3_warning("ignored .() operator");
7644 /* Line 1464 of skeleton.m4 */
7645 #line 3386 "parser.y"
7646 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7647 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7649 if(TYPE_IS_CLASS(t) && t->data) {
7654 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7656 if(f && !is_static != !(f->flags&FLAG_STATIC))
7658 if(f && f->slot && !noslot) {
7659 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7661 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7662 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7664 /* determine type */
7665 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7666 if(!(yyval.value).t)
7667 (yyval.value).c = abc_coerce_a((yyval.value).c);
7669 /* when resolving a property on an unknown type, we do know the
7670 name of the property (and don't seem to need the package), but
7671 we need to make avm2 try out all access modes */
7672 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7673 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7674 (yyval.value).c = abc_coerce_a((yyval.value).c);
7675 (yyval.value).t = registry_getanytype();
7686 /* Line 1464 of skeleton.m4 */
7687 #line 3419 "parser.y"
7690 /* Queue unresolved identifiers for checking against the parent
7691 function's variables.
7692 We consider everything which is not a local variable "unresolved".
7693 This encompasses class names, members of the surrounding class
7694 etc. which *correct* because local variables of the parent function
7697 if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
7698 unknown_variable((yyvsp[(1) - (1)].id));
7702 (yyval.value).t = 0;
7703 (yyval.value).c = 0;
7708 /* look at variables */
7709 if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
7710 // $1 is a local variable
7711 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7712 (yyval.value).t = v->type;
7715 if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
7716 (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
7717 (yyval.value).c = abc_getslot((yyval.value).c, v->index);
7718 (yyval.value).t = v->type;
7722 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7724 /* look at current class' members */
7725 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7726 (f->flags&FLAG_STATIC) >= i_am_static) {
7727 // $1 is a function in this class
7728 int var_is_static = (f->flags&FLAG_STATIC);
7730 if(f->kind == INFOTYPE_METHOD) {
7731 (yyval.value).t = TYPE_FUNCTION(f);
7733 (yyval.value).t = f->type;
7735 if(var_is_static && !i_am_static) {
7736 /* access to a static member from a non-static location.
7737 do this via findpropstrict:
7738 there doesn't seem to be any non-lookup way to access
7739 static properties of a class */
7740 state->method->late_binding = 1;
7741 (yyval.value).t = f->type;
7742 namespace_t ns = {f->access, ""};
7743 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7744 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7745 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7747 } else if(f->slot>0) {
7748 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7749 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7752 namespace_t ns = {f->access, ""};
7753 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7754 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7755 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7760 /* look at actual classes, in the current package and imported */
7761 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7762 if(a->access == ACCESS_PACKAGEINTERNAL &&
7763 strcmp(a->package, state->package) &&
7764 strcmp(a->package, internal_filename_package)
7766 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
7767 infotypename(a),(yyvsp[(1) - (1)].id), a->package, state->package);
7769 if(a->kind != INFOTYPE_CLASS) {
7771 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7772 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7773 if(a->kind == INFOTYPE_METHOD) {
7774 methodinfo_t*f = (methodinfo_t*)a;
7775 (yyval.value).t = TYPE_FUNCTION(f);
7777 varinfo_t*v = (varinfo_t*)a;
7778 (yyval.value).t = v->type;
7781 classinfo_t*c = (classinfo_t*)a;
7783 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7784 (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
7787 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7789 (yyval.value).t = TYPE_CLASS(c);
7794 /* unknown object, let the avm2 resolve it */
7796 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7797 state->method->late_binding = 1;
7799 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7801 (yyval.value).t = 0;
7802 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7803 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7814 /* Line 1464 of skeleton.m4 */
7815 #line 3540 "parser.y"
7825 /* Line 1464 of skeleton.m4 */
7826 #line 3541 "parser.y"
7836 /* Line 1464 of skeleton.m4 */
7837 #line 3542 "parser.y"
7847 /* Line 1464 of skeleton.m4 */
7848 #line 3544 "parser.y"
7851 tokenizer_register_namespace((yyvsp[(3) - (3)].id));
7860 /* Line 1464 of skeleton.m4 */
7861 #line 7862 "parser.tab.c"
7864 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7868 YY_STACK_PRINT (yyss, yyssp);
7872 /* Now `shift' the result of the reduction. Determine what state
7873 that goes to, based on the state we popped back to and the rule
7874 number reduced by. */
7878 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7879 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7880 yystate = yytable[yystate];
7882 yystate = yydefgoto[yyn - YYNTOKENS];
7887 /*------------------------------------.
7888 | yyerrlab -- here on detecting error |
7889 `------------------------------------*/
7891 /* If not already recovering from an error, report this error. */
7895 #if ! YYERROR_VERBOSE
7896 yyerror (YY_("syntax error"));
7899 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7900 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7902 YYSIZE_T yyalloc = 2 * yysize;
7903 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7904 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7905 if (yymsg != yymsgbuf)
7906 YYSTACK_FREE (yymsg);
7907 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7909 yymsg_alloc = yyalloc;
7913 yymsg_alloc = sizeof yymsgbuf;
7917 if (0 < yysize && yysize <= yymsg_alloc)
7919 (void) yysyntax_error (yymsg, yystate, yychar);
7924 yyerror (YY_("syntax error"));
7926 goto yyexhaustedlab;
7934 if (yyerrstatus == 3)
7936 /* If just tried and failed to reuse lookahead token after an
7937 error, discard it. */
7939 if (yychar <= YYEOF)
7941 /* Return failure if at end of input. */
7942 if (yychar == YYEOF)
7947 yydestruct ("Error: discarding",
7953 /* Else will try to reuse lookahead token after shifting the error
7958 /*---------------------------------------------------.
7959 | yyerrorlab -- error raised explicitly by YYERROR. |
7960 `---------------------------------------------------*/
7963 /* Pacify compilers like GCC when the user code never invokes
7964 YYERROR and the label yyerrorlab therefore never appears in user
7966 if (/*CONSTCOND*/ 0)
7969 /* Do not reclaim the symbols of the rule which action triggered
7973 YY_STACK_PRINT (yyss, yyssp);
7978 /*-------------------------------------------------------------.
7979 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7980 `-------------------------------------------------------------*/
7982 yyerrstatus = 3; /* Each real token shifted decrements this. */
7986 yyn = yypact[yystate];
7987 if (yyn != YYPACT_NINF)
7990 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7998 /* Pop the current state because it cannot handle the error token. */
8003 yydestruct ("Error: popping",
8004 yystos[yystate], yyvsp);
8007 YY_STACK_PRINT (yyss, yyssp);
8013 /* Shift the error token. */
8014 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8020 /*-------------------------------------.
8021 | yyacceptlab -- YYACCEPT comes here. |
8022 `-------------------------------------*/
8027 /*-----------------------------------.
8028 | yyabortlab -- YYABORT comes here. |
8029 `-----------------------------------*/
8034 #if !defined(yyoverflow) || YYERROR_VERBOSE
8035 /*-------------------------------------------------.
8036 | yyexhaustedlab -- memory exhaustion comes here. |
8037 `-------------------------------------------------*/
8039 yyerror (YY_("memory exhausted"));
8045 if (yychar != YYEMPTY)
8046 yydestruct ("Cleanup: discarding lookahead",
8048 /* Do not reclaim the symbols of the rule which action triggered
8049 this YYABORT or YYACCEPT. */
8051 YY_STACK_PRINT (yyss, yyssp);
8052 while (yyssp != yyss)
8054 yydestruct ("Cleanup: popping",
8055 yystos[*yyssp], yyvsp);
8060 YYSTACK_FREE (yyss);
8063 if (yymsg != yymsgbuf)
8064 YYSTACK_FREE (yymsg);
8066 /* Make sure YYID is used. */
8067 return YYID (yyresult);