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 {
351 int var_index; // for inner methods
354 abc_exception_list_t*exceptions;
356 methodstate_list_t*innerfunctions;
359 typedef struct _state {
364 import_list_t*wildcard_imports;
366 char has_own_imports;
367 char new_vars; // e.g. transition between two functions
370 methodstate_t*method;
377 typedef struct _global {
381 dict_t*file2token2info;
384 static global_t*global = 0;
385 static state_t* state = 0;
389 #define MULTINAME(m,x) \
393 registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
395 #define MEMBER_MULTINAME(m,f,n) \
399 m##_ns.access = (f)->access; \
403 m.namespace_set = 0; \
406 m.type = MULTINAME; \
408 m.namespace_set = &nopackage_namespace_set; \
412 /* warning: list length of namespace set is undefined */
413 #define MULTINAME_LATE(m, access, package) \
414 namespace_t m##_ns = {access, package}; \
415 namespace_set_t m##_nsset; \
416 namespace_list_t m##_l;m##_l.next = 0; \
417 m##_nsset.namespaces = &m##_l; \
418 m##_nsset = m##_nsset; \
419 m##_l.namespace = &m##_ns; \
420 multiname_t m = {MULTINAMEL, 0, &m##_nsset, 0};
422 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
423 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
424 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
425 static namespace_t ns4 = {ACCESS_PACKAGE, ""};
426 static namespace_list_t nl4 = {&ns4,0};
427 static namespace_list_t nl3 = {&ns3,&nl4};
428 static namespace_list_t nl2 = {&ns2,&nl3};
429 static namespace_list_t nl1 = {&ns1,&nl2};
430 static namespace_set_t nopackage_namespace_set = {&nl1};
432 static void new_state()
435 state_t*oldstate = state;
437 memcpy(s, state, sizeof(state_t)); //shallow copy
439 s->imports = dict_new();
443 state->has_own_imports = 0;
444 state->vars = dict_new();
445 state->old = oldstate;
447 static void state_has_imports()
449 state->wildcard_imports = list_clone(state->wildcard_imports);
450 state->imports = dict_clone(state->imports);
451 state->has_own_imports = 1;
454 static void state_destroy(state_t*state)
456 if(state->has_own_imports) {
457 list_free(state->wildcard_imports);
458 dict_destroy(state->imports);state->imports=0;
460 if(state->imports && (!state->old || state->old->imports!=state->imports)) {
461 dict_destroy(state->imports);state->imports=0;
465 for(t=0;t<state->vars->hashsize;t++) {
466 dictentry_t*e =state->vars->slots[t];
468 free(e->data);e->data=0;
472 dict_destroy(state->vars);state->vars=0;
478 static void old_state()
480 if(!state || !state->old)
481 syntaxerror("invalid nesting");
482 state_t*leaving = state;
486 if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
487 free(leaving->method);
490 if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
495 state_destroy(leaving);
498 static code_t* method_header(methodstate_t*m);
499 static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
500 static void function_initvars(methodstate_t*m, params_t*params, int flags);
503 static char* internal_filename_package = 0;
504 void initialize_file(char*filename)
507 syntaxerror("invalid call to initialize_file during parsing of another file");
510 state->package = internal_filename_package = strdup(filename);
512 global->token2info = dict_lookup(global->file2token2info,
513 current_filename // use long version
515 if(!global->token2info) {
516 global->token2info = dict_new2(&ptr_type);
517 dict_put(global->file2token2info, current_filename, global->token2info);
521 state->method = rfx_calloc(sizeof(methodstate_t));
522 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
524 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
525 function_initvars(state->method, 0, 0);
526 global->init = abc_initscript(global->file);
527 state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
533 if(!state || state->level!=1) {
534 syntaxerror("unexpected end of file in pass %d", as3_pass);
538 code_t*header = method_header(state->method);
539 code_t*c = wrap_function(header, 0, global->init->method->body->code);
540 global->init->method->body->code = c;
541 free(state->method);state->method=0;
544 //free(state->package);state->package=0; // used in registry
545 state_destroy(state);state=0;
548 void initialize_parser()
550 global = rfx_calloc(sizeof(global_t));
551 global->file = abc_file_new();
552 global->file->flags &= ~ABCFILE_LAZY;
553 global->file2token2info = dict_new();
554 global->token2info = 0;
557 void* finish_parser()
559 dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
561 global->token2info=0;
567 static void xx_scopetest()
569 /* findpropstrict doesn't just return a scope object- it
570 also makes it "active" somehow. Push local_0 on the
571 scope stack and read it back with findpropstrict, it'll
572 contain properties like "trace". Trying to find the same
573 property on a "vanilla" local_0 yields only a "undefined" */
574 //c = abc_findpropstrict(c, "[package]::trace");
576 /*c = abc_getlocal_0(c);
577 c = abc_findpropstrict(c, "[package]::trace");
579 c = abc_setlocal_1(c);
581 c = abc_pushbyte(c, 0);
582 c = abc_setlocal_2(c);
584 code_t*xx = c = abc_label(c);
585 c = abc_findpropstrict(c, "[package]::trace");
586 c = abc_pushstring(c, "prop:");
587 c = abc_hasnext2(c, 1, 2);
589 c = abc_setlocal_3(c);
590 c = abc_callpropvoid(c, "[package]::trace", 2);
591 c = abc_getlocal_3(c);
593 c = abc_iftrue(c,xx);*/
597 typedef struct _variable {
603 static variable_t* find_variable(char*name)
609 v = dict_lookup(s->vars, name);
619 static variable_t* find_variable_safe(char*name)
621 variable_t* v = find_variable(name);
623 syntaxerror("undefined variable: %s", name);
626 static char variable_exists(char*name)
628 return dict_lookup(state->vars, name)!=0;
630 code_t*defaultvalue(code_t*c, classinfo_t*type);
631 static int new_variable(const char*name, classinfo_t*type, char init)
634 v->index = state->method->variable_count;
638 dict_put(state->vars, name, v);
640 return state->method->variable_count++;
642 #define TEMPVARNAME "__as3_temp__"
643 static int gettempvar()
645 variable_t*v = find_variable(TEMPVARNAME);
648 return new_variable(TEMPVARNAME, 0, 0);
651 code_t* var_block(code_t*body)
657 for(t=0;t<state->vars->hashsize;t++) {
658 dictentry_t*e = state->vars->slots[t];
660 variable_t*v = (variable_t*)e->data;
661 if(v->type && v->init) {
662 c = defaultvalue(c, v->type);
663 c = abc_setlocal(c, v->index);
664 k = abc_kill(k, v->index);
674 if(x->opcode== OPCODE___BREAK__ ||
675 x->opcode== OPCODE___CONTINUE__) {
676 /* link kill code before break/continue */
677 code_t*e = code_dup(k);
678 code_t*s = code_start(e);
690 c = code_append(c, body);
691 c = code_append(c, k);
695 #define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
697 static void parsererror(const char*file, int line, const char*f)
699 syntaxerror("internal error in %s, %s:%d", f, file, line);
703 static code_t* method_header(methodstate_t*m)
706 if(m->late_binding && !m->inner) {
707 c = abc_getlocal_0(c);
708 c = abc_pushscope(c);
710 /*if(m->innerfunctions) {
711 c = abc_newactivation(c);
712 c = abc_pushscope(c);
714 methodstate_list_t*l = m->innerfunctions;
716 parserassert(l->methodstate->abc);
717 c = abc_newfunction(c, l->methodstate->abc);
718 c = abc_setlocal(c, l->methodstate->var_index);
719 free(l->methodstate);l->methodstate=0;
723 c = code_append(c, m->header);
726 if(m->is_constructor && !m->has_super) {
727 // call default constructor
728 c = abc_getlocal_0(c);
729 c = abc_constructsuper(c, 0);
731 list_free(m->innerfunctions);
732 m->innerfunctions = 0;
737 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
739 c = code_append(c, header);
740 c = code_append(c, var_block(body));
741 /* append return if necessary */
742 if(!c || (c->opcode != OPCODE_RETURNVOID &&
743 c->opcode != OPCODE_RETURNVALUE)) {
744 c = abc_returnvoid(c);
750 static void startpackage(char*name)
753 /*printf("entering package \"%s\"\n", name);*/
754 state->package = strdup(name);
756 static void endpackage()
758 /*printf("leaving package \"%s\"\n", state->package);*/
760 //used e.g. in classinfo_register:
761 //free(state->package);state->package=0;
766 #define FLAG_PUBLIC 256
767 #define FLAG_PROTECTED 512
768 #define FLAG_PRIVATE 1024
769 #define FLAG_PACKAGEINTERNAL 2048
770 #define FLAG_NAMESPACE 4096
772 static int flags2access(int flags)
775 if(flags&FLAG_PUBLIC) {
776 if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
777 syntaxerror("invalid combination of access levels");
778 access = ACCESS_PACKAGE;
779 } else if(flags&FLAG_PRIVATE) {
780 if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
781 syntaxerror("invalid combination of access levels");
782 access = ACCESS_PRIVATE;
783 } else if(flags&FLAG_PROTECTED) {
784 if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
785 syntaxerror("invalid combination of access levels");
786 access = ACCESS_PROTECTED;
788 access = ACCESS_PACKAGEINTERNAL;
793 static void function_initvars(methodstate_t*m, params_t*params, int flags)
796 new_variable("this", 0, 0);
797 else if(!m->is_global)
798 new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0);
800 new_variable("globalscope", 0, 0);
804 for(p=params->list;p;p=p->next) {
805 new_variable(p->param->name, p->param->type, 0);
809 methodstate_list_t*l = m->innerfunctions;
811 methodstate_t*m = l->methodstate;
812 m->var_index = new_variable(m->info->name, TYPE_FUNCTION(m->info), 0);
818 char*as3_globalclass=0;
819 static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements)
822 syntaxerror("inner classes now allowed");
826 classinfo_list_t*mlist=0;
828 if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
829 syntaxerror("invalid modifier(s)");
831 if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
832 syntaxerror("public and internal not supported at the same time.");
834 /* create the class name, together with the proper attributes */
838 if(!(flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
839 access = ACCESS_PRIVATE; package = internal_filename_package;
840 } else if(!(flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
841 access = ACCESS_PACKAGEINTERNAL; package = state->package;
842 } else if(state->package!=internal_filename_package) {
843 access = ACCESS_PACKAGE; package = state->package;
845 syntaxerror("public classes only allowed inside a package");
849 state->cls = rfx_calloc(sizeof(classstate_t));
850 state->cls->init = rfx_calloc(sizeof(methodstate_t));
851 state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
852 /* notice: we make no effort to initialize the top variable (local0) here,
853 even though it has special meaning. We just rely on the facat
854 that pass 1 won't do anything with variables */
856 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
858 /* set current method to constructor- all code within the class-level (except
859 static variable initializations) will be executed during construction time */
860 state->method = state->cls->init;
862 if(registry_find(package, classname)) {
863 syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
865 /* build info struct */
866 int num_interfaces = (list_length(implements));
867 state->cls->info = classinfo_register(access, package, classname, num_interfaces);
868 state->cls->info->flags |= flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
872 state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
874 state->method = state->cls->init;
875 parserassert(state->cls && state->cls->info);
877 function_initvars(state->cls->init, 0, 0);
878 function_initvars(state->cls->static_init, 0, 0);
880 if(extends && (extends->flags & FLAG_FINAL))
881 syntaxerror("Can't extend final class '%s'", extends->name);
883 /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
884 state->cls->info->superclass = extends?extends:TYPE_OBJECT;
886 classinfo_list_t*l = implements;
887 for(l=implements;l;l=l->next) {
888 if(!(l->classinfo->flags & FLAG_INTERFACE))
889 syntaxerror("'%s' is not an interface", l->classinfo->name);
890 state->cls->info->interfaces[pos++] = l->classinfo;
893 /* generate the abc code for this class */
894 MULTINAME(classname2,state->cls->info);
895 multiname_t*extends2 = sig2mname(extends);
897 state->cls->abc = abc_class_new(global->file, &classname2, extends2);
898 if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
899 if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
900 if(state->cls->info->flags&FLAG_INTERFACE) {
901 abc_class_interface(state->cls->abc);
904 abc_class_protectedNS(state->cls->abc, classname);
906 for(mlist=implements;mlist;mlist=mlist->next) {
907 MULTINAME(m, mlist->classinfo);
908 abc_class_add_interface(state->cls->abc, &m);
911 /* write the construction code for this class to the global init
913 int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
915 abc_method_body_t*m = global->init->method->body;
916 __ getglobalscope(m);
917 classinfo_t*s = extends;
922 //TODO: take a look at the current scope stack, maybe
923 // we can re-use something
928 multiname_t*s2 = sig2mname(s);
930 multiname_destroy(s2);
932 __ pushscope(m); count++;
933 m->code = m->code->prev->prev; // invert
935 /* continue appending after last op end */
936 while(m->code && m->code->next) m->code = m->code->next;
938 /* TODO: if this is one of *our* classes, we can also
939 do a getglobalscope/getslot <nr> (which references
940 the init function's slots) */
942 __ getlex2(m, extends2);
944 /* notice: we get a Verify Error #1107 if the top elemnt on the scope
945 stack is not the superclass */
946 __ pushscope(m);count++;
949 /* notice: we get a verify error #1107 if the top element on the scope
950 stack is not the global object */
952 __ pushscope(m);count++;
954 __ newclass(m,state->cls->abc);
958 __ setslot(m, slotindex);
959 multiname_destroy(extends2);
961 /* flash.display.MovieClip handling */
963 if(!as3_globalclass && (flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
964 if(state->package && state->package[0]) {
965 as3_globalclass = concat3(state->package, ".", classname);
967 as3_globalclass = strdup(classname);
973 static void setstaticfunction(int x)
977 state->method = state->cls->static_init;
979 state->method = state->cls->init;
982 parserassert(state->method);
986 static void endclass()
989 if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
991 c = abc_getlocal_0(c);
992 c = abc_constructsuper(c, 0);
993 state->cls->init->header = code_append(state->cls->init->header, c);
994 state->cls->has_constructor=1;
996 if(state->cls->init) {
997 if(state->cls->info->flags&FLAG_INTERFACE) {
998 if(state->cls->init->header)
999 syntaxerror("interface can not have class-level code");
1001 abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
1002 code_t*c = method_header(state->cls->init);
1003 m->body->code = wrap_function(c, 0, m->body->code);
1006 if(state->cls->static_init) {
1007 abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
1008 code_t*c = method_header(state->cls->static_init);
1009 m->body->code = wrap_function(c, 0, m->body->code);
1016 void check_code_for_break(code_t*c)
1019 if(c->opcode == OPCODE___BREAK__) {
1020 char*name = string_cstr(c->data[0]);
1021 syntaxerror("Unresolved \"break %s\"", name);
1023 if(c->opcode == OPCODE___CONTINUE__) {
1024 char*name = string_cstr(c->data[0]);
1025 syntaxerror("Unresolved \"continue %s\"", name);
1032 static void check_constant_against_type(classinfo_t*t, constant_t*c)
1034 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
1035 if(TYPE_IS_NUMBER(t)) {
1036 xassert(c->type == CONSTANT_FLOAT
1037 || c->type == CONSTANT_INT
1038 || c->type == CONSTANT_UINT);
1039 } else if(TYPE_IS_UINT(t)) {
1040 xassert(c->type == CONSTANT_UINT ||
1041 (c->type == CONSTANT_INT && c->i>0));
1042 } else if(TYPE_IS_INT(t)) {
1043 xassert(c->type == CONSTANT_INT);
1044 } else if(TYPE_IS_BOOLEAN(t)) {
1045 xassert(c->type == CONSTANT_TRUE
1046 || c->type == CONSTANT_FALSE);
1050 static void check_override(memberinfo_t*m, int flags)
1054 if(m->parent == state->cls->info)
1055 syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
1057 syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
1058 if(m->access==ACCESS_PRIVATE)
1060 if(m->flags & FLAG_FINAL)
1061 syntaxerror("can't override final member %s", m->name);
1062 if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
1063 syntaxerror("can't override static member %s", m->name);
1064 if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
1065 syntaxerror("can't override non-static member %s with static declaration", m->name);
1067 if(!(flags&FLAG_OVERRIDE)) {
1068 if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
1069 if(m->kind == INFOTYPE_METHOD)
1070 syntaxerror("can't override without explicit 'override' declaration");
1072 syntaxerror("can't override '%s'", m->name);
1077 static methodinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
1079 methodinfo_t*minfo = 0;
1080 U8 access = flags2access(flags);
1083 minfo = methodinfo_register_global(access, state->package, name);
1084 minfo->return_type = return_type;
1085 } else if(getset != KW_GET && getset != KW_SET) {
1087 memberinfo_t* m = registry_findmember(state->cls->info, name, 0);
1089 syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
1091 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1092 minfo->return_type = return_type;
1093 // getslot on a member slot only returns "undefined", so no need
1094 // to actually store these
1095 //state->minfo->slot = state->method->abc->method->trait->slot_id;
1097 //class getter/setter
1098 int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
1100 if(getset == KW_GET)
1102 else if(params->list && params->list->param)
1103 type = params->list->param->type;
1104 // not sure wether to look into superclasses here, too
1105 minfo = (methodinfo_t*)registry_findmember(state->cls->info, name, 1);
1107 if(minfo->kind!=INFOTYPE_SLOT)
1108 syntaxerror("class already contains a method called '%s'", name);
1109 if(!(minfo->subtype & (SUBTYPE_GETSET)))
1110 syntaxerror("class already contains a field called '%s'", name);
1111 if(minfo->subtype & gs)
1112 syntaxerror("getter/setter for '%s' already defined", name);
1113 /* make a setter or getter into a getset */
1114 minfo->subtype |= gs;
1115 if(!minfo->return_type) {
1116 minfo->return_type = type;
1118 if(minfo && minfo->return_type != type)
1119 syntaxerror("different type in getter and setter");
1122 minfo = methodinfo_register_onclass(state->cls->info, access, name);
1123 minfo->kind = INFOTYPE_SLOT; //hack
1124 minfo->subtype = gs;
1125 minfo->return_type = type;
1127 /* can't assign a slot as getter and setter might have different slots */
1128 //minfo->slot = slot;
1130 if(flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
1131 if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
1132 if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
1136 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
1138 //parserassert(state->method && state->method->info);
1140 methodstate_t*parent_method = state->method;
1149 state->new_vars = 1;
1152 state->method = rfx_calloc(sizeof(methodstate_t));
1153 state->method->inner = 1;
1154 state->method->variable_count = 0;
1155 state->method->abc = rfx_calloc(sizeof(abc_method_t));
1157 NEW(methodinfo_t,minfo);
1158 minfo->kind = INFOTYPE_METHOD;
1159 minfo->access = ACCESS_PACKAGEINTERNAL;
1161 state->method->info = minfo;
1164 list_append(parent_method->innerfunctions, state->method);
1166 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1170 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1171 parserassert(state->method);
1173 state->method->info->return_type = return_type;
1174 function_initvars(state->method, params, 0);
1178 static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1179 params_t*params, classinfo_t*return_type)
1181 if(state->method && state->method->info) {
1182 syntaxerror("not able to start another method scope");
1187 state->method = rfx_calloc(sizeof(methodstate_t));
1188 state->method->has_super = 0;
1191 state->method->is_constructor = !strcmp(state->cls->info->name,name);
1193 state->method->is_global = 1;
1194 state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
1196 if(state->method->is_constructor)
1197 name = "__as3_constructor__";
1200 state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
1202 dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
1206 state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
1207 parserassert(state->method);
1210 memberinfo_t*m = registry_findmember(state->cls->info, name, 2);
1211 check_override(m, flags);
1215 state->cls->has_constructor |= state->method->is_constructor;
1218 state->method->info->return_type = return_type;
1219 function_initvars(state->method, params, flags);
1223 static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
1224 params_t*params, classinfo_t*return_type, code_t*body)
1233 multiname_t*type2 = sig2mname(return_type);
1235 if(state->method->inner) {
1236 f = state->method->abc;
1237 abc_method_init(f, global->file, type2, 1);
1238 } else if(state->method->is_constructor) {
1239 f = abc_class_getconstructor(state->cls->abc, type2);
1240 } else if(!state->method->is_global) {
1241 namespace_t mname_ns = {state->method->info->access, ""};
1242 multiname_t mname = {QNAME, &mname_ns, 0, name};
1244 if(flags&FLAG_STATIC)
1245 f = abc_class_staticmethod(state->cls->abc, type2, &mname);
1247 f = abc_class_method(state->cls->abc, type2, &mname);
1248 slot = f->trait->slot_id;
1250 namespace_t mname_ns = {state->method->info->access, state->package};
1251 multiname_t mname = {QNAME, &mname_ns, 0, name};
1253 f = abc_method_new(global->file, type2, 1);
1254 trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
1255 //abc_code_t*c = global->init->method->body->code;
1257 //flash doesn't seem to allow us to access function slots
1258 //state->method->info->slot = slot;
1260 if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
1261 if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
1262 if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
1263 if(params->varargs) f->flags |= METHOD_NEED_REST;
1267 for(p=params->list;p;p=p->next) {
1268 if(params->varargs && !p->next) {
1269 break; //varargs: omit last parameter in function signature
1271 multiname_t*m = sig2mname(p->param->type);
1272 list_append(f->parameters, m);
1273 if(p->param->value) {
1274 check_constant_against_type(p->param->type, p->param->value);
1275 opt=1;list_append(f->optional_parameters, p->param->value);
1277 syntaxerror("non-optional parameter not allowed after optional parameters");
1280 check_code_for_break(body);
1283 f->body->code = body;
1284 f->body->exceptions = state->method->exceptions;
1285 } else { //interface
1287 syntaxerror("interface methods can't have a method body");
1294 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
1299 void breakjumpsto(code_t*c, char*name, code_t*jump)
1302 if(c->opcode == OPCODE___BREAK__) {
1303 string_t*name2 = c->data[0];
1304 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1305 c->opcode = OPCODE_JUMP;
1312 void continuejumpsto(code_t*c, char*name, code_t*jump)
1315 if(c->opcode == OPCODE___CONTINUE__) {
1316 string_t*name2 = c->data[0];
1317 if(!name2->len || !strncmp(name2->str, name, name2->len)) {
1318 c->opcode = OPCODE_JUMP;
1326 #define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
1327 #define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
1328 #define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
1330 classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
1332 if(!type1 || !type2)
1333 return registry_getanytype();
1334 if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
1335 return registry_getanytype();
1338 if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
1347 return registry_getanytype();
1349 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
1354 return abc_coerce_a(c);
1358 // cast an "any" type to a specific type. subject to
1359 // runtime exceptions
1360 return abc_coerce2(c, &m);
1363 if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
1364 (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
1365 // allow conversion between number types
1366 return abc_coerce2(c, &m);
1368 //printf("%s.%s\n", from.package, from.name);
1369 //printf("%s.%s\n", to.package, to.name);
1371 classinfo_t*supertype = from;
1373 if(supertype == to) {
1374 // target type is one of from's superclasses
1375 return abc_coerce2(c, &m);
1378 while(supertype->interfaces[t]) {
1379 if(supertype->interfaces[t]==to) {
1380 // target type is one of from's interfaces
1381 return abc_coerce2(c, &m);
1385 supertype = supertype->superclass;
1387 if(TYPE_IS_FUNCTION(from) && TYPE_IS_FUNCTION(to))
1389 if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
1391 if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
1393 syntaxerror("can't convert type %s to %s", from->name, to->name);
1394 return 0; // make gcc happy
1397 code_t*defaultvalue(code_t*c, classinfo_t*type)
1399 if(TYPE_IS_INT(type)) {
1400 c = abc_pushbyte(c, 0);
1401 } else if(TYPE_IS_UINT(type)) {
1402 c = abc_pushuint(c, 0);
1403 } else if(TYPE_IS_FLOAT(type)) {
1405 } else if(TYPE_IS_BOOLEAN(type)) {
1406 c = abc_pushfalse(c);
1408 //c = abc_pushundefined(c);
1410 c = abc_pushnull(c);
1412 c = abc_coerce2(c, &m);
1417 char is_pushundefined(code_t*c)
1419 return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
1422 static slotinfo_t* find_class(char*name)
1426 c = registry_find(state->package, name);
1429 /* try explicit imports */
1430 dictentry_t* e = dict_get_slot(state->imports, name);
1433 if(!strcmp(e->key, name)) {
1434 c = (slotinfo_t*)e->data;
1440 /* try package.* imports */
1441 import_list_t*l = state->wildcard_imports;
1443 //printf("does package %s contain a class %s?\n", l->import->package, name);
1444 c = registry_find(l->import->package, name);
1449 /* try global package */
1450 c = registry_find("", name);
1453 /* try local "filename" package */
1454 c = registry_find(internal_filename_package, name);
1460 static char is_getlocal(code_t*c)
1462 if(!c || c->prev || c->next)
1464 return(c->opcode == OPCODE_GETLOCAL
1465 || c->opcode == OPCODE_GETLOCAL_0
1466 || c->opcode == OPCODE_GETLOCAL_1
1467 || c->opcode == OPCODE_GETLOCAL_2
1468 || c->opcode == OPCODE_GETLOCAL_3);
1470 static int getlocalnr(code_t*c)
1472 if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
1473 else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
1474 else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
1475 else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
1476 else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
1477 else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
1481 static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
1485 [prefix code] [read instruction]
1489 [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
1491 if(in && in->opcode == OPCODE_COERCE_A) {
1492 in = code_cutlast(in);
1495 syntaxerror("internal error");
1497 /* chop off read instruction */
1501 prefix = r->prev;r->prev = 0;
1507 char use_temp_var = readbefore;
1509 /* generate the write instruction, and maybe append a dup to the prefix code */
1510 code_t* write = abc_nop(0);
1511 if(r->opcode == OPCODE_GETPROPERTY) {
1512 write->opcode = OPCODE_SETPROPERTY;
1513 multiname_t*m = (multiname_t*)r->data[0];
1514 write->data[0] = multiname_clone(m);
1515 if(m->type == QNAME || m->type == MULTINAME) {
1517 prefix = abc_dup(prefix); // we need the object, too
1520 } else if(m->type == MULTINAMEL) {
1522 /* dupping two values on the stack requires 5 operations and one register-
1523 couldn't adobe just have given us a dup2? */
1524 int temp = gettempvar();
1525 prefix = abc_setlocal(prefix, temp);
1526 prefix = abc_dup(prefix);
1527 prefix = abc_getlocal(prefix, temp);
1528 prefix = abc_swap(prefix);
1529 prefix = abc_getlocal(prefix, temp);
1531 prefix = abc_kill(prefix, temp);
1535 syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
1537 } else if(r->opcode == OPCODE_GETSLOT) {
1538 write->opcode = OPCODE_SETSLOT;
1539 write->data[0] = r->data[0];
1541 prefix = abc_dup(prefix); // we need the object, too
1544 } else if(r->opcode == OPCODE_GETLOCAL) {
1545 write->opcode = OPCODE_SETLOCAL;
1546 write->data[0] = r->data[0];
1547 } else if(r->opcode == OPCODE_GETLOCAL_0) {
1548 write->opcode = OPCODE_SETLOCAL_0;
1549 } else if(r->opcode == OPCODE_GETLOCAL_1) {
1550 write->opcode = OPCODE_SETLOCAL_1;
1551 } else if(r->opcode == OPCODE_GETLOCAL_2) {
1552 write->opcode = OPCODE_SETLOCAL_2;
1553 } else if(r->opcode == OPCODE_GETLOCAL_3) {
1554 write->opcode = OPCODE_SETLOCAL_3;
1557 syntaxerror("illegal lvalue: can't assign a value to this expression");
1564 /* with getproperty/getslot, we have to be extra careful not
1565 to execute the read code twice, as it might have side-effects
1566 (e.g. if the property is in fact a setter/getter combination)
1568 So read the value, modify it, and write it again,
1569 using prefix only once and making sure (by using a temporary
1570 register) that the return value is what we just wrote */
1571 temp = gettempvar();
1572 c = code_append(c, prefix);
1573 c = code_append(c, r);
1576 c = abc_setlocal(c, temp);
1578 c = code_append(c, middlepart);
1581 c = abc_setlocal(c, temp);
1583 c = code_append(c, write);
1584 c = abc_getlocal(c, temp);
1585 c = abc_kill(c, temp);
1587 /* if we're allowed to execute the read code twice *and*
1588 the middlepart doesn't modify the code, things are easier.
1590 code_t* r2 = code_dup(r);
1591 //c = code_append(c, prefix);
1592 parserassert(!prefix);
1593 c = code_append(c, r);
1594 c = code_append(c, middlepart);
1595 c = code_append(c, write);
1596 c = code_append(c, r2);
1599 /* even smaller version: overwrite the value without reading
1603 c = code_append(c, prefix);
1606 c = code_append(c, middlepart);
1607 c = code_append(c, write);
1608 c = code_append(c, r);
1611 temp = gettempvar();
1613 c = code_append(c, prefix);
1615 c = code_append(c, middlepart);
1617 c = abc_setlocal(c, temp);
1618 c = code_append(c, write);
1619 c = abc_getlocal(c, temp);
1620 c = abc_kill(c, temp);
1626 char is_break_or_jump(code_t*c)
1630 if(c->opcode == OPCODE_JUMP ||
1631 c->opcode == OPCODE___BREAK__ ||
1632 c->opcode == OPCODE___CONTINUE__ ||
1633 c->opcode == OPCODE_THROW ||
1634 c->opcode == OPCODE_RETURNVOID ||
1635 c->opcode == OPCODE_RETURNVALUE) {
1642 #define IS_FINALLY_TARGET(op) \
1643 ((op) == OPCODE___CONTINUE__ || \
1644 (op) == OPCODE___BREAK__ || \
1645 (op) == OPCODE_RETURNVOID || \
1646 (op) == OPCODE_RETURNVALUE || \
1647 (op) == OPCODE___RETHROW__)
1649 static code_t* insert_finally_lookup(code_t*c, code_t*finally, int tempvar)
1651 #define NEED_EXTRA_STACK_ARG
1652 code_t*finally_label = abc_nop(0);
1653 NEW(lookupswitch_t, l);
1659 code_t*prev = i->prev;
1660 if(IS_FINALLY_TARGET(i->opcode)) {
1663 if(i->opcode == OPCODE___RETHROW__ ||
1664 i->opcode == OPCODE_RETURNVALUE) {
1665 if(i->opcode == OPCODE___RETHROW__)
1666 i->opcode = OPCODE_THROW;
1668 p = abc_coerce_a(p);
1669 p = abc_setlocal(p, tempvar);
1671 p = abc_pushbyte(p, count++);
1672 p = abc_jump(p, finally_label);
1673 code_t*target = p = abc_label(p);
1674 #ifdef NEED_EXTRA_STACK_ARG
1678 p = abc_getlocal(p, tempvar);
1681 p->next = i;i->prev = p;
1682 list_append(l->targets, target);
1688 c = abc_pushbyte(c, -1);
1689 c = code_append(c, finally_label);
1690 c = code_append(c, finally);
1692 #ifdef NEED_EXTRA_STACK_ARG
1695 c = abc_lookupswitch(c, l);
1696 c = l->def = abc_label(c);
1697 #ifdef NEED_EXTRA_STACK_ARG
1704 static code_t* insert_finally_simple(code_t*c, code_t*finally, int tempvar)
1708 code_t*prev = i->prev;
1709 if(IS_FINALLY_TARGET(i->opcode)) {
1710 if(i->opcode == OPCODE___RETHROW__)
1711 i->opcode = OPCODE_THROW;
1712 code_t*end = code_dup(finally);
1713 code_t*start = code_start(end);
1714 if(prev) prev->next = start;
1721 return code_append(c, finally);
1724 code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
1730 int num_insertion_points=0;
1732 if(IS_FINALLY_TARGET(i->opcode))
1733 num_insertion_points++;
1740 if(i->branch || i->opcode == OPCODE_LOOKUPSWITCH) {
1745 int simple_version_cost = (1+num_insertion_points)*code_size;
1746 int lookup_version_cost = 4*num_insertion_points + 5;
1748 if(cantdup || simple_version_cost > lookup_version_cost) {
1749 printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
1750 return insert_finally_lookup(c, finally, tempvar);
1752 printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
1753 return insert_finally_simple(c, finally, tempvar);
1757 #define PASS1 }} if(as3_pass == 1) {{
1758 #define PASS1END }} if(as3_pass == 2) {{
1759 #define PASS2 }} if(as3_pass == 2) {{
1760 #define PASS12 }} {{
1761 #define PASS12END }} if(as3_pass == 2) {{
1765 /* Line 273 of skeleton.m4 */
1766 #line 1767 "parser.tab.c"
1773 typedef YYTYPE_UINT8 yytype_uint8;
1775 typedef unsigned char yytype_uint8;
1779 typedef YYTYPE_INT8 yytype_int8;
1780 #elif (defined __STDC__ || defined __C99__FUNC__ \
1781 || defined __cplusplus || defined _MSC_VER)
1782 typedef signed char yytype_int8;
1784 typedef short int yytype_int8;
1787 #ifdef YYTYPE_UINT16
1788 typedef YYTYPE_UINT16 yytype_uint16;
1790 typedef unsigned short int yytype_uint16;
1794 typedef YYTYPE_INT16 yytype_int16;
1796 typedef short int yytype_int16;
1800 # ifdef __SIZE_TYPE__
1801 # define YYSIZE_T __SIZE_TYPE__
1802 # elif defined size_t
1803 # define YYSIZE_T size_t
1804 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1805 || defined __cplusplus || defined _MSC_VER)
1806 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1807 # define YYSIZE_T size_t
1809 # define YYSIZE_T unsigned int
1813 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1818 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1819 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1823 # define YY_(msgid) msgid
1827 /* Suppress unused-variable warnings by "using" E. */
1828 #if ! defined lint || defined __GNUC__
1829 # define YYUSE(e) ((void) (e))
1831 # define YYUSE(e) /* empty */
1834 /* Identity function, used to suppress warnings about constant conditions. */
1836 # define YYID(n) (n)
1838 #if (defined __STDC__ || defined __C99__FUNC__ \
1839 || defined __cplusplus || defined _MSC_VER)
1852 #if ! defined yyoverflow || YYERROR_VERBOSE
1854 /* The parser invokes alloca or malloc; define the necessary symbols. */
1856 # ifdef YYSTACK_USE_ALLOCA
1857 # if YYSTACK_USE_ALLOCA
1859 # define YYSTACK_ALLOC __builtin_alloca
1860 # elif defined __BUILTIN_VA_ARG_INCR
1861 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1863 # define YYSTACK_ALLOC __alloca
1864 # elif defined _MSC_VER
1865 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1866 # define alloca _alloca
1868 # define YYSTACK_ALLOC alloca
1869 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1870 || defined __cplusplus || defined _MSC_VER)
1871 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1873 # define _STDLIB_H 1
1880 # ifdef YYSTACK_ALLOC
1881 /* Pacify GCC's `empty if-body' warning. */
1882 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1883 # ifndef YYSTACK_ALLOC_MAXIMUM
1884 /* The OS might guarantee only one guard page at the bottom of the stack,
1885 and a page size can be as small as 4096 bytes. So we cannot safely
1886 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1887 to allow for a few compiler-allocated temporary stack slots. */
1888 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1891 # define YYSTACK_ALLOC YYMALLOC
1892 # define YYSTACK_FREE YYFREE
1893 # ifndef YYSTACK_ALLOC_MAXIMUM
1894 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1896 # if (defined __cplusplus && ! defined _STDLIB_H \
1897 && ! ((defined YYMALLOC || defined malloc) \
1898 && (defined YYFREE || defined free)))
1899 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1901 # define _STDLIB_H 1
1905 # define YYMALLOC malloc
1906 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1907 || defined __cplusplus || defined _MSC_VER)
1908 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1912 # define YYFREE free
1913 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1914 || defined __cplusplus || defined _MSC_VER)
1915 void free (void *); /* INFRINGES ON USER NAME SPACE */
1919 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1922 #if (! defined yyoverflow \
1923 && (! defined __cplusplus \
1924 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1926 /* A type that is properly aligned for any stack member. */
1929 yytype_int16 yyss_alloc;
1933 /* The size of the maximum gap between one aligned stack and the next. */
1934 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1936 /* The size of an array large to enough to hold all stacks, each with
1938 # define YYSTACK_BYTES(N) \
1939 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1940 + YYSTACK_GAP_MAXIMUM)
1942 /* Copy COUNT objects from FROM to TO. The source and destination do
1945 # if defined __GNUC__ && 1 < __GNUC__
1946 # define YYCOPY(To, From, Count) \
1947 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1949 # define YYCOPY(To, From, Count) \
1953 for (yyi = 0; yyi < (Count); yyi++) \
1954 (To)[yyi] = (From)[yyi]; \
1960 /* Relocate STACK from its old location to the new one. The
1961 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1962 elements in the stack, and YYPTR gives the new location of the
1963 stack. Advance YYPTR to a properly aligned location for the next
1965 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1968 YYSIZE_T yynewbytes; \
1969 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1970 Stack = &yyptr->Stack_alloc; \
1971 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1972 yyptr += yynewbytes / sizeof (*yyptr); \
1978 /* YYFINAL -- State number of the termination state. */
1980 /* YYLAST -- Last index in YYTABLE. */
1983 /* YYNTOKENS -- Number of terminals. */
1984 #define YYNTOKENS 134
1985 /* YYNNTS -- Number of nonterminals. */
1987 /* YYNRULES -- Number of rules. */
1988 #define YYNRULES 303
1989 /* YYNRULES -- Number of states. */
1990 #define YYNSTATES 514
1992 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1993 #define YYUNDEFTOK 2
1994 #define YYMAXUTOK 363
1996 #define YYTRANSLATE(YYX) \
1997 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1999 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2000 static const yytype_uint8 yytranslate[] =
2002 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2003 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2004 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2005 2, 2, 2, 118, 2, 2, 2, 116, 108, 2,
2006 122, 133, 115, 113, 100, 112, 127, 114, 2, 2,
2007 2, 2, 2, 2, 2, 2, 2, 2, 105, 99,
2008 109, 102, 110, 104, 128, 2, 2, 2, 2, 2,
2009 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2010 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2011 2, 124, 2, 125, 107, 2, 2, 2, 2, 2,
2012 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2013 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2014 2, 2, 2, 126, 106, 132, 117, 2, 2, 2,
2015 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2016 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2017 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2018 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2019 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2020 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2021 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2022 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2023 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2024 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2025 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2026 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2027 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2028 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2029 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2030 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2031 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2032 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2033 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2034 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2035 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2036 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2037 95, 96, 97, 98, 101, 103, 111, 119, 120, 121,
2042 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2044 static const yytype_uint16 yyprhs[] =
2046 0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
2047 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
2048 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
2049 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
2050 85, 87, 91, 94, 96, 98, 100, 102, 104, 106,
2051 108, 113, 115, 118, 120, 122, 126, 129, 130, 133,
2052 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
2053 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
2054 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
2055 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
2056 275, 277, 280, 282, 283, 290, 293, 295, 301, 303,
2057 305, 309, 311, 312, 319, 320, 326, 329, 334, 335,
2058 337, 339, 342, 344, 346, 348, 350, 352, 354, 356,
2059 358, 360, 362, 363, 366, 367, 370, 371, 374, 375,
2060 385, 386, 395, 396, 398, 400, 403, 405, 410, 412,
2061 414, 416, 417, 419, 421, 424, 426, 429, 438, 440,
2062 442, 443, 450, 451, 454, 456, 458, 460, 462, 464,
2063 466, 468, 470, 472, 473, 475, 478, 483, 487, 489,
2064 494, 497, 499, 501, 502, 503, 516, 518, 519, 520,
2065 531, 533, 537, 539, 541, 543, 547, 549, 551, 553,
2066 556, 557, 558, 562, 563, 565, 567, 569, 572, 575,
2067 576, 581, 586, 591, 594, 596, 599, 601, 603, 607,
2068 609, 611, 613, 615, 617, 619, 621, 623, 625, 627,
2069 629, 631, 633, 635, 637, 639, 641, 643, 647, 651,
2070 655, 659, 663, 667, 671, 675, 679, 683, 686, 689,
2071 693, 697, 701, 705, 709, 713, 717, 721, 725, 729,
2072 733, 737, 741, 745, 749, 754, 757, 759, 763, 766,
2073 771, 775, 776, 778, 782, 788, 792, 796, 800, 804,
2074 808, 812, 816, 820, 824, 828, 832, 836, 842, 845,
2075 848, 851, 854, 858, 861, 866, 872, 876, 882, 886,
2079 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2080 static const yytype_int16 yyrhs[] =
2082 135, 0, -1, 136, -1, -1, 137, -1, 138, -1,
2083 137, 138, -1, 185, -1, 197, -1, 195, -1, 214,
2084 -1, 206, -1, 147, -1, 148, 126, 136, 132, -1,
2085 99, -1, -1, 140, -1, 141, -1, 140, 141, -1,
2086 197, -1, 195, -1, 214, -1, 206, -1, 147, -1,
2087 148, 126, 139, 132, -1, 99, -1, 143, -1, -1,
2088 143, 145, -1, 145, -1, 188, -1, 159, -1, 160,
2089 -1, 161, -1, 163, -1, 171, -1, 154, -1, 182,
2090 -1, 179, -1, 236, -1, 243, -1, 126, 143, 132,
2091 -1, 126, 132, -1, 99, -1, 144, -1, 150, -1,
2092 165, -1, 166, -1, 233, -1, 181, -1, 148, 126,
2093 143, 132, -1, 242, -1, 145, 99, -1, 145, -1,
2094 144, -1, 3, 89, 3, -1, 102, 234, -1, -1,
2095 46, 151, -1, 32, 151, -1, 152, -1, 151, 100,
2096 152, -1, 3, 224, 149, -1, -1, 65, 146, -1,
2097 -1, 64, 122, 155, 235, 133, 146, 153, -1, -1,
2098 150, -1, 236, -1, 46, 3, 224, -1, 3, -1,
2099 13, 122, -1, 13, 50, 122, -1, 158, 156, 99,
2100 235, 99, 236, 133, 146, -1, 158, 157, 68, 235,
2101 133, 146, -1, -1, 14, 122, 162, 235, 133, 146,
2102 -1, -1, 15, 164, 146, 14, 122, 235, 133, -1,
2103 66, -1, 66, 3, -1, 30, -1, 30, 3, -1,
2104 -1, 168, -1, 170, -1, 168, 170, -1, 169, -1,
2105 168, 169, -1, 34, 237, 105, 142, -1, 62, 105,
2106 142, -1, -1, 16, 122, 172, 237, 133, 126, 167,
2107 132, -1, -1, 33, 122, 3, 224, 133, 174, 126,
2108 142, 132, -1, -1, 28, 126, 176, 142, 132, -1,
2109 173, -1, 177, 173, -1, 177, -1, 177, 175, -1,
2110 175, -1, -1, 52, 126, 180, 142, 132, 178, -1,
2111 37, 235, -1, 37, -1, 39, 122, 235, 133, 146,
2112 -1, 3, -1, 19, -1, 184, 127, 183, -1, 183,
2113 -1, -1, 19, 184, 126, 186, 139, 132, -1, -1,
2114 19, 126, 187, 139, 132, -1, 41, 220, -1, 41,
2115 184, 127, 115, -1, -1, 190, -1, 191, -1, 190,
2116 191, -1, 21, -1, 22, -1, 20, -1, 38, -1,
2117 47, -1, 49, -1, 48, -1, 26, -1, 24, -1,
2118 4, -1, -1, 54, 221, -1, -1, 54, 222, -1,
2119 -1, 17, 222, -1, -1, 189, 31, 3, 192, 194,
2120 126, 196, 199, 132, -1, -1, 189, 44, 3, 193,
2121 126, 198, 202, 132, -1, -1, 200, -1, 201, -1,
2122 200, 201, -1, 99, -1, 148, 126, 199, 132, -1,
2123 206, -1, 214, -1, 144, -1, -1, 203, -1, 204,
2124 -1, 203, 204, -1, 99, -1, 46, 3, -1, 189,
2125 27, 213, 3, 122, 210, 133, 224, -1, 46, -1,
2126 32, -1, -1, 189, 205, 3, 207, 224, 149, -1,
2127 -1, 102, 209, -1, 10, -1, 8, -1, 9, -1,
2128 12, -1, 5, -1, 56, -1, 55, -1, 45, -1,
2129 3, -1, -1, 211, -1, 93, 212, -1, 211, 100,
2130 93, 212, -1, 211, 100, 212, -1, 212, -1, 3,
2131 105, 223, 208, -1, 3, 208, -1, 51, -1, 35,
2132 -1, -1, -1, 189, 27, 213, 3, 122, 210, 133,
2133 224, 126, 215, 142, 132, -1, 3, -1, -1, -1,
2134 27, 216, 122, 210, 133, 224, 126, 218, 142, 132,
2135 -1, 3, -1, 184, 127, 3, -1, 220, -1, 219,
2136 -1, 221, -1, 222, 100, 221, -1, 221, -1, 115,
2137 -1, 36, -1, 105, 223, -1, -1, -1, 122, 226,
2138 133, -1, -1, 227, -1, 228, -1, 234, -1, 227,
2139 100, -1, 228, 234, -1, -1, 25, 237, 229, 225,
2140 -1, 237, 122, 226, 133, -1, 53, 122, 226, 133,
2141 -1, 63, 237, -1, 42, -1, 42, 235, -1, 237,
2142 -1, 237, -1, 235, 100, 237, -1, 235, -1, 217,
2143 -1, 238, -1, 241, -1, 230, -1, 232, -1, 231,
2144 -1, 6, -1, 10, -1, 11, -1, 8, -1, 9,
2145 -1, 12, -1, 5, -1, 29, -1, 56, -1, 55,
2146 -1, 45, -1, 237, 109, 237, -1, 237, 110, 237,
2147 -1, 237, 75, 237, -1, 237, 76, 237, -1, 237,
2148 71, 237, -1, 237, 72, 237, -1, 237, 74, 237,
2149 -1, 237, 73, 237, -1, 237, 87, 237, -1, 237,
2150 88, 237, -1, 118, 237, -1, 117, 237, -1, 237,
2151 108, 237, -1, 237, 107, 237, -1, 237, 106, 237,
2152 -1, 237, 96, 237, -1, 237, 95, 237, -1, 237,
2153 94, 237, -1, 237, 114, 237, -1, 237, 116, 237,
2154 -1, 237, 113, 237, -1, 237, 112, 237, -1, 237,
2155 115, 237, -1, 237, 68, 237, -1, 237, 69, 237,
2156 -1, 237, 40, 237, -1, 237, 67, 237, -1, 43,
2157 122, 237, 133, -1, 36, 237, -1, 36, -1, 122,
2158 235, 133, -1, 112, 237, -1, 237, 124, 237, 125,
2159 -1, 124, 226, 125, -1, -1, 240, -1, 234, 105,
2160 234, -1, 240, 100, 234, 105, 234, -1, 70, 239,
2161 132, -1, 237, 80, 237, -1, 237, 79, 237, -1,
2162 237, 85, 237, -1, 237, 84, 237, -1, 237, 86,
2163 237, -1, 237, 78, 237, -1, 237, 77, 237, -1,
2164 237, 83, 237, -1, 237, 81, 237, -1, 237, 82,
2165 237, -1, 237, 102, 237, -1, 237, 104, 237, 105,
2166 237, -1, 237, 91, -1, 237, 90, -1, 91, 237,
2167 -1, 90, 237, -1, 53, 127, 3, -1, 128, 3,
2168 -1, 237, 127, 128, 3, -1, 237, 127, 3, 89,
2169 3, -1, 237, 92, 3, -1, 237, 127, 122, 237,
2170 133, -1, 237, 127, 3, -1, 3, -1, 189, 18,
2171 3, -1, 189, 18, 3, 102, 3, -1, 189, 18,
2172 3, 102, 5, -1, 23, 18, 3, -1
2175 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2176 static const yytype_uint16 yyrline[] =
2178 0, 1742, 1742, 1744, 1744, 1745, 1746, 1748, 1749, 1750,
2179 1751, 1752, 1753, 1754, 1755, 1757, 1757, 1758, 1759, 1761,
2180 1762, 1763, 1764, 1765, 1766, 1767, 1769, 1770, 1772, 1773,
2181 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785,
2182 1786, 1787, 1788, 1791, 1792, 1793, 1794, 1795, 1796, 1797,
2183 1798, 1800, 1804, 1805, 1809, 1816, 1820, 1821, 1825, 1826,
2184 1828, 1829, 1831, 1874, 1875, 1878, 1878, 1897, 1898, 1899,
2185 1904, 1907, 1911, 1912, 1914, 1934, 1977, 1977, 1996, 1996,
2186 2011, 2014, 2017, 2020, 2024, 2025, 2026, 2027, 2028, 2029,
2187 2031, 2042, 2045, 2045, 2074, 2074, 2094, 2094, 2111, 2112,
2188 2113, 2114, 2122, 2131, 2131, 2176, 2180, 2191, 2200, 2201,
2189 2203, 2204, 2206, 2206, 2208, 2208, 2211, 2225, 2241, 2242,
2190 2243, 2244, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253,
2191 2254, 2255, 2257, 2258, 2260, 2261, 2263, 2264, 2268, 2266,
2192 2274, 2272, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287,
2193 2289, 2295, 2296, 2297, 2298, 2299, 2300, 2303, 2316, 2316,
2194 2318, 2318, 2391, 2392, 2394, 2395, 2396, 2397, 2398, 2400,
2195 2401, 2402, 2403, 2412, 2416, 2422, 2428, 2436, 2441, 2447,
2196 2455, 2463, 2464, 2465, 2468, 2467, 2482, 2483, 2485, 2484,
2197 2506, 2515, 2528, 2529, 2531, 2532, 2534, 2535, 2536, 2545,
2198 2546, 2550, 2551, 2553, 2554, 2555, 2557, 2561, 2562, 2567,
2199 2568, 2604, 2650, 2671, 2692, 2695, 2702, 2703, 2704, 2710,
2200 2716, 2718, 2720, 2722, 2724, 2726, 2728, 2745, 2750, 2753,
2201 2756, 2759, 2762, 2765, 2768, 2771, 2774, 2778, 2781, 2784,
2202 2787, 2790, 2793, 2796, 2799, 2803, 2814, 2832, 2837, 2842,
2203 2847, 2852, 2857, 2861, 2865, 2870, 2874, 2878, 2887, 2896,
2204 2906, 2911, 2923, 2929, 2934, 2940, 2946, 2950, 2952, 2963,
2205 2972, 2979, 2980, 2982, 2988, 2997, 3004, 3016, 3022, 3028,
2206 3034, 3040, 3046, 3052, 3058, 3071, 3082, 3089, 3102, 3129,
2207 3143, 3157, 3171, 3186, 3193, 3200, 3207, 3214, 3225, 3259,
2208 3361, 3362, 3363, 3365
2212 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2213 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2214 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2215 static const char *const yytname[] =
2217 "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
2218 "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_BYTE",
2219 "T_SHORT", "T_FLOAT", "\"for\"", "\"while\"", "\"do\"", "\"switch\"",
2220 "\"implements\"", "\"namespace\"", "\"package\"", "\"protected\"",
2221 "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
2222 "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
2223 "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
2224 "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
2225 "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
2226 "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
2227 "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
2228 "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
2229 "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
2230 "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
2231 "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
2232 "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"",
2233 "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"",
2234 "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"", "\">>\"",
2235 "prec_none", "below_semicolon", "';'", "','", "below_assignment", "'='",
2236 "\"&=\"", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus",
2237 "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
2238 "plusplus_prefix", "below_curly", "'('", "new2", "'['", "']'", "'{'",
2239 "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
2240 "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
2241 "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
2242 "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
2243 "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
2244 "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
2245 "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
2246 "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
2247 "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
2248 "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
2249 "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
2250 "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
2251 "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
2252 "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
2253 "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
2254 "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
2255 "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@12",
2256 "MAYBESTATICCONSTANT", "STATICCONSTANT", "MAYBE_PARAM_LIST",
2257 "PARAM_LIST", "PARAM", "GETSET", "FUNCTION_DECLARATION", "$@13",
2258 "MAYBE_IDENTIFIER", "INNERFUNCTION", "$@14", "CLASS", "PACKAGEANDCLASS",
2259 "CLASS_SPEC", "CLASS_SPEC_LIST", "TYPE", "MAYBETYPE",
2260 "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST", "EXPRESSION_LIST",
2261 "EXPRESSION_LIST_AND_COMMA", "XX", "NEW", "FUNCTIONCALL", "DELETE",
2262 "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E",
2263 "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
2264 "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
2269 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2271 static const yytype_uint16 yytoknum[] =
2273 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2274 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2275 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2276 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2277 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2278 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2279 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2280 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2281 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2282 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
2283 44, 354, 61, 355, 63, 58, 124, 94, 38, 60,
2284 62, 356, 45, 43, 47, 42, 37, 126, 33, 357,
2285 358, 359, 40, 360, 91, 93, 123, 46, 64, 361,
2290 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2291 static const yytype_uint8 yyr1[] =
2293 0, 134, 135, 136, 136, 137, 137, 138, 138, 138,
2294 138, 138, 138, 138, 138, 139, 139, 140, 140, 141,
2295 141, 141, 141, 141, 141, 141, 142, 142, 143, 143,
2296 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
2297 144, 144, 144, 145, 145, 145, 145, 145, 145, 145,
2298 145, 145, 146, 146, 147, 148, 149, 149, 150, 150,
2299 151, 151, 152, 153, 153, 155, 154, 156, 156, 156,
2300 157, 157, 158, 158, 159, 160, 162, 161, 164, 163,
2301 165, 165, 166, 166, 167, 167, 167, 167, 168, 168,
2302 169, 170, 172, 171, 174, 173, 176, 175, 177, 177,
2303 178, 178, 178, 180, 179, 181, 181, 182, 183, 183,
2304 184, 184, 186, 185, 187, 185, 188, 188, 189, 189,
2305 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
2306 191, 191, 192, 192, 193, 193, 194, 194, 196, 195,
2307 198, 197, 199, 199, 200, 200, 201, 201, 201, 201,
2308 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
2309 207, 206, 208, 208, 209, 209, 209, 209, 209, 209,
2310 209, 209, 209, 210, 210, 210, 210, 211, 211, 212,
2311 212, 213, 213, 213, 215, 214, 216, 216, 218, 217,
2312 219, 220, 221, 221, 222, 222, 223, 223, 223, 224,
2313 224, 225, 225, 226, 226, 226, 227, 228, 227, 229,
2314 230, 231, 231, 232, 233, 233, 234, 235, 235, 236,
2315 237, 237, 237, 237, 237, 237, 237, 238, 238, 238,
2316 238, 238, 238, 238, 238, 238, 238, 237, 237, 237,
2317 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2318 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2319 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2320 237, 239, 239, 240, 240, 237, 237, 237, 237, 237,
2321 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
2322 237, 237, 237, 237, 237, 237, 237, 237, 237, 241,
2326 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2327 static const yytype_uint8 yyr2[] =
2329 0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
2330 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
2331 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2333 1, 3, 2, 1, 1, 1, 1, 1, 1, 1,
2334 4, 1, 2, 1, 1, 3, 2, 0, 2, 2,
2335 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
2336 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
2337 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
2338 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
2339 1, 2, 1, 0, 6, 2, 1, 5, 1, 1,
2340 3, 1, 0, 6, 0, 5, 2, 4, 0, 1,
2341 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2342 1, 1, 0, 2, 0, 2, 0, 2, 0, 9,
2343 0, 8, 0, 1, 1, 2, 1, 4, 1, 1,
2344 1, 0, 1, 1, 2, 1, 2, 8, 1, 1,
2345 0, 6, 0, 2, 1, 1, 1, 1, 1, 1,
2346 1, 1, 1, 0, 1, 2, 4, 3, 1, 4,
2347 2, 1, 1, 0, 0, 12, 1, 0, 0, 10,
2348 1, 3, 1, 1, 1, 3, 1, 1, 1, 2,
2349 0, 0, 3, 0, 1, 1, 1, 2, 2, 0,
2350 4, 4, 4, 2, 1, 2, 1, 1, 3, 1,
2351 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2352 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
2353 3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
2354 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2355 3, 3, 3, 3, 4, 2, 1, 3, 2, 4,
2356 3, 0, 1, 3, 5, 3, 3, 3, 3, 3,
2357 3, 3, 3, 3, 3, 3, 3, 5, 2, 2,
2358 2, 2, 3, 2, 4, 5, 3, 5, 3, 1,
2362 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2363 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2364 means the default is an error. */
2365 static const yytype_uint16 yydefact[] =
2367 118, 299, 131, 232, 226, 229, 230, 227, 228, 231,
2368 0, 0, 78, 0, 0, 124, 122, 123, 0, 130,
2369 0, 129, 187, 233, 266, 125, 0, 0, 0, 236,
2370 126, 128, 127, 0, 0, 235, 234, 0, 0, 271,
2371 0, 0, 14, 0, 0, 0, 0, 203, 118, 0,
2372 0, 2, 118, 5, 54, 12, 0, 36, 67, 31,
2373 32, 33, 34, 35, 38, 37, 7, 30, 0, 119,
2374 120, 9, 8, 11, 10, 220, 223, 225, 224, 219,
2375 39, 217, 221, 222, 40, 0, 0, 72, 76, 118,
2376 92, 108, 109, 114, 111, 0, 0, 299, 209, 186,
2377 0, 265, 0, 0, 116, 0, 103, 203, 0, 213,
2378 65, 0, 216, 0, 272, 291, 290, 268, 248, 247,
2379 0, 0, 204, 205, 206, 82, 0, 106, 214, 0,
2380 80, 43, 42, 118, 44, 29, 0, 45, 46, 47,
2381 49, 0, 48, 51, 293, 1, 6, 118, 299, 0,
2382 68, 0, 0, 69, 183, 0, 159, 0, 158, 0,
2383 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2385 0, 0, 0, 0, 289, 288, 0, 0, 0, 0,
2386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2387 0, 0, 203, 0, 0, 55, 73, 0, 53, 0,
2388 0, 118, 112, 0, 303, 201, 173, 0, 0, 0,
2389 27, 0, 292, 0, 0, 275, 0, 267, 270, 207,
2390 208, 83, 200, 59, 60, 105, 215, 58, 81, 41,
2391 28, 118, 0, 0, 200, 0, 0, 182, 181, 0,
2392 132, 134, 160, 218, 262, 263, 260, 261, 241, 242,
2393 244, 243, 239, 240, 282, 281, 277, 276, 284, 285,
2394 283, 279, 278, 280, 245, 246, 296, 254, 253, 252,
2395 286, 0, 251, 250, 249, 237, 238, 258, 257, 255,
2396 259, 256, 0, 0, 298, 0, 0, 0, 52, 0,
2397 0, 25, 0, 118, 17, 23, 0, 20, 19, 22,
2398 21, 118, 110, 203, 210, 162, 0, 0, 174, 178,
2399 118, 191, 117, 264, 0, 26, 212, 0, 273, 0,
2400 0, 57, 0, 118, 300, 13, 57, 0, 0, 0,
2401 0, 136, 0, 0, 200, 0, 211, 269, 0, 0,
2402 294, 118, 0, 0, 115, 18, 118, 0, 0, 0,
2403 0, 180, 175, 200, 0, 107, 0, 118, 0, 190,
2404 198, 197, 0, 193, 192, 196, 199, 0, 62, 61,
2405 50, 0, 0, 118, 173, 133, 0, 0, 194, 135,
2406 140, 57, 287, 295, 297, 77, 0, 84, 0, 113,
2407 202, 172, 168, 165, 166, 164, 167, 171, 170, 169,
2408 163, 162, 0, 0, 177, 0, 0, 98, 102, 100,
2409 104, 63, 274, 0, 56, 301, 302, 0, 75, 0,
2410 137, 138, 0, 118, 161, 79, 0, 0, 0, 85,
2411 88, 86, 24, 179, 188, 176, 96, 0, 99, 101,
2412 118, 66, 118, 200, 118, 195, 0, 155, 0, 0,
2413 118, 153, 0, 27, 93, 89, 87, 27, 27, 200,
2414 64, 74, 0, 146, 150, 0, 0, 0, 118, 144,
2415 148, 149, 156, 183, 141, 154, 27, 91, 0, 0,
2416 0, 184, 118, 139, 145, 0, 90, 189, 97, 94,
2417 27, 0, 0, 0, 0, 147, 173, 27, 185, 0,
2421 /* YYDEFGOTO[NTERM-NUM]. */
2422 static const yytype_int16 yydefgoto[] =
2424 -1, 50, 51, 52, 53, 302, 303, 304, 324, 325,
2425 134, 135, 209, 305, 136, 378, 137, 237, 234, 451,
2426 57, 223, 151, 152, 58, 59, 60, 61, 207, 62,
2427 89, 138, 139, 438, 439, 440, 441, 63, 210, 417,
2428 503, 418, 468, 419, 420, 64, 220, 140, 65, 94,
2429 372, 66, 311, 211, 67, 141, 69, 70, 341, 343,
2430 387, 307, 454, 308, 433, 477, 478, 479, 459, 460,
2431 461, 159, 309, 344, 361, 410, 317, 318, 319, 249,
2432 310, 500, 100, 75, 467, 373, 374, 375, 389, 376,
2433 331, 314, 121, 122, 123, 215, 76, 77, 78, 142,
2434 124, 79, 80, 81, 82, 113, 114, 83, 143, 84
2437 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2439 #define YYPACT_NINF -374
2440 static const yytype_int16 yypact[] =
2442 1667, -68, -374, -374, -374, -374, -374, -374, -374, -374,
2443 -30, -97, -374, -57, 20, -374, -374, -374, 49, -374,
2444 2087, -374, 71, -374, 2157, -374, -37, 85, -35, -374,
2445 -374, -374, -374, 6, 8, -374, -374, 2087, 14, 2087,
2446 2087, 2087, -374, 2087, 2087, 2087, 2087, 2087, 627, 88,
2447 177, -374, 497, -374, -374, -374, 81, -374, 2017, -374,
2448 -374, -374, -374, -374, -374, -374, -374, -374, 308, 298,
2449 -374, -374, -374, -374, -374, -374, -374, -374, -374, 79,
2450 -374, 2562, -374, -374, -374, 197, 86, -374, -374, 1919,
2451 -374, -374, -374, -374, -374, -18, 206, -374, -46, -374,
2452 93, 133, 2087, 83, -374, 2087, -374, 2087, 215, 133,
2453 -374, 117, 2562, 94, 127, 133, 133, 201, 133, 133,
2454 -53, 103, 129, 2087, -374, 227, 228, 2087, 2087, 228,
2455 232, -374, -374, 757, -374, -374, 107, -374, -374, -374,
2456 -374, 219, -374, -374, -374, -374, -374, 1017, 170, 236,
2457 -374, 141, 176, -374, 70, 242, -374, 243, -374, 244,
2458 -374, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2459 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2460 2087, 2087, 2087, 2087, -374, -374, 245, 2087, 2087, 2087,
2461 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
2462 2087, 2087, 2087, 2087, 11, -374, -374, 2087, 159, 247,
2463 2087, 1147, -374, 85, -374, 137, 24, -49, 16, 2182,
2464 1793, 130, -374, 2087, 2087, -374, 2087, -374, -374, -374,
2465 -374, -374, 157, 164, -374, 79, 79, 164, -374, -374,
2466 -374, 1919, 262, 134, 157, 2087, 2087, -374, -374, 269,
2467 226, 231, -374, 2562, 1009, 489, 489, 489, 2867, 2867,
2468 2867, 2867, 1009, 1009, 2562, 2562, 2562, 2562, 2562, 2562,
2469 2562, 2562, 2562, 2562, 304, 2623, -374, 349, 349, 349,
2470 2562, 2379, 2684, 2745, 2806, 1009, 1009, 201, 201, 133,
2471 133, 133, 148, 2440, 193, 2087, 281, -40, -374, 167,
2472 2253, -374, 154, 1277, -374, -374, 168, -374, -374, -374,
2473 -374, 1147, -374, 2087, -374, 96, 287, 174, 200, -374,
2474 1919, 181, -374, -374, 169, 1793, -374, -36, -374, 204,
2475 26, 208, 228, 887, 212, -374, -20, 53, -31, 199,
2476 125, 309, 125, 205, 157, 2087, -374, -374, 324, 2316,
2477 -374, 1919, 2087, 207, -374, -374, 1147, 202, 209, 67,
2478 26, -374, -374, 157, 25, -374, 110, 1919, 2087, 181,
2479 -374, -374, 210, -374, -374, -374, -374, 2087, -374, -374,
2480 -374, 39, 2087, 1919, 24, -374, 125, 217, -374, 251,
2481 -374, 208, 2562, -374, -374, -374, -14, 27, 221, -374,
2482 -374, -374, -374, -374, -374, -374, -374, -374, -374, -374,
2483 -374, 253, 233, 287, -374, 234, 241, -374, -374, 110,
2484 -374, 267, -374, 126, -374, -374, -374, 250, -374, 252,
2485 251, -374, 125, 230, -374, -374, 2087, 259, 235, 27,
2486 -374, -374, -374, -374, -374, -374, -374, 362, -374, -374,
2487 1919, -374, 1919, 157, 1407, -374, 366, -374, 347, 254,
2488 249, -374, 2501, 1793, -374, -374, -374, 1793, 1793, 157,
2489 -374, -374, 256, -374, -374, 258, 74, 255, 1537, -374,
2490 -374, -374, -374, 70, -374, -374, 1793, -374, 257, 261,
2491 264, -374, 1407, -374, -374, 385, -374, -374, -374, -374,
2492 1793, 270, 268, 265, 271, -374, 24, 1793, -374, 272,
2493 274, 157, -374, -374
2496 /* YYPGOTO[NTERM-NUM]. */
2497 static const yytype_int16 yypgoto[] =
2499 -374, -374, 260, -374, 352, -285, -374, 98, -373, -39,
2500 1, -84, -310, 31, 2, 17, 351, 289, 89, -374,
2501 -374, -374, -374, -374, -374, -374, -374, -374, -374, -374,
2502 -374, -374, -374, -374, -374, -17, -16, -374, -374, 5,
2503 -374, 13, -374, -374, -374, -374, -374, -374, -374, -202,
2504 36, -374, -374, -374, -374, 0, -374, 356, -374, -374,
2505 -374, 58, -374, 59, -374, -65, -374, -48, -374, -374,
2506 -26, -374, 3, -374, 32, -374, -369, -374, -298, -47,
2507 4, -374, -374, -374, -374, -374, 408, -318, 51, 78,
2508 -237, -374, -99, -374, -374, -374, -374, -374, -374, -374,
2509 -27, -3, -52, -7, -374, -374, -374, -374, -374, -374
2512 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2513 positive, shift that token. If negative, reduce the rule which
2514 number is the opposite. If zero, do what YYDEFACT says.
2515 If YYTABLE_NINF, syntax error. */
2516 #define YYTABLE_NINF -153
2517 static const yytype_int16 yytable[] =
2519 68, 54, 56, 73, 74, 208, 153, 336, 221, 133,
2520 365, 312, 111, 98, 294, 429, 312, 101, 362, 321,
2521 86, 85, 385, 91, 388, 88, 357, 315, 315, 369,
2522 109, 55, 112, 115, 116, 92, 117, 118, 119, 92,
2523 112, 395, 425, 120, 426, 92, 186, 161, -70, 240,
2524 95, 161, 68, 54, 56, 73, 74, 421, 71, 72,
2525 161, 436, 370, 103, 161, 90, 414, 96, 388, 161,
2526 401, 398, 402, 428, 99, 403, 404, 405, 203, 406,
2527 227, 204, 377, 55, 320, 102, 161, 105, 91, 437,
2528 487, 144, 87, 351, 488, 489, 230, 367, 219, 217,
2529 112, 154, 383, 292, 92, 247, 156, 391, 212, 213,
2530 71, 72, 407, 496, 455, 445, 112, 316, 413, 435,
2531 158, 248, 408, 409, 235, 236, 412, 504, 369, 321,
2532 107, 322, 106, 295, 510, 108, 110, 509, 415, 296,
2533 470, 371, 471, 416, 92, 92, 93, 68, 54, 56,
2534 73, 74, 382, 161, 253, 254, 255, 256, 257, 258,
2535 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
2536 269, 270, 271, 272, 273, 274, 275, 145, 55, 161,
2537 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
2538 287, 288, 289, 290, 291, 112, 293, 328, 359, 329,
2539 205, 360, 333, 300, 297, 71, 72, 147, 206, 214,
2540 218, 68, 54, 306, 358, 216, 472, 112, 222, 112,
2541 327, 312, 224, 184, 185, 186, 225, 226, 228, 229,
2542 231, 232, 490, 241, 2, 238, 208, 242, -71, 244,
2543 245, 240, 337, 338, 246, 250, 251, 252, 276, 240,
2544 15, 16, 17, 2, 19, 202, 21, 203, 298, 313,
2545 204, 299, 330, 326, 332, 334, 335, 208, 25, 15,
2546 16, 17, 339, 19, 513, 21, 456, 30, 31, 32,
2547 340, 346, 348, 208, 350, 342, 354, 25, 349, 352,
2548 315, 184, 185, 186, 356, 456, 30, 31, 32, 208,
2549 364, 366, 2, 68, 54, 306, 112, 363, -108, 368,
2550 377, 68, 54, 306, 381, 199, 200, 201, 15, 16,
2551 17, 384, 19, 202, 21, 203, 386, 393, 204, 457,
2552 427, 390, 450, 397, 399, 154, 25, 423, 392, 155,
2553 156, 422, 400, 431, 162, 30, 31, 32, 457, 396,
2554 424, 432, 157, 442, 158, 359, 68, 54, 306, 444,
2555 446, 112, -151, 447, 463, 469, 208, 464, 208, 482,
2556 112, 163, 164, 165, 483, 166, 167, 168, 169, 170,
2557 171, -152, 491, 452, 492, 453, 484, 493, 502, 497,
2558 506, 507, 183, 498, 184, 185, 186, 499, 187, 188,
2559 189, 355, 505, 508, 146, 511, 512, 243, 434, 150,
2560 192, 193, 194, 195, 196, 233, 197, 198, 199, 200,
2561 201, 379, 465, 466, 448, 160, 202, 501, 203, 462,
2562 494, 204, 449, 458, 485, 104, 495, 430, 411, 184,
2563 185, 186, 0, 443, 0, 0, 0, 0, 0, 0,
2564 0, 0, 0, 0, 476, 474, 475, 480, 481, 0,
2565 458, 197, 198, 199, 200, 201, 0, 0, 0, 0,
2566 0, 202, 0, 203, 0, 0, 204, 0, 476, 474,
2567 475, 480, 481, 0, 0, 0, 0, 0, 0, 0,
2568 0, 0, 476, 474, 475, 480, 481, -4, 0, 0,
2569 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2570 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2571 18, 19, 20, 21, 0, 0, 23, 0, 0, 162,
2572 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2573 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2574 34, 0, 35, 36, 0, 0, -153, -153, -153, 0,
2575 37, 38, 0, 0, 170, 171, 0, 39, 0, 0,
2576 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
2577 185, 186, 0, 187, 188, 189, 0, 40, 41, 0,
2578 0, 0, 0, 0, 0, 0, 42, 0, 195, 196,
2579 0, 197, 198, 199, 200, 201, 0, 0, 0, 43,
2580 0, 202, 0, 203, 44, 45, 204, 0, 0, 46,
2581 0, 47, 0, 48, 0, 49, 0, 0, 0, -4,
2582 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2583 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2584 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2585 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2586 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2587 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2588 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2590 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2591 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2592 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2593 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2594 0, 47, 0, 48, 0, 49, 0, 0, 0, 132,
2595 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2596 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2597 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2598 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2599 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2600 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2601 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2603 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2604 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2605 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2606 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2607 0, 47, 0, 48, 0, 49, 0, 0, 0, 239,
2608 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2609 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2610 18, 19, 20, 21, 22, 0, 23, 125, 0, 126,
2611 0, 0, 0, 24, 127, 25, 26, 0, 27, 128,
2612 28, 0, 29, 129, 30, 31, 32, 0, 0, 33,
2613 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2614 37, 38, 0, 130, 0, 0, 0, 39, 0, 0,
2615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2616 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2617 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
2618 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2619 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2620 0, 47, 0, 48, 0, 49, 0, 0, 0, 380,
2621 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2622 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2623 18, 19, 20, 21, 0, 0, 23, 0, 0, -153,
2624 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2625 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2626 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2627 37, 38, 0, 0, -153, -153, 0, 39, 0, 0,
2628 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
2629 185, 186, 0, 187, 188, 189, 0, 40, 41, 0,
2630 0, 0, 0, 0, 0, 0, 42, 0, -153, -153,
2631 0, 197, 198, 199, 200, 201, 0, 0, 0, 43,
2632 0, 202, 0, 203, 44, 45, 204, 0, 0, 46,
2633 0, 47, 0, 48, 0, 49, 0, 0, 0, -3,
2634 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2635 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2636 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2637 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2638 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2639 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2640 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2642 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2643 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
2644 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2645 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2646 0, 47, 0, 48, 0, 49, 0, 0, 0, -15,
2647 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2648 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2649 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2650 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2651 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2652 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2653 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2655 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2656 0, 0, 0, 0, 0, 0, 301, 0, 0, 0,
2657 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2658 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2659 0, 47, 0, 48, 0, 49, 0, 0, 0, -16,
2660 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2661 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2662 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2663 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2664 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2665 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2666 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2668 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2669 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2670 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2671 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2672 0, 47, 0, 48, 0, 49, 0, 0, 0, -142,
2673 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2674 10, 11, 12, 13, 0, 0, 0, 15, 16, 17,
2675 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2676 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2677 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2678 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2679 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2681 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2682 0, 0, 0, 0, 0, 0, 473, 0, 0, 0,
2683 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2684 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2685 0, 47, 0, 48, 0, 49, 0, -3, 0, -143,
2686 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
2687 10, 11, 12, 13, 0, 0, 14, 15, 16, 17,
2688 18, 19, 20, 21, 0, 0, 23, 0, 0, 0,
2689 0, 0, 0, 24, 0, 25, 26, 0, 27, 0,
2690 28, 0, 29, 0, 30, 31, 32, 0, 0, 33,
2691 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2692 37, 38, 0, 0, 0, 0, 0, 39, 0, 0,
2693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2694 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2695 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
2696 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2697 0, 0, 0, 0, 44, 45, 0, 0, 0, 46,
2698 0, 47, 0, 48, 0, 49, 1, 2, 3, 4,
2699 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
2700 0, -118, 0, 15, 16, 17, 18, 19, 20, 21,
2701 22, 0, 23, 125, 0, 126, 0, 0, 0, 24,
2702 127, 25, 26, 0, 27, 128, 28, 0, 29, 129,
2703 30, 31, 32, 0, 0, 33, 34, 0, 35, 36,
2704 0, 0, 0, 0, 0, 0, 37, 38, 0, 130,
2705 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
2706 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2707 0, 0, 0, 40, 41, 0, 0, 0, 0, 0,
2708 0, 0, 131, 0, 0, 0, 0, 0, 0, 0,
2709 0, 0, 0, 0, 0, 43, 0, 0, 0, 0,
2710 44, 45, 0, 0, 0, 46, 0, 47, 0, 48,
2711 0, 49, 1, 2, 3, 4, 0, 5, 6, 7,
2712 8, 9, 10, 11, 12, 13, 0, 0, 0, 15,
2713 16, 17, 18, 19, 20, 21, 22, 0, 23, 125,
2714 0, 126, 0, 0, 0, 24, 127, 25, 26, 0,
2715 27, 128, 28, 0, 29, 129, 30, 31, 32, 0,
2716 0, 33, 34, 0, 35, 36, 0, 0, 0, 0,
2717 0, 0, 37, 38, 0, 130, 0, 0, 0, 39,
2718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2719 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
2720 41, 0, 0, 0, 0, 0, 0, 0, 131, 0,
2721 148, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2722 0, 43, 0, 0, 0, 0, 44, 45, 0, 0,
2723 0, 46, 20, 47, 22, 48, 23, 49, 0, 126,
2724 0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
2725 28, 0, 29, 149, 0, 0, 0, 0, 0, 0,
2726 34, 0, 35, 36, 0, 0, 0, 0, 0, 0,
2727 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2728 97, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2729 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2730 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2731 0, 0, 0, 24, 0, 0, 0, 0, 0, 43,
2732 28, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2733 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2734 37, 0, 0, 0, 0, 0, 0, 39, 0, 0,
2735 97, 0, 3, 4, 0, 5, 6, 7, 8, 9,
2736 0, 0, 0, 0, 0, 0, 0, 40, 41, 0,
2737 0, 0, 20, 0, 22, 0, 23, 0, 0, 0,
2738 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
2739 0, 0, 29, 0, 44, 45, 0, 0, 0, 46,
2740 34, 47, 35, 36, 0, 49, 0, 0, 0, 0,
2741 0, 0, 162, 0, 0, 0, 0, 39, 0, 0,
2742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2743 0, 0, 0, 0, 0, 0, 0, 40, 41, 163,
2744 164, 165, 0, 166, 167, 168, 169, 170, 171, 172,
2745 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2746 183, 0, 184, 185, 186, 0, 187, 188, 189, 46,
2747 0, 47, 0, 0, 190, 49, 191, 0, 192, 193,
2748 194, 195, 196, 162, 197, 198, 199, 200, 201, 0,
2749 0, 0, 0, 0, 202, 0, 203, 0, 0, 204,
2750 0, 0, 0, 0, 0, 323, 0, 0, 0, 0,
2751 163, 164, 165, 0, 166, 167, 168, 169, 170, 171,
2752 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
2753 182, 183, 0, 184, 185, 186, 0, 187, 188, 189,
2754 0, 0, 0, 0, 0, 190, 162, 191, 0, 192,
2755 193, 194, 195, 196, 0, 197, 198, 199, 200, 201,
2756 0, 0, 0, 0, 0, 202, 0, 203, 0, 0,
2757 204, 0, 0, 163, 164, 165, 353, 166, 167, 168,
2758 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
2759 179, 180, 181, 182, 183, 0, 184, 185, 186, 0,
2760 187, 188, 189, 0, 0, 0, 0, 0, 190, 162,
2761 191, 0, 192, 193, 194, 195, 196, 0, 197, 198,
2762 199, 200, 201, 0, 0, 0, 0, 0, 202, 0,
2763 203, 0, 0, 204, 0, 0, 163, 164, 165, 394,
2764 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
2765 176, 177, 178, 179, 180, 181, 182, 183, 0, 184,
2766 185, 186, 0, 187, 188, 189, 0, 0, 0, 0,
2767 162, 190, 0, 191, 345, 192, 193, 194, 195, 196,
2768 0, 197, 198, 199, 200, 201, 0, 0, 0, 0,
2769 0, 202, 0, 203, 0, 0, 204, 163, 164, 165,
2770 0, 166, 167, 168, 169, 170, 171, 172, 173, 174,
2771 175, 176, 177, 178, 179, 180, 181, 182, 183, 0,
2772 184, 185, 186, 0, 187, 188, 189, 0, 0, 0,
2773 0, 162, 190, 0, 191, 0, 192, 193, 194, 195,
2774 196, 0, 197, 198, 199, 200, 201, 0, 0, 0,
2775 0, 0, 202, 0, 203, 347, 0, 204, 163, 164,
2776 165, 0, 166, 167, 168, 169, 170, 171, 172, 173,
2777 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
2778 0, 184, 185, 186, 0, 187, 188, 189, 0, 0,
2779 0, 0, 162, 190, 0, 191, 486, 192, 193, 194,
2780 195, 196, 0, 197, 198, 199, 200, 201, 0, 0,
2781 0, 0, 0, 202, 0, 203, 0, 0, 204, 163,
2782 164, 165, 0, 166, 167, 168, 169, 170, 171, 172,
2783 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
2784 183, 0, 184, 185, 186, 0, 187, 188, 189, 0,
2785 0, 0, 0, 162, 190, 0, 191, 0, 192, 193,
2786 194, 195, 196, 0, 197, 198, 199, 200, 201, 0,
2787 0, 0, 0, 0, 202, 0, 203, 0, 0, 204,
2788 163, 164, 165, 0, 166, 167, 168, 169, 170, 171,
2789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2790 0, 0, 0, 184, 185, 186, 0, 187, 188, 189,
2791 0, 0, 0, 0, 162, 0, 0, 0, 0, 192,
2792 193, 194, 195, 196, 0, 197, 198, 199, 200, 201,
2793 0, 0, 0, 0, 0, 202, 0, 203, 0, 0,
2794 204, 163, 164, 165, 0, 166, 167, 168, 169, 170,
2795 171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2796 0, 0, 0, 0, 184, 185, 186, 0, 187, 188,
2797 189, 0, 0, 0, 0, 162, 0, 0, 0, 0,
2798 0, 193, 194, 195, 196, 0, 197, 198, 199, 200,
2799 201, 0, 0, 0, 0, 0, 202, 0, 203, 0,
2800 0, 204, 163, 164, 165, 0, 166, 167, 168, 169,
2801 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
2802 0, 0, 0, 0, 0, 184, 185, 186, 0, 187,
2803 188, 189, 0, 0, 0, 0, 162, 0, 0, 0,
2804 0, 0, 0, 194, 195, 196, 0, 197, 198, 199,
2805 200, 201, 0, 0, 0, 0, 0, 202, 0, 203,
2806 0, 0, 204, 163, 164, 165, 0, 166, 167, 168,
2807 169, 170, 171, 0, 0, 0, 0, 0, 0, 0,
2808 0, 0, 0, 0, 0, 0, 184, 185, 186, 0,
2809 187, 188, 189, 0, 0, 0, 0, 162, 0, 0,
2810 0, 0, 0, 0, -153, 195, 196, 0, 197, 198,
2811 199, 200, 201, 0, 0, 0, 0, 0, 202, 0,
2812 203, 0, 0, 204, 163, 164, 165, 0, -153, -153,
2813 -153, -153, 170, 171, 0, 0, 0, 0, 0, 0,
2814 0, 0, 0, 0, 0, 0, 0, 184, 185, 186,
2815 0, 187, 188, 189, 0, 0, 0, 0, 0, 0,
2816 0, 0, 0, 0, 0, 0, 195, 196, 0, 197,
2817 198, 199, 200, 201, 0, 0, 0, 0, 0, 202,
2821 static const yytype_int16 yycheck[] =
2823 0, 0, 0, 0, 0, 89, 58, 244, 107, 48,
2824 320, 213, 39, 20, 3, 384, 218, 24, 316, 3,
2825 50, 89, 340, 3, 342, 122, 311, 3, 3, 3,
2826 37, 0, 39, 40, 41, 19, 43, 44, 45, 19,
2827 47, 351, 3, 46, 5, 19, 92, 100, 68, 133,
2828 14, 100, 52, 52, 52, 52, 52, 367, 0, 0,
2829 100, 34, 36, 27, 100, 122, 364, 18, 386, 100,
2830 3, 356, 5, 383, 3, 8, 9, 10, 124, 12,
2831 133, 127, 102, 52, 133, 122, 100, 122, 3, 62,
2832 463, 3, 122, 133, 467, 468, 123, 133, 105, 102,
2833 107, 27, 133, 202, 19, 35, 32, 344, 126, 127,
2834 52, 52, 45, 486, 432, 413, 123, 93, 93, 133,
2835 46, 51, 55, 56, 127, 128, 363, 500, 3, 3,
2836 122, 115, 126, 122, 507, 127, 122, 506, 28, 128,
2837 450, 115, 452, 33, 19, 19, 126, 147, 147, 147,
2838 147, 147, 99, 100, 161, 162, 163, 164, 165, 166,
2839 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
2840 177, 178, 179, 180, 181, 182, 183, 0, 147, 100,
2841 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
2842 197, 198, 199, 200, 201, 202, 203, 224, 102, 226,
2843 3, 105, 241, 210, 207, 147, 147, 126, 122, 3,
2844 127, 211, 211, 211, 313, 122, 453, 224, 3, 226,
2845 223, 423, 105, 90, 91, 92, 132, 100, 125, 100,
2846 3, 3, 469, 126, 4, 3, 320, 18, 68, 3,
2847 99, 325, 245, 246, 68, 3, 3, 3, 3, 333,
2848 20, 21, 22, 4, 24, 122, 26, 124, 99, 122,
2849 127, 14, 105, 133, 100, 3, 132, 351, 38, 20,
2850 21, 22, 3, 24, 511, 26, 46, 47, 48, 49,
2851 54, 133, 89, 367, 3, 54, 132, 38, 295, 122,
2852 3, 90, 91, 92, 126, 46, 47, 48, 49, 383,
2853 100, 132, 4, 303, 303, 303, 313, 133, 127, 105,
2854 102, 311, 311, 311, 102, 114, 115, 116, 20, 21,
2855 22, 122, 24, 122, 26, 124, 17, 3, 127, 99,
2856 382, 126, 65, 126, 132, 27, 38, 127, 345, 31,
2857 32, 368, 133, 126, 40, 47, 48, 49, 99, 352,
2858 377, 100, 44, 132, 46, 102, 356, 356, 356, 126,
2859 126, 368, 132, 122, 105, 3, 450, 132, 452, 3,
2860 377, 67, 68, 69, 27, 71, 72, 73, 74, 75,
2861 76, 132, 126, 133, 126, 133, 132, 132, 3, 132,
2862 122, 126, 88, 132, 90, 91, 92, 133, 94, 95,
2863 96, 303, 132, 132, 52, 133, 132, 147, 391, 58,
2864 106, 107, 108, 109, 110, 126, 112, 113, 114, 115,
2865 116, 332, 439, 439, 419, 69, 122, 492, 124, 436,
2866 478, 127, 419, 433, 460, 27, 483, 386, 360, 90,
2867 91, 92, -1, 411, -1, -1, -1, -1, -1, -1,
2868 -1, -1, -1, -1, 454, 454, 454, 454, 454, -1,
2869 460, 112, 113, 114, 115, 116, -1, -1, -1, -1,
2870 -1, 122, -1, 124, -1, -1, 127, -1, 478, 478,
2871 478, 478, 478, -1, -1, -1, -1, -1, -1, -1,
2872 -1, -1, 492, 492, 492, 492, 492, 0, -1, -1,
2873 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2874 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
2875 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
2876 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2877 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2878 53, -1, 55, 56, -1, -1, 67, 68, 69, -1,
2879 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
2880 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
2881 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
2882 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
2883 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
2884 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
2885 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2886 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2887 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2888 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
2889 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
2890 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
2891 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2892 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
2893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2894 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2895 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2896 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2897 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2898 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2899 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2900 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2901 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
2902 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
2903 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
2904 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2905 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
2906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2907 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2908 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2909 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2910 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2911 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2912 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2913 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2914 23, 24, 25, 26, 27, -1, 29, 30, -1, 32,
2915 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
2916 43, -1, 45, 46, 47, 48, 49, -1, -1, 52,
2917 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2918 63, 64, -1, 66, -1, -1, -1, 70, -1, -1,
2919 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2920 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2921 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2922 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2923 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2924 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2925 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2926 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
2927 23, 24, 25, 26, -1, -1, 29, -1, -1, 40,
2928 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2929 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2930 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2931 63, 64, -1, -1, 75, 76, -1, 70, -1, -1,
2932 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
2933 91, 92, -1, 94, 95, 96, -1, 90, 91, -1,
2934 -1, -1, -1, -1, -1, -1, 99, -1, 109, 110,
2935 -1, 112, 113, 114, 115, 116, -1, -1, -1, 112,
2936 -1, 122, -1, 124, 117, 118, 127, -1, -1, 122,
2937 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2938 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2939 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2940 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
2941 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2942 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2943 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2944 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
2945 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2946 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2947 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2948 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2949 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2950 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2951 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2952 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2953 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
2954 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2955 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2956 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2957 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
2958 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2959 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2960 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2961 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2962 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2963 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2964 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2965 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2966 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
2967 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2968 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2969 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2970 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
2971 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2972 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2973 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2974 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2975 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2976 -1, 124, -1, 126, -1, 128, -1, -1, -1, 132,
2977 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2978 13, 14, 15, 16, -1, -1, -1, 20, 21, 22,
2979 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
2980 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2981 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2982 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2983 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
2984 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2985 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2986 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
2987 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
2988 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
2989 -1, 124, -1, 126, -1, 128, -1, 0, -1, 132,
2990 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
2991 13, 14, 15, 16, -1, -1, 19, 20, 21, 22,
2992 23, 24, 25, 26, -1, -1, 29, -1, -1, -1,
2993 -1, -1, -1, 36, -1, 38, 39, -1, 41, -1,
2994 43, -1, 45, -1, 47, 48, 49, -1, -1, 52,
2995 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
2996 63, 64, -1, -1, -1, -1, -1, 70, -1, -1,
2997 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2998 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
2999 -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
3000 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3001 -1, -1, -1, -1, 117, 118, -1, -1, -1, 122,
3002 -1, 124, -1, 126, -1, 128, 3, 4, 5, 6,
3003 -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3004 -1, 18, -1, 20, 21, 22, 23, 24, 25, 26,
3005 27, -1, 29, 30, -1, 32, -1, -1, -1, 36,
3006 37, 38, 39, -1, 41, 42, 43, -1, 45, 46,
3007 47, 48, 49, -1, -1, 52, 53, -1, 55, 56,
3008 -1, -1, -1, -1, -1, -1, 63, 64, -1, 66,
3009 -1, -1, -1, 70, -1, -1, -1, -1, -1, -1,
3010 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3011 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3012 -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
3013 -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
3014 117, 118, -1, -1, -1, 122, -1, 124, -1, 126,
3015 -1, 128, 3, 4, 5, 6, -1, 8, 9, 10,
3016 11, 12, 13, 14, 15, 16, -1, -1, -1, 20,
3017 21, 22, 23, 24, 25, 26, 27, -1, 29, 30,
3018 -1, 32, -1, -1, -1, 36, 37, 38, 39, -1,
3019 41, 42, 43, -1, 45, 46, 47, 48, 49, -1,
3020 -1, 52, 53, -1, 55, 56, -1, -1, -1, -1,
3021 -1, -1, 63, 64, -1, 66, -1, -1, -1, 70,
3022 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3023 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3024 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
3025 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3026 -1, 112, -1, -1, -1, -1, 117, 118, -1, -1,
3027 -1, 122, 25, 124, 27, 126, 29, 128, -1, 32,
3028 -1, -1, -1, 36, -1, -1, -1, -1, -1, -1,
3029 43, -1, 45, 46, -1, -1, -1, -1, -1, -1,
3030 53, -1, 55, 56, -1, -1, -1, -1, -1, -1,
3031 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3032 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3033 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3034 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3035 -1, -1, -1, 36, -1, -1, -1, -1, -1, 112,
3036 43, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3037 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3038 63, -1, -1, -1, -1, -1, -1, 70, -1, -1,
3039 3, -1, 5, 6, -1, 8, 9, 10, 11, 12,
3040 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
3041 -1, -1, 25, -1, 27, -1, 29, -1, -1, -1,
3042 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
3043 -1, -1, 45, -1, 117, 118, -1, -1, -1, 122,
3044 53, 124, 55, 56, -1, 128, -1, -1, -1, -1,
3045 -1, -1, 40, -1, -1, -1, -1, 70, -1, -1,
3046 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3047 -1, -1, -1, -1, -1, -1, -1, 90, 91, 67,
3048 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3049 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3050 88, -1, 90, 91, 92, -1, 94, 95, 96, 122,
3051 -1, 124, -1, -1, 102, 128, 104, -1, 106, 107,
3052 108, 109, 110, 40, 112, 113, 114, 115, 116, -1,
3053 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3054 -1, -1, -1, -1, -1, 133, -1, -1, -1, -1,
3055 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3056 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3057 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
3058 -1, -1, -1, -1, -1, 102, 40, 104, -1, 106,
3059 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3060 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3061 127, -1, -1, 67, 68, 69, 133, 71, 72, 73,
3062 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
3063 84, 85, 86, 87, 88, -1, 90, 91, 92, -1,
3064 94, 95, 96, -1, -1, -1, -1, -1, 102, 40,
3065 104, -1, 106, 107, 108, 109, 110, -1, 112, 113,
3066 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3067 124, -1, -1, 127, -1, -1, 67, 68, 69, 133,
3068 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3069 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
3070 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
3071 40, 102, -1, 104, 105, 106, 107, 108, 109, 110,
3072 -1, 112, 113, 114, 115, 116, -1, -1, -1, -1,
3073 -1, 122, -1, 124, -1, -1, 127, 67, 68, 69,
3074 -1, 71, 72, 73, 74, 75, 76, 77, 78, 79,
3075 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
3076 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
3077 -1, 40, 102, -1, 104, -1, 106, 107, 108, 109,
3078 110, -1, 112, 113, 114, 115, 116, -1, -1, -1,
3079 -1, -1, 122, -1, 124, 125, -1, 127, 67, 68,
3080 69, -1, 71, 72, 73, 74, 75, 76, 77, 78,
3081 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3082 -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
3083 -1, -1, 40, 102, -1, 104, 105, 106, 107, 108,
3084 109, 110, -1, 112, 113, 114, 115, 116, -1, -1,
3085 -1, -1, -1, 122, -1, 124, -1, -1, 127, 67,
3086 68, 69, -1, 71, 72, 73, 74, 75, 76, 77,
3087 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3088 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
3089 -1, -1, -1, 40, 102, -1, 104, -1, 106, 107,
3090 108, 109, 110, -1, 112, 113, 114, 115, 116, -1,
3091 -1, -1, -1, -1, 122, -1, 124, -1, -1, 127,
3092 67, 68, 69, -1, 71, 72, 73, 74, 75, 76,
3093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3094 -1, -1, -1, 90, 91, 92, -1, 94, 95, 96,
3095 -1, -1, -1, -1, 40, -1, -1, -1, -1, 106,
3096 107, 108, 109, 110, -1, 112, 113, 114, 115, 116,
3097 -1, -1, -1, -1, -1, 122, -1, 124, -1, -1,
3098 127, 67, 68, 69, -1, 71, 72, 73, 74, 75,
3099 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3100 -1, -1, -1, -1, 90, 91, 92, -1, 94, 95,
3101 96, -1, -1, -1, -1, 40, -1, -1, -1, -1,
3102 -1, 107, 108, 109, 110, -1, 112, 113, 114, 115,
3103 116, -1, -1, -1, -1, -1, 122, -1, 124, -1,
3104 -1, 127, 67, 68, 69, -1, 71, 72, 73, 74,
3105 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3106 -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
3107 95, 96, -1, -1, -1, -1, 40, -1, -1, -1,
3108 -1, -1, -1, 108, 109, 110, -1, 112, 113, 114,
3109 115, 116, -1, -1, -1, -1, -1, 122, -1, 124,
3110 -1, -1, 127, 67, 68, 69, -1, 71, 72, 73,
3111 74, 75, 76, -1, -1, -1, -1, -1, -1, -1,
3112 -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
3113 94, 95, 96, -1, -1, -1, -1, 40, -1, -1,
3114 -1, -1, -1, -1, 108, 109, 110, -1, 112, 113,
3115 114, 115, 116, -1, -1, -1, -1, -1, 122, -1,
3116 124, -1, -1, 127, 67, 68, 69, -1, 71, 72,
3117 73, 74, 75, 76, -1, -1, -1, -1, -1, -1,
3118 -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
3119 -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
3120 -1, -1, -1, -1, -1, -1, 109, 110, -1, 112,
3121 113, 114, 115, 116, -1, -1, -1, -1, -1, 122,
3122 -1, 124, -1, -1, 127
3125 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3126 symbol of state STATE-NUM. */
3127 static const yytype_uint8 yystos[] =
3129 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
3130 13, 14, 15, 16, 19, 20, 21, 22, 23, 24,
3131 25, 26, 27, 29, 36, 38, 39, 41, 43, 45,
3132 47, 48, 49, 52, 53, 55, 56, 63, 64, 70,
3133 90, 91, 99, 112, 117, 118, 122, 124, 126, 128,
3134 135, 136, 137, 138, 144, 147, 148, 154, 158, 159,
3135 160, 161, 163, 171, 179, 182, 185, 188, 189, 190,
3136 191, 195, 197, 206, 214, 217, 230, 231, 232, 235,
3137 236, 237, 238, 241, 243, 89, 50, 122, 122, 164,
3138 122, 3, 19, 126, 183, 184, 18, 3, 237, 3,
3139 216, 237, 122, 184, 220, 122, 126, 122, 127, 237,
3140 122, 234, 237, 239, 240, 237, 237, 237, 237, 237,
3141 235, 226, 227, 228, 234, 30, 32, 37, 42, 46,
3142 66, 99, 132, 143, 144, 145, 148, 150, 165, 166,
3143 181, 189, 233, 242, 3, 0, 138, 126, 3, 46,
3144 150, 156, 157, 236, 27, 31, 32, 44, 46, 205,
3145 191, 100, 40, 67, 68, 69, 71, 72, 73, 74,
3146 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3147 85, 86, 87, 88, 90, 91, 92, 94, 95, 96,
3148 102, 104, 106, 107, 108, 109, 110, 112, 113, 114,
3149 115, 116, 122, 124, 127, 3, 122, 162, 145, 146,
3150 172, 187, 126, 127, 3, 229, 122, 235, 127, 237,
3151 180, 226, 3, 155, 105, 132, 100, 133, 125, 100,
3152 234, 3, 3, 151, 152, 235, 235, 151, 3, 132,
3153 145, 126, 18, 136, 3, 99, 68, 35, 51, 213,
3154 3, 3, 3, 237, 237, 237, 237, 237, 237, 237,
3155 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3156 237, 237, 237, 237, 237, 237, 3, 237, 237, 237,
3157 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
3158 237, 237, 226, 237, 3, 122, 128, 235, 99, 14,
3159 237, 99, 139, 140, 141, 147, 148, 195, 197, 206,
3160 214, 186, 183, 122, 225, 3, 93, 210, 211, 212,
3161 133, 3, 115, 133, 142, 143, 133, 235, 234, 234,
3162 105, 224, 100, 143, 3, 132, 224, 235, 235, 3,
3163 54, 192, 54, 193, 207, 105, 133, 125, 89, 237,
3164 3, 133, 122, 133, 132, 141, 126, 139, 226, 102,
3165 105, 208, 212, 133, 100, 146, 132, 133, 105, 3,
3166 36, 115, 184, 219, 220, 221, 223, 102, 149, 152,
3167 132, 102, 99, 133, 122, 221, 17, 194, 221, 222,
3168 126, 224, 237, 3, 133, 146, 235, 126, 139, 132,
3169 133, 3, 5, 8, 9, 10, 12, 45, 55, 56,
3170 209, 223, 224, 93, 212, 28, 33, 173, 175, 177,
3171 178, 146, 234, 127, 234, 3, 5, 236, 146, 210,
3172 222, 126, 100, 198, 149, 133, 34, 62, 167, 168,
3173 169, 170, 132, 208, 126, 212, 126, 122, 173, 175,
3174 65, 153, 133, 133, 196, 221, 46, 99, 189, 202,
3175 203, 204, 237, 105, 132, 169, 170, 218, 176, 3,
3176 146, 146, 224, 99, 144, 148, 189, 199, 200, 201,
3177 206, 214, 3, 27, 132, 204, 105, 142, 142, 142,
3178 224, 126, 126, 132, 201, 213, 142, 132, 132, 133,
3179 215, 199, 3, 174, 142, 132, 122, 126, 132, 210,
3183 #define yyerrok (yyerrstatus = 0)
3184 #define yyclearin (yychar = YYEMPTY)
3185 #define YYEMPTY (-2)
3188 #define YYACCEPT goto yyacceptlab
3189 #define YYABORT goto yyabortlab
3190 #define YYERROR goto yyerrorlab
3193 /* Like YYERROR except do call yyerror. This remains here temporarily
3194 to ease the transition to the new meaning of YYERROR, for GCC.
3195 Once GCC version 2 has supplanted version 1, this can go. */
3197 #define YYFAIL goto yyerrlab
3199 #define YYRECOVERING() (!!yyerrstatus)
3201 #define YYBACKUP(Token, Value) \
3203 if (yychar == YYEMPTY && yylen == 1) \
3207 yytoken = YYTRANSLATE (yychar); \
3213 yyerror (YY_("syntax error: cannot back up")); \
3220 #define YYERRCODE 256
3223 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3224 If N is 0, then set CURRENT to the empty location which ends
3225 the previous symbol: RHS[0] (always defined). */
3227 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3228 #ifndef YYLLOC_DEFAULT
3229 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3233 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3234 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3235 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3236 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3240 (Current).first_line = (Current).last_line = \
3241 YYRHSLOC (Rhs, 0).last_line; \
3242 (Current).first_column = (Current).last_column = \
3243 YYRHSLOC (Rhs, 0).last_column; \
3249 /* YY_LOCATION_PRINT -- Print the location on the stream.
3250 This macro was not mandated originally: define only if we know
3251 we won't break user code: when these are the locations we know. */
3253 #ifndef YY_LOCATION_PRINT
3254 # if YYLTYPE_IS_TRIVIAL
3255 # define YY_LOCATION_PRINT(File, Loc) \
3256 fprintf (File, "%d.%d-%d.%d", \
3257 (Loc).first_line, (Loc).first_column, \
3258 (Loc).last_line, (Loc).last_column)
3260 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3265 /* YYLEX -- calling `yylex' with the right arguments. */
3268 # define YYLEX yylex (YYLEX_PARAM)
3270 # define YYLEX yylex ()
3273 /* Enable debugging if requested. */
3277 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3278 # define YYFPRINTF fprintf
3281 # define YYDPRINTF(Args) \
3287 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3291 YYFPRINTF (stderr, "%s ", Title); \
3292 yy_symbol_print (stderr, \
3294 YYFPRINTF (stderr, "\n"); \
3299 /*--------------------------------.
3300 | Print this symbol on YYOUTPUT. |
3301 `--------------------------------*/
3304 #if (defined __STDC__ || defined __C99__FUNC__ \
3305 || defined __cplusplus || defined _MSC_VER)
3307 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3310 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3313 YYSTYPE const * const yyvaluep;
3319 if (yytype < YYNTOKENS)
3320 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3332 /*--------------------------------.
3333 | Print this symbol on YYOUTPUT. |
3334 `--------------------------------*/
3336 #if (defined __STDC__ || defined __C99__FUNC__ \
3337 || defined __cplusplus || defined _MSC_VER)
3339 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3342 yy_symbol_print (yyoutput, yytype, yyvaluep)
3345 YYSTYPE const * const yyvaluep;
3348 if (yytype < YYNTOKENS)
3349 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3351 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3353 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3354 YYFPRINTF (yyoutput, ")");
3357 /*------------------------------------------------------------------.
3358 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3360 `------------------------------------------------------------------*/
3362 #if (defined __STDC__ || defined __C99__FUNC__ \
3363 || defined __cplusplus || defined _MSC_VER)
3365 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3368 yy_stack_print (yybottom, yytop)
3369 yytype_int16 *yybottom;
3370 yytype_int16 *yytop;
3373 YYFPRINTF (stderr, "Stack now");
3374 for (; yybottom <= yytop; yybottom++)
3376 int yybot = *yybottom;
3377 YYFPRINTF (stderr, " %d", yybot);
3379 YYFPRINTF (stderr, "\n");
3382 # define YY_STACK_PRINT(Bottom, Top) \
3385 yy_stack_print ((Bottom), (Top)); \
3389 /*------------------------------------------------.
3390 | Report that the YYRULE is going to be reduced. |
3391 `------------------------------------------------*/
3393 #if (defined __STDC__ || defined __C99__FUNC__ \
3394 || defined __cplusplus || defined _MSC_VER)
3396 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3399 yy_reduce_print (yyvsp, yyrule)
3404 int yynrhs = yyr2[yyrule];
3406 unsigned long int yylno = yyrline[yyrule];
3407 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3409 /* The symbols being reduced. */
3410 for (yyi = 0; yyi < yynrhs; yyi++)
3412 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3413 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3414 &(yyvsp[(yyi + 1) - (yynrhs)])
3416 YYFPRINTF (stderr, "\n");
3420 # define YY_REDUCE_PRINT(Rule) \
3423 yy_reduce_print (yyvsp, Rule); \
3426 /* Nonzero means print parse trace. It is left uninitialized so that
3427 multiple parsers can coexist. */
3429 #else /* !YYDEBUG */
3430 # define YYDPRINTF(Args)
3431 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3432 # define YY_STACK_PRINT(Bottom, Top)
3433 # define YY_REDUCE_PRINT(Rule)
3434 #endif /* !YYDEBUG */
3437 /* YYINITDEPTH -- initial size of the parser's stacks. */
3439 # define YYINITDEPTH 200
3442 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3443 if the built-in stack extension method is used).
3445 Do not make this value too large; the results are undefined if
3446 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3447 evaluated with infinite-precision integer arithmetic. */
3450 # define YYMAXDEPTH 10000
3458 # if defined __GLIBC__ && defined _STRING_H
3459 # define yystrlen strlen
3461 /* Return the length of YYSTR. */
3462 #if (defined __STDC__ || defined __C99__FUNC__ \
3463 || defined __cplusplus || defined _MSC_VER)
3465 yystrlen (const char *yystr)
3473 for (yylen = 0; yystr[yylen]; yylen++)
3481 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3482 # define yystpcpy stpcpy
3484 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3486 #if (defined __STDC__ || defined __C99__FUNC__ \
3487 || defined __cplusplus || defined _MSC_VER)
3489 yystpcpy (char *yydest, const char *yysrc)
3492 yystpcpy (yydest, yysrc)
3498 const char *yys = yysrc;
3500 while ((*yyd++ = *yys++) != '\0')
3509 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3510 quotes and backslashes, so that it's suitable for yyerror. The
3511 heuristic is that double-quoting is unnecessary unless the string
3512 contains an apostrophe, a comma, or backslash (other than
3513 backslash-backslash). YYSTR is taken from yytname. If YYRES is
3514 null, do not copy; instead, return the length of what the result
3517 yytnamerr (char *yyres, const char *yystr)
3522 char const *yyp = yystr;
3529 goto do_not_strip_quotes;
3533 goto do_not_strip_quotes;
3546 do_not_strip_quotes: ;
3550 return yystrlen (yystr);
3552 return yystpcpy (yyres, yystr) - yyres;
3556 /* Copy into YYRESULT an error message about the unexpected token
3557 YYCHAR while in state YYSTATE. Return the number of bytes copied,
3558 including the terminating null byte. If YYRESULT is null, do not
3559 copy anything; just return the number of bytes that would be
3560 copied. As a special case, return 0 if an ordinary "syntax error"
3561 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3562 size calculation. */
3564 yysyntax_error (char *yyresult, int yystate, int yychar)
3566 int yyn = yypact[yystate];
3568 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3572 int yytype = YYTRANSLATE (yychar);
3573 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3574 YYSIZE_T yysize = yysize0;
3576 int yysize_overflow = 0;
3577 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3578 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3582 /* This is so xgettext sees the translatable formats that are
3583 constructed on the fly. */
3584 YY_("syntax error, unexpected %s");
3585 YY_("syntax error, unexpected %s, expecting %s");
3586 YY_("syntax error, unexpected %s, expecting %s or %s");
3587 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3588 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3592 static char const yyunexpected[] = "syntax error, unexpected %s";
3593 static char const yyexpecting[] = ", expecting %s";
3594 static char const yyor[] = " or %s";
3595 char yyformat[sizeof yyunexpected
3596 + sizeof yyexpecting - 1
3597 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3598 * (sizeof yyor - 1))];
3599 char const *yyprefix = yyexpecting;
3601 /* Start YYX at -YYN if negative to avoid negative indexes in
3603 int yyxbegin = yyn < 0 ? -yyn : 0;
3605 /* Stay within bounds of both yycheck and yytname. */
3606 int yychecklim = YYLAST - yyn + 1;
3607 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3610 yyarg[0] = yytname[yytype];
3611 yyfmt = yystpcpy (yyformat, yyunexpected);
3613 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3614 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3616 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3620 yyformat[sizeof yyunexpected - 1] = '\0';
3623 yyarg[yycount++] = yytname[yyx];
3624 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3625 yysize_overflow |= (yysize1 < yysize);
3627 yyfmt = yystpcpy (yyfmt, yyprefix);
3631 yyf = YY_(yyformat);
3632 yysize1 = yysize + yystrlen (yyf);
3633 yysize_overflow |= (yysize1 < yysize);
3636 if (yysize_overflow)
3637 return YYSIZE_MAXIMUM;
3641 /* Avoid sprintf, as that infringes on the user's name space.
3642 Don't have undefined behavior even if the translation
3643 produced a string with the wrong number of "%s"s. */
3644 char *yyp = yyresult;
3646 while ((*yyp = *yyf) != '\0')
3648 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3650 yyp += yytnamerr (yyp, yyarg[yyi++]);
3663 #endif /* YYERROR_VERBOSE */
3666 /*-----------------------------------------------.
3667 | Release the memory associated to this symbol. |
3668 `-----------------------------------------------*/
3671 #if (defined __STDC__ || defined __C99__FUNC__ \
3672 || defined __cplusplus || defined _MSC_VER)
3674 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
3677 yydestruct (yymsg, yytype, yyvaluep)
3687 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3697 /* Prevent warnings from -Wmissing-prototypes. */
3698 #ifdef YYPARSE_PARAM
3699 #if defined __STDC__ || defined __cplusplus
3700 int yyparse (void *YYPARSE_PARAM);
3704 #else /* ! YYPARSE_PARAM */
3705 #if defined __STDC__ || defined __cplusplus
3710 #endif /* ! YYPARSE_PARAM */
3713 /* The lookahead symbol. */
3716 /* The semantic value of the lookahead symbol. */
3719 /* Number of syntax errors so far. */
3724 /*-------------------------.
3725 | yyparse or yypush_parse. |
3726 `-------------------------*/
3728 #ifdef YYPARSE_PARAM
3729 #if (defined __STDC__ || defined __C99__FUNC__ \
3730 || defined __cplusplus || defined _MSC_VER)
3732 yyparse (void *YYPARSE_PARAM)
3735 yyparse (YYPARSE_PARAM)
3736 void *YYPARSE_PARAM;
3738 #else /* ! YYPARSE_PARAM */
3739 #if (defined __STDC__ || defined __C99__FUNC__ \
3740 || defined __cplusplus || defined _MSC_VER)
3753 /* Number of tokens to shift before error messages enabled. */
3756 /* The stacks and their tools:
3757 `yyss': related to states.
3758 `yyvs': related to semantic values.
3760 Refer to the stacks thru separate pointers, to allow yyoverflow
3761 to reallocate them elsewhere. */
3763 /* The state stack. */
3764 yytype_int16 yyssa[YYINITDEPTH];
3766 yytype_int16 *yyssp;
3768 /* The semantic value stack. */
3769 YYSTYPE yyvsa[YYINITDEPTH];
3773 YYSIZE_T yystacksize;
3777 /* Lookahead token as an internal (translated) token number. */
3779 /* The variables used to return semantic value and location from the
3784 /* Buffer for error messages, and its allocated size. */
3786 char *yymsg = yymsgbuf;
3787 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3790 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3792 /* The number of symbols on the RHS of the reduced rule.
3793 Keep to zero when no symbol should be popped. */
3799 yystacksize = YYINITDEPTH;
3801 YYDPRINTF ((stderr, "Starting parse\n"));
3806 yychar = YYEMPTY; /* Cause a token to be read. */
3808 /* Initialize stack pointers.
3809 Waste one element of value and location stack
3810 so that they stay on the same level as the state stack.
3811 The wasted elements are never initialized. */
3817 /*------------------------------------------------------------.
3818 | yynewstate -- Push a new state, which is found in yystate. |
3819 `------------------------------------------------------------*/
3821 /* In all cases, when you get here, the value and location stacks
3822 have just been pushed. So pushing a state here evens the stacks. */
3828 if (yyss + yystacksize - 1 <= yyssp)
3830 /* Get the current used size of the three stacks, in elements. */
3831 YYSIZE_T yysize = yyssp - yyss + 1;
3835 /* Give user a chance to reallocate the stack. Use copies of
3836 these so that the &'s don't force the real ones into
3838 YYSTYPE *yyvs1 = yyvs;
3839 yytype_int16 *yyss1 = yyss;
3841 /* Each stack pointer address is followed by the size of the
3842 data in use in that stack, in bytes. This used to be a
3843 conditional around just the two extra args, but that might
3844 be undefined if yyoverflow is a macro. */
3845 yyoverflow (YY_("memory exhausted"),
3846 &yyss1, yysize * sizeof (*yyssp),
3847 &yyvs1, yysize * sizeof (*yyvsp),
3853 #else /* no yyoverflow */
3854 # ifndef YYSTACK_RELOCATE
3855 goto yyexhaustedlab;
3857 /* Extend the stack our own way. */
3858 if (YYMAXDEPTH <= yystacksize)
3859 goto yyexhaustedlab;
3861 if (YYMAXDEPTH < yystacksize)
3862 yystacksize = YYMAXDEPTH;
3865 yytype_int16 *yyss1 = yyss;
3866 union yyalloc *yyptr =
3867 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
3869 goto yyexhaustedlab;
3870 YYSTACK_RELOCATE (yyss_alloc, yyss);
3871 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3872 # undef YYSTACK_RELOCATE
3874 YYSTACK_FREE (yyss1);
3877 #endif /* no yyoverflow */
3879 yyssp = yyss + yysize - 1;
3880 yyvsp = yyvs + yysize - 1;
3882 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3883 (unsigned long int) yystacksize));
3885 if (yyss + yystacksize - 1 <= yyssp)
3889 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3891 if (yystate == YYFINAL)
3901 /* Do appropriate processing given the current state. Read a
3902 lookahead token if we need one and don't already have one. */
3904 /* First try to decide what to do without reference to lookahead token. */
3905 yyn = yypact[yystate];
3906 if (yyn == YYPACT_NINF)
3909 /* Not known => get a lookahead token if don't already have one. */
3911 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3912 if (yychar == YYEMPTY)
3914 YYDPRINTF ((stderr, "Reading a token: "));
3918 if (yychar <= YYEOF)
3920 yychar = yytoken = YYEOF;
3921 YYDPRINTF ((stderr, "Now at end of input.\n"));
3925 yytoken = YYTRANSLATE (yychar);
3926 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3929 /* If the proper action on seeing token YYTOKEN is to reduce or to
3930 detect an error, take that action. */
3932 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3937 if (yyn == 0 || yyn == YYTABLE_NINF)
3943 /* Count tokens shifted since error; after three, turn off error
3948 /* Shift the lookahead token. */
3949 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3951 /* Discard the shifted token. */
3960 /*-----------------------------------------------------------.
3961 | yydefault -- do the default action for the current state. |
3962 `-----------------------------------------------------------*/
3964 yyn = yydefact[yystate];
3970 /*-----------------------------.
3971 | yyreduce -- Do a reduction. |
3972 `-----------------------------*/
3974 /* yyn is the number of a rule to reduce with. */
3977 /* If YYLEN is nonzero, implement the default value of the action:
3980 Otherwise, the following line sets YYVAL to garbage.
3981 This behavior is undocumented and Bison
3982 users should not rely upon it. Assigning to YYVAL
3983 unconditionally makes the parser a bit smaller, and it avoids a
3984 GCC warning that YYVAL may be used uninitialized. */
3985 yyval = yyvsp[1-yylen];
3988 YY_REDUCE_PRINT (yyn);
3995 /* Line 1464 of skeleton.m4 */
3996 #line 1769 "parser.y"
3997 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4006 /* Line 1464 of skeleton.m4 */
4007 #line 1770 "parser.y"
4008 {(yyval.code)=code_new();}
4017 /* Line 1464 of skeleton.m4 */
4018 #line 1772 "parser.y"
4019 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4028 /* Line 1464 of skeleton.m4 */
4029 #line 1773 "parser.y"
4030 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4039 /* Line 1464 of skeleton.m4 */
4040 #line 1787 "parser.y"
4041 {(yyval.code)=(yyvsp[(2) - (3)].code);}
4050 /* Line 1464 of skeleton.m4 */
4051 #line 1788 "parser.y"
4061 /* Line 1464 of skeleton.m4 */
4062 #line 1791 "parser.y"
4072 /* Line 1464 of skeleton.m4 */
4073 #line 1798 "parser.y"
4074 {(yyval.code)=(yyvsp[(3) - (4)].code);}
4083 /* Line 1464 of skeleton.m4 */
4084 #line 1800 "parser.y"
4085 {/*TODO*/(yyval.code)=0;}
4094 /* Line 1464 of skeleton.m4 */
4095 #line 1804 "parser.y"
4096 {(yyval.code)=(yyvsp[(1) - (2)].code);}
4105 /* Line 1464 of skeleton.m4 */
4106 #line 1805 "parser.y"
4107 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4116 /* Line 1464 of skeleton.m4 */
4117 #line 1809 "parser.y"
4119 code_t**cc = &global->init->method->body->code;
4120 *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
4130 /* Line 1464 of skeleton.m4 */
4131 #line 1820 "parser.y"
4132 {(yyval.value)=(yyvsp[(2) - (2)].value);}
4141 /* Line 1464 of skeleton.m4 */
4142 #line 1821 "parser.y"
4143 {(yyval.value).c=abc_pushundefined(0);
4144 (yyval.value).t=TYPE_ANY;
4154 /* Line 1464 of skeleton.m4 */
4155 #line 1825 "parser.y"
4156 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4165 /* Line 1464 of skeleton.m4 */
4166 #line 1826 "parser.y"
4167 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4176 /* Line 1464 of skeleton.m4 */
4177 #line 1828 "parser.y"
4178 {(yyval.code) = (yyvsp[(1) - (1)].code);}
4187 /* Line 1464 of skeleton.m4 */
4188 #line 1829 "parser.y"
4189 {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
4198 /* Line 1464 of skeleton.m4 */
4199 #line 1832 "parser.y"
4201 if(variable_exists((yyvsp[(1) - (3)].id)))
4202 syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
4204 if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
4205 syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
4206 (yyvsp[(2) - (3)].classinfo)->name);
4209 int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
4211 if((yyvsp[(2) - (3)].classinfo)) {
4212 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4213 (yyval.code) = (yyvsp[(3) - (3)].value).c;
4214 (yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
4215 (yyval.code) = abc_setlocal((yyval.code), index);
4217 code_free((yyvsp[(3) - (3)].value).c);
4218 (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
4219 (yyval.code) = abc_setlocal((yyval.code), index);
4222 if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
4223 (yyval.code) = (yyvsp[(3) - (3)].value).c;
4224 (yyval.code) = abc_coerce_a((yyval.code));
4225 (yyval.code) = abc_setlocal((yyval.code), index);
4227 code_free((yyvsp[(3) - (3)].value).c);
4228 (yyval.code) = code_new();
4232 /* that's the default for a local register, anyway
4234 state->method->initcode = abc_pushundefined(state->method->initcode);
4235 state->method->initcode = abc_setlocal(state->method->initcode, index);
4237 //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
4247 /* Line 1464 of skeleton.m4 */
4248 #line 1874 "parser.y"
4249 {(yyval.code) = code_new();}
4258 /* Line 1464 of skeleton.m4 */
4259 #line 1875 "parser.y"
4260 {(yyval.code)=(yyvsp[(2) - (2)].code);}
4269 /* Line 1464 of skeleton.m4 */
4270 #line 1878 "parser.y"
4280 /* Line 1464 of skeleton.m4 */
4281 #line 1878 "parser.y"
4284 (yyval.code) = code_new();
4285 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
4286 code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4288 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
4289 if((yyvsp[(7) - (7)].code)) {
4290 myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4292 myif->branch = (yyval.code) = abc_nop((yyval.code));
4293 if((yyvsp[(7) - (7)].code)) {
4294 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
4295 myjmp->branch = (yyval.code) = abc_nop((yyval.code));
4297 (yyval.code) = var_block((yyval.code));
4308 /* Line 1464 of skeleton.m4 */
4309 #line 1897 "parser.y"
4310 {(yyval.code)=code_new();}
4319 /* Line 1464 of skeleton.m4 */
4320 #line 1904 "parser.y"
4322 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
4332 /* Line 1464 of skeleton.m4 */
4333 #line 1907 "parser.y"
4335 (yyval.id)=(yyvsp[(1) - (1)].id);
4345 /* Line 1464 of skeleton.m4 */
4346 #line 1911 "parser.y"
4347 {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
4356 /* Line 1464 of skeleton.m4 */
4357 #line 1912 "parser.y"
4358 {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
4367 /* Line 1464 of skeleton.m4 */
4368 #line 1914 "parser.y"
4370 if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
4371 (yyval.code) = code_new();
4372 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (8)].code));
4373 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4374 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (8)].value).c);
4375 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4376 (yyval.code) = code_append((yyval.code), (yyvsp[(8) - (8)].code));
4377 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4378 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (8)].code));
4379 (yyval.code) = abc_jump((yyval.code), loopstart);
4380 code_t*out = (yyval.code) = abc_nop((yyval.code));
4381 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, out);
4382 continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
4385 (yyval.code) = var_block((yyval.code));
4396 /* Line 1464 of skeleton.m4 */
4397 #line 1934 "parser.y"
4399 variable_t*var = find_variable((yyvsp[(2) - (6)].id));
4400 char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
4401 int it = new_variable(tmp1name, TYPE_INT, 0);
4402 char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
4403 int array = new_variable(tmp1name, 0, 0);
4405 (yyval.code) = code_new();
4406 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4407 (yyval.code) = abc_coerce_a((yyval.code));
4408 (yyval.code) = abc_setlocal((yyval.code), array);
4409 (yyval.code) = abc_pushbyte((yyval.code), 0);
4410 (yyval.code) = abc_setlocal((yyval.code), it);
4412 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4414 (yyval.code) = abc_hasnext2((yyval.code), array, it);
4415 code_t*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
4416 (yyval.code) = abc_getlocal((yyval.code), array);
4417 (yyval.code) = abc_getlocal((yyval.code), it);
4418 if(!(yyvsp[(1) - (6)].for_start).each)
4419 (yyval.code) = abc_nextname((yyval.code));
4421 (yyval.code) = abc_nextvalue((yyval.code));
4422 (yyval.code) = converttype((yyval.code), 0, var->type);
4423 (yyval.code) = abc_setlocal((yyval.code), var->index);
4425 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4426 (yyval.code) = abc_jump((yyval.code), loopstart);
4428 code_t*out = (yyval.code) = abc_nop((yyval.code));
4429 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, out);
4430 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].for_start).name, loopstart);
4434 (yyval.code) = var_block((yyval.code));
4448 /* Line 1464 of skeleton.m4 */
4449 #line 1977 "parser.y"
4459 /* Line 1464 of skeleton.m4 */
4460 #line 1977 "parser.y"
4463 (yyval.code) = code_new();
4465 code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
4466 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4467 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
4468 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4469 myjmp->branch = cont;
4470 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
4471 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4472 code_t*out = (yyval.code) = abc_nop((yyval.code));
4473 breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
4474 continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
4476 (yyval.code) = var_block((yyval.code));
4487 /* Line 1464 of skeleton.m4 */
4488 #line 1996 "parser.y"
4498 /* Line 1464 of skeleton.m4 */
4499 #line 1996 "parser.y"
4501 (yyval.code) = code_new();
4502 code_t*loopstart = (yyval.code) = abc_label((yyval.code));
4503 (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
4504 code_t*cont = (yyval.code) = abc_nop((yyval.code));
4505 (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
4506 (yyval.code) = abc_iftrue((yyval.code), loopstart);
4507 code_t*out = (yyval.code) = abc_nop((yyval.code));
4508 breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
4509 continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
4511 (yyval.code) = var_block((yyval.code));
4522 /* Line 1464 of skeleton.m4 */
4523 #line 2011 "parser.y"
4525 (yyval.code) = abc___break__(0, "");
4535 /* Line 1464 of skeleton.m4 */
4536 #line 2014 "parser.y"
4538 (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
4548 /* Line 1464 of skeleton.m4 */
4549 #line 2017 "parser.y"
4551 (yyval.code) = abc___continue__(0, "");
4561 /* Line 1464 of skeleton.m4 */
4562 #line 2020 "parser.y"
4564 (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
4574 /* Line 1464 of skeleton.m4 */
4575 #line 2024 "parser.y"
4585 /* Line 1464 of skeleton.m4 */
4586 #line 2025 "parser.y"
4587 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4596 /* Line 1464 of skeleton.m4 */
4597 #line 2026 "parser.y"
4598 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4607 /* Line 1464 of skeleton.m4 */
4608 #line 2027 "parser.y"
4609 {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
4618 /* Line 1464 of skeleton.m4 */
4619 #line 2028 "parser.y"
4620 {(yyval.code)=(yyvsp[(1) - (1)].code);}
4629 /* Line 1464 of skeleton.m4 */
4630 #line 2029 "parser.y"
4631 {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
4640 /* Line 1464 of skeleton.m4 */
4641 #line 2031 "parser.y"
4643 (yyval.code) = abc_dup(0);
4644 (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
4645 code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
4646 (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
4647 if((yyval.code)->opcode != OPCODE___BREAK__) {
4648 (yyval.code) = abc___fallthrough__((yyval.code), "");
4650 code_t*e = (yyval.code) = abc_nop((yyval.code));
4661 /* Line 1464 of skeleton.m4 */
4662 #line 2042 "parser.y"
4664 (yyval.code) = (yyvsp[(3) - (3)].code);
4674 /* Line 1464 of skeleton.m4 */
4675 #line 2045 "parser.y"
4685 /* Line 1464 of skeleton.m4 */
4686 #line 2045 "parser.y"
4688 (yyval.code)=(yyvsp[(4) - (8)].value).c;
4689 (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
4690 code_t*out = (yyval.code) = abc_pop((yyval.code));
4691 breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
4693 code_t*c = (yyval.code),*lastblock=0;
4695 if(c->opcode == OPCODE_IFNE) {
4696 if(!c->next) syntaxerror("internal error in fallthrough handling");
4698 } else if(c->opcode == OPCODE___FALLTHROUGH__) {
4700 c->opcode = OPCODE_JUMP;
4701 c->branch = lastblock;
4703 /* fall through end of switch */
4704 c->opcode = OPCODE_NOP;
4710 (yyval.code) = var_block((yyval.code));
4721 /* Line 1464 of skeleton.m4 */
4722 #line 2074 "parser.y"
4723 {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
4732 /* Line 1464 of skeleton.m4 */
4733 #line 2075 "parser.y"
4735 namespace_t name_ns = {ACCESS_PACKAGE, ""};
4736 multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
4738 NEW(abc_exception_t, e)
4739 e->exc_type = sig2mname((yyvsp[(4) - (9)].classinfo));
4740 e->var_name = multiname_clone(&name);
4741 (yyval.exception) = e;
4744 int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
4745 e->target = c = abc_nop(0);
4746 c = abc_setlocal(c, i);
4747 c = code_append(c, (yyvsp[(8) - (9)].code));
4761 /* Line 1464 of skeleton.m4 */
4762 #line 2094 "parser.y"
4763 {new_state();state->exception_name=0;}
4772 /* Line 1464 of skeleton.m4 */
4773 #line 2094 "parser.y"
4775 (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
4776 if(!(yyvsp[(4) - (5)].code)) {
4777 (yyval.exception)=0;
4780 NEW(abc_exception_t, e)
4781 e->exc_type = 0; //all exceptions
4782 e->var_name = 0; //no name
4785 e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
4787 (yyval.exception) = e;
4798 /* Line 1464 of skeleton.m4 */
4799 #line 2111 "parser.y"
4800 {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
4809 /* Line 1464 of skeleton.m4 */
4810 #line 2112 "parser.y"
4811 {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
4820 /* Line 1464 of skeleton.m4 */
4821 #line 2113 "parser.y"
4822 {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
4831 /* Line 1464 of skeleton.m4 */
4832 #line 2114 "parser.y"
4834 (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
4835 (yyval.catch_list).finally = 0;
4836 if((yyvsp[(2) - (2)].exception)) {
4837 list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
4838 (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
4849 /* Line 1464 of skeleton.m4 */
4850 #line 2122 "parser.y"
4852 (yyval.catch_list).l=list_new();
4853 (yyval.catch_list).finally = 0;
4854 if((yyvsp[(1) - (1)].exception)) {
4855 list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
4856 (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
4867 /* Line 1464 of skeleton.m4 */
4868 #line 2131 "parser.y"
4878 /* Line 1464 of skeleton.m4 */
4879 #line 2131 "parser.y"
4881 code_t*out = abc_nop(0);
4883 code_t*start = abc_nop(0);
4884 (yyval.code) = code_append(start, (yyvsp[(4) - (6)].code));
4885 if(!is_break_or_jump((yyvsp[(4) - (6)].code))) {
4886 (yyval.code) = abc_jump((yyval.code), out);
4888 code_t*end = (yyval.code) = abc_nop((yyval.code));
4891 if((yyvsp[(6) - (6)].catch_list).finally)
4892 tmp = new_variable("__finally__", 0, 0);
4894 abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
4897 abc_exception_t*e = l->abc_exception;
4899 (yyval.code) = code_append((yyval.code), e->target);
4900 (yyval.code) = abc_jump((yyval.code), out);
4902 parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
4904 e->target = (yyval.code) = abc_nop((yyval.code));
4905 (yyval.code) = abc___rethrow__((yyval.code));
4913 (yyval.code) = code_append((yyval.code), out);
4915 (yyval.code) = insert_finally((yyval.code), (yyvsp[(6) - (6)].catch_list).finally, tmp);
4917 list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
4919 (yyval.code) = var_block((yyval.code));
4930 /* Line 1464 of skeleton.m4 */
4931 #line 2176 "parser.y"
4933 (yyval.code)=(yyvsp[(2) - (2)].value).c;
4934 (yyval.code)=abc_throw((yyval.code));
4944 /* Line 1464 of skeleton.m4 */
4945 #line 2180 "parser.y"
4947 if(!state->exception_name)
4948 syntaxerror("re-throw only possible within a catch block");
4949 variable_t*v = find_variable(state->exception_name);
4950 (yyval.code)=code_new();
4951 (yyval.code)=abc_getlocal((yyval.code), v->index);
4952 (yyval.code)=abc_throw((yyval.code));
4962 /* Line 1464 of skeleton.m4 */
4963 #line 2191 "parser.y"
4965 (yyval.code) = (yyvsp[(3) - (5)].value).c;
4966 (yyval.code) = abc_pushscope((yyval.code));
4967 (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
4968 (yyval.code) = abc_popscope((yyval.code));
4978 /* Line 1464 of skeleton.m4 */
4979 #line 2201 "parser.y"
4980 {PASS12 (yyval.id)="package";}
4989 /* Line 1464 of skeleton.m4 */
4990 #line 2203 "parser.y"
4991 {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
5000 /* Line 1464 of skeleton.m4 */
5001 #line 2204 "parser.y"
5002 {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
5011 /* Line 1464 of skeleton.m4 */
5012 #line 2206 "parser.y"
5013 {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
5022 /* Line 1464 of skeleton.m4 */
5023 #line 2207 "parser.y"
5024 {PASS12 endpackage();(yyval.code)=0;}
5033 /* Line 1464 of skeleton.m4 */
5034 #line 2208 "parser.y"
5035 {PASS12 startpackage("");}
5044 /* Line 1464 of skeleton.m4 */
5045 #line 2209 "parser.y"
5046 {PASS12 endpackage();(yyval.code)=0;}
5055 /* Line 1464 of skeleton.m4 */
5056 #line 2211 "parser.y"
5059 if(!registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name)) {
5060 as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
5064 classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
5066 syntaxerror("Couldn't import class\n");
5067 state_has_imports();
5068 dict_put(state->imports, c->name, c);
5079 /* Line 1464 of skeleton.m4 */
5080 #line 2225 "parser.y"
5083 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
5084 as3_schedule_package((yyvsp[(2) - (4)].id));
5089 i->package = (yyvsp[(2) - (4)].id);
5090 state_has_imports();
5091 list_append(state->wildcard_imports, i);
5102 /* Line 1464 of skeleton.m4 */
5103 #line 2241 "parser.y"
5104 {PASS12 (yyval.flags)=0;}
5113 /* Line 1464 of skeleton.m4 */
5114 #line 2242 "parser.y"
5115 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
5124 /* Line 1464 of skeleton.m4 */
5125 #line 2243 "parser.y"
5126 {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
5135 /* Line 1464 of skeleton.m4 */
5136 #line 2244 "parser.y"
5137 {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
5146 /* Line 1464 of skeleton.m4 */
5147 #line 2246 "parser.y"
5148 {PASS12 (yyval.token)=FLAG_PUBLIC;}
5157 /* Line 1464 of skeleton.m4 */
5158 #line 2247 "parser.y"
5159 {PASS12 (yyval.token)=FLAG_PRIVATE;}
5168 /* Line 1464 of skeleton.m4 */
5169 #line 2248 "parser.y"
5170 {PASS12 (yyval.token)=FLAG_PROTECTED;}
5179 /* Line 1464 of skeleton.m4 */
5180 #line 2249 "parser.y"
5181 {PASS12 (yyval.token)=FLAG_STATIC;}
5190 /* Line 1464 of skeleton.m4 */
5191 #line 2250 "parser.y"
5192 {PASS12 (yyval.token)=FLAG_DYNAMIC;}
5201 /* Line 1464 of skeleton.m4 */
5202 #line 2251 "parser.y"
5203 {PASS12 (yyval.token)=FLAG_FINAL;}
5212 /* Line 1464 of skeleton.m4 */
5213 #line 2252 "parser.y"
5214 {PASS12 (yyval.token)=FLAG_OVERRIDE;}
5223 /* Line 1464 of skeleton.m4 */
5224 #line 2253 "parser.y"
5225 {PASS12 (yyval.token)=FLAG_NATIVE;}
5234 /* Line 1464 of skeleton.m4 */
5235 #line 2254 "parser.y"
5236 {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
5245 /* Line 1464 of skeleton.m4 */
5246 #line 2255 "parser.y"
5247 {PASS12 (yyval.token)=FLAG_NAMESPACE;}
5256 /* Line 1464 of skeleton.m4 */
5257 #line 2257 "parser.y"
5258 {(yyval.classinfo)=registry_getobjectclass();}
5267 /* Line 1464 of skeleton.m4 */
5268 #line 2258 "parser.y"
5269 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5278 /* Line 1464 of skeleton.m4 */
5279 #line 2260 "parser.y"
5280 {PASS12 (yyval.classinfo_list)=list_new();}
5289 /* Line 1464 of skeleton.m4 */
5290 #line 2261 "parser.y"
5291 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5300 /* Line 1464 of skeleton.m4 */
5301 #line 2263 "parser.y"
5302 {PASS12 (yyval.classinfo_list)=list_new();}
5311 /* Line 1464 of skeleton.m4 */
5312 #line 2264 "parser.y"
5313 {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
5322 /* Line 1464 of skeleton.m4 */
5323 #line 2268 "parser.y"
5324 {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
5333 /* Line 1464 of skeleton.m4 */
5334 #line 2270 "parser.y"
5335 {PASS12 endclass();(yyval.code)=0;}
5344 /* Line 1464 of skeleton.m4 */
5345 #line 2274 "parser.y"
5346 {PASS12 startclass((yyvsp[(1) - (5)].flags)|FLAG_INTERFACE,(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
5355 /* Line 1464 of skeleton.m4 */
5356 #line 2276 "parser.y"
5357 {PASS12 endclass();(yyval.code)=0;}
5366 /* Line 1464 of skeleton.m4 */
5367 #line 2289 "parser.y"
5369 code_t*c = state->cls->static_init->header;
5370 c = code_append(c, (yyvsp[(1) - (1)].code));
5371 state->cls->static_init->header = c;
5381 /* Line 1464 of skeleton.m4 */
5382 #line 2300 "parser.y"
5384 syntaxerror("variable declarations not allowed in interfaces");
5394 /* Line 1464 of skeleton.m4 */
5395 #line 2303 "parser.y"
5398 (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
5399 if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
5400 syntaxerror("invalid method modifiers: interface methods always need to be public");
5402 startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
5403 endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
5404 list_deep_free((yyvsp[(6) - (8)].params).list);
5414 /* Line 1464 of skeleton.m4 */
5415 #line 2318 "parser.y"
5416 {setstaticfunction((yyvsp[(1) - (3)].flags));}
5425 /* Line 1464 of skeleton.m4 */
5426 #line 2318 "parser.y"
5428 int flags = (yyvsp[(1) - (6)].flags);
5429 U8 access = flags2access((yyvsp[(1) - (6)].flags));
5431 varinfo_t* info = 0;
5433 memberinfo_t*i = registry_findmember(state->cls->info, (yyvsp[(3) - (6)].id), 1);
5435 check_override(i, flags);
5437 info = varinfo_register_onclass(state->cls->info, access, (yyvsp[(3) - (6)].id));
5439 slotinfo_t*i = registry_find(state->package, (yyvsp[(3) - (6)].id));
5441 syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(3) - (6)].id));
5443 info = varinfo_register_global(access, state->package, (yyvsp[(3) - (6)].id));
5446 info->type = (yyvsp[(5) - (6)].classinfo);
5447 info->flags = flags;
5450 namespace_t mname_ns = {access, ""};
5451 multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (6)].id)};
5453 trait_list_t**traits;
5457 mname_ns.name = state->package;
5458 traits = &global->init->traits;
5459 code = &global->init->method->body->code;
5460 } else if(flags&FLAG_STATIC) {
5462 traits = &state->cls->abc->static_traits;
5463 code = &state->cls->static_init->header;
5465 // instance variable
5466 traits = &state->cls->abc->traits;
5467 code = &state->cls->init->header;
5471 if((yyvsp[(5) - (6)].classinfo)) {
5472 MULTINAME(m, (yyvsp[(5) - (6)].classinfo));
5473 t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
5475 t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
5477 info->slot = t->slot_id;
5479 /* initalization code (if needed) */
5481 if((yyvsp[(6) - (6)].value).c && !is_pushundefined((yyvsp[(6) - (6)].value).c)) {
5482 c = abc_getlocal_0(c);
5483 c = code_append(c, (yyvsp[(6) - (6)].value).c);
5484 c = converttype(c, (yyvsp[(6) - (6)].value).t, (yyvsp[(5) - (6)].classinfo));
5485 c = abc_setslot(c, t->slot_id);
5488 *code = code_append(*code, c);
5490 if((yyvsp[(2) - (6)].token)==KW_CONST) {
5491 t->kind= TRAIT_CONST;
5495 setstaticfunction(0);
5505 /* Line 1464 of skeleton.m4 */
5506 #line 2391 "parser.y"
5507 {(yyval.constant)=0;}
5516 /* Line 1464 of skeleton.m4 */
5517 #line 2392 "parser.y"
5518 {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
5527 /* Line 1464 of skeleton.m4 */
5528 #line 2394 "parser.y"
5529 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
5538 /* Line 1464 of skeleton.m4 */
5539 #line 2395 "parser.y"
5540 {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
5549 /* Line 1464 of skeleton.m4 */
5550 #line 2396 "parser.y"
5551 {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
5560 /* Line 1464 of skeleton.m4 */
5561 #line 2397 "parser.y"
5562 {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
5571 /* Line 1464 of skeleton.m4 */
5572 #line 2398 "parser.y"
5573 {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
5582 /* Line 1464 of skeleton.m4 */
5583 #line 2400 "parser.y"
5584 {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
5593 /* Line 1464 of skeleton.m4 */
5594 #line 2401 "parser.y"
5595 {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
5604 /* Line 1464 of skeleton.m4 */
5605 #line 2402 "parser.y"
5606 {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
5615 /* Line 1464 of skeleton.m4 */
5616 #line 2403 "parser.y"
5619 as3_warning("Couldn't resolve %s", (yyvsp[(1) - (1)].id));
5620 (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
5630 /* Line 1464 of skeleton.m4 */
5631 #line 2412 "parser.y"
5634 memset(&(yyval.params),0,sizeof((yyval.params)));
5644 /* Line 1464 of skeleton.m4 */
5645 #line 2416 "parser.y"
5648 (yyval.params)=(yyvsp[(1) - (1)].params);
5658 /* Line 1464 of skeleton.m4 */
5659 #line 2422 "parser.y"
5662 memset(&(yyval.params),0,sizeof((yyval.params)));
5663 (yyval.params).varargs=1;
5664 list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
5674 /* Line 1464 of skeleton.m4 */
5675 #line 2428 "parser.y"
5678 (yyval.params) =(yyvsp[(1) - (4)].params);
5679 (yyval.params).varargs=1;
5680 list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
5690 /* Line 1464 of skeleton.m4 */
5691 #line 2436 "parser.y"
5694 (yyval.params) = (yyvsp[(1) - (3)].params);
5695 list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
5705 /* Line 1464 of skeleton.m4 */
5706 #line 2441 "parser.y"
5709 memset(&(yyval.params),0,sizeof((yyval.params)));
5710 list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
5720 /* Line 1464 of skeleton.m4 */
5721 #line 2447 "parser.y"
5723 PASS1 (yyval.param)=0;
5725 (yyval.param) = malloc(sizeof(param_t));
5726 (yyval.param)->name=(yyvsp[(1) - (4)].id);
5727 (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
5728 (yyval.param)->value = (yyvsp[(4) - (4)].constant);
5738 /* Line 1464 of skeleton.m4 */
5739 #line 2455 "parser.y"
5741 PASS1 (yyval.param)=0;
5743 (yyval.param) = malloc(sizeof(param_t));
5744 (yyval.param)->name=(yyvsp[(1) - (2)].id);
5745 (yyval.param)->type = TYPE_ANY;
5746 (yyval.param)->value = (yyvsp[(2) - (2)].constant);
5756 /* Line 1464 of skeleton.m4 */
5757 #line 2463 "parser.y"
5758 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5767 /* Line 1464 of skeleton.m4 */
5768 #line 2464 "parser.y"
5769 {(yyval.token)=(yyvsp[(1) - (1)].token);}
5778 /* Line 1464 of skeleton.m4 */
5779 #line 2465 "parser.y"
5789 /* Line 1464 of skeleton.m4 */
5790 #line 2468 "parser.y"
5791 {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
5800 /* Line 1464 of skeleton.m4 */
5801 #line 2469 "parser.y"
5803 PASS1 old_state();list_deep_free((yyvsp[(6) - (12)].params).list);
5805 if(!state->method->info) syntaxerror("internal error");
5807 code_t*c = method_header(state->method);
5808 c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
5810 endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
5811 list_deep_free((yyvsp[(6) - (12)].params).list);
5822 /* Line 1464 of skeleton.m4 */
5823 #line 2483 "parser.y"
5824 {PASS12 (yyval.id)=0;}
5833 /* Line 1464 of skeleton.m4 */
5834 #line 2485 "parser.y"
5835 {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
5844 /* Line 1464 of skeleton.m4 */
5845 #line 2486 "parser.y"
5847 PASS1 old_state();list_deep_free((yyvsp[(4) - (10)].params).list);
5849 methodinfo_t*f = state->method->info;
5850 if(!f || !f->kind) syntaxerror("internal error");
5852 code_t*c = method_header(state->method);
5853 c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
5855 int index = state->method->var_index;
5856 endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
5857 list_deep_free((yyvsp[(4) - (10)].params).list);
5859 (yyval.value).c = abc_getlocal(0, index);
5860 (yyval.value).t = TYPE_FUNCTION(f);
5870 /* Line 1464 of skeleton.m4 */
5871 #line 2506 "parser.y"
5873 PASS1 (yyval.classinfo)=0;
5875 /* try current package */
5876 slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
5877 if(!s) syntaxerror("Could not find class/method %s\n", (yyvsp[(1) - (1)].id));
5878 (yyval.classinfo) = (classinfo_t*)s;
5888 /* Line 1464 of skeleton.m4 */
5889 #line 2515 "parser.y"
5891 PASS1 static classinfo_t c;
5892 memset(&c, 0, sizeof(c));
5893 c.package = (yyvsp[(1) - (3)].id);
5894 c.name = (yyvsp[(3) - (3)].id);
5895 (yyval.classinfo)=&c;
5897 slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5898 if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
5899 free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
5900 (yyval.classinfo) = (classinfo_t*)s;
5910 /* Line 1464 of skeleton.m4 */
5911 #line 2531 "parser.y"
5912 {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
5921 /* Line 1464 of skeleton.m4 */
5922 #line 2532 "parser.y"
5923 {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
5932 /* Line 1464 of skeleton.m4 */
5933 #line 2534 "parser.y"
5934 {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
5943 /* Line 1464 of skeleton.m4 */
5944 #line 2535 "parser.y"
5945 {(yyval.classinfo)=registry_getanytype();}
5954 /* Line 1464 of skeleton.m4 */
5955 #line 2536 "parser.y"
5956 {(yyval.classinfo)=registry_getanytype();}
5965 /* Line 1464 of skeleton.m4 */
5966 #line 2545 "parser.y"
5967 {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
5976 /* Line 1464 of skeleton.m4 */
5977 #line 2546 "parser.y"
5978 {(yyval.classinfo)=0;}
5987 /* Line 1464 of skeleton.m4 */
5988 #line 2550 "parser.y"
5989 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
5998 /* Line 1464 of skeleton.m4 */
5999 #line 2551 "parser.y"
6000 {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
6009 /* Line 1464 of skeleton.m4 */
6010 #line 2553 "parser.y"
6011 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
6020 /* Line 1464 of skeleton.m4 */
6021 #line 2557 "parser.y"
6022 {(yyval.value_list).len=1;
6023 (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
6033 /* Line 1464 of skeleton.m4 */
6034 #line 2561 "parser.y"
6035 {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
6044 /* Line 1464 of skeleton.m4 */
6045 #line 2562 "parser.y"
6047 (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
6048 (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
6058 /* Line 1464 of skeleton.m4 */
6059 #line 2568 "parser.y"
6061 (yyval.value).c = (yyvsp[(2) - (4)].value).c;
6062 if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
6064 code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
6065 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6066 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6067 (yyval.value).c = code_cutlast((yyval.value).c);
6068 (yyval.value).c = code_append((yyval.value).c, paramcode);
6069 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6070 multiname_destroy(name);
6071 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6072 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6073 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
6074 multiname_t*name = t->name;
6075 (yyval.value).c = code_cutlast((yyval.value).c);
6076 (yyval.value).c = code_append((yyval.value).c, paramcode);
6077 (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
6079 (yyval.value).c = code_append((yyval.value).c, paramcode);
6080 (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
6083 (yyval.value).t = TYPE_ANY;
6084 if(TYPE_IS_CLASS((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
6085 (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
6087 (yyval.value).c = abc_coerce_a((yyval.value).c);
6088 (yyval.value).t = TYPE_ANY;
6099 /* Line 1464 of skeleton.m4 */
6100 #line 2604 "parser.y"
6103 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6104 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6105 (yyval.value).c = code_cutlast((yyval.value).c);
6107 code_t*paramcode = (yyvsp[(3) - (4)].value_list).cc;
6109 (yyval.value).t = TYPE_ANY;
6110 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6111 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6112 (yyval.value).c = code_cutlast((yyval.value).c);
6113 (yyval.value).c = code_append((yyval.value).c, paramcode);
6114 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6115 multiname_destroy(name);
6116 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6117 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6118 trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
6119 if(t->kind!=TRAIT_METHOD) {
6120 //ok: flash allows to assign closures to members.
6122 multiname_t*name = t->name;
6123 (yyval.value).c = code_cutlast((yyval.value).c);
6124 (yyval.value).c = code_append((yyval.value).c, paramcode);
6125 //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
6126 (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6127 } else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
6128 multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
6129 (yyval.value).c = code_cutlast((yyval.value).c);
6130 (yyval.value).c = code_append((yyval.value).c, paramcode);
6131 (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
6132 multiname_destroy(name);
6134 (yyval.value).c = abc_getglobalscope((yyval.value).c);
6135 (yyval.value).c = code_append((yyval.value).c, paramcode);
6136 (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6139 if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
6140 (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
6142 (yyval.value).c = abc_coerce_a((yyval.value).c);
6143 (yyval.value).t = TYPE_ANY;
6154 /* Line 1464 of skeleton.m4 */
6155 #line 2650 "parser.y"
6157 if(!state->cls) syntaxerror("super() not allowed outside of a class");
6158 if(!state->method) syntaxerror("super() not allowed outside of a function");
6159 if(!state->method->is_constructor) syntaxerror("super() not allowed outside of a constructor");
6161 (yyval.value).c = code_new();
6162 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6164 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value_list).cc);
6166 this is dependent on the control path, check this somewhere else
6167 if(state->method->has_super)
6168 syntaxerror("constructor may call super() only once");
6170 state->method->has_super = 1;
6172 (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
6173 (yyval.value).c = abc_pushundefined((yyval.value).c);
6174 (yyval.value).t = TYPE_ANY;
6184 /* Line 1464 of skeleton.m4 */
6185 #line 2671 "parser.y"
6187 (yyval.value).c = (yyvsp[(2) - (2)].value).c;
6188 if((yyval.value).c->opcode == OPCODE_COERCE_A) {
6189 (yyval.value).c = code_cutlast((yyval.value).c);
6191 multiname_t*name = 0;
6192 if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
6193 (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
6194 } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
6195 int slot = (int)(ptroff_t)(yyval.value).c->data[0];
6196 multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
6197 (yyval.value).c = code_cutlast((yyval.value).c);
6198 (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
6200 (yyval.value).c = abc_getlocal_0((yyval.value).c);
6201 MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
6202 (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
6204 (yyval.value).t = TYPE_BOOLEAN;
6214 /* Line 1464 of skeleton.m4 */
6215 #line 2692 "parser.y"
6217 (yyval.code) = abc_returnvoid(0);
6227 /* Line 1464 of skeleton.m4 */
6228 #line 2695 "parser.y"
6230 (yyval.code) = (yyvsp[(2) - (2)].value).c;
6231 (yyval.code) = abc_returnvalue((yyval.code));
6241 /* Line 1464 of skeleton.m4 */
6242 #line 2702 "parser.y"
6243 {(yyval.value)=(yyvsp[(1) - (1)].value);}
6252 /* Line 1464 of skeleton.m4 */
6253 #line 2703 "parser.y"
6254 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6263 /* Line 1464 of skeleton.m4 */
6264 #line 2704 "parser.y"
6266 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6267 (yyval.value).c = cut_last_push((yyval.value).c);
6268 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6269 (yyval.value).t = (yyvsp[(3) - (3)].value).t;
6279 /* Line 1464 of skeleton.m4 */
6280 #line 2710 "parser.y"
6282 (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
6292 /* Line 1464 of skeleton.m4 */
6293 #line 2716 "parser.y"
6294 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6303 /* Line 1464 of skeleton.m4 */
6304 #line 2720 "parser.y"
6305 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6314 /* Line 1464 of skeleton.m4 */
6315 #line 2722 "parser.y"
6316 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6325 /* Line 1464 of skeleton.m4 */
6326 #line 2724 "parser.y"
6327 {(yyval.value) = (yyvsp[(1) - (1)].value);}
6336 /* Line 1464 of skeleton.m4 */
6337 #line 2728 "parser.y"
6339 (yyval.value).c = 0;
6340 namespace_t ns = {ACCESS_PACKAGE, ""};
6341 multiname_t m = {QNAME, &ns, 0, "RegExp"};
6342 if(!(yyvsp[(1) - (1)].regexp).options) {
6343 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6344 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6345 (yyval.value).c = abc_construct((yyval.value).c, 1);
6347 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
6348 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
6349 (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
6350 (yyval.value).c = abc_construct((yyval.value).c, 2);
6352 (yyval.value).t = TYPE_REGEXP;
6362 /* Line 1464 of skeleton.m4 */
6363 #line 2745 "parser.y"
6364 {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
6365 //MULTINAME(m, registry_getintclass());
6366 //$$.c = abc_coerce2($$.c, &m); // FIXME
6367 (yyval.value).t = TYPE_INT;
6377 /* Line 1464 of skeleton.m4 */
6378 #line 2750 "parser.y"
6379 {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
6380 (yyval.value).t = TYPE_INT;
6390 /* Line 1464 of skeleton.m4 */
6391 #line 2753 "parser.y"
6392 {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
6393 (yyval.value).t = TYPE_INT;
6403 /* Line 1464 of skeleton.m4 */
6404 #line 2756 "parser.y"
6405 {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
6406 (yyval.value).t = TYPE_UINT;
6416 /* Line 1464 of skeleton.m4 */
6417 #line 2759 "parser.y"
6418 {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
6419 (yyval.value).t = TYPE_FLOAT;
6429 /* Line 1464 of skeleton.m4 */
6430 #line 2762 "parser.y"
6431 {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
6432 (yyval.value).t = TYPE_STRING;
6442 /* Line 1464 of skeleton.m4 */
6443 #line 2765 "parser.y"
6444 {(yyval.value).c = abc_pushundefined(0);
6445 (yyval.value).t = TYPE_ANY;
6455 /* Line 1464 of skeleton.m4 */
6456 #line 2768 "parser.y"
6457 {(yyval.value).c = abc_pushtrue(0);
6458 (yyval.value).t = TYPE_BOOLEAN;
6468 /* Line 1464 of skeleton.m4 */
6469 #line 2771 "parser.y"
6470 {(yyval.value).c = abc_pushfalse(0);
6471 (yyval.value).t = TYPE_BOOLEAN;
6481 /* Line 1464 of skeleton.m4 */
6482 #line 2774 "parser.y"
6483 {(yyval.value).c = abc_pushnull(0);
6484 (yyval.value).t = TYPE_NULL;
6494 /* Line 1464 of skeleton.m4 */
6495 #line 2778 "parser.y"
6496 {(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);
6497 (yyval.value).t = TYPE_BOOLEAN;
6507 /* Line 1464 of skeleton.m4 */
6508 #line 2781 "parser.y"
6509 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
6510 (yyval.value).t = TYPE_BOOLEAN;
6520 /* Line 1464 of skeleton.m4 */
6521 #line 2784 "parser.y"
6522 {(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);
6523 (yyval.value).t = TYPE_BOOLEAN;
6533 /* Line 1464 of skeleton.m4 */
6534 #line 2787 "parser.y"
6535 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
6536 (yyval.value).t = TYPE_BOOLEAN;
6546 /* Line 1464 of skeleton.m4 */
6547 #line 2790 "parser.y"
6548 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
6549 (yyval.value).t = TYPE_BOOLEAN;
6559 /* Line 1464 of skeleton.m4 */
6560 #line 2793 "parser.y"
6561 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
6562 (yyval.value).t = TYPE_BOOLEAN;
6572 /* Line 1464 of skeleton.m4 */
6573 #line 2796 "parser.y"
6574 {(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);
6575 (yyval.value).t = TYPE_BOOLEAN;
6585 /* Line 1464 of skeleton.m4 */
6586 #line 2799 "parser.y"
6587 {(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);
6588 (yyval.value).t = TYPE_BOOLEAN;
6598 /* Line 1464 of skeleton.m4 */
6599 #line 2803 "parser.y"
6600 {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
6601 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6602 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6603 (yyval.value).c = abc_dup((yyval.value).c);
6604 code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
6605 (yyval.value).c = cut_last_push((yyval.value).c);
6606 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6607 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6608 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6609 jmp->branch = label;
6619 /* Line 1464 of skeleton.m4 */
6620 #line 2814 "parser.y"
6622 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
6623 /*printf("%08x:\n",$1.t);
6624 code_dump($1.c, 0, 0, "", stdout);
6625 printf("%08x:\n",$3.t);
6626 code_dump($3.c, 0, 0, "", stdout);
6627 printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
6628 (yyval.value).c = (yyvsp[(1) - (3)].value).c;
6629 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
6630 (yyval.value).c = abc_dup((yyval.value).c);
6631 code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
6632 (yyval.value).c = cut_last_push((yyval.value).c);
6633 (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
6634 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
6635 code_t*label = (yyval.value).c = abc_label((yyval.value).c);
6636 jmp->branch = label;
6646 /* Line 1464 of skeleton.m4 */
6647 #line 2832 "parser.y"
6648 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6649 (yyval.value).c = abc_not((yyval.value).c);
6650 (yyval.value).t = TYPE_BOOLEAN;
6660 /* Line 1464 of skeleton.m4 */
6661 #line 2837 "parser.y"
6662 {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
6663 (yyval.value).c = abc_bitnot((yyval.value).c);
6664 (yyval.value).t = TYPE_INT;
6674 /* Line 1464 of skeleton.m4 */
6675 #line 2842 "parser.y"
6676 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6677 (yyval.value).c = abc_bitand((yyval.value).c);
6678 (yyval.value).t = TYPE_INT;
6688 /* Line 1464 of skeleton.m4 */
6689 #line 2847 "parser.y"
6690 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6691 (yyval.value).c = abc_bitxor((yyval.value).c);
6692 (yyval.value).t = TYPE_INT;
6702 /* Line 1464 of skeleton.m4 */
6703 #line 2852 "parser.y"
6704 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6705 (yyval.value).c = abc_bitor((yyval.value).c);
6706 (yyval.value).t = TYPE_INT;
6716 /* Line 1464 of skeleton.m4 */
6717 #line 2857 "parser.y"
6718 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6719 (yyval.value).c = abc_rshift((yyval.value).c);
6720 (yyval.value).t = TYPE_INT;
6730 /* Line 1464 of skeleton.m4 */
6731 #line 2861 "parser.y"
6732 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6733 (yyval.value).c = abc_urshift((yyval.value).c);
6734 (yyval.value).t = TYPE_INT;
6744 /* Line 1464 of skeleton.m4 */
6745 #line 2865 "parser.y"
6746 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6747 (yyval.value).c = abc_lshift((yyval.value).c);
6748 (yyval.value).t = TYPE_INT;
6758 /* Line 1464 of skeleton.m4 */
6759 #line 2870 "parser.y"
6760 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6761 (yyval.value).c = abc_divide((yyval.value).c);
6762 (yyval.value).t = TYPE_NUMBER;
6772 /* Line 1464 of skeleton.m4 */
6773 #line 2874 "parser.y"
6774 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6775 (yyval.value).c = abc_modulo((yyval.value).c);
6776 (yyval.value).t = TYPE_NUMBER;
6786 /* Line 1464 of skeleton.m4 */
6787 #line 2878 "parser.y"
6788 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6789 if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
6790 (yyval.value).c = abc_add_i((yyval.value).c);
6791 (yyval.value).t = TYPE_INT;
6793 (yyval.value).c = abc_add((yyval.value).c);
6794 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
6805 /* Line 1464 of skeleton.m4 */
6806 #line 2887 "parser.y"
6807 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6808 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6809 (yyval.value).c = abc_subtract_i((yyval.value).c);
6810 (yyval.value).t = TYPE_INT;
6812 (yyval.value).c = abc_subtract((yyval.value).c);
6813 (yyval.value).t = TYPE_NUMBER;
6824 /* Line 1464 of skeleton.m4 */
6825 #line 2896 "parser.y"
6826 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6827 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
6828 (yyval.value).c = abc_multiply_i((yyval.value).c);
6829 (yyval.value).t = TYPE_INT;
6831 (yyval.value).c = abc_multiply((yyval.value).c);
6832 (yyval.value).t = TYPE_NUMBER;
6843 /* Line 1464 of skeleton.m4 */
6844 #line 2906 "parser.y"
6845 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
6846 (yyval.value).c = abc_in((yyval.value).c);
6847 (yyval.value).t = TYPE_BOOLEAN;
6857 /* Line 1464 of skeleton.m4 */
6858 #line 2911 "parser.y"
6859 {char use_astype=0; // flash player's astype works differently than astypelate
6860 if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
6861 MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
6862 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
6863 (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
6865 (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6866 (yyval.value).c = abc_astypelate((yyval.value).c);
6867 (yyval.value).t = TYPE_ANY;
6878 /* Line 1464 of skeleton.m4 */
6879 #line 2924 "parser.y"
6880 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6881 (yyval.value).c = abc_instanceof((yyval.value).c);
6882 (yyval.value).t = TYPE_BOOLEAN;
6892 /* Line 1464 of skeleton.m4 */
6893 #line 2929 "parser.y"
6894 {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
6895 (yyval.value).c = abc_istypelate((yyval.value).c);
6896 (yyval.value).t = TYPE_BOOLEAN;
6906 /* Line 1464 of skeleton.m4 */
6907 #line 2934 "parser.y"
6909 (yyval.value).c = (yyvsp[(3) - (4)].value).c;
6910 (yyval.value).c = abc_typeof((yyval.value).c);
6911 (yyval.value).t = TYPE_STRING;
6921 /* Line 1464 of skeleton.m4 */
6922 #line 2940 "parser.y"
6924 (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
6925 (yyval.value).c = abc_pushundefined((yyval.value).c);
6926 (yyval.value).t = TYPE_ANY;
6936 /* Line 1464 of skeleton.m4 */
6937 #line 2946 "parser.y"
6938 { (yyval.value).c = abc_pushundefined(0);
6939 (yyval.value).t = TYPE_ANY;
6949 /* Line 1464 of skeleton.m4 */
6950 #line 2950 "parser.y"
6951 {(yyval.value)=(yyvsp[(2) - (3)].value);}
6960 /* Line 1464 of skeleton.m4 */
6961 #line 2952 "parser.y"
6963 (yyval.value)=(yyvsp[(2) - (2)].value);
6964 if(IS_INT((yyvsp[(2) - (2)].value).t)) {
6965 (yyval.value).c=abc_negate_i((yyval.value).c);
6966 (yyval.value).t = TYPE_INT;
6968 (yyval.value).c=abc_negate((yyval.value).c);
6969 (yyval.value).t = TYPE_NUMBER;
6980 /* Line 1464 of skeleton.m4 */
6981 #line 2963 "parser.y"
6983 (yyval.value).c = (yyvsp[(1) - (4)].value).c;
6984 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
6986 MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
6987 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
6988 (yyval.value).t = 0; // array elements have unknown type
6998 /* Line 1464 of skeleton.m4 */
6999 #line 2972 "parser.y"
7001 (yyval.value).c = code_new();
7002 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7003 (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
7004 (yyval.value).t = registry_getarrayclass();
7014 /* Line 1464 of skeleton.m4 */
7015 #line 2979 "parser.y"
7016 {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
7025 /* Line 1464 of skeleton.m4 */
7026 #line 2980 "parser.y"
7027 {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
7036 /* Line 1464 of skeleton.m4 */
7037 #line 2982 "parser.y"
7039 (yyval.value_list).cc = 0;
7040 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
7041 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
7042 (yyval.value_list).len = 2;
7052 /* Line 1464 of skeleton.m4 */
7053 #line 2988 "parser.y"
7055 (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
7056 (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
7057 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
7058 (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
7068 /* Line 1464 of skeleton.m4 */
7069 #line 2997 "parser.y"
7071 (yyval.value).c = code_new();
7072 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
7073 (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
7074 (yyval.value).t = registry_getobjectclass();
7084 /* Line 1464 of skeleton.m4 */
7085 #line 3004 "parser.y"
7087 code_t*c = (yyvsp[(3) - (3)].value).c;
7088 if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
7089 c=abc_multiply_i(c);
7093 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
7094 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7095 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7105 /* Line 1464 of skeleton.m4 */
7106 #line 3016 "parser.y"
7108 code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
7109 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
7110 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7111 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7121 /* Line 1464 of skeleton.m4 */
7122 #line 3022 "parser.y"
7124 code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
7125 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
7126 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7127 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7137 /* Line 1464 of skeleton.m4 */
7138 #line 3028 "parser.y"
7140 code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
7141 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
7142 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7143 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7153 /* Line 1464 of skeleton.m4 */
7154 #line 3034 "parser.y"
7156 code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
7157 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
7158 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7159 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7169 /* Line 1464 of skeleton.m4 */
7170 #line 3040 "parser.y"
7172 code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
7173 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
7174 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7175 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7185 /* Line 1464 of skeleton.m4 */
7186 #line 3046 "parser.y"
7188 code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
7189 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7190 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7191 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7201 /* Line 1464 of skeleton.m4 */
7202 #line 3052 "parser.y"
7204 code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c);
7205 c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
7206 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7207 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7217 /* Line 1464 of skeleton.m4 */
7218 #line 3058 "parser.y"
7220 code_t*c = (yyvsp[(3) - (3)].value).c;
7222 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7226 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
7229 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7230 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7240 /* Line 1464 of skeleton.m4 */
7241 #line 3071 "parser.y"
7242 { code_t*c = (yyvsp[(3) - (3)].value).c;
7243 if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
7244 c=abc_subtract_i(c);
7247 c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
7250 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
7251 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7261 /* Line 1464 of skeleton.m4 */
7262 #line 3082 "parser.y"
7264 c = code_append(c, (yyvsp[(3) - (3)].value).c);
7265 c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
7266 (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
7267 (yyval.value).t = (yyvsp[(1) - (3)].value).t;
7277 /* Line 1464 of skeleton.m4 */
7278 #line 3089 "parser.y"
7280 (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
7281 (yyval.value).c = (yyvsp[(1) - (5)].value).c;
7282 code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
7283 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
7284 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7285 code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
7286 (yyval.value).c = j1->branch = abc_label((yyval.value).c);
7287 (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
7288 (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
7289 (yyval.value).c = j2->branch = abc_label((yyval.value).c);
7299 /* Line 1464 of skeleton.m4 */
7300 #line 3102 "parser.y"
7302 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7303 if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7304 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
7305 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
7306 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
7307 (yyval.value).c = abc_getlocal(0, nr);
7308 (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
7309 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
7310 (yyval.value).c = abc_getlocal(0, nr);
7311 (yyval.value).c = abc_inclocal((yyval.value).c, nr);
7312 } else syntaxerror("internal error");
7314 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7315 c=abc_increment_i(c);
7321 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7322 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7323 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7334 /* Line 1464 of skeleton.m4 */
7335 #line 3129 "parser.y"
7337 classinfo_t*type = (yyvsp[(1) - (2)].value).t;
7338 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7339 c=abc_decrement_i(c);
7345 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
7346 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
7347 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
7357 /* Line 1464 of skeleton.m4 */
7358 #line 3143 "parser.y"
7360 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7361 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7362 c=abc_increment_i(c);
7368 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7369 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7370 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7380 /* Line 1464 of skeleton.m4 */
7381 #line 3157 "parser.y"
7383 classinfo_t*type = (yyvsp[(2) - (2)].value).t;
7384 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
7385 c=abc_decrement_i(c);
7391 c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
7392 (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
7393 (yyval.value).t = (yyvsp[(2) - (2)].value).t;
7403 /* Line 1464 of skeleton.m4 */
7404 #line 3172 "parser.y"
7405 { if(!state->cls->info)
7406 syntaxerror("super keyword not allowed outside a class");
7407 classinfo_t*t = state->cls->info->superclass;
7408 if(!t) t = TYPE_OBJECT;
7410 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7411 namespace_t ns = {f->access, ""};
7412 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7413 (yyval.value).c = 0;
7414 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7415 (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
7416 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7426 /* Line 1464 of skeleton.m4 */
7427 #line 3186 "parser.y"
7430 (yyval.value).c = abc_pushundefined(0);
7431 (yyval.value).t = 0;
7432 as3_warning("ignored @ operator");
7442 /* Line 1464 of skeleton.m4 */
7443 #line 3193 "parser.y"
7445 // child attribute TODO
7446 (yyval.value).c = abc_pushundefined(0);
7447 (yyval.value).t = 0;
7448 as3_warning("ignored .@ operator");
7458 /* Line 1464 of skeleton.m4 */
7459 #line 3200 "parser.y"
7461 // namespace declaration TODO
7462 (yyval.value).c = abc_pushundefined(0);
7463 (yyval.value).t = 0;
7464 as3_warning("ignored :: operator");
7474 /* Line 1464 of skeleton.m4 */
7475 #line 3207 "parser.y"
7478 (yyval.value).c = abc_pushundefined(0);
7479 (yyval.value).t = 0;
7480 as3_warning("ignored .. operator");
7490 /* Line 1464 of skeleton.m4 */
7491 #line 3214 "parser.y"
7494 (yyval.value).c = abc_pushundefined(0);
7495 (yyval.value).t = 0;
7496 as3_warning("ignored .() operator");
7506 /* Line 1464 of skeleton.m4 */
7507 #line 3226 "parser.y"
7508 {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
7509 classinfo_t*t = (yyvsp[(1) - (3)].value).t;
7511 if(TYPE_IS_CLASS(t) && t->data) {
7516 memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
7518 if(f && !is_static != !(f->flags&FLAG_STATIC))
7520 if(f && f->slot && !noslot) {
7521 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7523 MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
7524 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7526 /* determine type */
7527 (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
7528 if(!(yyval.value).t)
7529 (yyval.value).c = abc_coerce_a((yyval.value).c);
7531 /* when resolving a property on an unknown type, we do know the
7532 name of the property (and don't seem to need the package), but
7533 we need to make avm2 try out all access modes */
7534 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
7535 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7536 (yyval.value).c = abc_coerce_a((yyval.value).c);
7537 (yyval.value).t = registry_getanytype();
7548 /* Line 1464 of skeleton.m4 */
7549 #line 3259 "parser.y"
7551 (yyval.value).t = 0;
7552 (yyval.value).c = 0;
7557 /* look at variables */
7558 if((v = find_variable((yyvsp[(1) - (1)].id)))) {
7559 // $1 is a local variable
7560 (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
7561 (yyval.value).t = v->type;
7565 int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
7567 /* look at current class' members */
7568 if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
7569 (f->flags&FLAG_STATIC) >= i_am_static) {
7570 // $1 is a function in this class
7571 int var_is_static = (f->flags&FLAG_STATIC);
7573 if(f->kind == INFOTYPE_METHOD) {
7574 (yyval.value).t = TYPE_FUNCTION(f);
7576 (yyval.value).t = f->type;
7578 if(var_is_static && !i_am_static) {
7579 /* access to a static member from a non-static location.
7580 do this via findpropstrict:
7581 there doesn't seem to be any non-lookup way to access
7582 static properties of a class */
7583 state->method->late_binding = 1;
7584 (yyval.value).t = f->type;
7585 namespace_t ns = {f->access, ""};
7586 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7587 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7588 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7590 } else if(f->slot>0) {
7591 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7592 (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
7595 namespace_t ns = {f->access, ""};
7596 multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
7597 (yyval.value).c = abc_getlocal_0((yyval.value).c);
7598 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7603 /* look at actual classes, in the current package and imported */
7604 if((a = find_class((yyvsp[(1) - (1)].id)))) {
7605 if(a->access == ACCESS_PACKAGEINTERNAL &&
7606 strcmp(a->package, state->package) &&
7607 strcmp(a->package, internal_filename_package)
7609 syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
7610 infotypename(a),(yyvsp[(1) - (1)].id), a->package, state->package);
7612 if(a->kind != INFOTYPE_CLASS) {
7614 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7615 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7616 if(a->kind == INFOTYPE_METHOD) {
7617 methodinfo_t*f = (methodinfo_t*)a;
7618 (yyval.value).t = TYPE_FUNCTION(f);
7620 varinfo_t*v = (varinfo_t*)a;
7621 (yyval.value).t = v->type;
7624 classinfo_t*c = (classinfo_t*)a;
7626 (yyval.value).c = abc_getglobalscope((yyval.value).c);
7627 (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
7630 (yyval.value).c = abc_getlex2((yyval.value).c, &m);
7632 (yyval.value).t = TYPE_CLASS(c);
7637 /* unknown object, let the avm2 resolve it */
7639 as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
7640 state->method->late_binding = 1;
7642 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
7644 (yyval.value).t = 0;
7645 (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
7646 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
7657 /* Line 1464 of skeleton.m4 */
7658 #line 3361 "parser.y"
7668 /* Line 1464 of skeleton.m4 */
7669 #line 3362 "parser.y"
7679 /* Line 1464 of skeleton.m4 */
7680 #line 3363 "parser.y"
7690 /* Line 1464 of skeleton.m4 */
7691 #line 3365 "parser.y"
7694 tokenizer_register_namespace((yyvsp[(3) - (3)].id));
7703 /* Line 1464 of skeleton.m4 */
7704 #line 7705 "parser.tab.c"
7707 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7711 YY_STACK_PRINT (yyss, yyssp);
7715 /* Now `shift' the result of the reduction. Determine what state
7716 that goes to, based on the state we popped back to and the rule
7717 number reduced by. */
7721 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7722 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7723 yystate = yytable[yystate];
7725 yystate = yydefgoto[yyn - YYNTOKENS];
7730 /*------------------------------------.
7731 | yyerrlab -- here on detecting error |
7732 `------------------------------------*/
7734 /* If not already recovering from an error, report this error. */
7738 #if ! YYERROR_VERBOSE
7739 yyerror (YY_("syntax error"));
7742 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7743 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7745 YYSIZE_T yyalloc = 2 * yysize;
7746 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7747 yyalloc = YYSTACK_ALLOC_MAXIMUM;
7748 if (yymsg != yymsgbuf)
7749 YYSTACK_FREE (yymsg);
7750 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7752 yymsg_alloc = yyalloc;
7756 yymsg_alloc = sizeof yymsgbuf;
7760 if (0 < yysize && yysize <= yymsg_alloc)
7762 (void) yysyntax_error (yymsg, yystate, yychar);
7767 yyerror (YY_("syntax error"));
7769 goto yyexhaustedlab;
7777 if (yyerrstatus == 3)
7779 /* If just tried and failed to reuse lookahead token after an
7780 error, discard it. */
7782 if (yychar <= YYEOF)
7784 /* Return failure if at end of input. */
7785 if (yychar == YYEOF)
7790 yydestruct ("Error: discarding",
7796 /* Else will try to reuse lookahead token after shifting the error
7801 /*---------------------------------------------------.
7802 | yyerrorlab -- error raised explicitly by YYERROR. |
7803 `---------------------------------------------------*/
7806 /* Pacify compilers like GCC when the user code never invokes
7807 YYERROR and the label yyerrorlab therefore never appears in user
7809 if (/*CONSTCOND*/ 0)
7812 /* Do not reclaim the symbols of the rule which action triggered
7816 YY_STACK_PRINT (yyss, yyssp);
7821 /*-------------------------------------------------------------.
7822 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7823 `-------------------------------------------------------------*/
7825 yyerrstatus = 3; /* Each real token shifted decrements this. */
7829 yyn = yypact[yystate];
7830 if (yyn != YYPACT_NINF)
7833 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7841 /* Pop the current state because it cannot handle the error token. */
7846 yydestruct ("Error: popping",
7847 yystos[yystate], yyvsp);
7850 YY_STACK_PRINT (yyss, yyssp);
7856 /* Shift the error token. */
7857 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7863 /*-------------------------------------.
7864 | yyacceptlab -- YYACCEPT comes here. |
7865 `-------------------------------------*/
7870 /*-----------------------------------.
7871 | yyabortlab -- YYABORT comes here. |
7872 `-----------------------------------*/
7877 #if !defined(yyoverflow) || YYERROR_VERBOSE
7878 /*-------------------------------------------------.
7879 | yyexhaustedlab -- memory exhaustion comes here. |
7880 `-------------------------------------------------*/
7882 yyerror (YY_("memory exhausted"));
7888 if (yychar != YYEMPTY)
7889 yydestruct ("Cleanup: discarding lookahead",
7891 /* Do not reclaim the symbols of the rule which action triggered
7892 this YYABORT or YYACCEPT. */
7894 YY_STACK_PRINT (yyss, yyssp);
7895 while (yyssp != yyss)
7897 yydestruct ("Cleanup: popping",
7898 yystos[*yyssp], yyvsp);
7903 YYSTACK_FREE (yyss);
7906 if (yymsg != yymsgbuf)
7907 YYSTACK_FREE (yymsg);
7909 /* Make sure YYID is used. */
7910 return YYID (yyresult);