#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse avm2_parse
-#define yylex avm2_lex
-#define yyerror avm2_error
-#define yylval avm2_lval
-#define yychar avm2_char
-#define yydebug avm2_debug
-#define yynerrs avm2_nerrs
+#define yyparse a3_parse
+#define yylex a3_lex
+#define yyerror a3_error
+#define yylval a3_lval
+#define yychar a3_char
+#define yydebug a3_debug
+#define yynerrs a3_nerrs
/* Copy the first part of user declarations. */
#include "abc.h"
#include "pool.h"
#include "files.h"
+#include "common.h"
#include "tokenizer.h"
#include "registry.h"
#include "code.h"
#include "opcodes.h"
+#include "compiler.h"
+#include "expr.h"
+
+extern int a3_lex();
/* Line 198 of skeleton.m4 */
-#line 96 "parser.tab.c"
+#line 101 "parser.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
know about them. */
enum yytokentype {
T_IDENTIFIER = 258,
- T_STRING = 259,
- T_REGEXP = 260,
- T_EMPTY = 261,
- T_INT = 262,
- T_UINT = 263,
- T_BYTE = 264,
- T_SHORT = 265,
- T_FLOAT = 266,
- T_FOR = 267,
- T_WHILE = 268,
- T_DO = 269,
- T_SWITCH = 270,
- KW_IMPLEMENTS = 271,
- KW_NAMESPACE = 272,
- KW_PACKAGE = 273,
- KW_PROTECTED = 274,
- KW_PUBLIC = 275,
- KW_PRIVATE = 276,
- KW_USE = 277,
- KW_INTERNAL = 278,
- KW_NEW = 279,
- KW_NATIVE = 280,
- KW_FUNCTION = 281,
- KW_FINALLY = 282,
- KW_UNDEFINED = 283,
+ T_NAMESPACE = 259,
+ T_STRING = 260,
+ T_REGEXP = 261,
+ T_EMPTY = 262,
+ T_INT = 263,
+ T_UINT = 264,
+ T_FLOAT = 265,
+ T_FOR = 266,
+ T_WHILE = 267,
+ T_DO = 268,
+ T_SWITCH = 269,
+ KW_IMPLEMENTS = 270,
+ KW_NAMESPACE = 271,
+ KW_PACKAGE = 272,
+ KW_PROTECTED = 273,
+ KW_PUBLIC = 274,
+ KW_PRIVATE = 275,
+ KW_USE = 276,
+ KW_INTERNAL = 277,
+ KW_NEW = 278,
+ KW_NATIVE = 279,
+ KW_FUNCTION = 280,
+ KW_FINALLY = 281,
+ KW_UNDEFINED = 282,
+ KW_NAN = 283,
KW_CONTINUE = 284,
KW_CLASS = 285,
KW_CONST = 286,
KW_IS = 321,
KW_IN = 322,
KW_AS = 323,
- T_EQEQ = 324,
- T_EQEQEQ = 325,
- T_NE = 326,
- T_NEE = 327,
- T_LE = 328,
- T_GE = 329,
- T_ORBY = 330,
- T_DIVBY = 331,
- T_MODBY = 332,
- T_MULBY = 333,
- T_PLUSBY = 334,
- T_MINUSBY = 335,
- T_SHRBY = 336,
- T_SHLBY = 337,
- T_USHRBY = 338,
- T_OROR = 339,
- T_ANDAND = 340,
- T_COLONCOLON = 341,
- T_MINUSMINUS = 342,
- T_PLUSPLUS = 343,
- T_DOTDOT = 344,
- T_DOTDOTDOT = 345,
- T_SHL = 346,
- T_USHR = 347,
- T_SHR = 348,
- prec_none = 349,
- below_semicolon = 350,
- below_assignment = 351,
- below_minus = 354,
- minusminus_prefix = 355,
- plusplus_prefix = 356,
- below_curly = 357,
- above_identifier = 358,
- below_else = 359,
- above_function = 360
+ T_DICTSTART = 324,
+ T_EQEQ = 325,
+ T_EQEQEQ = 326,
+ T_NE = 327,
+ T_NEE = 328,
+ T_LE = 329,
+ T_GE = 330,
+ T_ORBY = 331,
+ T_DIVBY = 332,
+ T_MODBY = 333,
+ T_MULBY = 334,
+ T_ANDBY = 335,
+ T_PLUSBY = 336,
+ T_MINUSBY = 337,
+ T_XORBY = 338,
+ T_SHRBY = 339,
+ T_SHLBY = 340,
+ T_USHRBY = 341,
+ T_OROR = 342,
+ T_ANDAND = 343,
+ T_COLONCOLON = 344,
+ T_MINUSMINUS = 345,
+ T_PLUSPLUS = 346,
+ T_DOTDOT = 347,
+ T_DOTDOTDOT = 348,
+ T_SHL = 349,
+ T_USHR = 350,
+ T_SHR = 351,
+ prec_none = 352,
+ below_semicolon = 353,
+ below_assignment = 354,
+ below_minus = 355,
+ minusminus_prefix = 356,
+ plusplus_prefix = 357,
+ below_curly = 358,
+ new2 = 359,
+ above_identifier = 360,
+ below_else = 361,
+ above_function = 362
};
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union
/* Line 223 of skeleton.m4 */
-#line 41 "parser.y"
+#line 46 "parser.y"
tokenunion
{
/* Line 223 of skeleton.m4 */
-#line 41 "parser.y"
+#line 46 "parser.y"
enum yytokentype token;
- int flags;
classinfo_t*classinfo;
classinfo_list_t*classinfo_list;
+ slotinfo_t*slotinfo;
+ slotinfo_list_t*slotinfo_list;
int number_int;
unsigned int number_uint;
for_start_t for_start;
abc_exception_t *exception;
regexp_t regexp;
+ modifiers_t flags;
+ namespace_decl_t* namespace_decl;
+ node_t*node;
struct {
abc_exception_list_t *l;
code_t*finally;
/* Line 223 of skeleton.m4 */
-#line 268 "parser.tab.c"
+#line 281 "parser.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Copy the second part of user declarations. */
/* Line 273 of skeleton.m4 */
-#line 251 "parser.y"
+#line 269 "parser.y"
-static int yyerror(char*s)
+static int a3_error(char*s)
{
syntaxerror("%s", s);
return 0; //make gcc happy
}
+static void parsererror(const char*file, int line, const char*f)
+{
+ syntaxerror("internal error in %s, %s:%d", f, file, line);
+}
+
+#define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
+
+
static char* concat2(const char* t1, const char* t2)
{
int l1 = strlen(t1);
typedef struct _import {
char*package;
} import_t;
-
DECLARE_LIST(import);
+DECLARE(methodstate);
+DECLARE_LIST(methodstate);
+
typedef struct _classstate {
/* class data */
classinfo_t*info;
abc_class_t*abc;
- code_t*init;
- code_t*static_init;
+
+ methodstate_t*init;
+ methodstate_t*static_init;
+ //code_t*init;
+ //code_t*static_init;
+
char has_constructor;
} classstate_t;
-typedef struct _methodstate {
+struct _methodstate {
/* method data */
- memberinfo_t*info;
+ methodinfo_t*info;
+ char has_exceptions;
char late_binding;
char is_constructor;
char has_super;
char is_global;
+ int variable_count;
+
+ dict_t*unresolved_variables;
+
char inner;
+ char uses_parent_function;
+ int uses_slots;
+ dict_t*slots;
+ int activation_var;
+
+ abc_method_t*abc;
+ int var_index; // for inner methods
+ int slot_index; // for inner methods
+ char is_a_slot; // for inner methods
+
+ code_t*header;
+
+ code_t*scope_code;
abc_exception_list_t*exceptions;
-} methodstate_t;
+
+ methodstate_list_t*innerfunctions;
+};
typedef struct _state {
struct _state*old;
char*package;
import_list_t*wildcard_imports;
+ dict_t*import_toplevel_packages;
dict_t*imports;
+
+ namespace_list_t*active_namespace_urls;
+
char has_own_imports;
+ char new_vars; // e.g. transition between two functions
classstate_t*cls;
methodstate_t*method;
char*exception_name;
+
+ int switch_var;
dict_t*vars;
} state_t;
typedef struct _global {
abc_file_t*file;
abc_script_t*init;
-
- int variable_count;
+ dict_t*token2info;
+ dict_t*file2token2info;
} global_t;
static global_t*global = 0;
#define MULTINAME(m,x) \
multiname_t m;\
namespace_t m##_ns;\
- registry_fill_multiname(&m, &m##_ns, x);
+ (x)->package; \
+ registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
#define MEMBER_MULTINAME(m,f,n) \
multiname_t m;\
namespace_t m##_ns;\
if(f) { \
- m##_ns = flags2namespace(f->flags, ""); \
+ if((m##_ns.access = ((slotinfo_t*)(f))->access)==ACCESS_NAMESPACE) \
+ m##_ns.name = ((slotinfo_t*)(f))->package; \
+ else \
+ m##_ns.name = ""; \
m.type = QNAME; \
m.ns = &m##_ns; \
m.namespace_set = 0; \
- m.name = f->name; \
+ m.name = ((slotinfo_t*)(f))->name; \
} else { \
m.type = MULTINAME; \
m.ns =0; \
static namespace_list_t nl1 = {&ns1,&nl2};
static namespace_set_t nopackage_namespace_set = {&nl1};
+static dict_t*definitions=0;
+void as3_set_define(const char*c)
+{
+ if(!definitions)
+ definitions = dict_new();
+ if(!dict_contains(definitions,c))
+ dict_put(definitions,c,0);
+}
+
static void new_state()
{
NEW(state_t, s);
if(!s->imports) {
s->imports = dict_new();
}
+ if(!s->import_toplevel_packages) {
+ s->import_toplevel_packages = dict_new();
+ }
state = s;
state->level++;
state->has_own_imports = 0;
state->vars = dict_new();
state->old = oldstate;
-}
-static void state_has_imports()
-{
- state->wildcard_imports = list_clone(state->wildcard_imports);
- state->imports = dict_clone(state->imports);
- state->has_own_imports = 1;
+ state->new_vars = 0;
+
+ trie_remember(active_namespaces);
+
+ if(oldstate)
+ state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
}
static void state_destroy(state_t*state)
dict_destroy(state->vars);state->vars=0;
}
+ list_free(state->active_namespace_urls)
+ state->active_namespace_urls = 0;
+
free(state);
}
static void old_state()
{
+ trie_rollback(active_namespaces);
+
if(!state || !state->old)
syntaxerror("invalid nesting");
state_t*leaving = state;
state = state->old;
-
- if(leaving->method && leaving->method != state->method) {
+
+ if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
free(leaving->method);
leaving->method=0;
}
- if(leaving->cls && leaving->cls != state->cls) {
+ if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
free(leaving->cls);
leaving->cls=0;
}
-
+
state_destroy(leaving);
}
-void initialize_parser()
-{
- global = rfx_calloc(sizeof(global_t));
- global->file = abc_file_new();
- global->file->flags &= ~ABCFILE_LAZY;
- global->variable_count = 1;
- global->init = abc_initscript(global->file);
- code_t*c = global->init->method->body->code;
- c = abc_getlocal_0(c);
- c = abc_pushscope(c);
- /*c = abc_findpropstrict(c, "[package]::trace");
- c = abc_pushstring(c, "[entering global init function]");
- c = abc_callpropvoid(c, "[package]::trace", 1);*/
- global->init->method->body->code = c;
-}
+static code_t* method_header(methodstate_t*m);
+static code_t* wrap_function(code_t*c,code_t*header, code_t*body);
+static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0);
+
+static char* internal_filename_package = 0;
void initialize_file(char*filename)
{
+ if(state) {
+ syntaxerror("invalid call to initialize_file during parsing of another file");
+ }
+
+ active_namespaces = trie_new();
+
new_state();
- state->package = filename;
- // needed for state->method->late_binding:
- state->method = rfx_calloc(sizeof(methodstate_t));
+ state->package = internal_filename_package = strdup(filename);
+
+ global->token2info = dict_lookup(global->file2token2info,
+ current_filename // use long version
+ );
+ if(!global->token2info) {
+ global->token2info = dict_new2(&ptr_type);
+ dict_put(global->file2token2info, current_filename, global->token2info);
+ }
+
+ if(as3_pass==1) {
+ state->method = rfx_calloc(sizeof(methodstate_t));
+ dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
+ state->method->late_binding = 1; // init scripts use getglobalscope, so we need a getlocal0/pushscope
+ } else {
+ state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+ if(!state->method)
+ syntaxerror("internal error: skewed tokencount");
+ function_initvars(state->method, 0, 0, 1);
+ global->init = abc_initscript(global->file);
+ }
}
+
void finish_file()
{
if(!state || state->level!=1) {
- syntaxerror("unexpected end of file");
+ syntaxerror("unexpected end of file in pass %d", as3_pass);
+ }
+
+ if(as3_pass==2) {
+ dict_del(global->file2token2info, current_filename);
+
+ code_t*header = method_header(state->method);
+ code_t*c = wrap_function(header, 0, global->init->method->body->code);
+ global->init->method->body->code = c;
+ free(state->method);state->method=0;
}
+
+ //free(state->package);state->package=0; // used in registry
state_destroy(state);state=0;
}
-void* finish_parser()
+void initialize_parser()
{
- code_t*c = global->init->method->body->code;
- /*c = abc_findpropstrict(c, "[package]::trace");
- c = abc_pushstring(c, "[leaving global init function]");
- c = abc_callpropvoid(c, "[package]::trace", 1);*/
- c = abc_returnvoid(c);
- global->init->method->body->code = c;
- return global->file;
+ global = rfx_calloc(sizeof(global_t));
+ global->file = abc_file_new();
+ global->file->flags &= ~ABCFILE_LAZY;
+ global->file2token2info = dict_new();
+ global->token2info = 0;
}
-
-static void xx_scopetest()
+void* finish_parser()
{
- /* findpropstrict doesn't just return a scope object- it
- also makes it "active" somehow. Push local_0 on the
- scope stack and read it back with findpropstrict, it'll
- contain properties like "trace". Trying to find the same
- property on a "vanilla" local_0 yields only a "undefined" */
- //c = abc_findpropstrict(c, "[package]::trace");
-
- /*c = abc_getlocal_0(c);
- c = abc_findpropstrict(c, "[package]::trace");
- c = abc_coerce_a(c);
- c = abc_setlocal_1(c);
-
- c = abc_pushbyte(c, 0);
- c = abc_setlocal_2(c);
-
- code_t*xx = c = abc_label(c);
- c = abc_findpropstrict(c, "[package]::trace");
- c = abc_pushstring(c, "prop:");
- c = abc_hasnext2(c, 1, 2);
- c = abc_dup(c);
- c = abc_setlocal_3(c);
- c = abc_callpropvoid(c, "[package]::trace", 2);
- c = abc_getlocal_3(c);
- c = abc_kill(c, 3);
- c = abc_iftrue(c,xx);*/
+ dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
+ global->token2info=0;
+ return global->file;
}
-
typedef struct _variable {
int index;
classinfo_t*type;
char init;
+ char is_parameter;
+ methodstate_t*is_inner_method;
} variable_t;
-static variable_t* find_variable(char*name)
+static variable_t* find_variable(state_t*s, char*name)
{
- state_t* s = state;
while(s) {
variable_t*v = 0;
- if(s->method)
- v = dict_lookup(s->vars, name);
- if(v) {
- return v;
- }
+ v = dict_lookup(s->vars, name);
+ if(v) return v;
+ if(s->new_vars) break;
s = s->old;
}
return 0;
-}
-static variable_t* find_variable_safe(char*name)
+}
+static variable_t* find_slot(state_t*s, const char*name)
+{
+ if(s->method && s->method->slots)
+ return dict_lookup(s->method->slots, name);
+ return 0;
+}
+
+static variable_t* find_variable_safe(state_t*s, char*name)
{
- variable_t* v = find_variable(name);
+ variable_t* v = find_variable(s, name);
if(!v)
syntaxerror("undefined variable: %s", name);
return v;
}
+
static char variable_exists(char*name)
{
- return dict_lookup(state->vars, name)!=0;
+ return dict_contains(state->vars, name);
+}
+
+static code_t*defaultvalue(code_t*c, classinfo_t*type)
+{
+ if(TYPE_IS_INT(type)) {
+ c = abc_pushbyte(c, 0);
+ } else if(TYPE_IS_UINT(type)) {
+ c = abc_pushuint(c, 0);
+ } else if(TYPE_IS_FLOAT(type)) {
+ c = abc_pushnan(c);
+ } else if(TYPE_IS_BOOLEAN(type)) {
+ c = abc_pushfalse(c);
+ } else if(!type) {
+ //c = abc_pushundefined(c);
+ syntaxerror("internal error: can't generate default value for * type");
+ } else {
+ c = abc_pushnull(c);
+ MULTINAME(m, type);
+ c = abc_coerce2(c, &m);
+ }
+ return c;
+}
+
+static int alloc_local()
+{
+ return state->method->variable_count++;
}
-code_t*defaultvalue(code_t*c, classinfo_t*type);
-static int new_variable(char*name, classinfo_t*type, char init)
+
+static variable_t* new_variable2(const char*name, classinfo_t*type, char init, char maybeslot)
{
+ if(maybeslot) {
+ variable_t*v = find_slot(state, name);
+ if(v)
+ return v;
+ }
+
NEW(variable_t, v);
- v->index = global->variable_count;
+ v->index = alloc_local();
v->type = type;
v->init = init;
-
- dict_put(state->vars, name, v);
+
+ if(name)
+ dict_put(state->vars, name, v);
- return global->variable_count++;
+ return v;
+}
+static int new_variable(const char*name, classinfo_t*type, char init, char maybeslot)
+{
+ return new_variable2(name, type, init, maybeslot)->index;
}
+
#define TEMPVARNAME "__as3_temp__"
-static int gettempvar()
+int gettempvar()
{
- variable_t*v = find_variable(TEMPVARNAME);
+ variable_t*v = find_variable(state, TEMPVARNAME);
if(v)
return v->index;
- return new_variable(TEMPVARNAME, 0, 0);
+ return new_variable(TEMPVARNAME, 0, 0, 0);
}
-code_t* var_block(code_t*body)
+static code_t* var_block(code_t*body)
{
code_t*c = 0;
code_t*k = 0;
return c;
}
+static void unknown_variable(char*name)
+{
+ if(!state->method->unresolved_variables)
+ state->method->unresolved_variables = dict_new();
+ if(!dict_contains(state->method->unresolved_variables, name))
+ dict_put(state->method->unresolved_variables, name, 0);
+}
+
+static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
+{
+ if(m->uses_slots || (m->late_binding && !m->inner)) { //???? especially inner functions need the pushscope
+ c = abc_getlocal_0(c);
+ c = abc_pushscope(c);
+ }
+ if(m->uses_slots) {
+ /* FIXME: this alloc_local() causes variable indexes to be
+ different in pass2 than in pass1 */
+ if(!m->activation_var)
+ m->activation_var = alloc_local();
+ if(init) {
+ c = abc_newactivation(c);
+ c = abc_dup(c);
+ c = abc_pushscope(c);
+ c = abc_setlocal(c, m->activation_var);
+ } else {
+ c = abc_getlocal(c, m->activation_var);
+ c = abc_pushscope(c);
+ }
+ }
+ return c;
+}
+
+static code_t* method_header(methodstate_t*m)
+{
+ code_t*c = 0;
+
+ c = add_scope_code(c, m, 1);
+
+ methodstate_list_t*l = m->innerfunctions;
+ while(l) {
+ parserassert(l->methodstate->abc);
+ if(m->uses_slots && l->methodstate->is_a_slot) {
+ c = abc_getscopeobject(c, 1);
+ c = abc_newfunction(c, l->methodstate->abc);
+ c = abc_dup(c);
+ c = abc_setlocal(c, l->methodstate->var_index);
+ c = abc_setslot(c, l->methodstate->slot_index);
+ } else {
+ c = abc_newfunction(c, l->methodstate->abc);
+ c = abc_setlocal(c, l->methodstate->var_index);
+ }
+ free(l->methodstate);l->methodstate=0;
+ l = l->next;
+ }
+ if(m->header) {
+ c = code_append(c, m->header);
+ m->header = 0;
+ }
+ if(m->is_constructor && !m->has_super) {
+ // call default constructor
+ c = abc_getlocal_0(c);
+ c = abc_constructsuper(c, 0);
+ }
+
+ if(m->slots) {
+ /* all parameters that are used by inner functions
+ need to be copied from local to slot */
+ parserassert(m->activation_var);
+ DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
+ if(v->is_parameter) {
+ c = abc_getlocal(c, m->activation_var);
+ c = abc_getlocal(c, v->index);
+ c = abc_setslot(c, v->index);
+ }
+ }
+ }
+ list_free(m->innerfunctions);
+ m->innerfunctions = 0;
+ return c;
+}
+
+
static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
{
c = code_append(c, header);
return c;
}
-
static void startpackage(char*name)
{
new_state();
- /*printf("entering package \"%s\"\n", name);*/
state->package = strdup(name);
- global->variable_count = 1;
}
static void endpackage()
{
- /*printf("leaving package \"%s\"\n", state->package);*/
-
//used e.g. in classinfo_register:
//free(state->package);state->package=0;
-
old_state();
}
-void parserassert(int b)
+#define FLAG_PUBLIC 256
+#define FLAG_PROTECTED 512
+#define FLAG_PRIVATE 1024
+#define FLAG_PACKAGEINTERNAL 2048
+#define FLAG_NAMESPACE 4096
+
+static namespace_t modifiers2access(modifiers_t*mod)
+{
+ namespace_t ns;
+ ns.access = 0;
+ ns.name = "";
+ if(mod->flags&FLAG_NAMESPACE) {
+ if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
+ syntaxerror("invalid combination of access levels and namespaces");
+ ns.access = ACCESS_NAMESPACE;
+ state_t*s = state;
+ const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
+ if(!url) {
+ /* shouldn't happen- the tokenizer only reports something as a namespace
+ if it was already registered */
+ trie_dump(active_namespaces);
+ syntaxerror("unknown namespace: %s", mod->ns);
+ }
+ ns.name = url;
+ } else if(mod->flags&FLAG_PUBLIC) {
+ if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
+ syntaxerror("invalid combination of access levels");
+ ns.access = ACCESS_PACKAGE;
+ } else if(mod->flags&FLAG_PRIVATE) {
+ if(mod->flags&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
+ syntaxerror("invalid combination of access levels");
+ ns.access = ACCESS_PRIVATE;
+ } else if(mod->flags&FLAG_PROTECTED) {
+ if(mod->flags&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
+ syntaxerror("invalid combination of access levels");
+ ns.access = ACCESS_PROTECTED;
+ } else {
+ ns.access = ACCESS_PACKAGEINTERNAL;
+ }
+ return ns;
+}
+static slotinfo_t* find_class(const char*name);
+
+static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
{
- if(!b) syntaxerror("internal error: assertion failed");
+ return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
+}
+
+static void function_initvars(methodstate_t*m, params_t*params, int flags, char var0)
+{
+ if(var0) {
+ int index = -1;
+ if(m->inner)
+ index = new_variable("this", 0, 0, 0);
+ else if(!m->is_global)
+ index = new_variable((flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
+ else
+ index = new_variable("globalscope", 0, 0, 0);
+ if(index)
+ *(int*)0=0;
+ parserassert(!index);
+ }
+
+ if(m->uses_slots) {
+ /* as variables and slots share the same number, make sure
+ that those variable indices are reserved. It's up to the
+ optimizer to later shuffle the variables down to lower
+ indices */
+ m->variable_count = m->uses_slots;
+ }
+
+ if(params) {
+ param_list_t*p=0;
+ for(p=params->list;p;p=p->next) {
+ variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1);
+ v->is_parameter = 1;
+ }
+ }
+
+ methodstate_list_t*l = m->innerfunctions;
+ while(l) {
+ methodstate_t*m = l->methodstate;
+
+ variable_t* v = new_variable2(m->info->name, TYPE_FUNCTION(m->info), 0, 1);
+ m->var_index = v->index;
+ m->slot_index = v->index;
+ v->is_inner_method = m;
+
+ l = l->next;
+ }
+
+ if(as3_pass==2) {
+ m->scope_code = add_scope_code(m->scope_code, m, 0);
+ }
+
+ if(as3_pass==2 && m->slots) {
+ /* exchange unresolved identifiers with the actual objects */
+ DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
+ if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
+ classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
+ if(!type || type->kind != INFOTYPE_CLASS) {
+ syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
+ }
+ v->type = type;
+ }
+ }
+ }
}
char*as3_globalclass=0;
-static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements, char interface)
+static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
{
if(state->cls) {
syntaxerror("inner classes now allowed");
}
- new_state();
- global->variable_count = 1;
- state->cls = rfx_calloc(sizeof(classstate_t));
- state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
+ new_state();
token_list_t*t=0;
classinfo_list_t*mlist=0;
- if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC))
+ if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
syntaxerror("invalid modifier(s)");
- if((flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
+ if((mod->flags&(FLAG_PUBLIC|FLAG_PACKAGEINTERNAL)) == (FLAG_PUBLIC|FLAG_PACKAGEINTERNAL))
syntaxerror("public and internal not supported at the same time.");
+
+ //if(!(mod->flags&FLAG_INTERFACE) && !extends) {
+ if(!(mod->flags&FLAG_INTERFACE) && !extends) {
+ // all classes extend object
+ extends = registry_getobjectclass();
+ }
/* create the class name, together with the proper attributes */
int access=0;
char*package=0;
- if(!(flags&FLAG_PUBLIC) && !state->package) {
- access = ACCESS_PRIVATE; package = current_filename;
- } else if(!(flags&FLAG_PUBLIC) && state->package) {
+ if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
+ access = ACCESS_PRIVATE; package = internal_filename_package;
+ } else if(!(mod->flags&FLAG_PUBLIC) && state->package!=internal_filename_package) {
access = ACCESS_PACKAGEINTERNAL; package = state->package;
- } else if(state->package) {
+ } else if(state->package!=internal_filename_package) {
access = ACCESS_PACKAGE; package = state->package;
} else {
syntaxerror("public classes only allowed inside a package");
}
if(as3_pass==1) {
- if(registry_findclass(package, classname)) {
+ state->cls = rfx_calloc(sizeof(classstate_t));
+ state->cls->init = rfx_calloc(sizeof(methodstate_t));
+ state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
+ /* notice: we make no effort to initialize the top variable (local0) here,
+ even though it has special meaning. We just rely on the facat
+ that pass 1 won't do anything with variables */
+
+ dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
+
+ /* set current method to constructor- all code within the class-level (except
+ static variable initializations) will be executed during construction time */
+ state->method = state->cls->init;
+
+ if(registry_find(package, classname)) {
syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
}
/* build info struct */
int num_interfaces = (list_length(implements));
state->cls->info = classinfo_register(access, package, classname, num_interfaces);
+ state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
+
+ int pos = 0;
+ classinfo_list_t*l = implements;
+ for(l=implements;l;l=l->next) {
+ state->cls->info->interfaces[pos++] = l->classinfo;
+ }
}
if(as3_pass == 2) {
- state->cls->info = registry_findclass(package, classname);
- parserassert((int)state->cls->info);
+ state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+
+ state->method = state->cls->init;
+ parserassert(state->cls && state->cls->info);
+
+ function_initvars(state->cls->init, 0, 0, 1);
+ function_initvars(state->cls->static_init, 0, 0, 0);
- /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
- state->cls->info->superclass = extends?extends:TYPE_OBJECT;
+ if(extends && (extends->flags & FLAG_FINAL))
+ syntaxerror("Can't extend final class '%s'", extends->name);
+
int pos = 0;
- classinfo_list_t*l = implements;
- for(l=implements;l;l=l->next) {
- state->cls->info->interfaces[pos++] = l->classinfo;
+ while(state->cls->info->interfaces[pos]) {
+ if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
+ syntaxerror("'%s' is not an interface",
+ state->cls->info->interfaces[pos]->name);
+ pos++;
}
+ /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
+ state->cls->info->superclass = extends;
+
/* generate the abc code for this class */
MULTINAME(classname2,state->cls->info);
multiname_t*extends2 = sig2mname(extends);
state->cls->abc = abc_class_new(global->file, &classname2, extends2);
- if(flags&FLAG_FINAL) abc_class_final(state->cls->abc);
- if(!(flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
- if(interface) {
- state->cls->info->flags |= CLASS_INTERFACE;
+ if(state->cls->info->flags&FLAG_FINAL) abc_class_final(state->cls->abc);
+ if(!(state->cls->info->flags&FLAG_DYNAMIC)) abc_class_sealed(state->cls->abc);
+ if(state->cls->info->flags&FLAG_INTERFACE) {
abc_class_interface(state->cls->abc);
}
/* flash.display.MovieClip handling */
- if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
+ if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
if(state->package && state->package[0]) {
as3_globalclass = concat3(state->package, ".", classname);
} else {
static void endclass()
{
if(as3_pass == 2) {
- if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_INTERFACE)) {
+ if(!state->cls->has_constructor && !(state->cls->info->flags&FLAG_INTERFACE)) {
code_t*c = 0;
c = abc_getlocal_0(c);
c = abc_constructsuper(c, 0);
- state->cls->init = code_append(state->cls->init, c);
- }
- if(!state->method->late_binding) {
- // class initialization code uses late binding
- code_t*c = 0;
- c = abc_getlocal_0(c);
- c = abc_pushscope(c);
- state->cls->static_init = code_append(c, state->cls->static_init);
+ state->cls->init->header = code_append(state->cls->init->header, c);
+ state->cls->has_constructor=1;
}
-
if(state->cls->init) {
- abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
- m->body->code = wrap_function(0, state->cls->init, m->body->code);
+ if(state->cls->info->flags&FLAG_INTERFACE) {
+ if(state->cls->init->header)
+ syntaxerror("interface can not have class-level code");
+ } else {
+ abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
+ code_t*c = method_header(state->cls->init);
+ m->body->code = wrap_function(c, 0, m->body->code);
+ }
}
if(state->cls->static_init) {
abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
- m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
+ code_t*c = method_header(state->cls->static_init);
+ m->body->code = wrap_function(c, 0, m->body->code);
}
}
char*name = string_cstr(c->data[0]);
syntaxerror("Unresolved \"continue %s\"", name);
}
+ if(c->opcode == OPCODE___RETHROW__) {
+ syntaxerror("Unresolved \"rethrow\"");
+ }
+ if(c->opcode == OPCODE___FALLTHROUGH__) {
+ syntaxerror("Unresolved \"fallthrough\"");
+ }
+ if(c->opcode == OPCODE___PUSHPACKAGE__) {
+ char*name = string_cstr(c->data[0]);
+ syntaxerror("Can't reference a package (%s) as such", name);
+ }
c=c->prev;
}
}
-
static void check_constant_against_type(classinfo_t*t, constant_t*c)
{
#define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
|| c->type == CONSTANT_UINT);
} else if(TYPE_IS_UINT(t)) {
xassert(c->type == CONSTANT_UINT ||
- (c->type == CONSTANT_INT && c->i>0));
+ (c->type == CONSTANT_INT && c->i>=0));
} else if(TYPE_IS_INT(t)) {
xassert(c->type == CONSTANT_INT);
} else if(TYPE_IS_BOOLEAN(t)) {
}
}
-
-static int flags2access(int flags)
+static void check_override(memberinfo_t*m, int flags)
{
- int access = 0;
- if(flags&FLAG_PUBLIC) {
- if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
- syntaxerror("invalid combination of access levels");
- access = ACCESS_PACKAGE;
- } else if(flags&FLAG_PRIVATE) {
- if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL))
- syntaxerror("invalid combination of access levels");
- access = ACCESS_PRIVATE;
- } else if(flags&FLAG_PROTECTED) {
- if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL))
- syntaxerror("invalid combination of access levels");
- access = ACCESS_PROTECTED;
- } else {
- access = ACCESS_PACKAGEINTERNAL;
+ if(!m)
+ return;
+ if(m->parent == state->cls->info)
+ syntaxerror("class '%s' already contains a method/slot '%s'", m->parent->name, m->name);
+ if(!m->parent)
+ syntaxerror("internal error: overriding method %s, which doesn't have parent", m->name);
+ if(m->access==ACCESS_PRIVATE)
+ return;
+ if(m->flags & FLAG_FINAL)
+ syntaxerror("can't override final member %s", m->name);
+
+ /* allow this. it's no issue.
+ if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
+ syntaxerror("can't override static member %s", m->name);*/
+
+ if(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
+ syntaxerror("can't override non-static member %s with static declaration", m->name);
+
+ if(!(flags&FLAG_OVERRIDE) && !(flags&FLAG_STATIC) && !(m->flags&FLAG_STATIC)) {
+ if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
+ if(m->kind == INFOTYPE_METHOD)
+ syntaxerror("can't override without explicit 'override' declaration");
+ else
+ syntaxerror("can't override '%s'", m->name);
+ }
}
- return access;
}
-
-static memberinfo_t*registerfunction(enum yytokentype getset, int flags, char*name, params_t*params, classinfo_t*return_type, int slot)
+static methodinfo_t*registerfunction(enum yytokentype getset, modifiers_t*mod, char*name, params_t*params, classinfo_t*return_type, int slot)
{
- memberinfo_t*minfo = 0;
+ methodinfo_t*minfo = 0;
+ namespace_t ns = modifiers2access(mod);
if(!state->cls) {
//package method
- minfo = memberinfo_register_global(flags2access(flags), state->package, name, MEMBER_METHOD);
- minfo->return_type = return_type;
+ minfo = methodinfo_register_global(ns.access, state->package, name);
+ minfo->return_type = 0; // save this for pass 2
} else if(getset != KW_GET && getset != KW_SET) {
//class method
- if((minfo = registry_findmember(state->cls->info, name, 0))) {
- if(minfo->parent == state->cls->info) {
- syntaxerror("class already contains a member/method called '%s'", name);
- } else if(!minfo->parent) {
- syntaxerror("internal error: overriding method %s, which doesn't have parent", name);
- } else {
- if(!(minfo->flags&(FLAG_STATIC|FLAG_PRIVATE)))
- syntaxerror("function %s already exists in superclass. Did you forget the 'override' keyword?");
- }
+ memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
+ if(m) {
+ syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
}
- minfo = memberinfo_register(state->cls->info, name, MEMBER_METHOD);
- minfo->return_type = return_type;
+ minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
+ minfo->return_type = 0; // save this for pass 2
// getslot on a member slot only returns "undefined", so no need
// to actually store these
//state->minfo->slot = state->method->abc->method->trait->slot_id;
} else {
//class getter/setter
- int gs = getset==KW_GET?MEMBER_GET:MEMBER_SET;
+ int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
classinfo_t*type=0;
- if(getset == KW_GET)
+ if(getset == KW_GET) {
type = return_type;
- else if(params->list)
+ } else if(params->list && params->list->param && !params->list->next) {
type = params->list->param->type;
+ } else
+ syntaxerror("setter function needs to take exactly one argument");
// not sure wether to look into superclasses here, too
- if((minfo=registry_findmember(state->cls->info, name, 0))) {
- if(minfo->kind & ~(MEMBER_GET|MEMBER_SET))
- syntaxerror("class already contains a member or method called '%s'", name);
- if(minfo->kind & gs)
+ minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
+ if(minfo) {
+ if(minfo->kind!=INFOTYPE_SLOT)
+ syntaxerror("class already contains a method called '%s'", name);
+ if(!(minfo->subtype & (SUBTYPE_GETSET)))
+ syntaxerror("class already contains a field called '%s'", name);
+ if(minfo->subtype & gs)
syntaxerror("getter/setter for '%s' already defined", name);
/* make a setter or getter into a getset */
- minfo->kind |= gs;
- if(!minfo->type)
- minfo->type = type;
- else
- if(type && minfo->type != type)
- syntaxerror("different type in getter and setter");
+ minfo->subtype |= gs;
+
+ /*
+ FIXME: this check needs to be done in pass 2
+
+ if((!minfo->return_type != !type) ||
+ (minfo->return_type && type &&
+ !strcmp(minfo->return_type->name, type->name))) {
+ syntaxerror("different type in getter and setter: %s and %s",
+ minfo->return_type?minfo->return_type->name:"*",
+ type?type->name:"*");
+ }*/
} else {
- minfo = memberinfo_register(state->cls->info, name, gs);
- minfo->type = type;
+ minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
+ minfo->kind = INFOTYPE_SLOT; //hack
+ minfo->subtype = gs;
+ minfo->return_type = 0;
}
/* can't assign a slot as getter and setter might have different slots */
//minfo->slot = slot;
}
- if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
- if(flags&FLAG_PUBLIC) minfo->flags |= FLAG_PUBLIC;
- if(flags&FLAG_PRIVATE) minfo->flags |= FLAG_PRIVATE;
- if(flags&FLAG_PROTECTED) minfo->flags |= FLAG_PROTECTED;
- if(flags&FLAG_PACKAGEINTERNAL) minfo->flags |= FLAG_PACKAGEINTERNAL;
- if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
+ if(mod->flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
+ if(mod->flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
+ if(mod->flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
+
return minfo;
}
static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
{
- parserassert(state->method && state->method->info);
- memberinfo_t*parent_method = state->method->info;
+ //parserassert(state->method && state->method->info);
+
+ methodstate_t*parent_method = state->method;
if(as3_pass==1) {
- // not valid yet
- params = 0;
- return_type = 0;
+ return_type = 0; // not valid in pass 1
}
new_state();
- state->method = rfx_calloc(sizeof(methodstate_t));
- state->method->inner = 1;
+ state->new_vars = 1;
+
+ if(as3_pass == 1) {
+ state->method = rfx_calloc(sizeof(methodstate_t));
+ state->method->inner = 1;
+ state->method->variable_count = 0;
+ state->method->abc = rfx_calloc(sizeof(abc_method_t));
+
+ NEW(methodinfo_t,minfo);
+ minfo->kind = INFOTYPE_METHOD;
+ minfo->access = ACCESS_PACKAGEINTERNAL;
+ minfo->name = name;
+ state->method->info = minfo;
+
+ if(parent_method)
+ list_append(parent_method->innerfunctions, state->method);
+
+ dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
- NEW(memberinfo_t,minfo);
- minfo->return_type = return_type;
- minfo->name = name;
+ function_initvars(state->method, params, 0, 1);
+ }
- if(!parent_method->subfunctions)
- parent_method->subfunctions = dict_new();
+ if(as3_pass == 2) {
+ state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+ state->method->variable_count = 0;
+ parserassert(state->method);
- dict_put(parent_method->subfunctions, name, minfo);
- state->method->info = minfo;
+ state->method->info->return_type = return_type;
+ function_initvars(state->method, params, 0, 1);
+ }
}
-static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
+static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
params_t*params, classinfo_t*return_type)
{
if(state->method && state->method->info) {
syntaxerror("not able to start another method scope");
}
new_state();
- state->method = rfx_calloc(sizeof(methodstate_t));
- state->method->has_super = 0;
-
- if(state->cls) {
- state->method->is_constructor = !strcmp(state->cls->info->name,name);
- state->cls->has_constructor |= state->method->is_constructor;
- } else {
- state->method->is_global = 1;
- state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
- }
- if(state->method->is_constructor)
- name = "__as3_constructor__";
-
+ state->new_vars = 1;
+
if(as3_pass == 1) {
- return_type = 0;
- state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
- }
+ state->method = rfx_calloc(sizeof(methodstate_t));
+ state->method->has_super = 0;
- if(as3_pass == 2) {
- /* retrieve the member info that we stored in the first pass.
- TODO: better getter/setter support? */
- if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
- else state->method->info = registry_findmember(state->cls->info, name, 0);
- state->method->info->return_type = return_type;
+ if(state->cls) {
+ state->method->is_constructor = !strcmp(state->cls->info->name,name);
+ } else {
+ state->method->is_global = 1;
+ state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
+ }
+ if(state->method->is_constructor)
+ name = "__as3_constructor__";
- global->variable_count = 0;
- /* state->vars is initialized by state_new */
- if(!state->method->is_global)
- new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
- else
- new_variable("globalscope", 0, 0);
- param_list_t*p=0;
- for(p=params->list;p;p=p->next) {
- new_variable(p->param->name, p->param->type, 0);
+ state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
+
+ function_initvars(state->method, params, mod->flags, 1);
+
+ dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
+ }
+
+ if(as3_pass == 2) {
+ state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+ state->method->variable_count = 0;
+ parserassert(state->method);
+
+ if(state->cls) {
+ memberinfo_t*m = registry_findmember(state->cls->info, mod->ns, name, 2);
+ check_override(m, mod->flags);
+ }
+
+ if(state->cls) {
+ state->cls->has_constructor |= state->method->is_constructor;
}
+
+ state->method->info->return_type = return_type;
+ function_initvars(state->method, params, mod->flags, 1);
}
}
-static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
+static abc_method_t* endfunction(modifiers_t*mod, enum yytokentype getset, char*name,
params_t*params, classinfo_t*return_type, code_t*body)
{
if(as3_pass==1) {
+ // store inner methods in variables
+ function_initvars(state->method, 0, 0, 0);
+
+ methodstate_list_t*ml = state->method->innerfunctions;
+
+ dict_t*xvars = dict_new();
+
+ while(ml) {
+ methodstate_t*m = ml->methodstate;
+ parserassert(m->inner);
+ if(m->unresolved_variables) {
+ dict_t*d = m->unresolved_variables;
+ int t;
+ for(t=0;t<d->hashsize;t++) {
+ dictentry_t*l = d->slots[t];
+ while(l) {
+ /* check parent method's variables */
+ variable_t*v;
+ if((v=find_variable(state, l->key))) {
+ m->uses_parent_function = 1;
+ state->method->uses_slots = 1;
+ dict_put(xvars, l->key, 0);
+ }
+ l = l->next;
+ }
+ if(l) break;
+ }
+
+ dict_destroy(m->unresolved_variables);
+ m->unresolved_variables = 0;
+ }
+ ml = ml->next;
+ }
+
+ if(state->method->uses_slots) {
+ state->method->slots = dict_new();
+ int i = 1;
+ DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
+ if(!name) syntaxerror("internal error");
+ if(v->index && dict_contains(xvars, name)) {
+ v->init = 0;
+ v->index = i++;
+ if(v->is_inner_method) {
+ v->is_inner_method->is_a_slot = 1;
+ }
+ //v->type = 0;
+ dict_put(state->method->slots, name, v);
+ }
+ }
+ state->method->uses_slots = i;
+ dict_destroy(state->vars);state->vars = 0;
+ }
old_state();
return 0;
}
- abc_method_t*f = 0;
+ if(as3_pass==2) {
+ /*if(state->method->uses_parent_function){
+ syntaxerror("accessing variables of parent function from inner functions not supported yet");
+ }*/
- multiname_t*type2 = sig2mname(return_type);
- int slot = 0;
- if(state->method->inner) {
- f = abc_method_new(global->file, type2, 1);
- //trait_t*t = trait_new_method(&global->init->traits, 0, f);
- } else if(state->method->is_constructor) {
- f = abc_class_getconstructor(state->cls->abc, type2);
- } else if(!state->method->is_global) {
- namespace_t mname_ns = flags2namespace(flags, "");
- multiname_t mname = {QNAME, &mname_ns, 0, name};
+ abc_method_t*f = 0;
- if(flags&FLAG_STATIC)
- f = abc_class_staticmethod(state->cls->abc, type2, &mname);
- else
- f = abc_class_method(state->cls->abc, type2, &mname);
- slot = f->trait->slot_id;
- } else {
- namespace_t mname_ns = flags2namespace(flags, state->package);
- multiname_t mname = {QNAME, &mname_ns, 0, name};
-
- f = abc_method_new(global->file, type2, 1);
- trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
- //abc_code_t*c = global->init->method->body->code;
- }
- //flash doesn't seem to allow us to access function slots
- //state->method->info->slot = slot;
-
- if(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
- if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
- if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
- if(params->varargs) f->flags |= METHOD_NEED_REST;
-
- char opt=0;
- param_list_t*p=0;
- for(p=params->list;p;p=p->next) {
- if(params->varargs && !p->next) {
- break; //varargs: omit last parameter in function signature
+ multiname_t*type2 = sig2mname(return_type);
+ int slot = 0;
+ if(state->method->inner) {
+ f = state->method->abc;
+ abc_method_init(f, global->file, type2, 1);
+ } else if(state->method->is_constructor) {
+ f = abc_class_getconstructor(state->cls->abc, type2);
+ } else if(!state->method->is_global) {
+ namespace_t mname_ns = modifiers2access(mod);
+ multiname_t mname = {QNAME, &mname_ns, 0, name};
+
+ if(mod->flags&FLAG_STATIC)
+ f = abc_class_staticmethod(state->cls->abc, type2, &mname);
+ else
+ f = abc_class_method(state->cls->abc, type2, &mname);
+ slot = f->trait->slot_id;
+ } else {
+ namespace_t mname_ns = {state->method->info->access, state->package};
+ multiname_t mname = {QNAME, &mname_ns, 0, name};
+
+ f = abc_method_new(global->file, type2, 1);
+ trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
+ //abc_code_t*c = global->init->method->body->code;
+ }
+ //flash doesn't seem to allow us to access function slots
+ //state->method->info->slot = slot;
+
+ if(mod && mod->flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
+ if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
+ if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
+ if(params->varargs) f->flags |= METHOD_NEED_REST;
+
+ char opt=0;
+ param_list_t*p=0;
+ for(p=params->list;p;p=p->next) {
+ if(params->varargs && !p->next) {
+ break; //varargs: omit last parameter in function signature
+ }
+ multiname_t*m = sig2mname(p->param->type);
+ list_append(f->parameters, m);
+ if(p->param->value) {
+ check_constant_against_type(p->param->type, p->param->value);
+ opt=1;list_append(f->optional_parameters, p->param->value);
+ } else if(opt) {
+ syntaxerror("non-optional parameter not allowed after optional parameters");
+ }
}
- multiname_t*m = sig2mname(p->param->type);
- list_append(f->parameters, m);
- if(p->param->value) {
- check_constant_against_type(p->param->type, p->param->value);
- opt=1;list_append(f->optional_parameters, p->param->value);
- } else if(opt) {
- syntaxerror("non-optional parameter not allowed after optional parameters");
+ if(state->method->slots) {
+ DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
+ if(v->index) {
+ multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
+ multiname_t*type = sig2mname(v->type);
+ trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
+ t->slot_id = v->index;
+ }
+ }
}
- }
- check_code_for_break(body);
- if(f->body) {
- f->body->code = body;
- f->body->exceptions = state->method->exceptions;
- } else { //interface
- if(body)
- syntaxerror("interface methods can't have a method body");
- }
-
- old_state();
- return f;
-}
+ check_code_for_break(body);
-char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
-{
- return 1; // FIXME
+ /* Seems this works now.
+ if(state->method->exceptions && state->method->uses_slots) {
+ as3_warning("try/catch and activation not supported yet within the same method");
+ }*/
+
+ if(f->body) {
+ f->body->code = body;
+ f->body->exceptions = state->method->exceptions;
+ } else { //interface
+ if(body)
+ syntaxerror("interface methods can't have a method body");
+ }
+
+ old_state();
+ return f;
+ }
+
+ return 0;
}
void breakjumpsto(code_t*c, char*name, code_t*jump)
}
}
-#define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
#define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
-#define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
-
-classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
-{
- if(!type1 || !type2)
- return registry_getanytype();
- if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
- return registry_getanytype();
-
- if(op=='+') {
- if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
- return TYPE_NUMBER;
- } else {
- return TYPE_ANY;
- }
- }
- if(type1 == type2)
- return type1;
- return registry_getanytype();
-}
code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
{
if(from==to)
if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
(TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
// allow conversion between number types
+ if(TYPE_IS_UINT(to))
+ return abc_convert_u(c);
+ else if(TYPE_IS_INT(to))
+ return abc_convert_i(c);
+ else if(TYPE_IS_NUMBER(to))
+ return abc_convert_d(c);
return abc_coerce2(c, &m);
}
- //printf("%s.%s\n", from.package, from.name);
- //printf("%s.%s\n", to.package, to.name);
+
+ if(TYPE_IS_BOOLEAN(to))
+ return abc_convert_b(c);
+ if(TYPE_IS_STRING(to))
+ return abc_convert_s(c);
+ if(TYPE_IS_OBJECT(to))
+ return abc_convert_o(c);
classinfo_t*supertype = from;
while(supertype) {
return c;
if(TYPE_IS_CLASS(from) && TYPE_IS_CLASS(to))
return c;
- syntaxerror("can't convert type %s to %s", from->name, to->name);
- return 0; // make gcc happy
-}
+ if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
+ return c;
+
+ as3_error("can't convert type %s%s%s to %s%s%s",
+ from->package, from->package[0]?".":"", from->name,
+ to->package, to->package[0]?".":"", to->name);
-code_t*defaultvalue(code_t*c, classinfo_t*type)
-{
- if(TYPE_IS_INT(type)) {
- c = abc_pushbyte(c, 0);
- } else if(TYPE_IS_UINT(type)) {
- c = abc_pushuint(c, 0);
- } else if(TYPE_IS_FLOAT(type)) {
- c = abc_pushnan(c);
- } else if(TYPE_IS_BOOLEAN(type)) {
- c = abc_pushfalse(c);
- } else if(!type) {
- //c = abc_pushundefined(c);
- } else {
- c = abc_pushnull(c);
- MULTINAME(m, type);
- c = abc_coerce2(c, &m);
- }
return c;
}
+/* move to ast.c todo end */
char is_pushundefined(code_t*c)
{
return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
}
-static classinfo_t* find_class(char*name)
+static const char* get_package_from_name(const char*name)
+{
+ /* try explicit imports */
+ dictentry_t* e = dict_get_slot(state->imports, name);
+ while(e) {
+ if(!strcmp(e->key, name)) {
+ slotinfo_t*c = (slotinfo_t*)e->data;
+ if(c) return c->package;
+ }
+ e = e->next;
+ }
+ return 0;
+}
+static namespace_list_t*get_current_imports()
+{
+ namespace_list_t*searchlist = 0;
+
+ list_append(searchlist, namespace_new_package(state->package));
+
+ import_list_t*l = state->wildcard_imports;
+ while(l) {
+ namespace_t*ns = namespace_new_package(l->import->package);
+ list_append(searchlist, ns);
+ l = l->next;
+ }
+ list_append(searchlist, namespace_new_package(""));
+ list_append(searchlist, namespace_new_package(internal_filename_package));
+ return searchlist;
+}
+
+static slotinfo_t* find_class(const char*name)
{
- classinfo_t*c=0;
+ slotinfo_t*c=0;
- c = registry_findclass(state->package, name);
+ c = registry_find(state->package, name);
if(c) return c;
/* try explicit imports */
if(c) return c;
while(e) {
if(!strcmp(e->key, name)) {
- c = (classinfo_t*)e->data;
+ c = (slotinfo_t*)e->data;
if(c) return c;
}
e = e->next;
import_list_t*l = state->wildcard_imports;
while(l) {
//printf("does package %s contain a class %s?\n", l->import->package, name);
- c = registry_findclass(l->import->package, name);
+ c = registry_find(l->import->package, name);
if(c) return c;
l = l->next;
}
/* try global package */
- c = registry_findclass("", name);
+ c = registry_find("", name);
if(c) return c;
-
+
/* try local "filename" package */
- c = registry_findclass(current_filename_short, name);
+ c = registry_find(internal_filename_package, name);
if(c) return c;
return 0;
}
-
-static char is_getlocal(code_t*c)
-{
- if(!c || c->prev || c->next)
- return 0;
- return(c->opcode == OPCODE_GETLOCAL
- || c->opcode == OPCODE_GETLOCAL_0
- || c->opcode == OPCODE_GETLOCAL_1
- || c->opcode == OPCODE_GETLOCAL_2
- || c->opcode == OPCODE_GETLOCAL_3);
-}
-static int getlocalnr(code_t*c)
-{
- if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
- else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
- else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
- else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
- else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
- else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
- return 0;
-}
-
-static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
+typedcode_t push_class(slotinfo_t*a)
{
- /* converts this:
-
- [prefix code] [read instruction]
-
- to this:
-
- [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
- */
-
- if(in && in->opcode == OPCODE_COERCE_A) {
- in = code_cutlast(in);
- }
- if(in->next)
- syntaxerror("internal error");
-
- /* chop off read instruction */
- code_t*prefix = in;
- code_t*r = in;
- if(r->prev) {
- prefix = r->prev;r->prev = 0;
- prefix->next=0;
- } else {
- prefix = 0;
- }
-
- char use_temp_var = readbefore;
-
- /* generate the write instruction, and maybe append a dup to the prefix code */
- code_t* write = abc_nop(0);
- if(r->opcode == OPCODE_GETPROPERTY) {
- write->opcode = OPCODE_SETPROPERTY;
- multiname_t*m = (multiname_t*)r->data[0];
- write->data[0] = multiname_clone(m);
- if(m->type == QNAME || m->type == MULTINAME) {
- if(!justassign) {
- prefix = abc_dup(prefix); // we need the object, too
- }
- use_temp_var = 1;
- } else if(m->type == MULTINAMEL) {
- if(!justassign) {
- /* dupping two values on the stack requires 5 operations and one register-
- couldn't adobe just have given us a dup2? */
- int temp = gettempvar();
- prefix = abc_setlocal(prefix, temp);
- prefix = abc_dup(prefix);
- prefix = abc_getlocal(prefix, temp);
- prefix = abc_swap(prefix);
- prefix = abc_getlocal(prefix, temp);
- if(!use_temp_var);
- prefix = abc_kill(prefix, temp);
- }
- use_temp_var = 1;
- } else {
- syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
- }
- } else if(r->opcode == OPCODE_GETSLOT) {
- write->opcode = OPCODE_SETSLOT;
- write->data[0] = r->data[0];
- if(!justassign) {
- prefix = abc_dup(prefix); // we need the object, too
- }
- use_temp_var = 1;
- } else if(r->opcode == OPCODE_GETLOCAL) {
- write->opcode = OPCODE_SETLOCAL;
- write->data[0] = r->data[0];
- } else if(r->opcode == OPCODE_GETLOCAL_0) {
- write->opcode = OPCODE_SETLOCAL_0;
- } else if(r->opcode == OPCODE_GETLOCAL_1) {
- write->opcode = OPCODE_SETLOCAL_1;
- } else if(r->opcode == OPCODE_GETLOCAL_2) {
- write->opcode = OPCODE_SETLOCAL_2;
- } else if(r->opcode == OPCODE_GETLOCAL_3) {
- write->opcode = OPCODE_SETLOCAL_3;
- } else {
- code_dump(r);
- syntaxerror("illegal lvalue: can't assign a value to this expression");
- }
- code_t* c = 0;
-
- int temp = -1;
- if(!justassign) {
- if(use_temp_var) {
- /* with getproperty/getslot, we have to be extra careful not
- to execute the read code twice, as it might have side-effects
- (e.g. if the property is in fact a setter/getter combination)
-
- So read the value, modify it, and write it again,
- using prefix only once and making sure (by using a temporary
- register) that the return value is what we just wrote */
- temp = gettempvar();
- c = code_append(c, prefix);
- c = code_append(c, r);
- if(readbefore) {
- c = abc_dup(c);
- c = abc_setlocal(c, temp);
- }
- c = code_append(c, middlepart);
- if(!readbefore) {
- c = abc_dup(c);
- c = abc_setlocal(c, temp);
- }
- c = code_append(c, write);
- c = abc_getlocal(c, temp);
- c = abc_kill(c, temp);
+ typedcode_t x;
+ x.c = 0;
+ x.t = 0;
+ if(a->access == ACCESS_PACKAGEINTERNAL &&
+ strcmp(a->package, state->package) &&
+ strcmp(a->package, internal_filename_package)
+ ) {
+ syntaxerror("Can't access internal %s %s in package '%s' from package '%s'",
+ infotypename(a), a->name, a->package, state->package);
+ }
+
+ if(a->kind != INFOTYPE_CLASS) {
+ MULTINAME(m, a);
+ x.c = abc_findpropstrict2(x.c, &m);
+ x.c = abc_getproperty2(x.c, &m);
+ if(a->kind == INFOTYPE_METHOD) {
+ methodinfo_t*f = (methodinfo_t*)a;
+ x.t = TYPE_FUNCTION(f);
} else {
- /* if we're allowed to execute the read code twice *and*
- the middlepart doesn't modify the code, things are easier.
- */
- code_t* r2 = code_dup(r);
- //c = code_append(c, prefix);
- parserassert(!prefix);
- c = code_append(c, r);
- c = code_append(c, middlepart);
- c = code_append(c, write);
- c = code_append(c, r2);
+ varinfo_t*v = (varinfo_t*)a;
+ x.t = v->type;
}
} else {
- /* even smaller version: overwrite the value without reading
- it out first */
- if(!use_temp_var) {
- if(prefix) {
- c = code_append(c, prefix);
- c = abc_dup(c);
- }
- c = code_append(c, middlepart);
- c = code_append(c, write);
- c = code_append(c, r);
+ classinfo_t*c = (classinfo_t*)a;
+ if(c->slot) {
+ x.c = abc_getglobalscope(x.c);
+ x.c = abc_getslot(x.c, c->slot);
} else {
- temp = gettempvar();
- if(prefix) {
- c = code_append(c, prefix);
- }
- c = code_append(c, middlepart);
- c = abc_dup(c);
- c = abc_setlocal(c, temp);
- c = code_append(c, write);
- c = abc_getlocal(c, temp);
- c = abc_kill(c, temp);
+ MULTINAME(m, c);
+ x.c = abc_getlex2(x.c, &m);
}
+ x.t = TYPE_CLASS(c);
}
- return c;
+ return x;
}
+
char is_break_or_jump(code_t*c)
{
if(!c)
return 0;
}
-
#define IS_FINALLY_TARGET(op) \
((op) == OPCODE___CONTINUE__ || \
(op) == OPCODE___BREAK__ || \
int lookup_version_cost = 4*num_insertion_points + 5;
if(cantdup || simple_version_cost > lookup_version_cost) {
- printf("lookup %d > *%d*\n", simple_version_cost, lookup_version_cost);
+ //printf("(use lookup) simple=%d > lookup=%d\n", simple_version_cost, lookup_version_cost);
return insert_finally_lookup(c, finally, tempvar);
} else {
- printf("simple *%d* < %d\n", simple_version_cost, lookup_version_cost);
+ //printf("(use simple) simple=%d < lookup=%d\n", simple_version_cost, lookup_version_cost);
return insert_finally_simple(c, finally, tempvar);
}
}
#define PASS1 }} if(as3_pass == 1) {{
#define PASS1END }} if(as3_pass == 2) {{
#define PASS2 }} if(as3_pass == 2) {{
-#define PASS12 }} {{
+#define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
#define PASS12END }} if(as3_pass == 2) {{
+#define PASS_ALWAYS }} {{
/* Line 273 of skeleton.m4 */
-#line 1574 "parser.tab.c"
+#line 1899 "parser.tab.c"
+/* Unqualified %code blocks. */
+
+/* Line 274 of skeleton.m4 */
+#line 1963 "parser.y"
+
+ char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
+ {
+ return 1; // FIXME
+ }
+
+
+/* Line 274 of skeleton.m4 */
+#line 2415 "parser.y"
+
+ static void state_has_imports()
+ {
+ state->wildcard_imports = list_clone(state->wildcard_imports);
+ state->imports = dict_clone(state->imports);
+ state->has_own_imports = 1;
+ }
+ static void import_toplevel(const char*package)
+ {
+ char* s = strdup(package);
+ while(1) {
+ dict_put(state->import_toplevel_packages, s, 0);
+ char*x = strrchr(s, '.');
+ if(!x)
+ break;
+ *x = 0;
+ }
+ free(s);
+ }
+
+
+/* Line 274 of skeleton.m4 */
+#line 2548 "parser.y"
+
+ static int slotstate_varconst = 0;
+ static modifiers_t*slotstate_flags = 0;
+ static void setslotstate(modifiers_t* flags, int varconst)
+ {
+ slotstate_varconst = varconst;
+ slotstate_flags = flags;
+ if(state->cls) {
+ if(flags && flags->flags&FLAG_STATIC) {
+ state->method = state->cls->static_init;
+ } else {
+ state->method = state->cls->init;
+ }
+ } else {
+ parserassert(state->method);
+ }
+ }
+
+
+/* Line 274 of skeleton.m4 */
+#line 3392 "parser.y"
+
+ void add_active_url(const char*url)
+ {
+ NEW(namespace_t,n);
+ n->name = url;
+ list_append(state->active_namespace_urls, n);
+ }
+
+
+
+/* Line 274 of skeleton.m4 */
+#line 1968 "parser.tab.c"
#ifdef short
# undef short
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 119
+#define YYFINAL 147
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 2463
+#define YYLAST 3105
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 130
+#define YYNTOKENS 133
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 106
+#define YYNNTS 115
/* YYNRULES -- Number of rules. */
-#define YYNRULES 286
+#define YYNRULES 303
/* YYNRULES -- Number of states. */
-#define YYNSTATES 479
+#define YYNSTATES 517
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 360
+#define YYMAXUTOK 362
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 116, 2, 2, 2, 114, 106, 2,
- 126, 129, 113, 111, 97, 110, 123, 112, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 103, 96,
- 107, 99, 108, 102, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 117, 2, 2, 2, 115, 107, 2,
+ 121, 132, 114, 112, 100, 111, 126, 113, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 104, 99,
+ 108, 102, 109, 103, 127, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 120, 2, 121, 105, 2, 2, 2, 2, 2,
+ 2, 123, 2, 124, 106, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 122, 104, 128, 115, 2, 2, 2,
+ 2, 2, 2, 125, 105, 131, 116, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 98, 100, 101, 109, 117, 118, 119, 124, 125,
- 127
+ 95, 96, 97, 98, 101, 110, 118, 119, 120, 122,
+ 128, 129, 130
};
#if YYDEBUG
static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 5, 6, 8, 10, 13, 15, 17,
- 19, 21, 23, 25, 27, 28, 30, 32, 35, 37,
- 39, 41, 43, 45, 47, 49, 50, 53, 55, 57,
- 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
- 79, 81, 83, 85, 87, 89, 91, 93, 97, 100,
- 103, 105, 107, 110, 111, 114, 117, 119, 123, 127,
- 128, 131, 132, 140, 141, 143, 145, 149, 151, 154,
- 158, 167, 174, 175, 182, 183, 191, 193, 196, 198,
- 201, 202, 204, 206, 209, 211, 214, 219, 223, 224,
- 233, 234, 244, 245, 251, 253, 256, 258, 261, 263,
- 264, 271, 274, 276, 282, 284, 286, 290, 292, 293,
- 300, 301, 307, 310, 315, 316, 318, 320, 323, 325,
- 327, 329, 331, 333, 335, 337, 339, 341, 342, 345,
- 346, 349, 350, 353, 354, 364, 365, 374, 375, 377,
- 379, 382, 384, 386, 388, 390, 391, 393, 395, 398,
- 400, 403, 412, 414, 416, 422, 423, 426, 428, 430,
- 432, 434, 436, 438, 440, 442, 443, 445, 448, 453,
- 457, 459, 464, 467, 469, 471, 472, 473, 486, 488,
- 489, 490, 501, 503, 507, 509, 511, 513, 517, 519,
- 521, 523, 526, 527, 528, 532, 533, 535, 537, 541,
- 545, 550, 555, 558, 560, 563, 565, 567, 571, 573,
- 575, 577, 579, 581, 583, 585, 587, 589, 591, 593,
- 595, 597, 599, 601, 603, 605, 607, 611, 615, 619,
- 623, 627, 631, 635, 639, 643, 647, 650, 653, 657,
- 661, 665, 669, 673, 677, 681, 685, 689, 693, 697,
- 701, 705, 709, 713, 718, 721, 723, 727, 730, 735,
- 739, 740, 742, 746, 752, 756, 760, 764, 768, 772,
- 776, 780, 784, 788, 792, 796, 802, 805, 808, 811,
- 814, 818, 822, 824, 828, 834, 840
+ 19, 21, 23, 25, 30, 32, 33, 35, 37, 40,
+ 42, 44, 46, 48, 50, 55, 57, 59, 60, 63,
+ 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
+ 85, 87, 89, 93, 96, 98, 100, 102, 104, 106,
+ 108, 110, 115, 118, 120, 122, 126, 129, 130, 133,
+ 136, 138, 142, 146, 147, 150, 151, 159, 160, 162,
+ 164, 168, 170, 173, 177, 186, 193, 194, 201, 202,
+ 210, 212, 215, 217, 220, 221, 223, 225, 228, 230,
+ 233, 238, 242, 243, 252, 253, 263, 264, 270, 272,
+ 275, 277, 280, 282, 283, 290, 293, 295, 300, 303,
+ 305, 307, 309, 313, 315, 316, 323, 324, 330, 333,
+ 338, 339, 341, 343, 346, 348, 350, 352, 354, 356,
+ 358, 360, 362, 364, 366, 367, 370, 371, 374, 375,
+ 378, 379, 389, 390, 399, 400, 402, 404, 407, 409,
+ 414, 416, 418, 420, 421, 423, 425, 428, 430, 433,
+ 442, 444, 446, 447, 452, 454, 458, 462, 463, 466,
+ 468, 470, 472, 474, 476, 478, 480, 482, 484, 485,
+ 487, 490, 495, 499, 501, 506, 509, 511, 513, 514,
+ 515, 528, 530, 531, 532, 543, 545, 549, 551, 553,
+ 555, 559, 561, 563, 565, 568, 569, 570, 574, 575,
+ 577, 579, 581, 584, 587, 588, 593, 598, 603, 606,
+ 608, 611, 613, 615, 617, 621, 623, 627, 628, 630,
+ 634, 640, 642, 644, 646, 648, 650, 652, 654, 656,
+ 660, 664, 668, 672, 676, 680, 684, 688, 692, 696,
+ 700, 704, 707, 710, 714, 718, 722, 726, 730, 734,
+ 738, 742, 746, 750, 754, 758, 762, 766, 770, 775,
+ 778, 780, 784, 787, 792, 796, 800, 804, 808, 812,
+ 816, 820, 824, 828, 832, 836, 840, 846, 849, 852,
+ 855, 858, 862, 865, 870, 876, 880, 886, 890, 892,
+ 895, 900, 905, 908
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 131, 0, -1, 132, -1, -1, 133, -1, 134, -1,
- 133, 134, -1, 180, -1, 192, -1, 190, -1, 208,
- -1, 201, -1, 143, -1, 96, -1, -1, 136, -1,
- 137, -1, 136, 137, -1, 192, -1, 190, -1, 208,
- -1, 201, -1, 143, -1, 96, -1, 139, -1, -1,
- 139, 141, -1, 141, -1, 183, -1, 154, -1, 155,
- -1, 156, -1, 158, -1, 166, -1, 149, -1, 177,
- -1, 174, -1, 228, -1, 96, -1, 140, -1, 145,
- -1, 160, -1, 161, -1, 225, -1, 176, -1, 234,
- -1, 235, -1, 122, 139, 128, -1, 122, 128, -1,
- 141, 96, -1, 141, -1, 140, -1, 99, 226, -1,
- -1, 45, 146, -1, 31, 146, -1, 147, -1, 146,
- 97, 147, -1, 3, 218, 144, -1, -1, 64, 142,
- -1, -1, 63, 126, 150, 227, 129, 142, 148, -1,
- -1, 145, -1, 228, -1, 45, 3, 218, -1, 3,
- -1, 12, 126, -1, 12, 49, 126, -1, 153, 151,
- 96, 227, 96, 228, 129, 142, -1, 153, 152, 67,
- 227, 129, 142, -1, -1, 13, 126, 157, 227, 129,
- 142, -1, -1, 14, 159, 142, 13, 126, 227, 129,
- -1, 65, -1, 65, 3, -1, 29, -1, 29, 3,
- -1, -1, 163, -1, 165, -1, 163, 165, -1, 164,
- -1, 163, 164, -1, 33, 229, 103, 138, -1, 61,
- 103, 138, -1, -1, 15, 126, 167, 229, 129, 122,
- 162, 128, -1, -1, 32, 126, 3, 218, 129, 169,
- 122, 138, 128, -1, -1, 27, 122, 171, 138, 128,
- -1, 168, -1, 172, 168, -1, 172, -1, 172, 170,
- -1, 170, -1, -1, 51, 122, 175, 138, 128, 173,
- -1, 36, 227, -1, 36, -1, 38, 126, 227, 129,
- 142, -1, 3, -1, 18, -1, 179, 123, 178, -1,
- 178, -1, -1, 18, 179, 122, 181, 135, 128, -1,
- -1, 18, 122, 182, 135, 128, -1, 40, 215, -1,
- 40, 179, 123, 113, -1, -1, 185, -1, 186, -1,
- 185, 186, -1, 20, -1, 21, -1, 19, -1, 37,
- -1, 46, -1, 48, -1, 47, -1, 25, -1, 23,
- -1, -1, 53, 215, -1, -1, 53, 216, -1, -1,
- 16, 216, -1, -1, 184, 30, 3, 187, 189, 122,
- 191, 194, 128, -1, -1, 184, 43, 3, 188, 122,
- 193, 197, 128, -1, -1, 195, -1, 196, -1, 195,
- 196, -1, 96, -1, 201, -1, 208, -1, 140, -1,
- -1, 198, -1, 199, -1, 198, 199, -1, 96, -1,
- 45, 3, -1, 184, 26, 207, 3, 126, 204, 129,
- 218, -1, 45, -1, 31, -1, 184, 200, 3, 218,
- 144, -1, -1, 99, 203, -1, 9, -1, 7, -1,
- 8, -1, 11, -1, 4, -1, 55, -1, 54, -1,
- 44, -1, -1, 205, -1, 90, 206, -1, 205, 97,
- 90, 206, -1, 205, 97, 206, -1, 206, -1, 3,
- 103, 217, 202, -1, 3, 202, -1, 50, -1, 34,
- -1, -1, -1, 184, 26, 207, 3, 126, 204, 129,
- 218, 122, 209, 138, 128, -1, 3, -1, -1, -1,
- 26, 210, 126, 204, 129, 218, 122, 212, 138, 128,
- -1, 3, -1, 179, 123, 3, -1, 214, -1, 213,
- -1, 215, -1, 216, 97, 215, -1, 215, -1, 113,
- -1, 35, -1, 103, 217, -1, -1, -1, 126, 220,
- 129, -1, -1, 221, -1, 226, -1, 221, 97, 226,
- -1, 24, 213, 219, -1, 229, 126, 220, 129, -1,
- 52, 126, 220, 129, -1, 62, 229, -1, 41, -1,
- 41, 227, -1, 229, -1, 229, -1, 227, 97, 229,
- -1, 227, -1, 211, -1, 230, -1, 233, -1, 222,
- -1, 224, -1, 5, -1, 9, -1, 10, -1, 7,
- -1, 8, -1, 11, -1, 4, -1, 28, -1, 55,
- -1, 54, -1, 44, -1, 223, -1, 229, 107, 229,
- -1, 229, 108, 229, -1, 229, 73, 229, -1, 229,
- 74, 229, -1, 229, 69, 229, -1, 229, 70, 229,
- -1, 229, 72, 229, -1, 229, 71, 229, -1, 229,
- 84, 229, -1, 229, 85, 229, -1, 116, 229, -1,
- 115, 229, -1, 229, 106, 229, -1, 229, 105, 229,
- -1, 229, 104, 229, -1, 229, 93, 229, -1, 229,
- 92, 229, -1, 229, 91, 229, -1, 229, 112, 229,
- -1, 229, 114, 229, -1, 229, 111, 229, -1, 229,
- 110, 229, -1, 229, 113, 229, -1, 229, 67, 229,
- -1, 229, 68, 229, -1, 229, 39, 229, -1, 229,
- 66, 229, -1, 42, 126, 229, 129, -1, 35, 229,
- -1, 35, -1, 126, 227, 129, -1, 110, 229, -1,
- 229, 120, 229, 121, -1, 120, 220, 121, -1, -1,
- 232, -1, 226, 103, 226, -1, 232, 97, 226, 103,
- 226, -1, 122, 231, 128, -1, 229, 78, 229, -1,
- 229, 77, 229, -1, 229, 82, 229, -1, 229, 81,
- 229, -1, 229, 83, 229, -1, 229, 76, 229, -1,
- 229, 75, 229, -1, 229, 79, 229, -1, 229, 80,
- 229, -1, 229, 99, 229, -1, 229, 102, 229, 103,
- 229, -1, 229, 88, -1, 229, 87, -1, 88, 229,
- -1, 87, 229, -1, 52, 123, 3, -1, 229, 123,
- 3, -1, 3, -1, 184, 17, 3, -1, 184, 17,
- 3, 99, 3, -1, 184, 17, 3, 99, 4, -1,
- 22, 17, 3, -1
+ 134, 0, -1, 135, -1, -1, 136, -1, 137, -1,
+ 136, 137, -1, 185, -1, 197, -1, 195, -1, 216,
+ -1, 206, -1, 146, -1, 147, 125, 135, 131, -1,
+ 99, -1, -1, 139, -1, 140, -1, 139, 140, -1,
+ 197, -1, 195, -1, 216, -1, 206, -1, 146, -1,
+ 147, 125, 138, 131, -1, 99, -1, 142, -1, -1,
+ 142, 144, -1, 144, -1, 188, -1, 158, -1, 159,
+ -1, 160, -1, 162, -1, 170, -1, 153, -1, 182,
+ -1, 178, -1, 239, -1, 247, -1, 246, -1, 125,
+ 142, 131, -1, 125, 131, -1, 99, -1, 143, -1,
+ 149, -1, 164, -1, 165, -1, 235, -1, 180, -1,
+ 147, 125, 142, 131, -1, 144, 99, -1, 144, -1,
+ 143, -1, 3, 89, 3, -1, 102, 236, -1, -1,
+ 45, 150, -1, 31, 150, -1, 151, -1, 150, 100,
+ 151, -1, 3, 226, 148, -1, -1, 64, 145, -1,
+ -1, 63, 121, 154, 237, 132, 145, 152, -1, -1,
+ 149, -1, 239, -1, 45, 3, 226, -1, 3, -1,
+ 11, 121, -1, 11, 49, 121, -1, 157, 155, 99,
+ 237, 99, 239, 132, 145, -1, 157, 156, 67, 237,
+ 132, 145, -1, -1, 12, 121, 161, 237, 132, 145,
+ -1, -1, 13, 163, 145, 12, 121, 237, 132, -1,
+ 65, -1, 65, 3, -1, 29, -1, 29, 3, -1,
+ -1, 167, -1, 169, -1, 167, 169, -1, 168, -1,
+ 167, 168, -1, 33, 242, 104, 141, -1, 61, 104,
+ 141, -1, -1, 14, 121, 171, 242, 132, 125, 166,
+ 131, -1, -1, 32, 121, 3, 226, 132, 173, 125,
+ 141, 131, -1, -1, 26, 125, 175, 141, 131, -1,
+ 172, -1, 176, 172, -1, 176, -1, 176, 174, -1,
+ 174, -1, -1, 51, 125, 179, 141, 131, 177, -1,
+ 36, 237, -1, 36, -1, 38, 121, 237, 132, -1,
+ 181, 145, -1, 3, -1, 17, -1, 4, -1, 184,
+ 126, 183, -1, 183, -1, -1, 17, 184, 125, 186,
+ 138, 131, -1, -1, 17, 125, 187, 138, 131, -1,
+ 40, 222, -1, 40, 184, 126, 114, -1, -1, 190,
+ -1, 191, -1, 190, 191, -1, 19, -1, 20, -1,
+ 18, -1, 37, -1, 46, -1, 48, -1, 47, -1,
+ 24, -1, 22, -1, 4, -1, -1, 53, 223, -1,
+ -1, 53, 224, -1, -1, 15, 224, -1, -1, 189,
+ 30, 3, 192, 194, 125, 196, 199, 131, -1, -1,
+ 189, 43, 3, 193, 125, 198, 202, 131, -1, -1,
+ 200, -1, 201, -1, 200, 201, -1, 99, -1, 147,
+ 125, 199, 131, -1, 206, -1, 216, -1, 143, -1,
+ -1, 203, -1, 204, -1, 203, 204, -1, 99, -1,
+ 45, 3, -1, 189, 25, 215, 3, 121, 212, 132,
+ 226, -1, 45, -1, 31, -1, -1, 189, 205, 207,
+ 208, -1, 209, -1, 208, 100, 209, -1, 3, 226,
+ 148, -1, -1, 102, 211, -1, 8, -1, 9, -1,
+ 10, -1, 5, -1, 55, -1, 54, -1, 44, -1,
+ 27, -1, 28, -1, -1, 213, -1, 93, 214, -1,
+ 213, 100, 93, 214, -1, 213, 100, 214, -1, 214,
+ -1, 3, 104, 225, 210, -1, 3, 210, -1, 50,
+ -1, 34, -1, -1, -1, 189, 25, 215, 3, 121,
+ 212, 132, 226, 125, 217, 141, 131, -1, 3, -1,
+ -1, -1, 25, 218, 121, 212, 132, 226, 125, 220,
+ 141, 131, -1, 183, -1, 184, 126, 183, -1, 222,
+ -1, 221, -1, 223, -1, 224, 100, 223, -1, 223,
+ -1, 114, -1, 35, -1, 104, 225, -1, -1, -1,
+ 121, 228, 132, -1, -1, 229, -1, 230, -1, 236,
+ -1, 229, 100, -1, 230, 236, -1, -1, 23, 242,
+ 231, 227, -1, 242, 121, 228, 132, -1, 52, 121,
+ 228, 132, -1, 62, 242, -1, 41, -1, 41, 237,
+ -1, 242, -1, 238, -1, 242, -1, 238, 100, 242,
+ -1, 242, -1, 239, 100, 242, -1, -1, 241, -1,
+ 236, 104, 236, -1, 241, 100, 236, 104, 236, -1,
+ 219, -1, 244, -1, 243, -1, 232, -1, 234, -1,
+ 233, -1, 211, -1, 6, -1, 123, 228, 124, -1,
+ 69, 240, 131, -1, 242, 108, 242, -1, 242, 109,
+ 242, -1, 242, 74, 242, -1, 242, 75, 242, -1,
+ 242, 70, 242, -1, 242, 71, 242, -1, 242, 73,
+ 242, -1, 242, 72, 242, -1, 242, 87, 242, -1,
+ 242, 88, 242, -1, 117, 242, -1, 116, 242, -1,
+ 242, 107, 242, -1, 242, 106, 242, -1, 242, 105,
+ 242, -1, 242, 96, 242, -1, 242, 95, 242, -1,
+ 242, 94, 242, -1, 242, 113, 242, -1, 242, 115,
+ 242, -1, 242, 112, 242, -1, 242, 111, 242, -1,
+ 242, 114, 242, -1, 242, 67, 242, -1, 242, 68,
+ 242, -1, 242, 39, 242, -1, 242, 66, 242, -1,
+ 42, 121, 242, 132, -1, 35, 242, -1, 35, -1,
+ 121, 238, 132, -1, 111, 242, -1, 242, 123, 242,
+ 124, -1, 242, 79, 242, -1, 242, 78, 242, -1,
+ 242, 85, 242, -1, 242, 84, 242, -1, 242, 86,
+ 242, -1, 242, 77, 242, -1, 242, 76, 242, -1,
+ 242, 83, 242, -1, 242, 80, 242, -1, 242, 81,
+ 242, -1, 242, 82, 242, -1, 242, 102, 242, -1,
+ 242, 103, 242, 104, 242, -1, 242, 91, -1, 242,
+ 90, -1, 91, 242, -1, 90, 242, -1, 52, 126,
+ 3, -1, 127, 3, -1, 242, 126, 127, 3, -1,
+ 242, 126, 3, 89, 3, -1, 242, 92, 3, -1,
+ 242, 126, 121, 242, 132, -1, 242, 126, 3, -1,
+ 3, -1, 16, 3, -1, 16, 3, 102, 3, -1,
+ 16, 3, 102, 5, -1, 189, 245, -1, 21, 16,
+ 223, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 1548, 1548, 1550, 1550, 1551, 1552, 1554, 1555, 1556,
- 1557, 1558, 1559, 1560, 1562, 1562, 1563, 1564, 1566, 1567,
- 1568, 1569, 1570, 1571, 1573, 1574, 1576, 1577, 1580, 1581,
- 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1592, 1593,
- 1594, 1595, 1596, 1597, 1598, 1600, 1601, 1603, 1604, 1605,
- 1606, 1610, 1617, 1618, 1622, 1623, 1625, 1626, 1628, 1669,
- 1670, 1673, 1673, 1692, 1693, 1694, 1697, 1700, 1704, 1705,
- 1707, 1727, 1770, 1770, 1789, 1789, 1804, 1807, 1810, 1813,
- 1817, 1818, 1819, 1820, 1821, 1822, 1824, 1835, 1838, 1838,
- 1867, 1867, 1887, 1887, 1904, 1905, 1906, 1907, 1915, 1924,
- 1924, 1969, 1973, 1984, 1993, 1994, 1996, 1997, 1999, 1999,
- 2001, 2001, 2004, 2012, 2022, 2023, 2024, 2025, 2027, 2028,
- 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2037, 2038, 2040,
- 2041, 2043, 2044, 2048, 2046, 2054, 2052, 2060, 2061, 2062,
- 2063, 2064, 2065, 2066, 2068, 2074, 2075, 2076, 2077, 2078,
- 2079, 2082, 2094, 2094, 2096, 2155, 2156, 2158, 2159, 2160,
- 2161, 2162, 2164, 2165, 2166, 2171, 2174, 2179, 2184, 2191,
- 2195, 2200, 2206, 2212, 2213, 2214, 2217, 2216, 2238, 2239,
- 2241, 2240, 2260, 2268, 2276, 2277, 2279, 2280, 2282, 2283,
- 2284, 2293, 2294, 2298, 2299, 2301, 2302, 2303, 2306, 2311,
- 2335, 2383, 2403, 2424, 2427, 2434, 2435, 2436, 2442, 2448,
- 2450, 2452, 2454, 2456, 2458, 2475, 2480, 2483, 2486, 2489,
- 2492, 2495, 2498, 2501, 2504, 2508, 2509, 2512, 2515, 2518,
- 2521, 2524, 2527, 2530, 2534, 2545, 2563, 2568, 2573, 2578,
- 2583, 2588, 2592, 2596, 2601, 2605, 2609, 2618, 2627, 2637,
- 2642, 2654, 2660, 2665, 2671, 2677, 2681, 2683, 2694, 2703,
- 2710, 2711, 2713, 2719, 2728, 2735, 2747, 2753, 2759, 2765,
- 2771, 2777, 2783, 2796, 2807, 2814, 2827, 2854, 2868, 2882,
- 2896, 2911, 2945, 3043, 3044, 3045, 3047
+ 0, 1878, 1878, 1880, 1880, 1881, 1882, 1884, 1885, 1886,
+ 1887, 1888, 1889, 1890, 1891, 1893, 1893, 1894, 1895, 1897,
+ 1898, 1899, 1900, 1901, 1902, 1903, 1905, 1906, 1908, 1909,
+ 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921,
+ 1922, 1923, 1924, 1925, 1928, 1929, 1930, 1931, 1932, 1933,
+ 1934, 1935, 1939, 1940, 1944, 1951, 1970, 1971, 1975, 1976,
+ 1978, 1979, 1981, 2042, 2043, 2046, 2046, 2065, 2066, 2067,
+ 2072, 2076, 2081, 2082, 2084, 2104, 2152, 2152, 2171, 2171,
+ 2186, 2189, 2192, 2195, 2199, 2200, 2201, 2202, 2203, 2204,
+ 2206, 2217, 2220, 2220, 2251, 2251, 2276, 2276, 2292, 2293,
+ 2294, 2295, 2303, 2312, 2312, 2361, 2365, 2376, 2386, 2403,
+ 2404, 2405, 2407, 2408, 2410, 2410, 2412, 2412, 2435, 2449,
+ 2465, 2466, 2467, 2468, 2475, 2476, 2477, 2478, 2479, 2480,
+ 2481, 2482, 2483, 2484, 2488, 2489, 2491, 2492, 2494, 2495,
+ 2499, 2497, 2505, 2503, 2512, 2513, 2514, 2515, 2516, 2517,
+ 2518, 2519, 2521, 2527, 2528, 2529, 2530, 2531, 2532, 2535,
+ 2567, 2567, 2569, 2569, 2571, 2572, 2574, 2659, 2660, 2663,
+ 2664, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2688, 2692,
+ 2698, 2704, 2712, 2717, 2723, 2731, 2739, 2740, 2741, 2744,
+ 2743, 2760, 2761, 2763, 2762, 2786, 2805, 2819, 2820, 2822,
+ 2823, 2825, 2826, 2827, 2836, 2837, 2841, 2842, 2844, 2845,
+ 2846, 2848, 2852, 2853, 2858, 2859, 2896, 2943, 2964, 2986,
+ 2989, 2996, 2999, 3002, 3005, 3008, 3011, 3016, 3017, 3019,
+ 3025, 3034, 3035, 3036, 3037, 3038, 3039, 3041, 3046, 3066,
+ 3076, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093,
+ 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103,
+ 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113,
+ 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123,
+ 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3132, 3133, 3134,
+ 3135, 3137, 3152, 3158, 3164, 3170, 3176, 3189, 3247, 3356,
+ 3363, 3370, 3377, 3401
};
#endif
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "T_IDENTIFIER", "T_STRING", "T_REGEXP",
- "T_EMPTY", "T_INT", "T_UINT", "T_BYTE", "T_SHORT", "T_FLOAT", "\"for\"",
- "\"while\"", "\"do\"", "\"switch\"", "\"implements\"", "\"namespace\"",
- "\"package\"", "\"protected\"", "\"public\"", "\"private\"", "\"use\"",
- "\"internal\"", "\"new\"", "\"native\"", "\"function\"", "\"finally\"",
- "\"undefined\"", "\"continue\"", "\"class\"", "\"const\"", "\"catch\"",
- "\"case\"", "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
+ "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
+ "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
+ "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
+ "\"namespace\"", "\"package\"", "\"protected\"", "\"public\"",
+ "\"private\"", "\"use\"", "\"internal\"", "\"new\"", "\"native\"",
+ "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
+ "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
+ "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
"\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
"\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
"\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
"\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
"\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"delete\"",
"\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"", "\"as\"",
- "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"", "\">=\"", "\"|=\"",
- "\"/=\"", "\"%=\"", "\"*=\"", "\"+=\"", "\"-=\"", "\">>=\"", "\"<<=\"",
- "\">>>=\"", "\"||\"", "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"",
- "\"...\"", "\"<<\"", "\">>>\"", "\">>\"", "prec_none", "below_semicolon",
- "';'", "','", "below_assignment", "'='", "\"&=\"", "\"^=\"", "'?'",
- "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "below_minus", "'-'", "'+'",
- "'/'", "'*'", "'%'", "'~'", "'!'", "minusminus_prefix",
- "plusplus_prefix", "below_curly", "'['", "']'", "'{'", "'.'",
- "above_identifier", "below_else", "'('", "above_function", "'}'", "')'",
- "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST",
- "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST",
- "INPACKAGE_CODE", "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE",
- "CODEBLOCK", "PACKAGE_INITCODE", "MAYBEEXPRESSION",
+ "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"", "\"<=\"",
+ "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"", "\"+=\"",
+ "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"", "\"&&\"",
+ "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"", "\">>>\"",
+ "\">>\"", "prec_none", "below_semicolon", "';'", "','",
+ "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'",
+ "'>'", "below_minus", "'-'", "'+'", "'/'", "'*'", "'%'", "'~'", "'!'",
+ "minusminus_prefix", "plusplus_prefix", "below_curly", "'('", "new2",
+ "'['", "']'", "'{'", "'.'", "'@'", "above_identifier", "below_else",
+ "above_function", "'}'", "')'", "$accept", "PROGRAM",
+ "MAYBE_PROGRAM_CODE_LIST", "PROGRAM_CODE_LIST", "PROGRAM_CODE",
+ "MAYBE_INPACKAGE_CODE_LIST", "INPACKAGE_CODE_LIST", "INPACKAGE_CODE",
+ "MAYBECODE", "CODE", "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK",
+ "PACKAGE_INITCODE", "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION",
"VARIABLE_DECLARATION", "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE",
"IF", "$@1", "FOR_INIT", "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN",
"WHILE", "$@2", "DO_WHILE", "$@3", "BREAK", "CONTINUE",
"MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT", "SWITCH", "$@4",
"CATCH", "$@5", "FINALLY", "$@6", "CATCH_LIST", "CATCH_FINALLY_LIST",
- "TRY", "$@7", "THROW", "WITH", "X_IDENTIFIER", "PACKAGE",
+ "TRY", "$@7", "THROW", "WITH_HEAD", "WITH", "X_IDENTIFIER", "PACKAGE",
"PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT", "MAYBE_MODIFIERS",
"MODIFIER_LIST", "MODIFIER", "EXTENDS", "EXTENDS_LIST",
"IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10", "INTERFACE_DECLARATION",
"$@11", "MAYBE_CLASS_BODY", "CLASS_BODY", "CLASS_BODY_ITEM",
"MAYBE_INTERFACE_BODY", "INTERFACE_BODY", "IDECLARATION", "VARCONST",
- "SLOT_DECLARATION", "MAYBESTATICCONSTANT", "STATICCONSTANT",
- "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
- "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
- "$@13", "CLASS", "PACKAGEANDCLASS", "QNAME", "QNAME_LIST", "TYPE",
- "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
- "EXPRESSION_LIST", "NEW", "FUNCTIONCALL", "DELETE", "RETURN",
- "NONCOMMAEXPRESSION", "EXPRESSION", "VOIDEXPRESSION", "E", "CONSTANT",
- "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
+ "SLOT_DECLARATION", "$@12", "SLOT_LIST", "ONE_SLOT", "MAYBECONSTANT",
+ "CONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
+ "FUNCTION_DECLARATION", "$@13", "MAYBE_IDENTIFIER", "INNERFUNCTION",
+ "$@14", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
+ "TYPE", "MAYBETYPE", "MAYBE_PARAM_VALUES", "MAYBE_EXPRESSION_LIST",
+ "EXPRESSION_LIST", "EXPRESSION_LIST_AND_COMMA", "XX", "NEW",
+ "FUNCTIONCALL", "DELETE", "RETURN", "NONCOMMAEXPRESSION", "EXPRESSION",
+ "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_EXPRPAIR_LIST",
+ "EXPRPAIR_LIST", "E", "MEMBER", "VAR_READ", "NAMESPACE_ID",
"NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
};
#endif
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348, 349, 350, 59, 44, 351, 61,
- 352, 353, 63, 58, 124, 94, 38, 60, 62, 354,
- 45, 43, 47, 42, 37, 126, 33, 355, 356, 357,
- 91, 93, 123, 46, 358, 359, 40, 360, 125, 41
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 59,
+ 44, 354, 61, 63, 58, 124, 94, 38, 60, 62,
+ 355, 45, 43, 47, 42, 37, 126, 33, 356, 357,
+ 358, 40, 359, 91, 93, 123, 46, 64, 360, 361,
+ 362, 125, 41
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 130, 131, 132, 132, 133, 133, 134, 134, 134,
- 134, 134, 134, 134, 135, 135, 136, 136, 137, 137,
- 137, 137, 137, 137, 138, 138, 139, 139, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
- 142, 143, 144, 144, 145, 145, 146, 146, 147, 148,
- 148, 150, 149, 151, 151, 151, 152, 152, 153, 153,
- 154, 155, 157, 156, 159, 158, 160, 160, 161, 161,
- 162, 162, 162, 162, 163, 163, 164, 165, 167, 166,
- 169, 168, 171, 170, 172, 172, 173, 173, 173, 175,
- 174, 176, 176, 177, 178, 178, 179, 179, 181, 180,
- 182, 180, 183, 183, 184, 184, 185, 185, 186, 186,
- 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
- 188, 189, 189, 191, 190, 193, 192, 194, 194, 195,
- 195, 196, 196, 196, 196, 197, 197, 198, 198, 199,
- 199, 199, 200, 200, 201, 202, 202, 203, 203, 203,
- 203, 203, 203, 203, 203, 204, 204, 204, 204, 205,
- 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
- 212, 211, 213, 214, 215, 215, 216, 216, 217, 217,
- 217, 218, 218, 219, 219, 220, 220, 221, 221, 222,
- 223, 223, 224, 225, 225, 226, 227, 227, 228, 229,
- 229, 229, 229, 229, 229, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 231, 231, 232, 232, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 233, 234, 234, 234, 235
+ 0, 133, 134, 135, 135, 136, 136, 137, 137, 137,
+ 137, 137, 137, 137, 137, 138, 138, 139, 139, 140,
+ 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 144, 144, 144, 144, 144, 144,
+ 144, 144, 145, 145, 146, 147, 148, 148, 149, 149,
+ 150, 150, 151, 152, 152, 154, 153, 155, 155, 155,
+ 156, 156, 157, 157, 158, 159, 161, 160, 163, 162,
+ 164, 164, 165, 165, 166, 166, 166, 166, 167, 167,
+ 168, 169, 171, 170, 173, 172, 175, 174, 176, 176,
+ 177, 177, 177, 179, 178, 180, 180, 181, 182, 183,
+ 183, 183, 184, 184, 186, 185, 187, 185, 188, 188,
+ 189, 189, 190, 190, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 192, 192, 193, 193, 194, 194,
+ 196, 195, 198, 197, 199, 199, 200, 200, 201, 201,
+ 201, 201, 201, 202, 202, 203, 203, 204, 204, 204,
+ 205, 205, 207, 206, 208, 208, 209, 210, 210, 211,
+ 211, 211, 211, 211, 211, 211, 211, 211, 212, 212,
+ 212, 212, 213, 213, 214, 214, 215, 215, 215, 217,
+ 216, 218, 218, 220, 219, 221, 222, 223, 223, 224,
+ 224, 225, 225, 225, 226, 226, 227, 227, 228, 228,
+ 228, 229, 230, 229, 231, 232, 233, 233, 234, 235,
+ 235, 236, 237, 238, 238, 239, 239, 240, 240, 241,
+ 241, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 243, 244, 245,
+ 245, 245, 246, 247
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 1, 0, 1, 1, 2, 1, 1, 1,
- 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
- 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
+ 1, 1, 1, 4, 1, 0, 1, 1, 2, 1,
+ 1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 2, 2,
- 1, 1, 2, 0, 2, 2, 1, 3, 3, 0,
- 2, 0, 7, 0, 1, 1, 3, 1, 2, 3,
- 8, 6, 0, 6, 0, 7, 1, 2, 1, 2,
- 0, 1, 1, 2, 1, 2, 4, 3, 0, 8,
- 0, 9, 0, 5, 1, 2, 1, 2, 1, 0,
- 6, 2, 1, 5, 1, 1, 3, 1, 0, 6,
- 0, 5, 2, 4, 0, 1, 1, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0, 2, 0,
- 2, 0, 2, 0, 9, 0, 8, 0, 1, 1,
- 2, 1, 1, 1, 1, 0, 1, 1, 2, 1,
- 2, 8, 1, 1, 5, 0, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 0, 1, 2, 4, 3,
- 1, 4, 2, 1, 1, 0, 0, 12, 1, 0,
- 0, 10, 1, 3, 1, 1, 1, 3, 1, 1,
- 1, 2, 0, 0, 3, 0, 1, 1, 3, 3,
- 4, 4, 2, 1, 2, 1, 1, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
+ 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
+ 1, 4, 2, 1, 1, 3, 2, 0, 2, 2,
+ 1, 3, 3, 0, 2, 0, 7, 0, 1, 1,
+ 3, 1, 2, 3, 8, 6, 0, 6, 0, 7,
+ 1, 2, 1, 2, 0, 1, 1, 2, 1, 2,
+ 4, 3, 0, 8, 0, 9, 0, 5, 1, 2,
+ 1, 2, 1, 0, 6, 2, 1, 4, 2, 1,
+ 1, 1, 3, 1, 0, 6, 0, 5, 2, 4,
+ 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
+ 0, 9, 0, 8, 0, 1, 1, 2, 1, 4,
+ 1, 1, 1, 0, 1, 1, 2, 1, 2, 8,
+ 1, 1, 0, 4, 1, 3, 3, 0, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
+ 2, 4, 3, 1, 4, 2, 1, 1, 0, 0,
+ 12, 1, 0, 0, 10, 1, 3, 1, 1, 1,
+ 3, 1, 1, 1, 2, 0, 0, 3, 0, 1,
+ 1, 1, 2, 2, 0, 4, 4, 4, 2, 1,
+ 2, 1, 1, 1, 3, 1, 3, 0, 1, 3,
+ 5, 1, 1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 4, 2, 1, 3, 2, 4, 3,
- 0, 1, 3, 5, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 5, 2, 2, 2, 2,
- 3, 3, 1, 3, 5, 5, 3
+ 3, 2, 2, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 4, 2,
+ 1, 3, 2, 4, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 5, 2, 2, 2,
+ 2, 3, 2, 4, 5, 3, 5, 3, 1, 2,
+ 4, 4, 2, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 114, 282, 220, 214, 217, 218, 215, 216, 219, 0,
- 0, 74, 0, 0, 120, 118, 119, 126, 0, 125,
- 179, 221, 255, 121, 0, 0, 0, 224, 122, 124,
- 123, 0, 0, 223, 222, 0, 0, 0, 0, 13,
- 0, 0, 0, 195, 260, 0, 0, 2, 114, 5,
- 51, 12, 34, 63, 29, 30, 31, 32, 33, 36,
- 35, 7, 28, 0, 115, 116, 9, 8, 11, 10,
- 209, 212, 225, 213, 208, 37, 206, 210, 211, 0,
- 68, 72, 114, 88, 104, 105, 110, 107, 0, 182,
- 193, 178, 0, 254, 0, 182, 0, 185, 184, 112,
- 0, 99, 0, 195, 202, 61, 279, 278, 257, 237,
- 236, 0, 196, 197, 205, 0, 0, 261, 0, 1,
- 6, 282, 0, 0, 64, 0, 0, 65, 175, 0,
- 153, 0, 152, 0, 117, 0, 0, 0, 0, 0,
+ 120, 298, 133, 172, 238, 169, 170, 171, 0, 0,
+ 78, 0, 0, 126, 124, 125, 0, 132, 0, 131,
+ 192, 176, 177, 270, 127, 0, 0, 0, 175, 128,
+ 130, 129, 0, 0, 174, 173, 0, 0, 227, 0,
+ 0, 14, 0, 0, 0, 0, 208, 120, 0, 0,
+ 2, 120, 5, 54, 12, 0, 36, 67, 31, 32,
+ 33, 34, 35, 38, 120, 37, 7, 30, 0, 121,
+ 122, 9, 8, 11, 237, 10, 231, 234, 236, 235,
+ 39, 225, 233, 232, 41, 40, 0, 0, 72, 76,
+ 120, 92, 109, 111, 110, 116, 113, 0, 0, 298,
+ 214, 191, 0, 269, 0, 0, 118, 0, 103, 208,
+ 0, 218, 65, 0, 0, 228, 221, 290, 289, 272,
+ 252, 251, 0, 223, 0, 209, 210, 211, 82, 0,
+ 106, 219, 0, 80, 44, 43, 120, 45, 29, 0,
+ 46, 47, 48, 50, 0, 49, 292, 1, 6, 120,
+ 298, 0, 68, 0, 0, 69, 53, 108, 0, 188,
+ 0, 161, 0, 160, 162, 302, 123, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 277, 276, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 195, 69, 0, 0,
- 78, 102, 203, 0, 76, 38, 114, 39, 50, 0,
- 40, 41, 42, 44, 0, 43, 45, 46, 0, 114,
- 108, 0, 195, 199, 165, 0, 0, 0, 25, 280,
- 0, 0, 259, 0, 0, 264, 0, 256, 192, 55,
- 56, 192, 54, 0, 0, 174, 173, 0, 127, 129,
- 192, 207, 251, 252, 249, 250, 230, 231, 233, 232,
- 228, 229, 271, 270, 266, 265, 272, 273, 268, 267,
- 269, 234, 235, 243, 242, 241, 274, 0, 240, 239,
- 238, 226, 227, 247, 246, 244, 248, 245, 0, 281,
- 0, 0, 0, 79, 101, 204, 77, 48, 114, 27,
- 206, 49, 0, 0, 0, 23, 0, 114, 16, 22,
- 19, 18, 21, 20, 114, 106, 0, 155, 0, 0,
- 166, 170, 114, 183, 113, 253, 0, 24, 201, 0,
- 198, 262, 0, 0, 53, 0, 53, 0, 0, 0,
- 0, 131, 0, 0, 53, 0, 258, 200, 114, 286,
- 47, 26, 0, 283, 0, 111, 17, 0, 194, 0,
- 0, 172, 167, 192, 0, 103, 0, 114, 0, 190,
- 189, 0, 188, 191, 0, 58, 57, 0, 114, 165,
- 128, 0, 0, 186, 130, 135, 154, 275, 73, 0,
- 0, 80, 109, 161, 158, 159, 157, 160, 164, 163,
- 162, 156, 155, 0, 0, 169, 0, 0, 94, 98,
- 96, 100, 59, 263, 0, 52, 0, 71, 0, 132,
- 133, 0, 114, 75, 284, 285, 0, 0, 0, 81,
- 84, 82, 171, 180, 168, 92, 0, 95, 97, 114,
- 62, 114, 192, 114, 187, 0, 149, 0, 0, 114,
- 147, 0, 25, 89, 85, 83, 25, 25, 192, 60,
- 70, 0, 141, 144, 0, 0, 114, 139, 142, 143,
- 150, 175, 136, 148, 25, 87, 0, 0, 0, 176,
- 134, 140, 0, 86, 181, 93, 90, 25, 0, 0,
- 0, 165, 25, 177, 0, 0, 192, 91, 151
+ 0, 288, 287, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
+ 0, 0, 55, 73, 0, 0, 0, 120, 114, 0,
+ 195, 0, 198, 197, 303, 206, 178, 0, 222, 0,
+ 0, 27, 0, 291, 0, 0, 240, 0, 0, 271,
+ 239, 212, 213, 83, 205, 59, 60, 105, 220, 58,
+ 81, 42, 28, 120, 0, 205, 0, 0, 52, 299,
+ 187, 186, 0, 134, 136, 0, 226, 266, 267, 264,
+ 265, 245, 246, 248, 247, 243, 244, 280, 279, 275,
+ 274, 282, 283, 284, 281, 277, 276, 278, 249, 250,
+ 295, 258, 257, 256, 285, 0, 255, 254, 253, 241,
+ 242, 262, 261, 259, 263, 260, 0, 0, 297, 0,
+ 0, 0, 0, 0, 25, 0, 120, 17, 23, 0,
+ 20, 19, 22, 21, 120, 112, 0, 208, 215, 167,
+ 0, 0, 179, 183, 107, 119, 196, 268, 0, 26,
+ 217, 0, 229, 0, 224, 0, 57, 0, 120, 13,
+ 57, 0, 0, 0, 0, 0, 138, 0, 0, 205,
+ 163, 164, 0, 216, 273, 0, 0, 293, 120, 0,
+ 0, 117, 18, 120, 0, 0, 0, 0, 185, 180,
+ 205, 0, 0, 120, 0, 203, 202, 201, 204, 0,
+ 62, 61, 51, 0, 120, 300, 301, 178, 135, 0,
+ 0, 199, 137, 142, 57, 0, 286, 294, 296, 77,
+ 0, 84, 0, 115, 207, 168, 167, 0, 0, 182,
+ 0, 0, 98, 102, 100, 104, 63, 230, 56, 0,
+ 75, 0, 139, 140, 0, 120, 166, 165, 79, 0,
+ 0, 0, 85, 88, 86, 24, 184, 193, 181, 96,
+ 0, 99, 101, 120, 66, 120, 205, 120, 200, 0,
+ 157, 0, 0, 120, 155, 0, 27, 93, 89, 87,
+ 27, 27, 205, 64, 74, 0, 148, 152, 0, 0,
+ 0, 120, 146, 150, 151, 158, 188, 143, 156, 27,
+ 91, 0, 0, 0, 189, 120, 141, 147, 0, 90,
+ 194, 97, 94, 27, 0, 0, 0, 0, 149, 178,
+ 27, 190, 0, 0, 205, 95, 159
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 46, 47, 48, 49, 286, 287, 288, 306, 307,
- 187, 279, 189, 289, 355, 190, 222, 220, 420, 52,
- 211, 125, 126, 53, 54, 55, 56, 178, 57, 82,
- 191, 192, 408, 409, 410, 411, 58, 198, 388, 469,
- 389, 437, 390, 391, 59, 208, 193, 60, 87, 351,
- 61, 294, 199, 62, 194, 64, 65, 321, 323, 362,
- 290, 423, 291, 402, 445, 446, 447, 428, 429, 430,
- 133, 292, 341, 381, 299, 300, 301, 227, 293, 467,
- 92, 70, 436, 97, 98, 352, 364, 353, 314, 203,
- 111, 112, 71, 72, 73, 195, 113, 74, 75, 76,
- 77, 116, 117, 78, 196, 197
+ -1, 49, 50, 51, 52, 315, 316, 317, 338, 339,
+ 137, 138, 157, 318, 139, 390, 140, 249, 246, 454,
+ 56, 234, 153, 154, 57, 58, 59, 60, 214, 61,
+ 90, 141, 142, 441, 442, 443, 444, 62, 216, 422,
+ 506, 423, 471, 424, 425, 63, 231, 143, 64, 65,
+ 220, 221, 66, 324, 217, 67, 144, 69, 70, 356,
+ 358, 400, 320, 457, 321, 435, 480, 481, 482, 462,
+ 463, 464, 164, 322, 265, 360, 361, 378, 74, 331,
+ 332, 333, 262, 323, 503, 102, 76, 470, 222, 223,
+ 387, 402, 388, 346, 328, 124, 125, 126, 225, 77,
+ 78, 79, 145, 127, 227, 228, 80, 114, 115, 81,
+ 82, 83, 165, 84, 85
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -306
+#define YYPACT_NINF -406
static const yytype_int16 yypact[] =
{
- 349, -306, -306, -306, -306, -306, -306, -306, -306, -40,
- -85, -306, -37, 35, -306, -306, -306, -306, 30, -306,
- 68, -306, 52, -306, -24, 18, -16, -306, -306, -306,
- -306, -22, -35, -306, -306, 1538, -14, 1538, 1538, -306,
- 1538, 1538, 1538, 1538, 1538, 1538, 167, -306, 473, -306,
- -306, -306, -306, 211, -306, -306, -306, -306, -306, -306,
- -306, -306, -306, 217, 640, -306, -306, -306, -306, -306,
- -306, -306, -306, -306, 76, -306, 1971, -306, -306, 60,
- -306, -306, 1469, -306, -306, -306, -306, -306, -28, -306,
- 67, -306, 71, 141, 1538, 69, 81, -306, -306, -306,
- 1538, -306, 186, 1538, 141, -306, 141, 141, 163, 141,
- 141, 87, 115, -306, 1971, 120, 96, 128, -86, -306,
- -306, 165, 227, 230, -306, 138, 169, -306, -5, 238,
- -306, 241, -306, 246, -306, 1538, 1538, 1538, 1538, 1538,
- 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
- 1538, 1538, 1538, 1538, 1538, 1538, 1538, -306, -306, 1538,
- 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
- 1538, 1538, 1538, 1538, 1538, 254, 1538, -306, 1538, 242,
- 255, 1538, 1538, 227, 265, -306, 593, -306, 173, 257,
- -306, -306, -306, -306, 261, -306, -306, -306, 1538, 845,
- -306, 72, 1538, -306, 9, -82, 49, 1599, 1349, -306,
- 143, 1538, -306, 1538, 1538, -306, 1538, -306, 171, 182,
- -306, 171, 182, 1538, 1538, -306, -306, 277, 228, 231,
- 171, 1971, 962, 836, 836, 836, 2337, 2337, 2337, 2337,
- 962, 962, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
- 1971, 2032, 2093, 340, 340, 340, 1971, 1727, 2154, 2215,
- 2276, 962, 962, 163, 163, 141, 141, 141, 1788, -306,
- 156, -55, 287, -306, 76, 76, -306, -306, 719, -306,
- 1849, -306, 170, 288, 1663, -306, 175, 971, -306, -306,
- -306, -306, -306, -306, 845, -306, 164, -69, 294, 172,
- 207, -306, 1469, 69, -306, -306, 177, 1349, -306, 74,
- -306, -306, 203, 63, 209, 227, 112, 73, 84, 183,
- 18, 296, 18, 188, 209, 1538, -306, -306, 1469, -306,
- -306, -306, 1538, 214, 192, -306, -306, 189, -306, 61,
- 63, -306, -306, 171, 11, -306, 8, 1469, 1538, -306,
- -306, 193, -306, -306, 1538, -306, -306, 1538, 1469, 9,
- -306, 18, 196, -306, 222, -306, -306, 1971, -306, 88,
- 179, 130, -306, -306, -306, -306, -306, -306, -306, -306,
- -306, -306, 221, 201, 294, -306, 202, 199, -306, -306,
- 8, -306, 268, -306, 90, -306, 200, -306, 205, 222,
- -306, 18, 394, -306, -306, -306, 1538, 232, 210, 130,
- -306, -306, -306, -306, -306, -306, 336, -306, -306, 1469,
- -306, 1469, 171, 1097, -306, 337, -306, 316, 216, 529,
- -306, 1910, 1349, -306, -306, -306, 1349, 1349, 171, -306,
- -306, 224, -306, -306, 66, 219, 1223, -306, -306, -306,
- -306, -5, -306, -306, 1349, -306, 220, 223, 226, -306,
- -306, -306, 347, -306, -306, -306, -306, 1349, 239, 244,
- 243, 9, 1349, -306, 247, 250, 171, -306, -306
+ 1661, -65, -406, -406, -406, -406, -406, -406, -10, -85,
+ -406, -59, 54, -406, -406, -406, 66, -406, 2104, -406,
+ 101, -406, -406, 2159, -406, -9, 89, -6, -406, -406,
+ -406, -406, -3, -51, -406, -406, 2104, 7, 2104, 2104,
+ 2104, -406, 2104, 2104, 2104, 2104, 2104, 629, 120, 130,
+ -406, 500, -406, -406, -406, -1, -406, 2034, -406, -406,
+ -406, -406, -406, -406, 1911, -406, -406, -406, 244, 364,
+ -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
+ 31, 2613, -406, -406, -406, -406, 129, 12, -406, -406,
+ 1911, -406, -406, -406, -406, -406, -406, -81, 89, -406,
+ -54, -406, 18, 119, 2104, 8, -406, 2104, -406, 2104,
+ 132, 119, -406, 36, 5, 43, 2613, 119, 119, 595,
+ 119, 119, -53, 2613, 21, 46, 2104, -406, 144, 145,
+ 2104, 2104, 145, 177, -406, -406, 758, -406, -406, 77,
+ -406, -406, -406, -406, 188, -406, -406, -406, -406, 1016,
+ 140, 209, -406, 115, 148, 31, 117, -406, 217, 14,
+ 223, -406, 224, -406, -406, -406, -406, 2104, 2104, 2104,
+ 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
+ 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
+ 2104, -406, -406, 227, 2104, 2104, 2104, 2104, 2104, 2104,
+ 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
+ 2104, 17, -406, -406, 2104, 219, 2104, 1145, -406, 89,
+ 107, 108, -406, -406, -406, 118, 15, 104, 141, 64,
+ 2217, 1786, 116, -406, 2104, 2104, -406, 2104, 2104, -406,
+ -406, -406, -406, -406, 143, 156, -406, -406, -406, 156,
+ -406, -406, -406, 1911, 126, 143, 2104, 2104, -406, 157,
+ -406, -406, 255, 208, 211, 259, 2613, 492, 328, 328,
+ 328, 2979, 2979, 2979, 2979, 492, 492, 2613, 2613, 2613,
+ 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2674, 2735,
+ -406, 354, 354, 354, 2613, 2430, 2796, 2857, 2918, 492,
+ 492, 595, 595, 119, 119, 119, 135, 2491, 181, 2104,
+ 269, 149, 152, 2288, -406, 151, 1274, -406, -406, 155,
+ -406, -406, -406, -406, 1145, -406, 89, 2104, -406, -19,
+ 281, 154, 191, -406, -406, -406, 162, -406, 163, 1786,
+ -406, 161, -406, 193, 2613, 86, 196, 145, 887, -406,
+ -24, 200, 169, 124, 174, 89, 287, 89, 178, 143,
+ 213, -406, 2104, -406, -406, 306, 2359, -406, 1911, 2104,
+ 190, -406, -406, 1145, 189, 187, 32, 86, -406, -406,
+ 143, 16, 94, 1911, 2104, -406, -406, -406, -406, 2104,
+ -406, -406, -406, 2104, 1911, -406, -406, 15, -406, 89,
+ 197, -406, 228, -406, 196, 259, 2613, -406, -406, -406,
+ 204, 13, 198, -406, -406, -406, 235, 214, 281, -406,
+ 215, 220, -406, -406, 94, -406, 257, -406, -406, -37,
+ -406, 212, 228, -406, 89, 231, -406, -406, -406, 2104,
+ 239, 222, 13, -406, -406, -406, -406, -406, -406, -406,
+ 342, -406, -406, 1911, -406, 1911, 143, 1403, -406, 343,
+ -406, 323, 226, 286, -406, 2552, 1786, -406, -406, -406,
+ 1786, 1786, 143, -406, -406, 225, -406, -406, 229, 221,
+ 230, 1532, -406, -406, -406, -406, 14, -406, -406, 1786,
+ -406, 232, 233, 234, -406, 1403, -406, -406, 348, -406,
+ -406, -406, -406, 1786, 238, 237, 240, 246, -406, 15,
+ 1786, -406, 247, 249, 143, -406, -406
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -306, -306, -306, -306, 327, 85, -306, 93, -227, 197,
- 1, -76, -244, 16, 58, 332, 270, 75, -306, -306,
- -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
- -306, -306, -306, -306, -15, -11, -306, -306, 15, -306,
- 17, -306, -306, -306, -306, -306, -306, -306, -193, 19,
- -306, -306, -306, -306, 0, -306, 335, -306, -306, -306,
- 31, -306, 39, -306, -306, -306, -38, -306, -306, -23,
- -306, 2, 27, -306, -305, -306, -271, -41, 3, -306,
- -306, -306, -306, 398, -306, -20, 57, 80, -184, -306,
- -93, -306, -306, -306, -306, -306, -26, -17, -46, -18,
- -306, -306, -306, -306, -306, -306
+ -406, -406, 203, -406, 308, -296, -406, 62, -405, -30,
+ 1, -56, -83, 49, 2, -23, 330, 260, 44, -406,
+ -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
+ -406, -406, -406, -406, -406, -52, -50, -406, -406, -31,
+ -406, -26, -406, -406, -406, -406, -406, -406, -406, -406,
+ 9, 76, -406, -406, -406, -406, 0, -406, 331, -406,
+ -406, -406, 50, -406, 56, -406, -91, -406, -76, -406,
+ -406, -57, -406, 3, -406, -406, 10, -8, 33, -384,
+ -406, -308, -79, 4, -406, -406, -406, -406, -406, 387,
+ -92, 22, 37, -243, -406, -95, -406, -406, -406, -406,
+ -406, -406, -406, -29, -115, 371, -46, -406, -406, -13,
+ -406, -406, -406, -406, -406
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -206
+#define YYTABLE_NINF -155
static const yytype_int16 yytable[] =
{
- 63, 50, 68, 69, 93, 99, 188, 127, 295, 79,
- 210, 135, 297, 295, 297, 135, 51, 104, 115, 106,
- 107, 95, 108, 109, 110, 114, 114, 342, 118, 225,
- 339, 66, 88, 89, 340, 386, 85, 316, 84, 67,
- 387, 81, 135, 217, 96, 226, 324, 302, 63, 50,
- 68, 69, 303, 85, 398, 1, 2, 3, 345, 4,
- 5, 6, 7, 8, 51, 373, 95, 85, 374, 375,
- 376, 91, 377, 385, 328, 84, 18, 205, 20, 66,
- 21, 85, 207, 270, 368, 114, 80, 67, 102, 83,
- 85, 103, 128, 303, 200, 201, 27, 130, 349, 298,
- 101, 384, 94, 392, 32, 378, 33, 34, 85, 296,
- 100, 132, 105, 414, 397, 379, 380, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 250, 251, 252, 37,
- 38, 253, 254, 255, 256, 257, 258, 259, 260, 261,
- 262, 263, 264, 265, 266, 267, 268, 86, 114, 383,
- 115, 271, 304, 406, 274, 275, 474, 119, 280, 357,
- 135, 135, 43, 135, 44, 439, 350, 440, 45, -66,
- 284, 135, 404, 405, 114, 135, 177, 310, 311, 209,
- 312, 407, -104, 202, 309, 114, 114, 204, 114, 63,
- 50, 295, 331, 347, 206, 455, 317, 318, 212, 456,
- 457, 354, 213, 358, 121, 2, 3, 403, 4, 5,
- 6, 7, 8, 214, 215, 216, 188, 463, 157, 158,
- 218, 331, -67, 221, 223, 18, 224, 20, 441, 21,
- 470, 228, 122, 128, 229, 475, 22, 129, 130, 230,
- 157, 158, 188, 26, 458, 27, 123, 269, 273, 272,
- 131, 174, 132, 32, 175, 33, 34, 176, 276, 281,
- 282, 188, 308, 35, 313, 171, 172, 173, 283, 315,
- 319, 320, 188, 174, 322, 327, 175, 63, 50, 176,
- 329, 333, 478, 338, 63, 50, 332, 297, 37, 38,
- 360, 343, 363, 335, 344, 346, 348, 367, 354, 359,
- 365, 396, 361, 370, 371, 369, 394, 372, 400, 401,
- 339, 40, 393, 413, 415, 416, 41, 42, 395, 421,
- 114, 43, 419, 44, 422, 432, 114, 45, 433, 438,
- 450, 363, 451, 188, 452, 188, 459, 460, 464, -3,
- 468, 465, 1, 2, 3, 466, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 471, 472, 13, 14, 15,
- 16, 473, 17, 18, 19, 120, 476, 21, 477, 337,
- 336, 424, 366, 278, 22, 124, 23, 24, 431, 25,
- 356, 26, 219, 27, 434, 28, 29, 30, 435, 134,
- 31, 32, 427, 33, 34, 417, 453, 418, 461, 412,
- 462, 35, 36, 14, 15, 16, 90, 17, 399, 19,
- 382, 0, 0, 444, 443, 448, 449, 157, 158, 427,
- 0, 23, 0, 0, 0, 0, 37, 38, 0, 425,
- 28, 29, 30, 0, 0, 39, 444, 443, 448, 449,
- 169, 170, 171, 172, 173, 0, 0, 0, 0, 40,
- 174, 0, 0, 175, 41, 42, 176, 0, 0, 43,
- 0, 44, 0, -4, 0, 45, 1, 2, 3, 0,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
- 426, 13, 14, 15, 16, 0, 17, 18, 19, 0,
- 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
- 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
- 29, 30, -145, 0, 31, 32, 0, 33, 34, 0,
- 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
- 16, 0, 17, 0, 19, 0, 0, 0, 0, 0,
- 37, 38, 0, 0, 0, 0, 23, 0, 0, 39,
- 0, 0, 0, 0, 425, 28, 29, 30, 0, 0,
- 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
- 0, 0, 0, 43, 0, 44, 1, 2, 3, 45,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
- 0, 0, 14, 15, 16, 179, 17, 18, 19, 20,
- 0, 21, 180, 0, 122, 426, 0, 0, 22, 181,
- 23, 24, 0, 25, 182, 26, 0, 27, 183, 28,
- 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
- 0, 0, 0, 0, 0, 35, 36, -146, 184, 14,
- 15, 16, 0, 17, 0, 19, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
- 37, 38, 0, 0, 0, 0, 28, 29, 30, 185,
+ 68, 53, 55, 73, 75, 100, 224, 215, 156, 113,
+ 103, 155, 350, 431, 232, 247, 248, 136, 329, 329,
+ 308, 96, 379, 111, 86, 116, 117, 118, 374, 119,
+ 120, 121, 123, 116, 156, 96, 89, 3, 193, 87,
+ 5, 6, 7, -70, 218, 219, 439, 238, 260, 54,
+ 71, 68, 53, 55, 73, 75, 72, 92, 93, 21,
+ 22, 490, 91, 167, 261, 491, 492, 92, 93, 210,
+ 109, 94, 211, 419, 440, 110, 28, 412, 389, 239,
+ 252, 94, 98, 376, 499, 377, 34, 35, 97, 92,
+ 93, 123, 92, 93, 230, 455, 116, 242, 507, 311,
+ 54, 71, 105, 94, 101, 513, 94, 72, 330, 418,
+ 448, 88, 104, 116, 306, 107, 404, 123, 123, 341,
+ 420, 385, 108, 146, 149, 512, 421, 395, 112, 396,
+ 147, 167, 212, 213, 229, 233, 236, 417, 309, 226,
+ 235, 351, 352, 237, 310, 240, 241, 243, 244, 68,
+ 53, 55, 73, 75, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 335, 95,
+ 250, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 116, 307, 54, 71,
+ 386, 123, 253, 313, 158, 72, 342, -71, 343, 191,
+ 192, 193, 255, 475, 256, 257, 258, 68, 53, 319,
+ 259, 123, 116, 348, 116, 344, 263, 264, 325, 493,
+ 290, 312, 375, -113, 326, 2, 334, 158, 336, 327,
+ 209, 238, 210, 123, 123, 211, 159, 345, 340, 13,
+ 14, 15, 161, 17, 410, 19, 347, 349, 354, 353,
+ 158, 355, 359, 398, 357, 401, 163, 363, 24, 159,
+ 365, 516, 367, 369, 160, 161, 459, 29, 30, 31,
+ 373, 368, 371, 252, 329, 409, 380, 162, -112, 163,
+ 2, 381, 252, 383, 382, 397, 366, 384, 389, 393,
+ 426, 394, 399, 403, 13, 14, 15, 401, 17, 407,
+ 19, 430, 156, 405, 116, 411, 68, 53, 319, 414,
+ 413, 453, 433, 24, 68, 53, 319, 156, 434, 445,
+ 460, 459, 29, 30, 31, 336, 438, 376, 156, 447,
+ 449, 450, 458, 466, 456, 472, 485, 429, 486, 406,
+ 494, 505, 254, 467, 495, 427, 123, 487, 509, 148,
+ 428, 496, -153, 500, 501, 510, 502, 168, 2, 508,
+ 473, 116, 474, 68, 53, 319, 116, 511, 372, 514,
+ 515, 436, 13, 14, 15, 460, 17, 152, 19, 245,
+ 468, 391, 469, 451, -155, -155, -155, 156, 452, 156,
+ 166, 24, 176, 177, 504, 497, 488, 498, 446, 415,
+ 29, 30, 31, 106, 416, 437, 122, -154, 191, 192,
+ 193, 432, 194, 195, 196, 0, 465, 0, 0, 0,
+ 0, 0, 0, 0, 0, 461, 202, 203, 0, 204,
+ 205, 206, 207, 208, 191, 192, 193, 0, 0, 209,
+ 0, 210, 0, 0, 211, 0, 0, 479, 477, 478,
+ 483, 484, 0, 461, 0, 204, 205, 206, 207, 208,
+ 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
+ 211, 479, 477, 478, 483, 484, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 479, 477, 478, 483, 484,
+ -4, 0, 0, 1, 2, 3, 4, 0, 5, 6,
+ 7, 8, 9, 10, 11, 0, 0, 12, 13, 14,
+ 15, 16, 17, 18, 19, 0, 0, 21, 22, 0,
+ 0, -155, 0, 0, 0, 23, 0, 24, 25, 0,
+ 26, 0, 27, 0, 28, 0, 29, 30, 31, 0,
+ 0, 32, 33, 0, 34, 35, 0, 0, 0, 0,
+ 0, 0, 36, 37, 0, 0, -155, -155, 0, 38,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 191, 192, 193, 0, 194, 195, 196, 0,
+ 39, 40, 0, 0, 0, 0, 0, 0, 0, 41,
+ -155, -155, 0, 204, 205, 206, 207, 208, 0, 0,
+ 0, 42, 0, 209, 0, 210, 43, 44, 211, 0,
+ 0, 45, 0, 46, 0, 47, 0, 48, 0, 0,
+ 0, -4, 1, 2, 3, 4, 0, 5, 6, 7,
+ 8, 9, 10, 11, 0, 0, 0, 13, 14, 15,
+ 16, 17, 18, 19, 20, 0, 21, 22, 128, 0,
+ 129, 0, 0, 0, 23, 130, 24, 25, 0, 26,
+ 131, 27, 0, 28, 132, 29, 30, 31, 0, 0,
+ 32, 33, 0, 34, 35, 191, 192, 193, 0, 0,
+ 0, 36, 37, 0, 133, 0, 0, 0, 38, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
+ 208, 0, 0, 0, 0, 0, 209, 0, 210, 39,
+ 40, 211, 0, 0, 0, 0, 0, 0, 134, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
- 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
- 0, 277, 1, 2, 3, 0, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
- 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
- 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
- 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
- 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
- 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
+ 42, 0, 0, 0, 0, 43, 44, 0, 0, 0,
+ 45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
+ 135, 1, 2, 3, 4, 0, 5, 6, 7, 8,
+ 9, 10, 11, 0, 0, 0, 13, 14, 15, 16,
+ 17, 18, 19, 20, 0, 21, 22, 128, 0, 129,
+ 0, 0, 0, 23, 130, 24, 25, 0, 26, 131,
+ 27, 0, 28, 132, 29, 30, 31, 0, 0, 32,
+ 33, 0, 34, 35, 0, 0, 0, 0, 0, 0,
+ 36, 37, 0, 133, 0, 0, 0, 38, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
- 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
- 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
- 0, 44, 0, 0, 0, 45, 0, 330, 1, 2,
- 3, 0, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 0, 0, 0, 14, 15, 16, 0, 17, 18,
- 19, 0, 0, 21, 0, 136, 0, 0, 0, 0,
- 22, 0, 23, 24, 0, 25, 0, 26, 0, 27,
- 0, 28, 29, 30, 0, 0, 31, 32, 0, 33,
- 34, 0, -206, -206, -206, 0, 0, 35, 36, 144,
- 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
- 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
- 0, 285, 0, 167, 168, 0, 169, 170, 171, 172,
- 173, 0, 0, 0, 0, 40, 174, 0, 0, 175,
- 41, 42, 176, 0, 0, 43, 0, 44, 0, 0,
- 0, 45, 0, -14, 1, 2, 3, 0, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
- 14, 15, 16, 0, 17, 18, 19, 0, 0, 21,
- 0, -206, 0, 0, 0, 0, 22, 0, 23, 24,
- 0, 25, 0, 26, 0, 27, 0, 28, 29, 30,
- 0, 0, 31, 32, 0, 33, 34, 0, 0, 0,
- 0, 0, 0, 35, 36, -206, -206, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
- 158, 0, 0, 159, 160, 161, 0, 0, 37, 38,
- 0, 0, 0, 0, 0, 0, 0, 285, 0, -206,
- -206, 0, 169, 170, 171, 172, 173, 0, 0, 0,
- 0, 40, 174, 0, 0, 175, 41, 42, 176, 0,
- 0, 43, 0, 44, 0, 0, 0, 45, 0, -15,
- 1, 2, 3, 0, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 0, 0, 0, 14, 15, 16, 0,
- 17, 18, 19, 0, 0, 21, 0, 0, 0, 0,
- 0, 0, 22, 0, 23, 24, 0, 25, 0, 26,
- 0, 27, 0, 28, 29, 30, 0, 0, 31, 32,
- 0, 33, 34, 0, 0, 0, 0, 0, 0, 35,
- 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 39, 40,
+ 0, 0, 0, 0, 0, 0, 0, 134, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
+ 0, 0, 0, 0, 43, 44, 0, 0, 0, 45,
+ 0, 46, 0, 47, 0, 48, 0, 0, 0, 251,
+ 1, 2, 3, 4, 0, 5, 6, 7, 8, 9,
+ 10, 11, 0, 0, 0, 13, 14, 15, 16, 17,
+ 18, 19, 20, 0, 21, 22, 128, 0, 129, 0,
+ 0, 0, 23, 130, 24, 25, 0, 26, 131, 27,
+ 0, 28, 132, 29, 30, 31, 0, 0, 32, 33,
+ 0, 34, 35, 0, 0, 0, 0, 0, 0, 36,
+ 37, 0, 133, 0, 0, 0, 38, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
- 0, 0, 0, 442, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
- 0, 0, 41, 42, 0, 0, 0, 43, 0, 44,
- 0, 0, 0, 45, 0, -137, 1, 2, 3, 0,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
- 0, 0, 14, 15, 16, 0, 17, 18, 19, 0,
- 0, 21, 0, 0, 0, 0, 0, 0, 22, 0,
- 23, 24, 0, 25, 0, 26, 0, 27, 0, 28,
- 29, 30, 0, 0, 31, 32, 0, 33, 34, 0,
- 0, 0, 0, 0, 0, 35, 36, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 39, 40, 0,
+ 0, 0, 0, 0, 0, 0, 134, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
+ 0, 0, 0, 43, 44, 0, 0, 0, 45, 0,
+ 46, 0, 47, 0, 48, 0, 0, 0, 392, 1,
+ 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
+ 11, 0, 0, 12, 13, 14, 15, 16, 17, 18,
+ 19, 0, 0, 21, 22, 0, 0, 0, 0, 0,
+ 0, 23, 0, 24, 25, 0, 26, 0, 27, 0,
+ 28, 0, 29, 30, 31, 0, 0, 32, 33, 0,
+ 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
+ 0, 0, 0, 0, 0, 38, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
+ 0, 0, 0, 0, 0, 41, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
+ 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
+ 0, 47, 0, 48, 0, 0, 0, -3, 1, 2,
+ 3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
+ 0, 0, 0, 13, 14, 15, 16, 17, 18, 19,
+ 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
+ 23, 0, 24, 25, 0, 26, 0, 27, 0, 28,
+ 0, 29, 30, 31, 0, 0, 32, 33, 0, 34,
+ 35, 0, 0, 0, 0, 0, 0, 36, 37, 0,
+ 0, 0, 0, 0, 38, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 37, 38, 0, 0, 0, 0, 0, 0, 0, 442,
+ 0, 0, 0, 0, 0, 39, 40, 0, 0, 0,
+ 0, 0, 0, 0, 314, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
+ 0, 43, 44, 0, 0, 0, 45, 0, 46, 0,
+ 47, 0, 48, 0, 0, 0, -15, 1, 2, 3,
+ 4, 0, 5, 6, 7, 8, 9, 10, 11, 0,
+ 0, 0, 13, 14, 15, 16, 17, 18, 19, 0,
+ 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
+ 0, 24, 25, 0, 26, 0, 27, 0, 28, 0,
+ 29, 30, 31, 0, 0, 32, 33, 0, 34, 35,
+ 0, 0, 0, 0, 0, 0, 36, 37, 0, 0,
+ 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 40, 0, 0, 0, 0, 41, 42,
- 0, 0, 0, 43, 0, 44, 0, 0, 0, 45,
- 0, -138, 1, 2, 3, 0, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 0, -114, 0, 14, 15,
- 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
- 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
- 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
- 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
- 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
+ 0, 0, 0, 314, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
+ 43, 44, 0, 0, 0, 45, 0, 46, 0, 47,
+ 0, 48, 0, 0, 0, -16, 1, 2, 3, 4,
+ 0, 5, 6, 7, 8, 9, 10, 11, 0, 0,
+ 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
+ 21, 22, 0, 0, 0, 0, 0, 0, 23, 0,
+ 24, 25, 0, 26, 0, 27, 0, 28, 0, 29,
+ 30, 31, 0, 0, 32, 33, 0, 34, 35, 0,
+ 0, 0, 0, 0, 0, 36, 37, 0, 0, 0,
+ 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
- 0, 0, 0, 0, 0, 185, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
- 0, 0, 0, 0, 41, 42, 0, 0, 0, 43,
- 0, 44, 1, 2, 3, 45, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 0, 0, 0, 14, 15,
- 16, 179, 17, 18, 19, 20, 0, 21, 180, 0,
- 122, 0, 0, 0, 22, 181, 23, 24, 0, 25,
- 182, 26, 0, 27, 183, 28, 29, 30, 0, 0,
- 31, 32, 0, 33, 34, 0, 0, 0, 0, 0,
- 0, 35, 36, 0, 184, 0, 0, 0, 0, 0,
- 0, 1, 2, 3, 0, 4, 5, 6, 7, 8,
- 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
- 0, 0, 18, 0, 20, 185, 21, 0, 0, 0,
- 0, 0, 0, 22, 0, 0, 0, 0, 0, 40,
- 26, 0, 27, 0, 41, 42, 0, 0, 0, 43,
- 32, 186, 33, 34, 0, 45, 0, 0, 0, 0,
- 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 39, 40, 0, 0, 0, 0, 0,
+ 0, 0, 476, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
+ 44, 0, 0, 0, 45, 0, 46, 0, 47, 0,
+ 48, 0, 0, 0, -144, 1, 2, 3, 4, 0,
+ 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
+ 13, 14, 15, 16, 17, 18, 19, 0, 0, 21,
+ 22, 0, 0, 0, 0, 0, 0, 23, 0, 24,
+ 25, 0, 26, 0, 27, 0, 28, 0, 29, 30,
+ 31, 0, 0, 32, 33, 0, 34, 35, 0, 0,
+ 0, 0, 0, 0, 36, 37, 0, 0, 0, 0,
+ 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 37, 38, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 136, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 40, 0,
- 0, 0, 0, 41, 42, 0, 0, 0, 43, 0,
- 44, 0, 0, 0, 45, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
- 159, 160, 161, 0, 0, 0, 0, 0, 162, 0,
- 0, 163, 136, 164, 165, 166, 167, 168, 0, 169,
- 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
- 0, 0, 175, 0, 0, 176, 0, 0, 305, 137,
- 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
- 148, 149, 150, 151, 152, 153, 154, 155, 156, 0,
- 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
- 0, 0, 162, 0, 0, 163, 136, 164, 165, 166,
- 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
- 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
- 0, 0, 334, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 154, 155, 156, 0, 157, 158, 0, 0, 159, 160,
- 161, 0, 0, 0, 0, 0, 162, 136, 0, 163,
- 325, 164, 165, 166, 167, 168, 0, 169, 170, 171,
- 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
- 175, 0, 0, 176, 137, 138, 139, 140, 141, 142,
- 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
- 153, 154, 155, 156, 0, 157, 158, 0, 0, 159,
- 160, 161, 0, 0, 0, 0, 0, 162, 136, 0,
- 163, 0, 164, 165, 166, 167, 168, 0, 169, 170,
- 171, 172, 173, 0, 0, 0, 0, 0, 174, 326,
- 0, 175, 0, 0, 176, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 0, 157, 158, 0, 0,
- 159, 160, 161, 0, 0, 0, 0, 0, 162, 136,
- 0, 163, -205, 164, 165, 166, 167, 168, 0, 169,
- 170, 171, 172, 173, 0, 0, 0, 0, 0, 174,
- 0, 0, 175, 0, 0, 176, 137, 138, 139, 140,
- 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
- 151, 152, 153, 154, 155, 156, 0, 157, 158, 0,
- 0, 159, 160, 161, 0, 0, 0, 0, 0, 162,
- 136, 0, 163, 454, 164, 165, 166, 167, 168, 0,
- 169, 170, 171, 172, 173, 0, 0, 0, 0, 0,
- 174, 0, 0, 175, 0, 0, 176, 137, 138, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151, 152, 153, 154, 155, 156, 0, 157, 158,
- 0, 0, 159, 160, 161, 0, 0, 0, 0, 0,
- 162, 136, 0, 163, 0, 164, 165, 166, 167, 168,
- 0, 169, 170, 171, 172, 173, 0, 0, 0, 0,
- 0, 174, 0, 0, 175, 0, 0, 176, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 156, 0, 157,
- 158, 0, 0, 159, 160, 161, 0, 0, 0, 0,
- 0, 0, 136, 0, 0, 0, 164, 165, 166, 167,
- 168, 0, 169, 170, 171, 172, 173, 0, 0, 0,
- 0, 0, 174, 0, 0, 175, 0, 0, 176, 137,
- 138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
+ 0, 0, 39, 40, 0, 0, 0, 0, 0, 0,
+ 0, 476, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 42, 0, 0, 0, 0, 43, 44,
+ 0, 0, 0, 45, 0, 46, 0, 47, 0, 48,
+ 0, -3, 0, -145, 1, 2, 3, 4, 0, 5,
+ 6, 7, 8, 9, 10, 11, 0, 0, 12, 13,
+ 14, 15, 16, 17, 18, 19, 0, 0, 21, 22,
+ 0, 0, 0, 0, 0, 0, 23, 0, 24, 25,
+ 0, 26, 0, 27, 0, 28, 0, 29, 30, 31,
+ 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
+ 0, 0, 0, 36, 37, 0, 0, 0, 0, 0,
+ 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 157, 158, 0, 0, 159, 160, 161, 0, 0, 0,
- 0, 0, 0, 136, 0, 0, 0, 164, 165, 166,
- 167, 168, 0, 169, 170, 171, 172, 173, 0, 0,
- 0, 0, 0, 174, 0, 0, 175, 0, 0, 176,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
+ 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
+ 41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
+ 0, 0, 45, 0, 46, 0, 47, 0, 48, 1,
+ 2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
+ 11, 0, -120, 0, 13, 14, 15, 16, 17, 18,
+ 19, 20, 0, 21, 22, 128, 0, 129, 0, 0,
+ 0, 23, 130, 24, 25, 0, 26, 131, 27, 0,
+ 28, 132, 29, 30, 31, 0, 0, 32, 33, 0,
+ 34, 35, 0, 0, 0, 0, 0, 0, 36, 37,
+ 0, 133, 0, 0, 0, 38, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 157, 158, 0, 0, 159, 160, 161, 0, 0,
- 0, 0, 0, 0, 136, 0, 0, 0, 0, 165,
- 166, 167, 168, 0, 169, 170, 171, 172, 173, 0,
- 0, 0, 0, 0, 174, 0, 0, 175, 0, 0,
- 176, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 0, 0, 0, 0, 0, 0, 39, 40, 0, 0,
+ 0, 0, 0, 0, 0, 134, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 42, 0, 0,
+ 0, 0, 43, 44, 0, 0, 0, 45, 0, 46,
+ 0, 47, 0, 48, 1, 2, 3, 4, 0, 5,
+ 6, 7, 8, 9, 10, 11, 0, 0, 0, 13,
+ 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
+ 128, 0, 129, 0, 0, 0, 23, 130, 24, 25,
+ 0, 26, 131, 27, 0, 28, 132, 29, 30, 31,
+ 0, 0, 32, 33, 0, 34, 35, 0, 0, 0,
+ 0, 0, 0, 36, 37, 0, 133, 0, 0, 0,
+ 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 157, 158, 0, 0, 159, 160, 161, 0,
- 0, 0, 0, 0, 0, 136, 0, 0, 0, 0,
- 0, 166, 167, 168, 0, 169, 170, 171, 172, 173,
- 0, 0, 0, 0, 0, 174, 0, 0, 175, 0,
- 0, 176, 137, 138, 139, 140, 141, 142, 143, 144,
- 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 157, 158, 0, 0, 159, 160, 161,
- 0, 0, 0, 0, 0, 0, 136, 0, 0, 0,
- 0, 0, -206, 167, 168, 0, 169, 170, 171, 172,
- 173, 0, 0, 0, 0, 0, 174, 0, 0, 175,
- 0, 0, 176, 137, 138, 139, -206, -206, -206, -206,
- 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 157, 158, 0, 0, 159, 160,
- 161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 167, 168, 0, 169, 170, 171,
- 172, 173, 0, 0, 0, 0, 0, 174, 0, 0,
- 175, 0, 0, 176
+ 0, 39, 40, 0, 0, 0, 0, 0, 0, 0,
+ 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 42, 0, 0, 0, 0, 43, 44, 0,
+ 0, 0, 45, 0, 46, 0, 47, 150, 48, 3,
+ 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 18, 0, 20,
+ 0, 21, 22, 0, 0, 129, 0, 0, 0, 23,
+ 0, 0, 0, 0, 0, 0, 27, 0, 28, 151,
+ 0, 0, 0, 0, 0, 0, 33, 0, 34, 35,
+ 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
+ 0, 0, 0, 38, 0, 0, 0, 99, 0, 3,
+ 4, 0, 5, 6, 7, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 39, 40, 0, 18, 0, 20,
+ 0, 21, 22, 0, 0, 0, 0, 0, 0, 23,
+ 0, 0, 0, 0, 0, 42, 27, 0, 28, 0,
+ 43, 44, 0, 0, 0, 45, 33, 46, 34, 35,
+ 0, 48, 99, 0, 3, 4, 36, 5, 6, 7,
+ 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
+ 0, 0, 18, 0, 20, 0, 21, 22, 0, 0,
+ 0, 0, 0, 0, 39, 40, 0, 0, 0, 0,
+ 0, 0, 0, 28, 0, 0, 0, 0, 0, 0,
+ 0, 33, 0, 34, 35, 42, 0, 0, 0, 0,
+ 43, 44, 0, 0, 0, 45, 0, 46, 38, 0,
+ 0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
+ 40, 0, 0, 0, 0, 0, 168, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 45, 0, 46, 169, 170, 171, 48, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 0, 191, 192, 193,
+ 0, 194, 195, 196, 0, 0, 0, 0, 0, 197,
+ 198, 0, 199, 200, 201, 202, 203, 168, 204, 205,
+ 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
+ 210, 0, 0, 211, 0, 0, 0, 0, 0, 337,
+ 0, 0, 0, 0, 169, 170, 171, 0, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 0, 191, 192,
+ 193, 0, 194, 195, 196, 0, 0, 0, 0, 0,
+ 197, 198, 0, 199, 200, 201, 202, 203, 168, 204,
+ 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
+ 0, 210, 0, 0, 211, 0, 0, 0, 0, 0,
+ 370, 0, 0, 0, 0, 169, 170, 171, 0, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 0, 191,
+ 192, 193, 0, 194, 195, 196, 0, 0, 0, 0,
+ 0, 197, 198, 0, 199, 200, 201, 202, 203, 168,
+ 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
+ 209, 0, 210, 0, 0, 211, 0, 0, 0, 0,
+ 0, 408, 0, 0, 0, 0, 169, 170, 171, 0,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 0,
+ 191, 192, 193, 0, 194, 195, 196, 0, 0, 0,
+ 168, 0, 197, 198, 362, 199, 200, 201, 202, 203,
+ 0, 204, 205, 206, 207, 208, 0, 0, 0, 0,
+ 0, 209, 0, 210, 0, 0, 211, 169, 170, 171,
+ 0, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 0, 191, 192, 193, 0, 194, 195, 196, 0, 0,
+ 0, 168, 0, 197, 198, 0, 199, 200, 201, 202,
+ 203, 0, 204, 205, 206, 207, 208, 0, 0, 0,
+ 0, 0, 209, 0, 210, 364, 0, 211, 169, 170,
+ 171, 0, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 0, 191, 192, 193, 0, 194, 195, 196, 0,
+ 0, 0, 168, 0, 197, 198, 489, 199, 200, 201,
+ 202, 203, 0, 204, 205, 206, 207, 208, 0, 0,
+ 0, 0, 0, 209, 0, 210, 0, 0, 211, 169,
+ 170, 171, 0, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 0, 191, 192, 193, 0, 194, 195, 196,
+ 0, 0, 0, 168, 0, 197, 198, 0, 199, 200,
+ 201, 202, 203, 0, 204, 205, 206, 207, 208, 0,
+ 0, 0, 0, 0, 209, 0, 210, 0, 0, 211,
+ 169, 170, 171, 0, 172, 173, 174, 175, 176, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 190, 0, 191, 192, 193, 0, 194, 195,
+ 196, 0, 0, 0, 168, 0, 0, 0, 0, 199,
+ 200, 201, 202, 203, 0, 204, 205, 206, 207, 208,
+ 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
+ 211, 169, 170, 171, 0, 172, 173, 174, 175, 176,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 191, 192, 193, 0, 194,
+ 195, 196, 0, 0, 0, 168, 0, 0, 0, 0,
+ 199, 200, 201, 202, 203, 0, 204, 205, 206, 207,
+ 208, 0, 0, 0, 0, 0, 209, 0, 210, 0,
+ 0, 211, 169, 170, 171, 0, 172, 173, 174, 175,
+ 176, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 191, 192, 193, 0,
+ 194, 195, 196, 0, 0, 0, 168, 0, 0, 0,
+ 0, 0, 200, 201, 202, 203, 0, 204, 205, 206,
+ 207, 208, 0, 0, 0, 0, 0, 209, 0, 210,
+ 0, 0, 211, 169, 170, 171, 0, 172, 173, 174,
+ 175, 176, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 191, 192, 193,
+ 0, 194, 195, 196, 0, 0, 0, 168, 0, 0,
+ 0, 0, 0, 0, 201, 202, 203, 0, 204, 205,
+ 206, 207, 208, 0, 0, 0, 0, 0, 209, 0,
+ 210, 0, 0, 211, 169, 170, 171, 0, 172, 173,
+ 174, 175, 176, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 191, 192,
+ 193, 0, 194, 195, 196, 0, 0, 0, 168, 0,
+ 0, 0, 0, 0, 0, -155, 202, 203, 0, 204,
+ 205, 206, 207, 208, 0, 0, 0, 0, 0, 209,
+ 0, 210, 0, 0, 211, 169, 170, 171, 0, -155,
+ -155, -155, -155, 176, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
+ 192, 193, 0, 194, 195, 196, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 202, 203, 0,
+ 204, 205, 206, 207, 208, 0, 0, 0, 0, 0,
+ 209, 0, 210, 0, 0, 211
};
static const yytype_int16 yycheck[] =
{
- 0, 0, 0, 0, 22, 25, 82, 53, 201, 49,
- 103, 97, 3, 206, 3, 97, 0, 35, 44, 37,
- 38, 3, 40, 41, 42, 43, 44, 298, 45, 34,
- 99, 0, 13, 3, 103, 27, 18, 221, 3, 0,
- 32, 126, 97, 129, 25, 50, 230, 129, 48, 48,
- 48, 48, 3, 18, 359, 3, 4, 5, 302, 7,
- 8, 9, 10, 11, 48, 4, 3, 18, 7, 8,
- 9, 3, 11, 344, 129, 3, 24, 94, 26, 48,
- 28, 18, 100, 176, 328, 103, 126, 48, 123, 126,
- 18, 126, 26, 3, 122, 123, 44, 31, 35, 90,
- 122, 90, 126, 347, 52, 44, 54, 55, 18, 202,
- 126, 45, 126, 384, 358, 54, 55, 135, 136, 137,
- 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
- 148, 149, 150, 151, 152, 153, 154, 155, 156, 87,
- 88, 159, 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 122, 176, 343,
- 186, 178, 113, 33, 181, 182, 471, 0, 186, 96,
- 97, 97, 120, 97, 122, 419, 113, 421, 126, 67,
- 198, 97, 3, 4, 202, 97, 126, 213, 214, 3,
- 216, 61, 123, 126, 211, 213, 214, 126, 216, 199,
- 199, 394, 278, 129, 123, 432, 223, 224, 121, 436,
- 437, 99, 97, 129, 3, 4, 5, 129, 7, 8,
- 9, 10, 11, 103, 128, 97, 302, 454, 87, 88,
- 3, 307, 67, 3, 96, 24, 67, 26, 422, 28,
- 467, 3, 31, 26, 3, 472, 35, 30, 31, 3,
- 87, 88, 328, 42, 438, 44, 45, 3, 3, 17,
- 43, 120, 45, 52, 123, 54, 55, 126, 3, 96,
- 13, 347, 129, 62, 103, 112, 113, 114, 17, 97,
- 3, 53, 358, 120, 53, 129, 123, 287, 287, 126,
- 3, 3, 476, 129, 294, 294, 126, 3, 87, 88,
- 320, 129, 322, 128, 97, 128, 103, 325, 99, 126,
- 122, 357, 16, 99, 122, 332, 123, 128, 122, 97,
- 99, 110, 348, 122, 122, 126, 115, 116, 354, 129,
- 348, 120, 64, 122, 129, 103, 354, 126, 128, 3,
- 3, 361, 26, 419, 128, 421, 122, 128, 128, 0,
- 3, 128, 3, 4, 5, 129, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 126, 122, 18, 19, 20,
- 21, 128, 23, 24, 25, 48, 129, 28, 128, 294,
- 287, 401, 324, 186, 35, 53, 37, 38, 406, 40,
- 315, 42, 122, 44, 409, 46, 47, 48, 409, 64,
- 51, 52, 402, 54, 55, 390, 429, 390, 446, 382,
- 451, 62, 63, 19, 20, 21, 18, 23, 361, 25,
- 340, -1, -1, 423, 423, 423, 423, 87, 88, 429,
- -1, 37, -1, -1, -1, -1, 87, 88, -1, 45,
- 46, 47, 48, -1, -1, 96, 446, 446, 446, 446,
- 110, 111, 112, 113, 114, -1, -1, -1, -1, 110,
- 120, -1, -1, 123, 115, 116, 126, -1, -1, 120,
- -1, 122, -1, 0, -1, 126, 3, 4, 5, -1,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
- 96, 18, 19, 20, 21, -1, 23, 24, 25, -1,
- -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
- 37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
- 47, 48, 128, -1, 51, 52, -1, 54, 55, -1,
- -1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
- 21, -1, 23, -1, 25, -1, -1, -1, -1, -1,
- 87, 88, -1, -1, -1, -1, 37, -1, -1, 96,
- -1, -1, -1, -1, 45, 46, 47, 48, -1, -1,
- -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
- -1, -1, -1, 120, -1, 122, 3, 4, 5, 126,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
- -1, -1, 19, 20, 21, 22, 23, 24, 25, 26,
- -1, 28, 29, -1, 31, 96, -1, -1, 35, 36,
- 37, 38, -1, 40, 41, 42, -1, 44, 45, 46,
- 47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
- -1, -1, -1, -1, -1, 62, 63, 128, 65, 19,
- 20, 21, -1, 23, -1, 25, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
- 87, 88, -1, -1, -1, -1, 46, 47, 48, 96,
+ 0, 0, 0, 0, 0, 18, 98, 90, 64, 38,
+ 23, 57, 255, 397, 109, 130, 131, 47, 3, 3,
+ 3, 12, 330, 36, 89, 38, 39, 40, 324, 42,
+ 43, 44, 45, 46, 90, 26, 121, 5, 92, 49,
+ 8, 9, 10, 67, 125, 126, 33, 100, 34, 0,
+ 0, 51, 51, 51, 51, 51, 0, 3, 4, 27,
+ 28, 466, 121, 100, 50, 470, 471, 3, 4, 123,
+ 121, 17, 126, 381, 61, 126, 44, 373, 102, 132,
+ 136, 17, 16, 102, 489, 104, 54, 55, 12, 3,
+ 4, 104, 3, 4, 107, 132, 109, 126, 503, 214,
+ 51, 51, 26, 17, 3, 510, 17, 51, 93, 93,
+ 418, 121, 121, 126, 209, 121, 359, 130, 131, 234,
+ 26, 35, 125, 3, 125, 509, 32, 3, 121, 5,
+ 0, 100, 3, 121, 126, 3, 131, 380, 121, 121,
+ 104, 256, 257, 100, 127, 124, 100, 3, 3, 149,
+ 149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 114, 125,
+ 3, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 149, 149,
+ 114, 214, 125, 216, 16, 149, 235, 67, 237, 90,
+ 91, 92, 3, 456, 99, 67, 99, 217, 217, 217,
+ 3, 234, 235, 253, 237, 238, 3, 3, 219, 472,
+ 3, 12, 327, 126, 126, 4, 132, 16, 229, 121,
+ 121, 100, 123, 256, 257, 126, 25, 104, 132, 18,
+ 19, 20, 31, 22, 369, 24, 100, 131, 3, 102,
+ 16, 53, 3, 355, 53, 357, 45, 132, 37, 25,
+ 89, 514, 3, 121, 30, 31, 45, 46, 47, 48,
+ 125, 132, 131, 339, 3, 368, 132, 43, 126, 45,
+ 4, 100, 348, 132, 131, 121, 309, 104, 102, 99,
+ 383, 132, 15, 125, 18, 19, 20, 399, 22, 3,
+ 24, 394, 368, 100, 327, 125, 316, 316, 316, 132,
+ 131, 64, 125, 37, 324, 324, 324, 383, 100, 131,
+ 99, 45, 46, 47, 48, 326, 132, 102, 394, 125,
+ 125, 121, 434, 104, 132, 3, 3, 393, 25, 362,
+ 125, 3, 149, 131, 125, 384, 369, 131, 121, 51,
+ 389, 131, 131, 131, 131, 125, 132, 39, 4, 131,
+ 453, 384, 455, 373, 373, 373, 389, 131, 316, 132,
+ 131, 404, 18, 19, 20, 99, 22, 57, 24, 129,
+ 442, 347, 442, 424, 66, 67, 68, 453, 424, 455,
+ 69, 37, 74, 75, 495, 481, 463, 486, 416, 376,
+ 46, 47, 48, 26, 377, 405, 45, 131, 90, 91,
+ 92, 399, 94, 95, 96, -1, 439, -1, -1, -1,
+ -1, -1, -1, -1, -1, 435, 108, 109, -1, 111,
+ 112, 113, 114, 115, 90, 91, 92, -1, -1, 121,
+ -1, 123, -1, -1, 126, -1, -1, 457, 457, 457,
+ 457, 457, -1, 463, -1, 111, 112, 113, 114, 115,
+ -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
+ 126, 481, 481, 481, 481, 481, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 495, 495, 495, 495, 495,
+ 0, -1, -1, 3, 4, 5, 6, -1, 8, 9,
+ 10, 11, 12, 13, 14, -1, -1, 17, 18, 19,
+ 20, 21, 22, 23, 24, -1, -1, 27, 28, -1,
+ -1, 39, -1, -1, -1, 35, -1, 37, 38, -1,
+ 40, -1, 42, -1, 44, -1, 46, 47, 48, -1,
+ -1, 51, 52, -1, 54, 55, -1, -1, -1, -1,
+ -1, -1, 62, 63, -1, -1, 74, 75, -1, 69,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
- -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
- -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
- 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
+ -1, -1, 90, 91, 92, -1, 94, 95, 96, -1,
+ 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
+ 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
+ -1, 111, -1, 121, -1, 123, 116, 117, 126, -1,
+ -1, 121, -1, 123, -1, 125, -1, 127, -1, -1,
+ -1, 131, 3, 4, 5, 6, -1, 8, 9, 10,
+ 11, 12, 13, 14, -1, -1, -1, 18, 19, 20,
+ 21, 22, 23, 24, 25, -1, 27, 28, 29, -1,
31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
- 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
- -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
+ 51, 52, -1, 54, 55, 90, 91, 92, -1, -1,
+ -1, 62, 63, -1, 65, -1, -1, -1, 69, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 113, 114,
+ 115, -1, -1, -1, -1, -1, 121, -1, 123, 90,
+ 91, 126, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 111, -1, -1, -1, -1, 116, 117, -1, -1, -1,
+ 121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
+ 131, 3, 4, 5, 6, -1, 8, 9, 10, 11,
+ 12, 13, 14, -1, -1, -1, 18, 19, 20, 21,
+ 22, 23, 24, 25, -1, 27, 28, 29, -1, 31,
+ -1, -1, -1, 35, 36, 37, 38, -1, 40, 41,
+ 42, -1, 44, 45, 46, 47, 48, -1, -1, 51,
+ 52, -1, 54, 55, -1, -1, -1, -1, -1, -1,
+ 62, 63, -1, 65, -1, -1, -1, 69, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
+ -1, -1, -1, -1, 116, 117, -1, -1, -1, 121,
+ -1, 123, -1, 125, -1, 127, -1, -1, -1, 131,
+ 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
+ 13, 14, -1, -1, -1, 18, 19, 20, 21, 22,
+ 23, 24, 25, -1, 27, 28, 29, -1, 31, -1,
+ -1, -1, 35, 36, 37, 38, -1, 40, 41, 42,
+ -1, 44, 45, 46, 47, 48, -1, -1, 51, 52,
+ -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
+ 63, -1, 65, -1, -1, -1, 69, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
+ -1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
+ 123, -1, 125, -1, 127, -1, -1, -1, 131, 3,
+ 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
+ 14, -1, -1, 17, 18, 19, 20, 21, 22, 23,
+ 24, -1, -1, 27, 28, -1, -1, -1, -1, -1,
+ -1, 35, -1, 37, 38, -1, 40, -1, 42, -1,
+ 44, -1, 46, 47, 48, -1, -1, 51, 52, -1,
+ 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
+ -1, -1, -1, -1, -1, 69, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
- -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
- -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
- -1, 122, -1, -1, -1, 126, -1, 128, 3, 4,
- 5, -1, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, -1, -1, -1, 19, 20, 21, -1, 23, 24,
- 25, -1, -1, 28, -1, 39, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
+ -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
+ -1, 125, -1, 127, -1, -1, -1, 131, 3, 4,
+ 5, 6, -1, 8, 9, 10, 11, 12, 13, 14,
+ -1, -1, -1, 18, 19, 20, 21, 22, 23, 24,
+ -1, -1, 27, 28, -1, -1, -1, -1, -1, -1,
35, -1, 37, 38, -1, 40, -1, 42, -1, 44,
-1, 46, 47, 48, -1, -1, 51, 52, -1, 54,
- 55, -1, 66, 67, 68, -1, -1, 62, 63, 73,
- 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
- -1, -1, 87, 88, -1, -1, -1, -1, -1, -1,
- -1, 96, -1, 107, 108, -1, 110, 111, 112, 113,
- 114, -1, -1, -1, -1, 110, 120, -1, -1, 123,
- 115, 116, 126, -1, -1, 120, -1, 122, -1, -1,
- -1, 126, -1, 128, 3, 4, 5, -1, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, -1, -1, -1,
- 19, 20, 21, -1, 23, 24, 25, -1, -1, 28,
- -1, 39, -1, -1, -1, -1, 35, -1, 37, 38,
- -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
- -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
- -1, -1, -1, 62, 63, 73, 74, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 87,
- 88, -1, -1, 91, 92, 93, -1, -1, 87, 88,
- -1, -1, -1, -1, -1, -1, -1, 96, -1, 107,
- 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
- -1, 110, 120, -1, -1, 123, 115, 116, 126, -1,
- -1, 120, -1, 122, -1, -1, -1, 126, -1, 128,
- 3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, -1, -1, -1, 19, 20, 21, -1,
- 23, 24, 25, -1, -1, 28, -1, -1, -1, -1,
- -1, -1, 35, -1, 37, 38, -1, 40, -1, 42,
- -1, 44, -1, 46, 47, 48, -1, -1, 51, 52,
- -1, 54, 55, -1, -1, -1, -1, -1, -1, 62,
- 63, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 55, -1, -1, -1, -1, -1, -1, 62, 63, -1,
+ -1, -1, -1, -1, 69, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
+ -1, 116, 117, -1, -1, -1, 121, -1, 123, -1,
+ 125, -1, 127, -1, -1, -1, 131, 3, 4, 5,
+ 6, -1, 8, 9, 10, 11, 12, 13, 14, -1,
+ -1, -1, 18, 19, 20, 21, 22, 23, 24, -1,
+ -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
+ -1, 37, 38, -1, 40, -1, 42, -1, 44, -1,
+ 46, 47, 48, -1, -1, 51, 52, -1, 54, 55,
+ -1, -1, -1, -1, -1, -1, 62, 63, -1, -1,
+ -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 87, 88, -1, -1, -1, -1,
- -1, -1, -1, 96, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
- -1, -1, 115, 116, -1, -1, -1, 120, -1, 122,
- -1, -1, -1, 126, -1, 128, 3, 4, 5, -1,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
- -1, -1, 19, 20, 21, -1, 23, 24, 25, -1,
- -1, 28, -1, -1, -1, -1, -1, -1, 35, -1,
+ -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 111, -1, -1, -1, -1,
+ 116, 117, -1, -1, -1, 121, -1, 123, -1, 125,
+ -1, 127, -1, -1, -1, 131, 3, 4, 5, 6,
+ -1, 8, 9, 10, 11, 12, 13, 14, -1, -1,
+ -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
+ 27, 28, -1, -1, -1, -1, -1, -1, 35, -1,
37, 38, -1, 40, -1, 42, -1, 44, -1, 46,
47, 48, -1, -1, 51, 52, -1, 54, 55, -1,
-1, -1, -1, -1, -1, 62, 63, -1, -1, -1,
+ -1, -1, 69, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 111, -1, -1, -1, -1, 116,
+ 117, -1, -1, -1, 121, -1, 123, -1, 125, -1,
+ 127, -1, -1, -1, 131, 3, 4, 5, 6, -1,
+ 8, 9, 10, 11, 12, 13, 14, -1, -1, -1,
+ 18, 19, 20, 21, 22, 23, 24, -1, -1, 27,
+ 28, -1, -1, -1, -1, -1, -1, 35, -1, 37,
+ 38, -1, 40, -1, 42, -1, 44, -1, 46, 47,
+ 48, -1, -1, 51, 52, -1, 54, 55, -1, -1,
+ -1, -1, -1, -1, 62, 63, -1, -1, -1, -1,
+ -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 111, -1, -1, -1, -1, 116, 117,
+ -1, -1, -1, 121, -1, 123, -1, 125, -1, 127,
+ -1, 0, -1, 131, 3, 4, 5, 6, -1, 8,
+ 9, 10, 11, 12, 13, 14, -1, -1, 17, 18,
+ 19, 20, 21, 22, 23, 24, -1, -1, 27, 28,
+ -1, -1, -1, -1, -1, -1, 35, -1, 37, 38,
+ -1, 40, -1, 42, -1, 44, -1, 46, 47, 48,
+ -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
+ -1, -1, -1, 62, 63, -1, -1, -1, -1, -1,
+ 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
+ -1, -1, 121, -1, 123, -1, 125, -1, 127, 3,
+ 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
+ 14, -1, 16, -1, 18, 19, 20, 21, 22, 23,
+ 24, 25, -1, 27, 28, 29, -1, 31, -1, -1,
+ -1, 35, 36, 37, 38, -1, 40, 41, 42, -1,
+ 44, 45, 46, 47, 48, -1, -1, 51, 52, -1,
+ 54, 55, -1, -1, -1, -1, -1, -1, 62, 63,
+ -1, 65, -1, -1, -1, 69, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 87, 88, -1, -1, -1, -1, -1, -1, -1, 96,
+ -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
+ -1, -1, 116, 117, -1, -1, -1, 121, -1, 123,
+ -1, 125, -1, 127, 3, 4, 5, 6, -1, 8,
+ 9, 10, 11, 12, 13, 14, -1, -1, -1, 18,
+ 19, 20, 21, 22, 23, 24, 25, -1, 27, 28,
+ 29, -1, 31, -1, -1, -1, 35, 36, 37, 38,
+ -1, 40, 41, 42, -1, 44, 45, 46, 47, 48,
+ -1, -1, 51, 52, -1, 54, 55, -1, -1, -1,
+ -1, -1, -1, 62, 63, -1, 65, -1, -1, -1,
+ 69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 110, -1, -1, -1, -1, 115, 116,
- -1, -1, -1, 120, -1, 122, -1, -1, -1, 126,
- -1, 128, 3, 4, 5, -1, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, -1, 17, -1, 19, 20,
- 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
- 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
- 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
- 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
- -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 111, -1, -1, -1, -1, 116, 117, -1,
+ -1, -1, 121, -1, 123, -1, 125, 3, 127, 5,
+ 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 23, -1, 25,
+ -1, 27, 28, -1, -1, 31, -1, -1, -1, 35,
+ -1, -1, -1, -1, -1, -1, 42, -1, 44, 45,
+ -1, -1, -1, -1, -1, -1, 52, -1, 54, 55,
+ -1, -1, -1, -1, -1, -1, 62, -1, -1, -1,
+ -1, -1, -1, 69, -1, -1, -1, 3, -1, 5,
+ 6, -1, 8, 9, 10, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 90, 91, -1, 23, -1, 25,
+ -1, 27, 28, -1, -1, -1, -1, -1, -1, 35,
+ -1, -1, -1, -1, -1, 111, 42, -1, 44, -1,
+ 116, 117, -1, -1, -1, 121, 52, 123, 54, 55,
+ -1, 127, 3, -1, 5, 6, 62, 8, 9, 10,
+ -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, 23, -1, 25, -1, 27, 28, -1, -1,
+ -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 44, -1, -1, -1, -1, -1, -1,
+ -1, 52, -1, 54, 55, 111, -1, -1, -1, -1,
+ 116, 117, -1, -1, -1, 121, -1, 123, 69, -1,
+ -1, 127, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, -1, -1, -1, -1, -1, 39, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
- -1, -1, -1, -1, -1, 96, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 110,
- -1, -1, -1, -1, 115, 116, -1, -1, -1, 120,
- -1, 122, 3, 4, 5, 126, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, -1, -1, -1, 19, 20,
- 21, 22, 23, 24, 25, 26, -1, 28, 29, -1,
- 31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
- 41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
- 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
- -1, 62, 63, -1, 65, -1, -1, -1, -1, -1,
- -1, 3, 4, 5, -1, 7, 8, 9, 10, 11,
- -1, -1, -1, -1, -1, -1, 87, 88, -1, -1,
- -1, -1, 24, -1, 26, 96, 28, -1, -1, -1,
- -1, -1, -1, 35, -1, -1, -1, -1, -1, 110,
- 42, -1, 44, -1, 115, 116, -1, -1, -1, 120,
- 52, 122, 54, 55, -1, 126, -1, -1, -1, -1,
- 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 39, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
- -1, -1, -1, 115, 116, -1, -1, -1, 120, -1,
- 122, -1, -1, -1, 126, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
- 91, 92, 93, -1, -1, -1, -1, -1, 99, -1,
- -1, 102, 39, 104, 105, 106, 107, 108, -1, 110,
- 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
- -1, -1, 123, -1, -1, 126, -1, -1, 129, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
- 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
- -1, -1, 99, -1, -1, 102, 39, 104, 105, 106,
- 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
- -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
- -1, -1, 129, 66, 67, 68, 69, 70, 71, 72,
+ 121, -1, 123, 66, 67, 68, 127, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 84, 85, -1, 87, 88, -1, -1, 91, 92,
- 93, -1, -1, -1, -1, -1, 99, 39, -1, 102,
- 103, 104, 105, 106, 107, 108, -1, 110, 111, 112,
- 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
- 123, -1, -1, 126, 66, 67, 68, 69, 70, 71,
+ 83, 84, 85, 86, 87, 88, -1, 90, 91, 92,
+ -1, 94, 95, 96, -1, -1, -1, -1, -1, 102,
+ 103, -1, 105, 106, 107, 108, 109, 39, 111, 112,
+ 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
+ 123, -1, -1, 126, -1, -1, -1, -1, -1, 132,
+ -1, -1, -1, -1, 66, 67, 68, -1, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, -1, 87, 88, -1, -1, 91,
- 92, 93, -1, -1, -1, -1, -1, 99, 39, -1,
- 102, -1, 104, 105, 106, 107, 108, -1, 110, 111,
- 112, 113, 114, -1, -1, -1, -1, -1, 120, 121,
- -1, 123, -1, -1, 126, 66, 67, 68, 69, 70,
+ 82, 83, 84, 85, 86, 87, 88, -1, 90, 91,
+ 92, -1, 94, 95, 96, -1, -1, -1, -1, -1,
+ 102, 103, -1, 105, 106, 107, 108, 109, 39, 111,
+ 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
+ -1, 123, -1, -1, 126, -1, -1, -1, -1, -1,
+ 132, -1, -1, -1, -1, 66, 67, 68, -1, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, 84, 85, -1, 87, 88, -1, -1,
- 91, 92, 93, -1, -1, -1, -1, -1, 99, 39,
- -1, 102, 103, 104, 105, 106, 107, 108, -1, 110,
- 111, 112, 113, 114, -1, -1, -1, -1, -1, 120,
- -1, -1, 123, -1, -1, 126, 66, 67, 68, 69,
+ 81, 82, 83, 84, 85, 86, 87, 88, -1, 90,
+ 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
+ -1, 102, 103, -1, 105, 106, 107, 108, 109, 39,
+ 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
+ 121, -1, 123, -1, -1, 126, -1, -1, -1, -1,
+ -1, 132, -1, -1, -1, -1, 66, 67, 68, -1,
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, -1, 87, 88, -1,
- -1, 91, 92, 93, -1, -1, -1, -1, -1, 99,
- 39, -1, 102, 103, 104, 105, 106, 107, 108, -1,
- 110, 111, 112, 113, 114, -1, -1, -1, -1, -1,
- 120, -1, -1, 123, -1, -1, 126, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
- -1, -1, 91, 92, 93, -1, -1, -1, -1, -1,
- 99, 39, -1, 102, -1, 104, 105, 106, 107, 108,
- -1, 110, 111, 112, 113, 114, -1, -1, -1, -1,
- -1, 120, -1, -1, 123, -1, -1, 126, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 85, -1, 87,
- 88, -1, -1, 91, 92, 93, -1, -1, -1, -1,
- -1, -1, 39, -1, -1, -1, 104, 105, 106, 107,
- 108, -1, 110, 111, 112, 113, 114, -1, -1, -1,
- -1, -1, 120, -1, -1, 123, -1, -1, 126, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, -1,
+ 90, 91, 92, -1, 94, 95, 96, -1, -1, -1,
+ 39, -1, 102, 103, 104, 105, 106, 107, 108, 109,
+ -1, 111, 112, 113, 114, 115, -1, -1, -1, -1,
+ -1, 121, -1, 123, -1, -1, 126, 66, 67, 68,
+ -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ -1, 90, 91, 92, -1, 94, 95, 96, -1, -1,
+ -1, 39, -1, 102, 103, -1, 105, 106, 107, 108,
+ 109, -1, 111, 112, 113, 114, 115, -1, -1, -1,
+ -1, -1, 121, -1, 123, 124, -1, 126, 66, 67,
+ 68, -1, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, -1, 90, 91, 92, -1, 94, 95, 96, -1,
+ -1, -1, 39, -1, 102, 103, 104, 105, 106, 107,
+ 108, 109, -1, 111, 112, 113, 114, 115, -1, -1,
+ -1, -1, -1, 121, -1, 123, -1, -1, 126, 66,
+ 67, 68, -1, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, -1, 90, 91, 92, -1, 94, 95, 96,
+ -1, -1, -1, 39, -1, 102, 103, -1, 105, 106,
+ 107, 108, 109, -1, 111, 112, 113, 114, 115, -1,
+ -1, -1, -1, -1, 121, -1, 123, -1, -1, 126,
+ 66, 67, 68, -1, 70, 71, 72, 73, 74, 75,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 87, 88, -1, -1, 91, 92, 93, -1, -1, -1,
- -1, -1, -1, 39, -1, -1, -1, 104, 105, 106,
- 107, 108, -1, 110, 111, 112, 113, 114, -1, -1,
- -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 87, 88, -1, -1, 91, 92, 93, -1, -1,
- -1, -1, -1, -1, 39, -1, -1, -1, -1, 105,
- 106, 107, 108, -1, 110, 111, 112, 113, 114, -1,
- -1, -1, -1, -1, 120, -1, -1, 123, -1, -1,
- 126, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 87, 88, -1, -1, 91, 92, 93, -1,
- -1, -1, -1, -1, -1, 39, -1, -1, -1, -1,
- -1, 106, 107, 108, -1, 110, 111, 112, 113, 114,
- -1, -1, -1, -1, -1, 120, -1, -1, 123, -1,
- -1, 126, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 87, 88, -1, -1, 91, 92, 93,
- -1, -1, -1, -1, -1, -1, 39, -1, -1, -1,
- -1, -1, 106, 107, 108, -1, 110, 111, 112, 113,
- 114, -1, -1, -1, -1, -1, 120, -1, -1, 123,
- -1, -1, 126, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 87, 88, -1, -1, 91, 92,
- 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 107, 108, -1, 110, 111, 112,
- 113, 114, -1, -1, -1, -1, -1, 120, -1, -1,
- 123, -1, -1, 126
+ -1, -1, 88, -1, 90, 91, 92, -1, 94, 95,
+ 96, -1, -1, -1, 39, -1, -1, -1, -1, 105,
+ 106, 107, 108, 109, -1, 111, 112, 113, 114, 115,
+ -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
+ 126, 66, 67, 68, -1, 70, 71, 72, 73, 74,
+ 75, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, 92, -1, 94,
+ 95, 96, -1, -1, -1, 39, -1, -1, -1, -1,
+ 105, 106, 107, 108, 109, -1, 111, 112, 113, 114,
+ 115, -1, -1, -1, -1, -1, 121, -1, 123, -1,
+ -1, 126, 66, 67, 68, -1, 70, 71, 72, 73,
+ 74, 75, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 91, 92, -1,
+ 94, 95, 96, -1, -1, -1, 39, -1, -1, -1,
+ -1, -1, 106, 107, 108, 109, -1, 111, 112, 113,
+ 114, 115, -1, -1, -1, -1, -1, 121, -1, 123,
+ -1, -1, 126, 66, 67, 68, -1, 70, 71, 72,
+ 73, 74, 75, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, 92,
+ -1, 94, 95, 96, -1, -1, -1, 39, -1, -1,
+ -1, -1, -1, -1, 107, 108, 109, -1, 111, 112,
+ 113, 114, 115, -1, -1, -1, -1, -1, 121, -1,
+ 123, -1, -1, 126, 66, 67, 68, -1, 70, 71,
+ 72, 73, 74, 75, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
+ 92, -1, 94, 95, 96, -1, -1, -1, 39, -1,
+ -1, -1, -1, -1, -1, 107, 108, 109, -1, 111,
+ 112, 113, 114, 115, -1, -1, -1, -1, -1, 121,
+ -1, 123, -1, -1, 126, 66, 67, 68, -1, 70,
+ 71, 72, 73, 74, 75, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, 92, -1, 94, 95, 96, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
+ 111, 112, 113, 114, 115, -1, -1, -1, -1, -1,
+ 121, -1, 123, -1, -1, 126
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 3, 4, 5, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 18, 19, 20, 21, 23, 24, 25,
- 26, 28, 35, 37, 38, 40, 42, 44, 46, 47,
- 48, 51, 52, 54, 55, 62, 63, 87, 88, 96,
- 110, 115, 116, 120, 122, 126, 131, 132, 133, 134,
- 140, 143, 149, 153, 154, 155, 156, 158, 166, 174,
- 177, 180, 183, 184, 185, 186, 190, 192, 201, 208,
- 211, 222, 223, 224, 227, 228, 229, 230, 233, 49,
- 126, 126, 159, 126, 3, 18, 122, 178, 179, 3,
- 213, 3, 210, 229, 126, 3, 179, 213, 214, 215,
- 126, 122, 123, 126, 229, 126, 229, 229, 229, 229,
- 229, 220, 221, 226, 229, 226, 231, 232, 227, 0,
- 134, 3, 31, 45, 145, 151, 152, 228, 26, 30,
- 31, 43, 45, 200, 186, 97, 39, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 87, 88, 91,
- 92, 93, 99, 102, 104, 105, 106, 107, 108, 110,
- 111, 112, 113, 114, 120, 123, 126, 126, 157, 22,
- 29, 36, 41, 45, 65, 96, 122, 140, 141, 142,
- 145, 160, 161, 176, 184, 225, 234, 235, 167, 182,
- 122, 123, 126, 219, 126, 227, 123, 229, 175, 3,
- 220, 150, 121, 97, 103, 128, 97, 129, 3, 146,
- 147, 3, 146, 96, 67, 34, 50, 207, 3, 3,
- 3, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 3,
- 220, 227, 17, 3, 227, 227, 3, 128, 139, 141,
- 229, 96, 13, 17, 229, 96, 135, 136, 137, 143,
- 190, 192, 201, 208, 181, 178, 220, 3, 90, 204,
- 205, 206, 129, 3, 113, 129, 138, 139, 129, 227,
- 226, 226, 226, 103, 218, 97, 218, 227, 227, 3,
- 53, 187, 53, 188, 218, 103, 121, 129, 129, 3,
- 128, 141, 126, 3, 129, 128, 137, 135, 129, 99,
- 103, 202, 206, 129, 97, 142, 128, 129, 103, 35,
- 113, 179, 215, 217, 99, 144, 147, 96, 129, 126,
- 215, 16, 189, 215, 216, 122, 144, 229, 142, 227,
- 99, 122, 128, 4, 7, 8, 9, 11, 44, 54,
- 55, 203, 217, 218, 90, 206, 27, 32, 168, 170,
- 172, 173, 142, 226, 123, 226, 228, 142, 204, 216,
- 122, 97, 193, 129, 3, 4, 33, 61, 162, 163,
- 164, 165, 202, 122, 206, 122, 126, 168, 170, 64,
- 148, 129, 129, 191, 215, 45, 96, 184, 197, 198,
- 199, 229, 103, 128, 164, 165, 212, 171, 3, 142,
- 142, 218, 96, 140, 184, 194, 195, 196, 201, 208,
- 3, 26, 128, 199, 103, 138, 138, 138, 218, 122,
- 128, 196, 207, 138, 128, 128, 129, 209, 3, 169,
- 138, 126, 122, 128, 204, 138, 129, 128, 218
+ 0, 3, 4, 5, 6, 8, 9, 10, 11, 12,
+ 13, 14, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 27, 28, 35, 37, 38, 40, 42, 44, 46,
+ 47, 48, 51, 52, 54, 55, 62, 63, 69, 90,
+ 91, 99, 111, 116, 117, 121, 123, 125, 127, 134,
+ 135, 136, 137, 143, 146, 147, 153, 157, 158, 159,
+ 160, 162, 170, 178, 181, 182, 185, 188, 189, 190,
+ 191, 195, 197, 206, 211, 216, 219, 232, 233, 234,
+ 239, 242, 243, 244, 246, 247, 89, 49, 121, 121,
+ 163, 121, 3, 4, 17, 125, 183, 184, 16, 3,
+ 242, 3, 218, 242, 121, 184, 222, 121, 125, 121,
+ 126, 242, 121, 236, 240, 241, 242, 242, 242, 242,
+ 242, 242, 238, 242, 228, 229, 230, 236, 29, 31,
+ 36, 41, 45, 65, 99, 131, 142, 143, 144, 147,
+ 149, 164, 165, 180, 189, 235, 3, 0, 137, 125,
+ 3, 45, 149, 155, 156, 239, 144, 145, 16, 25,
+ 30, 31, 43, 45, 205, 245, 191, 100, 39, 66,
+ 67, 68, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 90, 91, 92, 94, 95, 96, 102, 103, 105,
+ 106, 107, 108, 109, 111, 112, 113, 114, 115, 121,
+ 123, 126, 3, 121, 161, 145, 171, 187, 125, 126,
+ 183, 184, 221, 222, 223, 231, 121, 237, 238, 126,
+ 242, 179, 228, 3, 154, 104, 131, 100, 100, 132,
+ 124, 100, 236, 3, 3, 150, 151, 237, 237, 150,
+ 3, 131, 144, 125, 135, 3, 99, 67, 99, 3,
+ 34, 50, 215, 3, 3, 207, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 3, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 228, 242, 3, 121,
+ 127, 237, 12, 242, 99, 138, 139, 140, 146, 147,
+ 195, 197, 206, 216, 186, 183, 126, 121, 227, 3,
+ 93, 212, 213, 214, 132, 114, 183, 132, 141, 142,
+ 132, 237, 236, 236, 242, 104, 226, 100, 142, 131,
+ 226, 237, 237, 102, 3, 53, 192, 53, 193, 3,
+ 208, 209, 104, 132, 124, 89, 242, 3, 132, 121,
+ 132, 131, 140, 125, 138, 228, 102, 104, 210, 214,
+ 132, 100, 131, 132, 104, 35, 114, 223, 225, 102,
+ 148, 151, 131, 99, 132, 3, 5, 121, 223, 15,
+ 194, 223, 224, 125, 226, 100, 242, 3, 132, 145,
+ 237, 125, 138, 131, 132, 211, 225, 226, 93, 214,
+ 26, 32, 172, 174, 176, 177, 145, 236, 236, 239,
+ 145, 212, 224, 125, 100, 198, 148, 209, 132, 33,
+ 61, 166, 167, 168, 169, 131, 210, 125, 214, 125,
+ 121, 172, 174, 64, 152, 132, 132, 196, 223, 45,
+ 99, 189, 202, 203, 204, 242, 104, 131, 168, 169,
+ 220, 175, 3, 145, 145, 226, 99, 143, 147, 189,
+ 199, 200, 201, 206, 216, 3, 25, 131, 204, 104,
+ 141, 141, 141, 226, 125, 125, 131, 201, 215, 141,
+ 131, 131, 132, 217, 199, 3, 173, 141, 131, 121,
+ 125, 131, 212, 141, 132, 131, 226
};
#define yyerrok (yyerrstatus = 0)
switch (yyn)
{
- case 24:
+ case 13:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1573 "parser.y"
- {(yyval.code)=(yyvsp[(1) - (1)].code);}
+#line 1890 "parser.y"
+ {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
- case 25:
+ case 24:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1574 "parser.y"
- {(yyval.code)=code_new();}
+#line 1902 "parser.y"
+ {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1576 "parser.y"
- {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
+#line 1905 "parser.y"
+ {(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1577 "parser.y"
- {(yyval.code)=(yyvsp[(1) - (1)].code);}
+#line 1906 "parser.y"
+ {(yyval.code)=code_new();}
}
break;
- case 38:
+ case 28:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1592 "parser.y"
- {(yyval.code)=0;}
+#line 1908 "parser.y"
+ {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
}
break;
- case 45:
+ case 29:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1600 "parser.y"
- {/*TODO*/(yyval.code)=0;}
+#line 1909 "parser.y"
+ {(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
- case 46:
+ case 42:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1601 "parser.y"
- {/*TODO*/(yyval.code)=0;}
+#line 1924 "parser.y"
+ {(yyval.code)=(yyvsp[(2) - (3)].code);}
}
break;
- case 47:
+ case 43:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1603 "parser.y"
- {(yyval.code)=(yyvsp[(2) - (3)].code);}
+#line 1925 "parser.y"
+ {(yyval.code)=0;}
}
break;
- case 48:
+ case 44:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1604 "parser.y"
+#line 1928 "parser.y"
{(yyval.code)=0;}
}
break;
- case 49:
+ case 51:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 1935 "parser.y"
+ {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
+ }
+ break;
+
+
+
+ case 52:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1605 "parser.y"
+#line 1939 "parser.y"
{(yyval.code)=(yyvsp[(1) - (2)].code);}
}
break;
- case 50:
+ case 53:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1606 "parser.y"
+#line 1940 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
- case 51:
+ case 54:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1610 "parser.y"
+#line 1944 "parser.y"
{
code_t**cc = &global->init->method->body->code;
*cc = code_append(*cc, (yyvsp[(1) - (1)].code));
- case 52:
+ case 55:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 1951 "parser.y"
+ {
+ PASS12
+ (yyval.number_int)=as3_pass;
+ char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
+ if(!definitions || !dict_contains(definitions, key)) {
+ as3_pass=0;
+ }
+ free(key);
+}
+ }
+ break;
+
+
+
+ case 56:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1617 "parser.y"
+#line 1970 "parser.y"
{(yyval.value)=(yyvsp[(2) - (2)].value);}
}
break;
- case 53:
+ case 57:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1618 "parser.y"
+#line 1971 "parser.y"
{(yyval.value).c=abc_pushundefined(0);
(yyval.value).t=TYPE_ANY;
}
- case 54:
+ case 58:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1622 "parser.y"
+#line 1975 "parser.y"
{(yyval.code)=(yyvsp[(2) - (2)].code);}
}
break;
- case 55:
+ case 59:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1623 "parser.y"
+#line 1976 "parser.y"
{(yyval.code)=(yyvsp[(2) - (2)].code);}
}
break;
- case 56:
+ case 60:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1625 "parser.y"
+#line 1978 "parser.y"
{(yyval.code) = (yyvsp[(1) - (1)].code);}
}
break;
- case 57:
+ case 61:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1626 "parser.y"
+#line 1979 "parser.y"
{(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
}
break;
- case 58:
+ case 62:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1629 "parser.y"
+#line 1982 "parser.y"
{
+PASS12
if(variable_exists((yyvsp[(1) - (3)].id)))
syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
+PASS1
+ new_variable((yyvsp[(1) - (3)].id), 0, 1, 0);
+PASS2
if(!is_subtype_of((yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo))) {
syntaxerror("Can't convert %s to %s", (yyvsp[(3) - (3)].value).t->name,
(yyvsp[(2) - (3)].classinfo)->name);
}
- int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
+ char slot = 0;
+ int index = 0;
+ if(state->method->uses_slots) {
+ variable_t* v = find_slot(state, (yyvsp[(1) - (3)].id));
+ if(v && !v->init) {
+ // this variable is stored in a slot
+ v->init = 1;
+ v->type = (yyvsp[(2) - (3)].classinfo);
+ slot = 1;
+ index = v->index;
+ }
+ }
+ if(!index) {
+ index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
+ }
+
+ (yyval.code) = slot?abc_getscopeobject(0, 1):0;
if((yyvsp[(2) - (3)].classinfo)) {
if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
- (yyval.code) = (yyvsp[(3) - (3)].value).c;
+ (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
(yyval.code) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
- (yyval.code) = abc_setlocal((yyval.code), index);
} else {
- (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
- (yyval.code) = abc_setlocal((yyval.code), index);
+ code_free((yyvsp[(3) - (3)].value).c);
+ (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
}
} else {
if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
- (yyval.code) = (yyvsp[(3) - (3)].value).c;
+ (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (3)].value).c);
(yyval.code) = abc_coerce_a((yyval.code));
- (yyval.code) = abc_setlocal((yyval.code), index);
} else {
- (yyval.code) = code_new();
+ // don't do anything
+ code_free((yyvsp[(3) - (3)].value).c);
+ code_free((yyval.code));
+ (yyval.code) = 0;
+ break;
}
}
-
- /* that's the default for a local register, anyway
- else {
- state->method->initcode = abc_pushundefined(state->method->initcode);
- state->method->initcode = abc_setlocal(state->method->initcode, index);
- }*/
- //printf("variable %s -> %d (%s)\n", $2->text, index, $4.t?$4.t->name:"");
+ if(slot) {
+ (yyval.code) = abc_setslot((yyval.code), index);
+ } else {
+ (yyval.code) = abc_setlocal((yyval.code), index);
+ }
}
}
break;
- case 59:
+ case 63:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1669 "parser.y"
+#line 2042 "parser.y"
{(yyval.code) = code_new();}
}
break;
- case 60:
+ case 64:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1670 "parser.y"
+#line 2043 "parser.y"
{(yyval.code)=(yyvsp[(2) - (2)].code);}
}
break;
- case 61:
+ case 65:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1673 "parser.y"
- {new_state();}
+#line 2046 "parser.y"
+ {PASS12 new_state();}
}
break;
- case 62:
+ case 66:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1673 "parser.y"
+#line 2046 "parser.y"
{
(yyval.code) = code_new();
myjmp->branch = (yyval.code) = abc_nop((yyval.code));
}
(yyval.code) = var_block((yyval.code));
- old_state();
+ PASS12 old_state();
}
}
break;
- case 63:
+ case 67:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1692 "parser.y"
+#line 2065 "parser.y"
{(yyval.code)=code_new();}
}
break;
- case 66:
+ case 70:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1697 "parser.y"
+#line 2072 "parser.y"
{
- (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1);
+ PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
+ PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
}
}
break;
- case 67:
+ case 71:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1700 "parser.y"
+#line 2076 "parser.y"
{
+ PASS12
(yyval.id)=(yyvsp[(1) - (1)].id);
}
}
- case 68:
+ case 72:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1704 "parser.y"
- {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
+#line 2081 "parser.y"
+ {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
}
break;
- case 69:
+ case 73:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1705 "parser.y"
- {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
+#line 2082 "parser.y"
+ {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
}
break;
- case 70:
+ case 74:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1707 "parser.y"
+#line 2084 "parser.y"
{
if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
(yyval.code) = code_new();
myif->branch = out;
(yyval.code) = var_block((yyval.code));
- old_state();
+ PASS12 old_state();
}
}
break;
- case 71:
+ case 75:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1727 "parser.y"
+#line 2104 "parser.y"
{
- variable_t*var = find_variable((yyvsp[(2) - (6)].id));
+ variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
+ if(!var) {
+ syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
+ }
+
char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
- int it = new_variable(tmp1name, TYPE_INT, 0);
+ int it = new_variable(tmp1name, TYPE_INT, 0, 0);
char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
- int array = new_variable(tmp1name, 0, 0);
+ int array = new_variable(tmp1name, 0, 0, 0);
(yyval.code) = code_new();
(yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
myif->branch = out;
(yyval.code) = var_block((yyval.code));
- old_state();
free(tmp1name);
free(tmp2name);
+
+ PASS12 old_state();
}
}
break;
- case 72:
+ case 76:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1770 "parser.y"
- {new_state();}
+#line 2152 "parser.y"
+ {PASS12 new_state();}
}
break;
- case 73:
+ case 77:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1770 "parser.y"
+#line 2152 "parser.y"
{
(yyval.code) = code_new();
continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
(yyval.code) = var_block((yyval.code));
- old_state();
+ PASS12 old_state();
}
}
break;
- case 74:
+ case 78:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1789 "parser.y"
- {new_state();}
+#line 2171 "parser.y"
+ {PASS12 new_state();}
}
break;
- case 75:
+ case 79:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1789 "parser.y"
+#line 2171 "parser.y"
{
(yyval.code) = code_new();
code_t*loopstart = (yyval.code) = abc_label((yyval.code));
continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
(yyval.code) = var_block((yyval.code));
- old_state();
+ PASS12 old_state();
}
}
break;
- case 76:
+ case 80:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1804 "parser.y"
+#line 2186 "parser.y"
{
(yyval.code) = abc___break__(0, "");
}
- case 77:
+ case 81:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1807 "parser.y"
+#line 2189 "parser.y"
{
(yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
}
- case 78:
+ case 82:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1810 "parser.y"
+#line 2192 "parser.y"
{
(yyval.code) = abc___continue__(0, "");
}
- case 79:
+ case 83:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1813 "parser.y"
+#line 2195 "parser.y"
{
(yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
}
- case 80:
+ case 84:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1817 "parser.y"
+#line 2199 "parser.y"
{(yyval.code)=0;}
}
break;
- case 81:
+ case 85:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1818 "parser.y"
+#line 2200 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
- case 82:
+ case 86:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1819 "parser.y"
+#line 2201 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
- case 83:
+ case 87:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1820 "parser.y"
+#line 2202 "parser.y"
{(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
}
break;
- case 84:
+ case 88:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1821 "parser.y"
+#line 2203 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
- case 85:
+ case 89:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1822 "parser.y"
+#line 2204 "parser.y"
{(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
}
break;
- case 86:
+ case 90:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1824 "parser.y"
+#line 2206 "parser.y"
{
- (yyval.code) = abc_dup(0);
- (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
+ (yyval.code) = abc_getlocal(0, state->switch_var);
+ (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
(yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
if((yyval.code)->opcode != OPCODE___BREAK__) {
- case 87:
+ case 91:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1835 "parser.y"
+#line 2217 "parser.y"
{
(yyval.code) = (yyvsp[(3) - (3)].code);
}
- case 88:
+ case 92:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1838 "parser.y"
- {new_state();}
+#line 2220 "parser.y"
+ {PASS12 new_state();state->switch_var=alloc_local();}
}
break;
- case 89:
+ case 93:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1838 "parser.y"
+#line 2220 "parser.y"
{
- (yyval.code)=(yyvsp[(4) - (8)].value).c;
+ (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
+ (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
(yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
- code_t*out = (yyval.code) = abc_pop((yyval.code));
+
+ code_t*out = (yyval.code) = abc_kill((yyval.code), state->switch_var);
breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
code_t*c = (yyval.code),*lastblock=0;
}
(yyval.code) = var_block((yyval.code));
- old_state();
+ PASS12 old_state();
}
}
break;
- case 90:
+ case 94:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1867 "parser.y"
- {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
+#line 2251 "parser.y"
+ {PASS12 new_state();
+ state->exception_name=(yyvsp[(3) - (5)].id);
+ PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
+ PASS2 new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
+ }
}
break;
- case 91:
+ case 95:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1868 "parser.y"
+#line 2256 "parser.y"
{
namespace_t name_ns = {ACCESS_PACKAGE, ""};
multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
(yyval.exception) = e;
code_t*c = 0;
- int i = find_variable_safe((yyvsp[(3) - (9)].id))->index;
+ int i = find_variable_safe(state, (yyvsp[(3) - (9)].id))->index;
e->target = c = abc_nop(0);
c = abc_setlocal(c, i);
+ c = code_append(c, code_dup(state->method->scope_code));
c = code_append(c, (yyvsp[(8) - (9)].code));
c = abc_kill(c, i);
c = var_block(c);
- old_state();
+ PASS12 old_state();
}
}
break;
- case 92:
+ case 96:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1887 "parser.y"
- {new_state();state->exception_name=0;}
+#line 2276 "parser.y"
+ {PASS12 new_state();state->exception_name=0;}
}
break;
- case 93:
+ case 97:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1887 "parser.y"
+#line 2276 "parser.y"
{
(yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
if(!(yyvsp[(4) - (5)].code)) {
(yyval.exception)=0;
- old_state();
} else {
NEW(abc_exception_t, e)
e->exc_type = 0; //all exceptions
e->target = 0;
e->to = abc_nop(0);
e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
- old_state();
(yyval.exception) = e;
}
+ PASS12 old_state();
}
}
break;
- case 94:
+ case 98:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1904 "parser.y"
+#line 2292 "parser.y"
{(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
}
break;
- case 95:
+ case 99:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1905 "parser.y"
+#line 2293 "parser.y"
{(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
}
break;
- case 96:
+ case 100:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1906 "parser.y"
+#line 2294 "parser.y"
{(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
}
break;
- case 97:
+ case 101:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1907 "parser.y"
+#line 2295 "parser.y"
{
(yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
(yyval.catch_list).finally = 0;
- case 98:
+ case 102:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1915 "parser.y"
+#line 2303 "parser.y"
{
(yyval.catch_list).l=list_new();
(yyval.catch_list).finally = 0;
- case 99:
+ case 103:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1924 "parser.y"
- {new_state();}
+#line 2312 "parser.y"
+ {PASS12 new_state();
+ state->method->has_exceptions=1;
+ state->method->late_binding=1;//for invariant scope_code
+ }
}
break;
- case 100:
+ case 104:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1924 "parser.y"
+#line 2315 "parser.y"
{
code_t*out = abc_nop(0);
int tmp;
if((yyvsp[(6) - (6)].catch_list).finally)
- tmp = new_variable("__finally__", 0, 0);
+ tmp = new_variable("__finally__", 0, 0, 0);
abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
int count=0;
parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
// finally block
e->target = (yyval.code) = abc_nop((yyval.code));
+ (yyval.code) = code_append((yyval.code), code_dup(state->method->scope_code));
(yyval.code) = abc___rethrow__((yyval.code));
}
list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
(yyval.code) = var_block((yyval.code));
- old_state();
+ PASS12 old_state();
}
}
break;
- case 101:
+ case 105:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1969 "parser.y"
+#line 2361 "parser.y"
{
(yyval.code)=(yyvsp[(2) - (2)].value).c;
(yyval.code)=abc_throw((yyval.code));
- case 102:
+ case 106:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1973 "parser.y"
+#line 2365 "parser.y"
{
if(!state->exception_name)
syntaxerror("re-throw only possible within a catch block");
- variable_t*v = find_variable(state->exception_name);
+ variable_t*v = find_variable(state, state->exception_name);
(yyval.code)=code_new();
(yyval.code)=abc_getlocal((yyval.code), v->index);
(yyval.code)=abc_throw((yyval.code));
- case 103:
+ case 107:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2376 "parser.y"
+ {
+ new_state();
+ if(state->method->has_exceptions) {
+ int v = alloc_local();
+ state->method->scope_code = abc_getlocal(state->method->scope_code, v);
+ state->method->scope_code = abc_pushwith(state->method->scope_code);
+ (yyval.value_list).number = v;
+ }
+ (yyval.value_list).cc = (yyvsp[(3) - (4)].value).c;
+}
+ }
+ break;
+
+
+
+ case 108:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1984 "parser.y"
+#line 2386 "parser.y"
{
- (yyval.code) = (yyvsp[(3) - (5)].value).c;
- (yyval.code) = abc_pushscope((yyval.code));
- (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
+ /* remove getlocal;pushwith from scope code again */
+ state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
+
+ (yyval.code) = (yyvsp[(1) - (2)].value_list).cc;
+ if(state->method->has_exceptions) {
+ (yyval.code) = abc_dup((yyval.code));
+ (yyval.code) = abc_setlocal((yyval.code), (yyvsp[(1) - (2)].value_list).number);
+ }
+ (yyval.code) = abc_pushwith((yyval.code));
+ (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (2)].code));
(yyval.code) = abc_popscope((yyval.code));
+ old_state();
}
}
break;
- case 105:
+ case 110:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1994 "parser.y"
+#line 2404 "parser.y"
{PASS12 (yyval.id)="package";}
}
break;
- case 106:
+ case 111:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2405 "parser.y"
+ {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
+ }
+ break;
+
+
+
+ case 112:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1996 "parser.y"
+#line 2407 "parser.y"
{PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
}
break;
- case 107:
+ case 113:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1997 "parser.y"
+#line 2408 "parser.y"
{PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
}
break;
- case 108:
+ case 114:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1999 "parser.y"
+#line 2410 "parser.y"
{PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
}
break;
- case 109:
+ case 115:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2000 "parser.y"
+#line 2411 "parser.y"
{PASS12 endpackage();(yyval.code)=0;}
}
break;
- case 110:
+ case 116:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2001 "parser.y"
+#line 2412 "parser.y"
{PASS12 startpackage("");}
}
break;
- case 111:
+ case 117:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2002 "parser.y"
+#line 2413 "parser.y"
{PASS12 endpackage();(yyval.code)=0;}
}
break;
- case 112:
+ case 118:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2004 "parser.y"
+#line 2435 "parser.y"
{
+ PASS12
+ slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
+ if(!s && as3_pass==1) {// || !(s->flags&FLAG_BUILTIN)) {
+ as3_schedule_class((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
+ }
classinfo_t*c = (yyvsp[(2) - (2)].classinfo);
if(!c)
syntaxerror("Couldn't import class\n");
state_has_imports();
dict_put(state->imports, c->name, c);
+ import_toplevel(c->package);
(yyval.code)=0;
}
}
- case 113:
+ case 119:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2012 "parser.y"
+#line 2449 "parser.y"
{
+ PASS12
+ if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
+ as3_schedule_package((yyvsp[(2) - (4)].id));
+ }
+
NEW(import_t,i);
i->package = (yyvsp[(2) - (4)].id);
state_has_imports();
list_append(state->wildcard_imports, i);
+ import_toplevel(i->package);
(yyval.code)=0;
}
}
- case 114:
+ case 120:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2022 "parser.y"
- {PASS12 (yyval.flags)=0;}
+#line 2465 "parser.y"
+ {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
}
break;
- case 115:
+ case 121:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2023 "parser.y"
+#line 2466 "parser.y"
{PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
}
break;
- case 116:
+ case 122:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2024 "parser.y"
- {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
+#line 2467 "parser.y"
+ {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
}
break;
- case 117:
+ case 123:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2025 "parser.y"
- {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
+#line 2468 "parser.y"
+ {
+ PASS12
+ (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
+ if((yyvsp[(1) - (2)].flags).ns && (yyvsp[(2) - (2)].flags).ns) syntaxerror("only one namespace allowed in one declaration");
+ (yyval.flags).ns=(yyvsp[(1) - (2)].flags).ns?(yyvsp[(1) - (2)].flags).ns:(yyvsp[(2) - (2)].flags).ns;
+
+}
}
break;
- case 118:
+ case 124:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2027 "parser.y"
- {PASS12 (yyval.token)=FLAG_PUBLIC;}
+#line 2475 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
}
break;
- case 119:
+ case 125:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2028 "parser.y"
- {PASS12 (yyval.token)=FLAG_PRIVATE;}
+#line 2476 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
}
break;
- case 120:
+ case 126:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2029 "parser.y"
- {PASS12 (yyval.token)=FLAG_PROTECTED;}
+#line 2477 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
}
break;
- case 121:
+ case 127:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2030 "parser.y"
- {PASS12 (yyval.token)=FLAG_STATIC;}
+#line 2478 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
}
break;
- case 122:
+ case 128:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2031 "parser.y"
- {PASS12 (yyval.token)=FLAG_DYNAMIC;}
+#line 2479 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
}
break;
- case 123:
+ case 129:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2032 "parser.y"
- {PASS12 (yyval.token)=FLAG_FINAL;}
+#line 2480 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
}
break;
- case 124:
+ case 130:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2033 "parser.y"
- {PASS12 (yyval.token)=FLAG_OVERRIDE;}
+#line 2481 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
}
break;
- case 125:
+ case 131:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2034 "parser.y"
- {PASS12 (yyval.token)=FLAG_NATIVE;}
+#line 2482 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
}
break;
- case 126:
+ case 132:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2035 "parser.y"
- {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
+#line 2483 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
}
break;
- case 127:
+ case 133:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2037 "parser.y"
- {(yyval.classinfo)=registry_getobjectclass();}
+#line 2484 "parser.y"
+ {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
+ (yyval.flags).ns=(yyvsp[(1) - (1)].id);
+ }
}
break;
- case 128:
+ case 134:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2038 "parser.y"
- {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+#line 2488 "parser.y"
+ {PASS12 (yyval.classinfo)=0;}
}
break;
- case 129:
+ case 135:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2489 "parser.y"
+ {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+ }
+ break;
+
+
+
+ case 136:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2040 "parser.y"
+#line 2491 "parser.y"
{PASS12 (yyval.classinfo_list)=list_new();}
}
break;
- case 130:
+ case 137:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2041 "parser.y"
+#line 2492 "parser.y"
{PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
}
break;
- case 131:
+ case 138:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2043 "parser.y"
+#line 2494 "parser.y"
{PASS12 (yyval.classinfo_list)=list_new();}
}
break;
- case 132:
+ case 139:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2044 "parser.y"
+#line 2495 "parser.y"
{PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
}
break;
- case 133:
+ case 140:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2048 "parser.y"
- {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);}
+#line 2499 "parser.y"
+ {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
}
break;
- case 134:
+ case 141:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2050 "parser.y"
+#line 2501 "parser.y"
{PASS12 endclass();(yyval.code)=0;}
}
break;
- case 135:
+ case 142:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2054 "parser.y"
- {PASS12 startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);}
+#line 2505 "parser.y"
+ {PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
+ startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
}
break;
- case 136:
+ case 143:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2056 "parser.y"
+#line 2508 "parser.y"
{PASS12 endclass();(yyval.code)=0;}
}
break;
- case 144:
+ case 149:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2068 "parser.y"
- {
- code_t*c = state->cls->static_init;
- c = code_append(c, (yyvsp[(1) - (1)].code));
- state->cls->static_init = c;
-}
+#line 2517 "parser.y"
+ {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
- case 150:
+ case 152:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2079 "parser.y"
+#line 2521 "parser.y"
{
- syntaxerror("variable declarations not allowed in interfaces");
+ code_t*c = state->cls->static_init->header;
+ c = code_append(c, (yyvsp[(1) - (1)].code));
+ state->cls->static_init->header = c;
}
}
break;
- case 151:
+ case 158:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2082 "parser.y"
+#line 2532 "parser.y"
{
- PASS12
- (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
- if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
- syntaxerror("invalid method modifiers: interface methods always need to be public");
- }
- startfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
- endfunction(0,(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
+ syntaxerror("variable declarations not allowed in interfaces");
}
}
break;
- case 154:
+ case 159:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2096 "parser.y"
+#line 2535 "parser.y"
{
- int flags = (yyvsp[(1) - (5)].flags);
- memberinfo_t* info = state->cls?
- memberinfo_register(state->cls->info, (yyvsp[(3) - (5)].id), MEMBER_SLOT):
- memberinfo_register_global(flags2access((yyvsp[(1) - (5)].flags)), state->package, (yyvsp[(3) - (5)].id), MEMBER_SLOT);
-
- info->type = (yyvsp[(4) - (5)].classinfo);
- info->flags = flags;
-
- /* slot name */
- namespace_t mname_ns = {flags2access(flags), ""};
- multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
-
- trait_list_t**traits;
- code_t**code;
- if(!state->cls) {
- // global variable
- mname_ns.name = state->package;
- traits = &global->init->traits;
- code = &global->init->method->body->code;
- } else if(flags&FLAG_STATIC) {
- // static variable
- traits = &state->cls->abc->static_traits;
- code = &state->cls->static_init;
- } else {
- // instance variable
- traits = &state->cls->abc->traits;
- code = &state->cls->init;
- }
-
- trait_t*t=0;
- if((yyvsp[(4) - (5)].classinfo)) {
- MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
- t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
- } else {
- t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
- }
- info->slot = t->slot_id;
-
- /* initalization code (if needed) */
- code_t*c = 0;
- if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
- c = abc_getlocal_0(c);
- c = code_append(c, (yyvsp[(5) - (5)].value).c);
- c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
- c = abc_setslot(c, t->slot_id);
- }
-
- *code = code_append(*code, c);
-
- if((yyvsp[(2) - (5)].token)==KW_CONST) {
- t->kind= TRAIT_CONST;
+ PASS12
+ (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
+ if((yyvsp[(1) - (8)].flags).flags&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
+ syntaxerror("invalid method modifiers: interface methods always need to be public");
}
-
- (yyval.code)=0;
+ startfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo));
+ endfunction(&(yyvsp[(1) - (8)].flags),(yyvsp[(3) - (8)].token),(yyvsp[(4) - (8)].id),&(yyvsp[(6) - (8)].params),(yyvsp[(8) - (8)].classinfo), 0);
+ list_deep_free((yyvsp[(6) - (8)].params).list);
}
}
break;
- case 155:
+ case 162:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2155 "parser.y"
- {(yyval.constant)=0;}
+#line 2569 "parser.y"
+ {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
}
break;
- case 156:
+ case 163:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2156 "parser.y"
- {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
+#line 2569 "parser.y"
+ {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
}
break;
- case 157:
+ case 164:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2158 "parser.y"
- {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
+#line 2571 "parser.y"
+ {PASS12 (yyval.code)=0;}
}
break;
- case 158:
+ case 165:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2159 "parser.y"
- {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
+#line 2572 "parser.y"
+ {PASS12 (yyval.code)=0;}
}
break;
- case 159:
+ case 166:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2160 "parser.y"
- {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
+#line 2575 "parser.y"
+ {
+PASS12
+ int flags = slotstate_flags->flags;
+ namespace_t ns = modifiers2access(slotstate_flags);
+
+ if(as3_pass == 1) {
+
+ varinfo_t* info = 0;
+ if(state->cls) {
+ memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
+ if(i) {
+ check_override(i, flags);
+ }
+ info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
+ } else {
+ slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
+ if(i) {
+ syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
+ }
+ if(ns.name && ns.name[0]) {
+ syntaxerror("namespaces not allowed on package-level variables");
+ }
+ info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
+ }
+
+ info->type = (yyvsp[(2) - (3)].classinfo);
+ info->flags = flags;
+
+ dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
+ }
+
+ if(as3_pass == 2) {
+ varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+
+ /* slot name */
+ multiname_t mname = {QNAME, &ns, 0, (yyvsp[(1) - (3)].id)};
+
+ trait_list_t**traits;
+ code_t**code;
+ if(!state->cls) {
+ // global variable
+ ns.name = state->package;
+ traits = &global->init->traits;
+ code = &global->init->method->body->code;
+ } else if(flags&FLAG_STATIC) {
+ // static variable
+ traits = &state->cls->abc->static_traits;
+ code = &state->cls->static_init->header;
+ } else {
+ // instance variable
+ traits = &state->cls->abc->traits;
+ code = &state->cls->init->header;
+ }
+
+ trait_t*t=0;
+ if((yyvsp[(2) - (3)].classinfo)) {
+ MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
+ t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
+ } else {
+ t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
+ }
+ info->slot = t->slot_id;
+
+ /* initalization code (if needed) */
+ code_t*c = 0;
+ if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].value).c)) {
+ c = abc_getlocal_0(c);
+ c = code_append(c, (yyvsp[(3) - (3)].value).c);
+ c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
+ c = abc_setslot(c, t->slot_id);
+ }
+
+ *code = code_append(*code, c);
+
+ if(slotstate_varconst==KW_CONST) {
+ t->kind= TRAIT_CONST;
+ }
+ }
+
+ (yyval.code)=0;
+}
+ }
+ break;
+
+
+
+ case 167:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2659 "parser.y"
+ {(yyval.constant)=0;}
+ }
+ break;
+
+
+
+ case 168:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2660 "parser.y"
+ {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
+ }
+ break;
+
+
+
+ case 169:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2663 "parser.y"
+ {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
+ }
+ break;
+
+
+
+ case 170:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2664 "parser.y"
+ {
+ (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
+}
}
break;
- case 160:
+ case 171:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2161 "parser.y"
+#line 2667 "parser.y"
{(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
}
break;
- case 161:
+ case 172:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2162 "parser.y"
- {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);}
+#line 2668 "parser.y"
+ {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
}
break;
- case 162:
+ case 173:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2164 "parser.y"
+#line 2669 "parser.y"
{(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
}
break;
- case 163:
+ case 174:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2165 "parser.y"
+#line 2670 "parser.y"
{(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
}
break;
- case 164:
+ case 175:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2166 "parser.y"
+#line 2671 "parser.y"
{(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
}
break;
- case 165:
+ case 176:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2171 "parser.y"
+#line 2672 "parser.y"
+ {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
+ }
+ break;
+
+
+
+ case 177:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2673 "parser.y"
+ {(yyval.constant) = constant_new_float(__builtin_nan(""));}
+ }
+ break;
+
+
+
+ case 178:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2688 "parser.y"
{
+ PASS12
memset(&(yyval.params),0,sizeof((yyval.params)));
}
}
- case 166:
+ case 179:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2174 "parser.y"
+#line 2692 "parser.y"
{
+ PASS12
(yyval.params)=(yyvsp[(1) - (1)].params);
}
}
- case 167:
+ case 180:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2179 "parser.y"
+#line 2698 "parser.y"
{
+ PASS12
memset(&(yyval.params),0,sizeof((yyval.params)));
(yyval.params).varargs=1;
list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
- case 168:
+ case 181:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2184 "parser.y"
+#line 2704 "parser.y"
{
+ PASS12
(yyval.params) =(yyvsp[(1) - (4)].params);
(yyval.params).varargs=1;
list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
- case 169:
+ case 182:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2191 "parser.y"
+#line 2712 "parser.y"
{
+ PASS12
(yyval.params) = (yyvsp[(1) - (3)].params);
list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
}
- case 170:
+ case 183:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2195 "parser.y"
+#line 2717 "parser.y"
{
+ PASS12
memset(&(yyval.params),0,sizeof((yyval.params)));
list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
}
- case 171:
+ case 184:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2200 "parser.y"
+#line 2723 "parser.y"
{
- (yyval.param) = malloc(sizeof(param_t));
+ PASS12
+ (yyval.param) = rfx_calloc(sizeof(param_t));
(yyval.param)->name=(yyvsp[(1) - (4)].id);
(yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
+ PASS2
(yyval.param)->value = (yyvsp[(4) - (4)].constant);
}
}
- case 172:
+ case 185:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2206 "parser.y"
+#line 2731 "parser.y"
{
- (yyval.param) = malloc(sizeof(param_t));
+ PASS12
+ (yyval.param) = rfx_calloc(sizeof(param_t));
(yyval.param)->name=(yyvsp[(1) - (2)].id);
(yyval.param)->type = TYPE_ANY;
+ PASS2
(yyval.param)->value = (yyvsp[(2) - (2)].constant);
}
}
- case 173:
- if(as3_pass==2) {
-
-/* Line 1464 of skeleton.m4 */
-#line 2212 "parser.y"
- {(yyval.token)=(yyvsp[(1) - (1)].token);}
- }
- break;
-
-
-
- case 174:
- if(as3_pass==2) {
-
-/* Line 1464 of skeleton.m4 */
-#line 2213 "parser.y"
- {(yyval.token)=(yyvsp[(1) - (1)].token);}
- }
- break;
-
-
-
- case 175:
+ case 188:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2214 "parser.y"
- {(yyval.token)=0;}
+#line 2741 "parser.y"
+ {PASS12 (yyval.token)=0;}
}
break;
- case 176:
+ case 189:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2217 "parser.y"
- {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
+#line 2744 "parser.y"
+ {PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
}
break;
- case 177:
+ case 190:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2218 "parser.y"
+#line 2745 "parser.y"
{
- PASS1 old_state();
+ PASS1
+ endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
PASS2
if(!state->method->info) syntaxerror("internal error");
- code_t*c = 0;
- if(state->method->late_binding) {
- c = abc_getlocal_0(c);
- c = abc_pushscope(c);
- }
- if(state->method->is_constructor && !state->method->has_super) {
- // call default constructor
- c = abc_getlocal_0(c);
- c = abc_constructsuper(c, 0);
- }
+
+ code_t*c = method_header(state->method);
c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
- endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
+ endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
+ PASS12
+ list_deep_free((yyvsp[(6) - (12)].params).list);
(yyval.code)=0;
}
}
- case 179:
+ case 192:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2239 "parser.y"
- {(yyval.id)=0;}
+#line 2761 "parser.y"
+ {PASS12 (yyval.id)=0;}
}
break;
- case 180:
+ case 193:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2241 "parser.y"
+#line 2763 "parser.y"
{PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
}
break;
- case 181:
+ case 194:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2242 "parser.y"
+#line 2764 "parser.y"
{
- PASS1 old_state();
+ PASS1
+ endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
PASS2
- memberinfo_t*f = state->method->info;
- if(!f) syntaxerror("internal error");
-
- code_t*c = 0;
+ methodinfo_t*f = state->method->info;
+ if(!f || !f->kind) syntaxerror("internal error");
+
+ code_t*c = method_header(state->method);
c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
- abc_method_t*abc = endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
+ int index = state->method->var_index;
+ endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
- (yyval.value).c = abc_newfunction(0, abc);
+ (yyval.value).c = abc_getlocal(0, index);
(yyval.value).t = TYPE_FUNCTION(f);
+
+ PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
}
}
break;
- case 182:
+ case 195:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2260 "parser.y"
+#line 2786 "parser.y"
{
- PASS1 (yyval.classinfo)=0;
+ PASS1 NEW(unresolvedinfo_t,c);
+ memset(c, 0, sizeof(*c));
+ c->kind = INFOTYPE_UNRESOLVED;
+ c->name = (yyvsp[(1) - (1)].id);
+ c->package = get_package_from_name((yyvsp[(1) - (1)].id));
+ if(!c->package) {
+ c->nsset = get_current_imports();
+ /* make the compiler look for this class in the current directory,
+ just in case: */
+ as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
+ }
+ (yyval.classinfo) = (classinfo_t*)c;
PASS2
- /* try current package */
- (yyval.classinfo) = find_class((yyvsp[(1) - (1)].id));
- if(!(yyval.classinfo)) syntaxerror("Could not find class %s\n", (yyvsp[(1) - (1)].id));
+ slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
+ if(!s) syntaxerror("Could not find class/method %s (current package: %s)\n", (yyvsp[(1) - (1)].id), state->package);
+ (yyval.classinfo) = (classinfo_t*)s;
}
}
break;
- case 183:
+ case 196:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2268 "parser.y"
+#line 2805 "parser.y"
{
- PASS1 (yyval.classinfo)=0;
+ PASS1 NEW(unresolvedinfo_t,c);
+ memset(c, 0, sizeof(*c));
+ c->kind = INFOTYPE_UNRESOLVED;
+ c->package = (yyvsp[(1) - (3)].id);
+ c->name = (yyvsp[(3) - (3)].id);
+ (yyval.classinfo) = (classinfo_t*)c;
PASS2
- (yyval.classinfo) = registry_findclass((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
- if(!(yyval.classinfo)) syntaxerror("Couldn't find class %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
+ slotinfo_t*s = registry_find((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
+ if(!s) syntaxerror("Couldn't find class/method %s.%s\n", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;
+ (yyval.classinfo) = (classinfo_t*)s;
}
}
break;
- case 186:
+ case 199:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2279 "parser.y"
+#line 2822 "parser.y"
{PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
}
break;
- case 187:
+ case 200:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2280 "parser.y"
+#line 2823 "parser.y"
{PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
}
break;
- case 188:
+ case 201:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2282 "parser.y"
- {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
+#line 2825 "parser.y"
+ {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
}
break;
- case 189:
+ case 202:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2283 "parser.y"
- {(yyval.classinfo)=registry_getanytype();}
+#line 2826 "parser.y"
+ {PASS12 (yyval.classinfo)=registry_getanytype();}
}
break;
- case 190:
+ case 203:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2284 "parser.y"
- {(yyval.classinfo)=registry_getanytype();}
+#line 2827 "parser.y"
+ {PASS12 (yyval.classinfo)=registry_getanytype();}
}
break;
- case 191:
+ case 204:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2293 "parser.y"
- {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+#line 2836 "parser.y"
+ {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
}
break;
- case 192:
+ case 205:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2294 "parser.y"
- {(yyval.classinfo)=0;}
+#line 2837 "parser.y"
+ {PASS12 (yyval.classinfo)=0;}
}
break;
- case 193:
+ case 206:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2298 "parser.y"
- {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
+#line 2841 "parser.y"
+ {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
}
break;
- case 194:
+ case 207:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2299 "parser.y"
+#line 2842 "parser.y"
{(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
}
break;
- case 195:
+ case 208:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2301 "parser.y"
- {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
+#line 2844 "parser.y"
+ {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
}
break;
- case 197:
+ case 211:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2303 "parser.y"
- {(yyval.value_list).len=1;
+#line 2848 "parser.y"
+ {(yyval.value_list).number=1;
(yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
}
}
- case 198:
+ case 212:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2306 "parser.y"
+#line 2852 "parser.y"
+ {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
+ }
+ break;
+
+
+
+ case 213:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 2853 "parser.y"
{
- (yyval.value_list).len= (yyvsp[(1) - (3)].value_list).len+1;
- (yyval.value_list).cc = code_append((yyvsp[(1) - (3)].value_list).cc, (yyvsp[(3) - (3)].value).c);
+ (yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
+ (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
}
}
break;
- case 199:
+ case 215:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2311 "parser.y"
+#line 2859 "parser.y"
{
- MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
- (yyval.value).c = code_new();
-
- if((yyvsp[(2) - (3)].classinfo)->slot) {
- (yyval.value).c = abc_getglobalscope((yyval.value).c);
- (yyval.value).c = abc_getslot((yyval.value).c, (yyvsp[(2) - (3)].classinfo)->slot);
+ typedcode_t v = node_read((yyvsp[(2) - (4)].node));
+ (yyval.value).c = v.c;
+ if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
+
+ code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
+ if((yyval.value).c->opcode == OPCODE_GETPROPERTY) {
+ multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
+ (yyval.value).c = code_cutlast((yyval.value).c);
+ (yyval.value).c = code_append((yyval.value).c, paramcode);
+ (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
+ multiname_destroy(name);
+ } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
+ int slot = (int)(ptroff_t)(yyval.value).c->data[0];
+ trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
+ multiname_t*name = t->name;
+ (yyval.value).c = code_cutlast((yyval.value).c);
+ (yyval.value).c = code_append((yyval.value).c, paramcode);
+ (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
} else {
- (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
+ (yyval.value).c = code_append((yyval.value).c, paramcode);
+ (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
+ }
+
+ (yyval.value).t = TYPE_ANY;
+ if(TYPE_IS_CLASS(v.t) && v.t->data) {
+ (yyval.value).t = v.t->data;
+ } else {
+ (yyval.value).c = abc_coerce_a((yyval.value).c);
+ (yyval.value).t = TYPE_ANY;
}
-
- (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (3)].value_list).cc);
-
- if((yyvsp[(2) - (3)].classinfo)->slot)
- (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(3) - (3)].value_list).len);
- else
- (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(3) - (3)].value_list).len);
- (yyval.value).t = (yyvsp[(2) - (3)].classinfo);
}
}
break;
- case 200:
+ case 216:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2335 "parser.y"
+#line 2896 "parser.y"
{
-
- (yyval.value).c = (yyvsp[(1) - (4)].value).c;
+
+ typedcode_t v = node_read((yyvsp[(1) - (4)].node));
+ (yyval.value).c = v.c;
if((yyval.value).c->opcode == OPCODE_COERCE_A) {
(yyval.value).c = code_cutlast((yyval.value).c);
}
multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
(yyval.value).c = code_cutlast((yyval.value).c);
(yyval.value).c = code_append((yyval.value).c, paramcode);
- (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
+ (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
multiname_destroy(name);
- } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
+ } else if((yyval.value).c->opcode == OPCODE_GETSLOT && (yyval.value).c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
int slot = (int)(ptroff_t)(yyval.value).c->data[0];
- trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
+ trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
if(t->kind!=TRAIT_METHOD) {
//ok: flash allows to assign closures to members.
}
(yyval.value).c = code_cutlast((yyval.value).c);
(yyval.value).c = code_append((yyval.value).c, paramcode);
//$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
- (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
+ (yyval.value).c = abc_callproperty2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
} else if((yyval.value).c->opcode == OPCODE_GETSUPER) {
multiname_t*name = (yyval.value).c->data[0];(yyval.value).c->data[0]=0;
(yyval.value).c = code_cutlast((yyval.value).c);
(yyval.value).c = code_append((yyval.value).c, paramcode);
- (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).len);
+ (yyval.value).c = abc_callsuper2((yyval.value).c, name, (yyvsp[(3) - (4)].value_list).number);
multiname_destroy(name);
} else {
- (yyval.value).c = abc_getlocal_0((yyval.value).c);
+ (yyval.value).c = abc_getglobalscope((yyval.value).c);
(yyval.value).c = code_append((yyval.value).c, paramcode);
- (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
+ (yyval.value).c = abc_call((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
}
- memberinfo_t*f = 0;
-
- if(TYPE_IS_FUNCTION((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->function) {
- (yyval.value).t = (yyvsp[(1) - (4)].value).t->function->return_type;
+ if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
+ (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
} else {
(yyval.value).c = abc_coerce_a((yyval.value).c);
(yyval.value).t = TYPE_ANY;
}
-
}
}
break;
- case 201:
+ case 217:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2383 "parser.y"
+#line 2943 "parser.y"
{
if(!state->cls) syntaxerror("super() not allowed outside of a class");
if(!state->method) syntaxerror("super() not allowed outside of a function");
syntaxerror("constructor may call super() only once");
*/
state->method->has_super = 1;
- (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).len);
+
+ (yyval.value).c = abc_constructsuper((yyval.value).c, (yyvsp[(3) - (4)].value_list).number);
(yyval.value).c = abc_pushundefined((yyval.value).c);
(yyval.value).t = TYPE_ANY;
}
- case 202:
+ case 218:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2403 "parser.y"
+#line 2964 "parser.y"
{
- (yyval.value).c = (yyvsp[(2) - (2)].value).c;
+ typedcode_t v = node_read((yyvsp[(2) - (2)].node));
+ (yyval.value).c = v.c;
if((yyval.value).c->opcode == OPCODE_COERCE_A) {
(yyval.value).c = code_cutlast((yyval.value).c);
}
(yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
} else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
int slot = (int)(ptroff_t)(yyval.value).c->data[0];
- multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
+ multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
(yyval.value).c = code_cutlast((yyval.value).c);
(yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
} else {
(yyval.value).c = abc_getlocal_0((yyval.value).c);
- MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
+ MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
(yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
}
(yyval.value).t = TYPE_BOOLEAN;
- case 203:
+ case 219:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2424 "parser.y"
+#line 2986 "parser.y"
{
(yyval.code) = abc_returnvoid(0);
}
- case 204:
+ case 220:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2427 "parser.y"
+#line 2989 "parser.y"
{
(yyval.code) = (yyvsp[(2) - (2)].value).c;
(yyval.code) = abc_returnvalue((yyval.code));
- case 205:
+ case 221:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2434 "parser.y"
- {(yyval.value)=(yyvsp[(1) - (1)].value);}
+#line 2996 "parser.y"
+ {
+ (yyval.value) = node_read((yyvsp[(1) - (1)].node));
+}
}
break;
- case 206:
+ case 222:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2435 "parser.y"
- {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 2999 "parser.y"
+ {
+ (yyval.value) = node_read((yyvsp[(1) - (1)].node));
+}
}
break;
- case 207:
+ case 223:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2436 "parser.y"
+#line 3002 "parser.y"
{
- (yyval.value).c = (yyvsp[(1) - (3)].value).c;
- (yyval.value).c = cut_last_push((yyval.value).c);
- (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).t = (yyvsp[(3) - (3)].value).t;
+ (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
}
}
break;
- case 208:
+ case 224:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2442 "parser.y"
+#line 3005 "parser.y"
{
- (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
+ (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
}
}
break;
- case 209:
+ case 225:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2448 "parser.y"
- {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3008 "parser.y"
+ {
+ (yyval.code) = node_exec((yyvsp[(1) - (1)].node));
+}
}
break;
- case 211:
+ case 226:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2452 "parser.y"
- {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3011 "parser.y"
+ {
+ (yyval.code) = (yyvsp[(1) - (3)].code);
+ (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
+}
}
break;
- case 212:
+ case 227:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2454 "parser.y"
- {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3016 "parser.y"
+ {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
}
break;
- case 213:
+ case 228:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2456 "parser.y"
- {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3017 "parser.y"
+ {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
}
break;
- case 214:
+ case 229:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2458 "parser.y"
+#line 3019 "parser.y"
{
- (yyval.value).c = 0;
- namespace_t ns = {ACCESS_PACKAGE, ""};
- multiname_t m = {QNAME, &ns, 0, "RegExp"};
- if(!(yyvsp[(1) - (1)].regexp).options) {
- (yyval.value).c = abc_getlex2((yyval.value).c, &m);
- (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
- (yyval.value).c = abc_construct((yyval.value).c, 1);
- } else {
- (yyval.value).c = abc_getlex2((yyval.value).c, &m);
- (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
- (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
- (yyval.value).c = abc_construct((yyval.value).c, 2);
+ (yyval.value_list).cc = 0;
+ (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
+ (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
+ (yyval.value_list).number = 2;
+}
}
- (yyval.value).t = TYPE_REGEXP;
+ break;
+
+
+
+ case 230:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 3025 "parser.y"
+ {
+ (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
+ (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
+ (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
+ (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
}
}
break;
- case 215:
+ case 231:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2475 "parser.y"
- {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
- //MULTINAME(m, registry_getintclass());
- //$$.c = abc_coerce2($$.c, &m); // FIXME
- (yyval.value).t = TYPE_INT;
- }
+#line 3034 "parser.y"
+ {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
- case 216:
+ case 232:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2480 "parser.y"
- {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
- (yyval.value).t = TYPE_INT;
- }
+#line 3035 "parser.y"
+ {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
- case 217:
+ case 233:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2483 "parser.y"
- {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
- (yyval.value).t = TYPE_INT;
- }
+#line 3036 "parser.y"
+ {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
- case 218:
+ case 234:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2486 "parser.y"
- {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
- (yyval.value).t = TYPE_UINT;
- }
+#line 3037 "parser.y"
+ {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
- case 219:
+ case 235:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2489 "parser.y"
- {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
- (yyval.value).t = TYPE_FLOAT;
- }
+#line 3038 "parser.y"
+ {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
- case 220:
+ case 236:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2492 "parser.y"
- {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
- (yyval.value).t = TYPE_STRING;
- }
+#line 3039 "parser.y"
+ {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
- case 221:
+ case 237:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2495 "parser.y"
- {(yyval.value).c = abc_pushundefined(0);
- (yyval.value).t = TYPE_ANY;
- }
+#line 3041 "parser.y"
+ {
+ (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
+}
}
break;
- case 222:
+ case 238:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 3046 "parser.y"
+ {
+ typedcode_t v;
+ v.c = 0;
+ namespace_t ns = {ACCESS_PACKAGE, ""};
+ multiname_t m = {QNAME, &ns, 0, "RegExp"};
+ if(!(yyvsp[(1) - (1)].regexp).options) {
+ v.c = abc_getlex2(v.c, &m);
+ v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
+ v.c = abc_construct(v.c, 1);
+ } else {
+ v.c = abc_getlex2(v.c, &m);
+ v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
+ v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
+ v.c = abc_construct(v.c, 2);
+ }
+ v.t = TYPE_REGEXP;
+ (yyval.node) = mkcodenode(v);
+}
+ }
+ break;
+
+
+
+ case 239:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2498 "parser.y"
- {(yyval.value).c = abc_pushtrue(0);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3066 "parser.y"
+ {
+ typedcode_t v;
+ v.c = code_new();
+ v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
+ v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
+ v.t = registry_getarrayclass();
+ (yyval.node) = mkcodenode(v);
+}
}
break;
- case 223:
+ case 240:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2501 "parser.y"
- {(yyval.value).c = abc_pushfalse(0);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3076 "parser.y"
+ {
+ typedcode_t v;
+ v.c = code_new();
+ v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
+ v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
+ v.t = registry_getobjectclass();
+ (yyval.node) = mkcodenode(v);
+}
}
break;
- case 224:
+ case 241:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2504 "parser.y"
- {(yyval.value).c = abc_pushnull(0);
- (yyval.value).t = TYPE_NULL;
- }
+#line 3085 "parser.y"
+ {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 226:
+ case 242:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2509 "parser.y"
- {(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);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3086 "parser.y"
+ {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 227:
+ case 243:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2512 "parser.y"
- {(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).t = TYPE_BOOLEAN;
- }
+#line 3087 "parser.y"
+ {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 228:
+ case 244:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2515 "parser.y"
- {(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);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3088 "parser.y"
+ {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 229:
+ case 245:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2518 "parser.y"
- {(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).t = TYPE_BOOLEAN;
- }
+#line 3089 "parser.y"
+ {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 230:
+ case 246:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2521 "parser.y"
- {(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).t = TYPE_BOOLEAN;
- }
+#line 3090 "parser.y"
+ {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 231:
+ case 247:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2524 "parser.y"
- {(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).t = TYPE_BOOLEAN;
- }
+#line 3091 "parser.y"
+ {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 232:
+ case 248:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2527 "parser.y"
- {(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);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3092 "parser.y"
+ {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 233:
+ case 249:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2530 "parser.y"
- {(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);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3093 "parser.y"
+ {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 234:
+ case 250:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2534 "parser.y"
- {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
- (yyval.value).c = (yyvsp[(1) - (3)].value).c;
- (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
- (yyval.value).c = abc_dup((yyval.value).c);
- code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
- (yyval.value).c = cut_last_push((yyval.value).c);
- (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
- code_t*label = (yyval.value).c = abc_label((yyval.value).c);
- jmp->branch = label;
- }
+#line 3094 "parser.y"
+ {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
- case 235:
+ case 251:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2545 "parser.y"
- {
- (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
- /*printf("%08x:\n",$1.t);
- code_dump($1.c, 0, 0, "", stdout);
- printf("%08x:\n",$3.t);
- code_dump($3.c, 0, 0, "", stdout);
- printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
- (yyval.value).c = (yyvsp[(1) - (3)].value).c;
- (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
- (yyval.value).c = abc_dup((yyval.value).c);
- code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
- (yyval.value).c = cut_last_push((yyval.value).c);
- (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
- code_t*label = (yyval.value).c = abc_label((yyval.value).c);
- jmp->branch = label;
- }
+#line 3095 "parser.y"
+ {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
}
break;
- case 236:
+ case 252:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2563 "parser.y"
- {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
- (yyval.value).c = abc_not((yyval.value).c);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3096 "parser.y"
+ {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
}
break;
- case 237:
+ case 253:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2568 "parser.y"
- {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
- (yyval.value).c = abc_bitnot((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3097 "parser.y"
+ {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 238:
+ case 254:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2573 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_bitand((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3098 "parser.y"
+ {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 239:
+ case 255:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2578 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_bitxor((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3099 "parser.y"
+ {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 240:
+ case 256:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2583 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_bitor((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3100 "parser.y"
+ {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 241:
+ case 257:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2588 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_rshift((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3101 "parser.y"
+ {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 242:
+ case 258:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2592 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_urshift((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3102 "parser.y"
+ {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 243:
+ case 259:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2596 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_lshift((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- }
+#line 3103 "parser.y"
+ {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 244:
+ case 260:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2601 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_divide((yyval.value).c);
- (yyval.value).t = TYPE_NUMBER;
- }
+#line 3104 "parser.y"
+ {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 245:
+ case 261:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2605 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_modulo((yyval.value).c);
- (yyval.value).t = TYPE_NUMBER;
- }
+#line 3105 "parser.y"
+ {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 246:
+ case 262:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2609 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
- (yyval.value).c = abc_add_i((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- } else {
- (yyval.value).c = abc_add((yyval.value).c);
- (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
- }
- }
+#line 3106 "parser.y"
+ {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 247:
+ case 263:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2618 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
- (yyval.value).c = abc_subtract_i((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- } else {
- (yyval.value).c = abc_subtract((yyval.value).c);
- (yyval.value).t = TYPE_NUMBER;
- }
- }
+#line 3107 "parser.y"
+ {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 248:
+ case 264:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2627 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
- (yyval.value).c = abc_multiply_i((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- } else {
- (yyval.value).c = abc_multiply((yyval.value).c);
- (yyval.value).t = TYPE_NUMBER;
- }
- }
+#line 3108 "parser.y"
+ {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 249:
+ case 265:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2637 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_in((yyval.value).c);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3109 "parser.y"
+ {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 250:
+ case 266:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2642 "parser.y"
- {char use_astype=0; // flash player's astype works differently than astypelate
- if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t)) {
- MULTINAME(m,(yyvsp[(3) - (3)].value).t->cls);
- (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
- (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
- } else {
- (yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_astypelate((yyval.value).c);
- (yyval.value).t = TYPE_ANY;
- }
- }
+#line 3110 "parser.y"
+ {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 251:
+ case 267:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2655 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_instanceof((yyval.value).c);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3111 "parser.y"
+ {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 252:
+ case 268:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2660 "parser.y"
- {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
- (yyval.value).c = abc_istypelate((yyval.value).c);
- (yyval.value).t = TYPE_BOOLEAN;
- }
+#line 3112 "parser.y"
+ {(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
}
break;
- case 253:
+ case 269:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2665 "parser.y"
- {
- (yyval.value).c = (yyvsp[(3) - (4)].value).c;
- (yyval.value).c = abc_typeof((yyval.value).c);
- (yyval.value).t = TYPE_STRING;
- }
+#line 3113 "parser.y"
+ {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
}
break;
- case 254:
+ case 270:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2671 "parser.y"
- {
- (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
- (yyval.value).c = abc_pushundefined((yyval.value).c);
- (yyval.value).t = TYPE_ANY;
- }
+#line 3114 "parser.y"
+ { (yyval.node) = mkconstnode(constant_new_undefined());}
}
break;
- case 255:
+ case 271:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2677 "parser.y"
- { (yyval.value).c = abc_pushundefined(0);
- (yyval.value).t = TYPE_ANY;
- }
+#line 3115 "parser.y"
+ { (yyval.node)=(yyvsp[(2) - (3)].node);}
}
break;
- case 256:
+ case 272:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2681 "parser.y"
- {(yyval.value)=(yyvsp[(2) - (3)].value);}
+#line 3116 "parser.y"
+ {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
}
break;
- case 257:
+ case 273:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2683 "parser.y"
- {
- (yyval.value)=(yyvsp[(2) - (2)].value);
- if(IS_INT((yyvsp[(2) - (2)].value).t)) {
- (yyval.value).c=abc_negate_i((yyval.value).c);
- (yyval.value).t = TYPE_INT;
- } else {
- (yyval.value).c=abc_negate((yyval.value).c);
- (yyval.value).t = TYPE_NUMBER;
- }
-}
+#line 3117 "parser.y"
+ {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
}
break;
- case 258:
+ case 274:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2694 "parser.y"
- {
- (yyval.value).c = (yyvsp[(1) - (4)].value).c;
- (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
-
- MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
- (yyval.value).t = 0; // array elements have unknown type
-}
+#line 3118 "parser.y"
+ {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 259:
+ case 275:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2703 "parser.y"
- {
- (yyval.value).c = code_new();
- (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
- (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
- (yyval.value).t = registry_getarrayclass();
-}
+#line 3119 "parser.y"
+ {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 260:
+ case 276:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2710 "parser.y"
- {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
+#line 3120 "parser.y"
+ {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 261:
+ case 277:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2711 "parser.y"
- {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
+#line 3121 "parser.y"
+ {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 262:
+ case 278:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2713 "parser.y"
- {
- (yyval.value_list).cc = 0;
- (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
- (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
- (yyval.value_list).len = 2;
-}
+#line 3122 "parser.y"
+ {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 263:
+ case 279:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2719 "parser.y"
- {
- (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
- (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
- (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
- (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
-}
+#line 3123 "parser.y"
+ { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 264:
+ case 280:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2728 "parser.y"
- {
- (yyval.value).c = code_new();
- (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
- (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
- (yyval.value).t = registry_getobjectclass();
-}
+#line 3124 "parser.y"
+ { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 265:
+ case 281:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2735 "parser.y"
- {
- code_t*c = (yyvsp[(3) - (3)].value).c;
- if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
- c=abc_multiply_i(c);
- } else {
- c=abc_multiply(c);
- }
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3125 "parser.y"
+ { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 266:
+ case 282:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2747 "parser.y"
- {
- code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3126 "parser.y"
+ { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 267:
+ case 283:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2753 "parser.y"
- {
- code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3127 "parser.y"
+ { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 268:
+ case 284:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2759 "parser.y"
- {
- code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3128 "parser.y"
+ { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 269:
+ case 285:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2765 "parser.y"
- {
- code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3129 "parser.y"
+ { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
- case 270:
+ case 286:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2771 "parser.y"
- {
- code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3130 "parser.y"
+ { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
}
break;
- case 271:
+ case 287:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2777 "parser.y"
- {
- code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
- c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3132 "parser.y"
+ { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
}
break;
- case 272:
+ case 288:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2783 "parser.y"
- {
- code_t*c = (yyvsp[(3) - (3)].value).c;
-
- if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
- c=abc_add_i(c);
- } else {
- c=abc_add(c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
- }
-
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3133 "parser.y"
+ { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
}
break;
- case 273:
+ case 289:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2796 "parser.y"
- { code_t*c = (yyvsp[(3) - (3)].value).c;
- if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
- c=abc_subtract_i(c);
- } else {
- c=abc_subtract(c);
- c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
- }
-
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3134 "parser.y"
+ {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
}
break;
- case 274:
+ case 290:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2807 "parser.y"
- { code_t*c = 0;
- c = code_append(c, (yyvsp[(3) - (3)].value).c);
- c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
- (yyval.value).t = (yyvsp[(1) - (3)].value).t;
- }
+#line 3135 "parser.y"
+ {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
}
break;
- case 275:
+ case 291:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2814 "parser.y"
- {
- (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
- (yyval.value).c = (yyvsp[(1) - (5)].value).c;
- code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
- (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
- (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
- code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
- (yyval.value).c = j1->branch = abc_label((yyval.value).c);
- (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
- (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
- (yyval.value).c = j2->branch = abc_label((yyval.value).c);
- }
+#line 3138 "parser.y"
+ { if(!state->cls->info)
+ syntaxerror("super keyword not allowed outside a class");
+ classinfo_t*t = state->cls->info->superclass;
+ if(!t) t = TYPE_OBJECT;
+ memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
+ MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
+ typedcode_t v;
+ v.c = 0;
+ v.c = abc_getlocal_0(v.c);
+ v.c = abc_getsuper2(v.c, &m);
+ v.t = slotinfo_gettype((slotinfo_t*)f);
+ (yyval.node) = mkcodenode(v);
+ }
}
break;
- case 276:
+ case 292:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2827 "parser.y"
- { code_t*c = 0;
- classinfo_t*type = (yyvsp[(1) - (2)].value).t;
- if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
- int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
- code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
- if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
- (yyval.value).c = abc_getlocal(0, nr);
- (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
- } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
- (yyval.value).c = abc_getlocal(0, nr);
- (yyval.value).c = abc_inclocal((yyval.value).c, nr);
- } else syntaxerror("internal error");
- } else {
- if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
- c=abc_increment_i(c);
- type = TYPE_INT;
- } else {
- c=abc_increment(c);
- type = TYPE_NUMBER;
- }
- c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
- (yyval.value).t = (yyvsp[(1) - (2)].value).t;
- }
+#line 3152 "parser.y"
+ {
+ // attribute TODO
+ (yyval.node) = mkdummynode();
+ as3_warning("ignored @ operator");
}
}
break;
- case 277:
+ case 293:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2854 "parser.y"
- { code_t*c = 0;
- classinfo_t*type = (yyvsp[(1) - (2)].value).t;
- if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
- c=abc_decrement_i(c);
- type = TYPE_INT;
- } else {
- c=abc_decrement(c);
- type = TYPE_NUMBER;
- }
- c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
- (yyval.value).t = (yyvsp[(1) - (2)].value).t;
- }
+#line 3158 "parser.y"
+ {
+ // child attribute TODO
+ (yyval.node) = mkdummynode();
+ as3_warning("ignored .@ operator");
+ }
}
break;
- case 278:
+ case 294:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2868 "parser.y"
- { code_t*c = 0;
- classinfo_t*type = (yyvsp[(2) - (2)].value).t;
- if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
- c=abc_increment_i(c);
- type = TYPE_INT;
- } else {
- c=abc_increment(c);
- type = TYPE_NUMBER;
- }
- c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(2) - (2)].value).t;
+#line 3164 "parser.y"
+ {
+ // namespace declaration TODO
+ (yyval.node) = mkdummynode();
+ as3_warning("ignored :: operator");
}
}
break;
- case 279:
+ case 295:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2882 "parser.y"
- { code_t*c = 0;
- classinfo_t*type = (yyvsp[(2) - (2)].value).t;
- if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
- c=abc_decrement_i(c);
- type = TYPE_INT;
- } else {
- c=abc_decrement(c);
- type = TYPE_NUMBER;
- }
- c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
- (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
- (yyval.value).t = (yyvsp[(2) - (2)].value).t;
+#line 3170 "parser.y"
+ {
+ // descendants TODO
+ (yyval.node) = mkdummynode();
+ as3_warning("ignored .. operator");
}
}
break;
- case 280:
+ case 296:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2897 "parser.y"
- { if(!state->cls->info)
- syntaxerror("super keyword not allowed outside a class");
- classinfo_t*t = state->cls->info->superclass;
- if(!t) t = TYPE_OBJECT;
-
- memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
- namespace_t ns = flags2namespace(f->flags, "");
- MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
- (yyval.value).c = 0;
- (yyval.value).c = abc_getlocal_0((yyval.value).c);
- (yyval.value).c = abc_getsuper2((yyval.value).c, &m);
- (yyval.value).t = memberinfo_gettype(f);
+#line 3176 "parser.y"
+ {
+ // filter TODO
+ (yyval.node) = mkdummynode();
+ as3_warning("ignored .() operator");
}
}
break;
- case 281:
+ case 297:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2912 "parser.y"
- {(yyval.value).c = (yyvsp[(1) - (3)].value).c;
- classinfo_t*t = (yyvsp[(1) - (3)].value).t;
- char is_static = 0;
- if(TYPE_IS_CLASS(t) && t->cls) {
- t = t->cls;
- is_static = 1;
- }
- if(t) {
- memberinfo_t*f = registry_findmember(t, (yyvsp[(3) - (3)].id), 1);
- char noslot = 0;
- if(f && !is_static != !(f->flags&FLAG_STATIC))
- noslot=1;
- if(f && f->slot && !noslot) {
- (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
- } else {
- MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
- }
- /* determine type */
- (yyval.value).t = memberinfo_gettype(f);
- if(!(yyval.value).t)
- (yyval.value).c = abc_coerce_a((yyval.value).c);
- } else {
- /* when resolving a property on an unknown type, we do know the
- name of the property (and don't seem to need the package), but
- we need to make avm2 try out all access modes */
- multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
- (yyval.value).c = abc_coerce_a((yyval.value).c);
- (yyval.value).t = registry_getanytype();
- }
+#line 3189 "parser.y"
+ {
+ typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
+ (yyval.value).c = v1.c;
+ classinfo_t*t = v1.t;
+ char is_static = 0;
+ if(TYPE_IS_CLASS(t) && t->data) {
+ t = t->data;
+ is_static = 1;
+ }
+ if(t) {
+ if(t->subtype==INFOTYPE_UNRESOLVED) {
+ syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
+ }
+ memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
+ char noslot = 0;
+ if(f && !is_static != !(f->flags&FLAG_STATIC))
+ noslot=1;
+ if(f && f->slot && !noslot) {
+ (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
+ } else {
+ if(!f) {
+ as3_warning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
}
+
+ MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
+ (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
+ }
+ /* determine type */
+ (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
+ if(!(yyval.value).t)
+ (yyval.value).c = abc_coerce_a((yyval.value).c);
+ } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
+ string_t*package = v1.c->data[0];
+ char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
+
+ slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
+ if(a) {
+ (yyval.value) = push_class(a);
+ } else if(dict_contains(state->import_toplevel_packages, package2) ||
+ registry_ispackage(package2)) {
+ (yyval.value).c = v1.c;
+ (yyval.value).c->data[0] = string_new4(package2);
+ (yyval.value).t = 0;
+ } else {
+ syntaxerror("couldn't resolve %s", package2);
+ }
+ } else {
+ /* when resolving a property on an unknown type, we do know the
+ name of the property (and don't seem to need the package), but
+ we need to make avm2 try out all access modes */
+ as3_warning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
+ multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
+ (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
+ (yyval.value).c = abc_coerce_a((yyval.value).c);
+ (yyval.value).t = registry_getanytype();
+ }
+}
}
break;
- case 282:
+ case 298:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2945 "parser.y"
+#line 3247 "parser.y"
{
+ PASS1
+ /* Queue unresolved identifiers for checking against the parent
+ function's variables.
+ We consider everything which is not a local variable "unresolved".
+ This encompasses class names, members of the surrounding class
+ etc. which is *correct* because local variables of the parent function
+ would shadow those.
+ */
+ if(state->method->inner && !find_variable(state, (yyvsp[(1) - (1)].id))) {
+ unknown_variable((yyvsp[(1) - (1)].id));
+ }
+
+ /* let the compiler know that it might want to check the current directory/package
+ for this identifier- maybe there's a file $1.as defining $1. */
+ as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
+ PASS2
+
(yyval.value).t = 0;
(yyval.value).c = 0;
- classinfo_t*a = 0;
+ slotinfo_t*a = 0;
memberinfo_t*f = 0;
variable_t*v;
/* look at variables */
- if((v = find_variable((yyvsp[(1) - (1)].id)))) {
+ if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
// $1 is a local variable
(yyval.value).c = abc_getlocal((yyval.value).c, v->index);
(yyval.value).t = v->type;
break;
}
+ if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
+ (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
+ (yyval.value).c = abc_getslot((yyval.value).c, v->index);
+ (yyval.value).t = v->type;
+ break;
+ }
int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
/* look at current class' members */
- if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
- (f->flags&FLAG_STATIC) >= i_am_static) {
+ if(!state->method->inner &&
+ state->cls &&
+ (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
+ (f->flags&FLAG_STATIC) >= i_am_static)
+ {
// $1 is a function in this class
int var_is_static = (f->flags&FLAG_STATIC);
- if(f->kind == MEMBER_METHOD) {
+ if(f->kind == INFOTYPE_METHOD) {
(yyval.value).t = TYPE_FUNCTION(f);
} else {
(yyval.value).t = f->type;
static properties of a class */
state->method->late_binding = 1;
(yyval.value).t = f->type;
- namespace_t ns = {flags2access(f->flags), ""};
+ namespace_t ns = {f->access, f->package};
multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
(yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
(yyval.value).c = abc_getproperty2((yyval.value).c, &m);
(yyval.value).c = abc_getslot((yyval.value).c, f->slot);
break;
} else {
- namespace_t ns = {flags2access(f->flags), ""};
+ namespace_t ns = {f->access, f->package};
multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
(yyval.value).c = abc_getlocal_0((yyval.value).c);
(yyval.value).c = abc_getproperty2((yyval.value).c, &m);
/* look at actual classes, in the current package and imported */
if((a = find_class((yyvsp[(1) - (1)].id)))) {
- if(a->flags & FLAG_METHOD) {
- MULTINAME(m, a);
- (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
- if(a->function->kind == MEMBER_METHOD) {
- (yyval.value).t = TYPE_FUNCTION(a->function);
- } else {
- (yyval.value).t = a->function->type;
- }
- } else {
- if(a->slot) {
- (yyval.value).c = abc_getglobalscope((yyval.value).c);
- (yyval.value).c = abc_getslot((yyval.value).c, a->slot);
- } else {
- MULTINAME(m, a);
- (yyval.value).c = abc_getlex2((yyval.value).c, &m);
- }
- (yyval.value).t = TYPE_CLASS(a);
- }
+ (yyval.value) = push_class(a);
+ break;
+ }
+
+ /* look through package prefixes */
+ if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id)) ||
+ registry_ispackage((yyvsp[(1) - (1)].id))) {
+ (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
+ (yyval.value).t = 0;
break;
}
/* unknown object, let the avm2 resolve it */
if(1) {
- if(strcmp((yyvsp[(1) - (1)].id),"trace"))
- as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
+ //as3_softwarning("Couldn't resolve '%s', doing late binding", $1);
+ as3_warning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
state->method->late_binding = 1;
multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
- case 283:
+ case 299:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3043 "parser.y"
- {(yyval.code)=0;}
+#line 3356 "parser.y"
+ {
+ PASS12
+ NEW(namespace_decl_t,n);
+ n->name = (yyvsp[(2) - (2)].id);
+ n->url = (yyvsp[(2) - (2)].id);
+ (yyval.namespace_decl)=n;
+}
}
break;
- case 284:
+ case 300:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3044 "parser.y"
- {(yyval.code)=0;}
+#line 3363 "parser.y"
+ {
+ PASS12
+ NEW(namespace_decl_t,n);
+ n->name = (yyvsp[(2) - (4)].id);
+ n->url = (yyvsp[(4) - (4)].id);
+ (yyval.namespace_decl)=n;
+}
}
break;
- case 285:
+ case 301:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3045 "parser.y"
- {(yyval.code)=0;}
+#line 3370 "parser.y"
+ {
+ PASS12
+ NEW(namespace_decl_t,n);
+ n->name = (yyvsp[(2) - (4)].id);
+ n->url = (yyvsp[(4) - (4)].str).str;
+ (yyval.namespace_decl)=n;
+}
}
break;
- case 286:
+ case 302:
+ if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4 */
+#line 3377 "parser.y"
+ {
+ PASS12
+ trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
+
+ namespace_t access = modifiers2access(&(yyvsp[(1) - (2)].flags));
+ varinfo_t* var = varinfo_register_global(access.access, state->package, (yyvsp[(2) - (2)].namespace_decl)->name);
+ var->type = TYPE_NAMESPACE;
+ namespace_t ns;
+ ns.access = ACCESS_NAMESPACE;
+ ns.name = (yyvsp[(2) - (2)].namespace_decl)->url;
+ var->value = constant_new_namespace(&ns);
+
+ (yyval.code)=0;
+}
+ }
+ break;
+
+
+
+ case 303:
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3047 "parser.y"
- {(yyval.token)=0;}
+#line 3401 "parser.y"
+ {
+ PASS12
+ const char*url = (yyvsp[(3) - (3)].classinfo)->name;
+
+ varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
+ if(s->kind == INFOTYPE_UNRESOLVED) {
+ s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
+ if(!s)
+ syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
+ }
+
+ if(!s || s->kind != INFOTYPE_SLOT)
+ syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
+ if(!s->value || !NS_TYPE(s->value->type))
+ syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
+ url = s->value->ns->name;
+
+ trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
+ add_active_url(url);
+ (yyval.code)=0;
+}
}
break;
/* Line 1464 of skeleton.m4 */
-#line 7170 "parser.tab.c"
+#line 7843 "parser.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);