added rollbacking functionality to trier (for namespaces)
[swftools.git] / lib / as3 / parser.tab.c
index 6fe4636..f4565e5 100644 (file)
@@ -49,7 +49,7 @@
 #define YYBISON_VERSION "2.4"
 
 /* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
+#define YYSKELETON_NAME "./skeleton.m4"
 
 /* Pure parsers.  */
 #define YYPURE 0
 #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.  */
 
-/* Line 189 of yacc.c  */
+/* Line 198 of skeleton.m4  */
 #line 23 "parser.y"
 
 #include <stdlib.h>
 #include "registry.h"
 #include "code.h"
 #include "opcodes.h"
+#include "compiler.h"
 
+extern int a3_lex();
 
 
-/* Line 189 of yacc.c  */
-#line 96 "parser.tab.c"
+
+/* Line 198 of skeleton.m4  */
+#line 99 "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,
-     KW_CONTINUE = 284,
-     KW_CLASS = 285,
-     KW_CONST = 286,
-     KW_CATCH = 287,
-     KW_CASE = 288,
-     KW_SET = 289,
-     KW_VOID = 290,
-     KW_THROW = 291,
-     KW_STATIC = 292,
-     KW_WITH = 293,
-     KW_INSTANCEOF = 294,
-     KW_IMPORT = 295,
-     KW_RETURN = 296,
-     KW_TYPEOF = 297,
-     KW_INTERFACE = 298,
-     KW_NULL = 299,
-     KW_VAR = 300,
-     KW_DYNAMIC = 301,
-     KW_OVERRIDE = 302,
-     KW_FINAL = 303,
-     KW_EACH = 304,
-     KW_GET = 305,
-     KW_TRY = 306,
-     KW_SUPER = 307,
-     KW_EXTENDS = 308,
-     KW_FALSE = 309,
-     KW_TRUE = 310,
-     KW_BOOLEAN = 311,
-     KW_UINT = 312,
-     KW_INT = 313,
-     KW_NUMBER = 314,
-     KW_STRING = 315,
-     KW_DEFAULT = 316,
-     KW_DELETE = 317,
-     KW_IF = 318,
-     KW_ELSE = 319,
-     KW_BREAK = 320,
-     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_NAMESPACE = 259,
+     T_STRING = 260,
+     T_REGEXP = 261,
+     T_EMPTY = 262,
+     T_INT = 263,
+     T_UINT = 264,
+     T_BYTE = 265,
+     T_SHORT = 266,
+     T_FLOAT = 267,
+     T_FOR = 268,
+     T_WHILE = 269,
+     T_DO = 270,
+     T_SWITCH = 271,
+     KW_IMPLEMENTS = 272,
+     KW_NAMESPACE = 273,
+     KW_PACKAGE = 274,
+     KW_PROTECTED = 275,
+     KW_PUBLIC = 276,
+     KW_PRIVATE = 277,
+     KW_USE = 278,
+     KW_INTERNAL = 279,
+     KW_NEW = 280,
+     KW_NATIVE = 281,
+     KW_FUNCTION = 282,
+     KW_FINALLY = 283,
+     KW_UNDEFINED = 284,
+     KW_CONTINUE = 285,
+     KW_CLASS = 286,
+     KW_CONST = 287,
+     KW_CATCH = 288,
+     KW_CASE = 289,
+     KW_SET = 290,
+     KW_VOID = 291,
+     KW_THROW = 292,
+     KW_STATIC = 293,
+     KW_WITH = 294,
+     KW_INSTANCEOF = 295,
+     KW_IMPORT = 296,
+     KW_RETURN = 297,
+     KW_TYPEOF = 298,
+     KW_INTERFACE = 299,
+     KW_NULL = 300,
+     KW_VAR = 301,
+     KW_DYNAMIC = 302,
+     KW_OVERRIDE = 303,
+     KW_FINAL = 304,
+     KW_EACH = 305,
+     KW_GET = 306,
+     KW_TRY = 307,
+     KW_SUPER = 308,
+     KW_EXTENDS = 309,
+     KW_FALSE = 310,
+     KW_TRUE = 311,
+     KW_BOOLEAN = 312,
+     KW_UINT = 313,
+     KW_INT = 314,
+     KW_NUMBER = 315,
+     KW_STRING = 316,
+     KW_DEFAULT = 317,
+     KW_DELETE = 318,
+     KW_IF = 319,
+     KW_ELSE = 320,
+     KW_BREAK = 321,
+     KW_IS = 322,
+     KW_IN = 323,
+     KW_AS = 324,
+     T_DICTSTART = 325,
+     T_EQEQ = 326,
+     T_EQEQEQ = 327,
+     T_NE = 328,
+     T_NEE = 329,
+     T_LE = 330,
+     T_GE = 331,
+     T_ORBY = 332,
+     T_DIVBY = 333,
+     T_MODBY = 334,
+     T_MULBY = 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 = 356,
+     minusminus_prefix = 357,
+     plusplus_prefix = 358,
+     below_curly = 359,
+     new2 = 360,
+     above_identifier = 361,
+     below_else = 362,
+     above_function = 363
    };
 #endif
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union 
-/* Line 214 of yacc.c  */
-#line 41 "parser.y"
+/* Line 223 of skeleton.m4  */
+#line 44 "parser.y"
 tokenunion
 {
 
-/* Line 214 of yacc.c  */
-#line 41 "parser.y"
+/* Line 223 of skeleton.m4  */
+#line 44 "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;
@@ -256,6 +264,8 @@ tokenunion
     for_start_t for_start;
     abc_exception_t *exception;
     regexp_t regexp;
+    modifiers_t flags;
+    namespace_decl_t* namespace_decl;
     struct {
         abc_exception_list_t *l;
         code_t*finally;
@@ -263,8 +273,8 @@ tokenunion
 
 
 
-/* Line 214 of yacc.c  */
-#line 268 "parser.tab.c"
+/* Line 223 of skeleton.m4  */
+#line 278 "parser.tab.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -274,16 +284,17 @@ tokenunion
 
 /* Copy the second part of user declarations.  */
 
-/* Line 264 of yacc.c  */
-#line 251 "parser.y"
+/* Line 273 of skeleton.m4  */
+#line 265 "parser.y"
 
 
-static int yyerror(char*s)
+static int a3_error(char*s)
 {
    syntaxerror("%s", s); 
    return 0; //make gcc happy
 }
 
+
 static char* concat2(const char* t1, const char* t2)
 {
     int l1 = strlen(t1);
@@ -313,24 +324,51 @@ typedef struct _import {
 
 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;
+
+    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;
@@ -338,13 +376,18 @@ typedef struct _state {
     
     char*package;     
     import_list_t*wildcard_imports;
+    dict_t*import_toplevel_packages;
     dict_t*imports;
+    
     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;
@@ -352,8 +395,8 @@ typedef struct _state {
 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;
@@ -364,17 +407,21 @@ DECLARE_LIST(state);
 #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; \
@@ -411,11 +458,17 @@ static void new_state()
     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;
+    state->new_vars = 0;
+
+    trie_remember(active_namespaces);
 }
 static void state_has_imports()
 {
@@ -423,6 +476,18 @@ static void state_has_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);
+}
 
 static void state_destroy(state_t*state)
 {
@@ -450,53 +515,94 @@ static void state_destroy(state_t*state)
 
 static void old_state()
 {
+    trie_rollback(active_namespaces);
+
     if(!state || !state->old)
         syntaxerror("invalid nesting");
     state_t*leaving = state;
     
     state = state->old;
+
+    if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
+        free(leaving->method);
+        leaving->method=0;
+    }
+    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);
+        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) {
+        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 initialize_parser()
+{
+    global = rfx_calloc(sizeof(global_t));
+    global->file = abc_file_new();
+    global->file->flags &= ~ABCFILE_LAZY;
+    global->file2token2info = dict_new();
+    global->token2info = 0;
+}
+
 void* finish_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;
+    dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
+
+    global->token2info=0;
+
     return global->file;
 }
 
@@ -530,57 +636,79 @@ static void xx_scopetest()
     c = abc_iftrue(c,xx);*/
 }
 
-
 typedef struct _variable {
     int index;
     classinfo_t*type;
     char init;
+    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);
 }
 code_t*defaultvalue(code_t*c, classinfo_t*type);
-static int new_variable(char*name, classinfo_t*type, char init)
+
+static int alloc_local()
 {
+    return state->method->variable_count++;
+}
+
+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()
 {
-    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) 
@@ -627,6 +755,74 @@ code_t* var_block(code_t*body)
     return c;
 }
 
+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);
+}
+
+#define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
+
+static void parsererror(const char*file, int line, const char*f)
+{
+    syntaxerror("internal error in %s, %s:%d", f, file, line);
+}
+
+   
+static code_t* add_scope_code(code_t*c, methodstate_t*m)
+{
+    if(m->uses_slots || (m->late_binding && !m->inner)) {
+        c = abc_getlocal_0(c);
+        c = abc_pushscope(c);
+    }
+    if(m->uses_slots) {
+        /* FIXME: does this need to be the same activation object as
+                  in the function header? */
+        c = abc_newactivation(c);
+        c = abc_pushscope(c);
+    }
+    return c;
+}
+
+static code_t* method_header(methodstate_t*m)
+{
+    code_t*c = 0;
+
+    c = add_scope_code(c, m);
+
+    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);
+    }
+    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);
@@ -645,7 +841,6 @@ static void startpackage(char*name)
     new_state();
     /*printf("entering package \"%s\"\n", name);*/
     state->package = strdup(name);
-    global->variable_count = 1;
 }
 static void endpackage()
 {
@@ -657,165 +852,328 @@ static void endpackage()
     old_state();
 }
 
+#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 */
+            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);
+
+memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
+{
+    /* FIXME- we need to loop through namespaces here */
+    return registry_findmember(cls, "", 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) {
+            new_variable(p->param->name, p->param->type, 0, 1);
+        }
+    }
+
+    if(as3_pass==2) {
+        m->scope_code = add_scope_code(m->scope_code, m);
+    }
+
+    
+    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->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) {
+                v->type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
+                if(!v->type || v->type->kind != INFOTYPE_CLASS) {
+                    syntaxerror("Couldn't find class %s", v->type->name);
+                }
+            }
+        }
+    }
+}
+
+
 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(registry_findclass(package, classname)) {
-        syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
-    }
-   
+    if(as3_pass==1) {
+        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;
 
-    /* build info struct */
-    int num_interfaces = (list_length(implements));
-    state->cls->info = classinfo_register(access, package, classname, num_interfaces);
-    state->cls->info->superclass = extends?extends:TYPE_OBJECT;
-    int pos = 0;
-    classinfo_list_t*l = implements;
-    for(l=implements;l;l=l->next) {
-        state->cls->info->interfaces[pos++] = l->classinfo;
+        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;
+        }
     }
     
-    multiname_t*extends2 = sig2mname(extends);
+    if(as3_pass == 2) {
+        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);
 
-    MULTINAME(classname2,state->cls->info);
+        if(extends && (extends->flags & FLAG_FINAL))
+            syntaxerror("Can't extend final class '%s'", extends->name);
+        
+        int pos = 0;
+        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++;
+        }
 
-    /*if(extends) {
-        state->cls_init = abc_getlocal_0(state->cls_init);
-        state->cls_init = abc_constructsuper(state->cls_init, 0);
-    }*/
+        /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
+        state->cls->info->superclass = 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;
-        abc_class_interface(state->cls->abc);
-    }
+        /* generate the abc code for this class */
+        MULTINAME(classname2,state->cls->info);
+        multiname_t*extends2 = sig2mname(extends);
 
-    abc_class_protectedNS(state->cls->abc, classname);
+        state->cls->abc = abc_class_new(global->file, &classname2, extends2);
+        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);
+        }
 
-    for(mlist=implements;mlist;mlist=mlist->next) {
-        MULTINAME(m, mlist->classinfo);
-        abc_class_add_interface(state->cls->abc, &m);
-    }
+        abc_class_protectedNS(state->cls->abc, classname);
 
-    /* now write the construction code for this class */
-    int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
+        for(mlist=implements;mlist;mlist=mlist->next) {
+            MULTINAME(m, mlist->classinfo);
+            abc_class_add_interface(state->cls->abc, &m);
+        }
 
-    abc_method_body_t*m = global->init->method->body;
-    __ getglobalscope(m);
-    classinfo_t*s = extends;
+        /* write the construction code for this class to the global init
+           function */
+        int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
 
-    int count=0;
-    
-    while(s) {
-        //TODO: take a look at the current scope stack, maybe 
-        //      we can re-use something
-        s = s->superclass;
-        if(!s) 
-        break;
-       
-        multiname_t*s2 = sig2mname(s);
-        __ getlex2(m, s2);
-        multiname_destroy(s2);
-
-        __ pushscope(m); count++;
-        m->code = m->code->prev->prev; // invert
-    }
-    /* continue appending after last op end */
-    while(m->code && m->code->next) m->code = m->code->next; 
-
-    /* TODO: if this is one of *our* classes, we can also 
-             do a getglobalscope/getslot <nr> (which references
-             the init function's slots) */
-    if(extends2) {
-        __ getlex2(m, extends2);
-        __ dup(m);
-        /* notice: we get a Verify Error #1107 if the top elemnt on the scope
-           stack is not the superclass */
-        __ pushscope(m);count++;
-    } else {
-        __ pushnull(m);
-        /* notice: we get a verify error #1107 if the top element on the scope 
-           stack is not the global object */
-        __ getlocal_0(m);
-        __ pushscope(m);count++;
-    }
-    __ newclass(m,state->cls->abc);
-    while(count--) {
-        __ popscope(m);
-    }
-    __ setslot(m, slotindex);
-
-    /* flash.display.MovieClip handling */
-    if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
-        if(state->package && state->package[0]) {
-            as3_globalclass = concat3(state->package, ".", classname);
+        abc_method_body_t*m = global->init->method->body;
+        __ getglobalscope(m);
+        classinfo_t*s = extends;
+
+        int count=0;
+        
+        while(s) {
+            //TODO: take a look at the current scope stack, maybe 
+            //      we can re-use something
+            s = s->superclass;
+            if(!s) 
+            break;
+           
+            multiname_t*s2 = sig2mname(s);
+            __ getlex2(m, s2);
+            multiname_destroy(s2);
+
+            __ pushscope(m); count++;
+            m->code = m->code->prev->prev; // invert
+        }
+        /* continue appending after last op end */
+        while(m->code && m->code->next) m->code = m->code->next; 
+
+        /* TODO: if this is one of *our* classes, we can also 
+                 do a getglobalscope/getslot <nr> (which references
+                 the init function's slots) */
+        if(extends2) {
+            __ getlex2(m, extends2);
+            __ dup(m);
+            /* notice: we get a Verify Error #1107 if the top elemnt on the scope
+               stack is not the superclass */
+            __ pushscope(m);count++;
         } else {
-            as3_globalclass = strdup(classname);
+            __ pushnull(m);
+            /* notice: we get a verify error #1107 if the top element on the scope 
+               stack is not the global object */
+            __ getlocal_0(m);
+            __ pushscope(m);count++;
+        }
+        __ newclass(m,state->cls->abc);
+        while(count--) {
+            __ popscope(m);
+        }
+        __ setslot(m, slotindex);
+        multiname_destroy(extends2);
+
+        /* flash.display.MovieClip handling */
+
+        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 {
+                as3_globalclass = strdup(classname);
+            }
         }
     }
-    multiname_destroy(extends2);
 }
 
-static void endclass()
+static int slotstate_varconst = 0;
+static modifiers_t*slotstate_flags = 0;
+static void setslotstate(modifiers_t* flags, int varconst)
 {
-    if(!state->cls->has_constructor && !(state->cls->info->flags&CLASS_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);
+    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);
     }
+}
 
-    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->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);
+static void endclass()
+{
+    if(as3_pass == 2) {
+        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->header = code_append(state->cls->init->header, c);
+            state->cls->has_constructor=1;
+        }
+        if(state->cls->init) {
+            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);
+            code_t*c = method_header(state->cls->static_init);
+            m->body->code = wrap_function(c, 0, m->body->code);
+        }
     }
 
-    free(state->cls);state->cls=0;
-    free(state->method);state->method=0;
     old_state();
 }
 
@@ -830,6 +1188,10 @@ void check_code_for_break(code_t*c)
             char*name = string_cstr(c->data[0]);
             syntaxerror("Unresolved \"continue %s\"", name);
         }
+        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;
     }
 }
@@ -837,6 +1199,7 @@ void check_code_for_break(code_t*c)
 
 static void check_constant_against_type(classinfo_t*t, constant_t*c)
 {
+    return;
 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
    if(TYPE_IS_NUMBER(t)) {
         xassert(c->type == CONSTANT_FLOAT
@@ -844,7 +1207,7 @@ static void check_constant_against_type(classinfo_t*t, constant_t*c)
              || 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)) {
@@ -853,188 +1216,343 @@ static void check_constant_against_type(classinfo_t*t, constant_t*c)
    }
 }
 
-
-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) {
+            printf("%s.%s | %s.%s\n", 
+                m->package, m->name,
+                ns.name, name);
+            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 startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
-                          params_t*params, classinfo_t*return_type)
+static void innerfunction(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();
-    global->variable_count = 0;
-    state->method = rfx_calloc(sizeof(methodstate_t));
-    state->method->has_super = 0;
+    //parserassert(state->method && state->method->info);
 
-    if(state->cls) {
-        state->method->is_constructor = !strcmp(state->cls->info->name,name);
-        state->cls->has_constructor |= state->method->is_constructor;
-        
-        new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
-    } else {
-        state->method->is_global = 1;
-        state->method->late_binding = 1; // for global methods, always push local_0 on the scope stack
+    methodstate_t*parent_method = state->method;
+
+    if(as3_pass==1) {
+        return_type = 0; // not valid in pass 1
+    }
 
-        new_variable("globalscope", 0, 0);
+    new_state();
+    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);
+    
+        function_initvars(state->method, params, 0, 1);
     }
 
-    /* state->vars is initialized by state_new */
+    if(as3_pass == 2) {
+        state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+        state->method->variable_count = 0;
+        parserassert(state->method);
 
-    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->return_type = return_type;
+        function_initvars(state->method, params, 0, 1);
     }
-    if(state->method->is_constructor)
-        name = "__as3_constructor__";
-    state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
 }
 
-static void endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
-                          params_t*params, classinfo_t*return_type, code_t*body)
+static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
+                          params_t*params, classinfo_t*return_type)
 {
-    abc_method_t*f = 0;
-
-    multiname_t*type2 = sig2mname(return_type);
-    int slot = 0;
-    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};
-
-        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*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 && state->method->info) {
+        syntaxerror("not able to start another method scope");
     }
-    check_code_for_break(body);
+    new_state();
+    state->new_vars = 1;
+    
+    if(as3_pass == 1) {
+        state->method = rfx_calloc(sizeof(methodstate_t));
+        state->method->has_super = 0;
 
-    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");
-    }
+        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__";
+
+        state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
        
-    free(state->method);state->method=0;
-    old_state();
+        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(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;
+    }
+
+    if(as3_pass==2) {
+        /*if(state->method->uses_parent_function){
+            syntaxerror("accessing variables of parent function from inner functions not supported yet");
+        }*/
+
+        abc_method_t*f = 0;
+
+        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");
+            }
+        }
+        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);
+
+        /* 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;
+}
 
 char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
 {
@@ -1133,8 +1651,13 @@ code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
         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?".":"", from->name, 
+        to->package, to->package?".":"", to->name);
+    return c;
 }
 
 code_t*defaultvalue(code_t*c, classinfo_t*type)
@@ -1162,16 +1685,41 @@ char is_pushundefined(code_t*c)
     return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
 }
 
-void parserassert(int b)
+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()
 {
-    if(!b) syntaxerror("internal error: assertion failed");
+    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 classinfo_t* find_class(char*name)
+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 */
@@ -1179,7 +1727,7 @@ static classinfo_t* find_class(char*name)
     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;
@@ -1189,21 +1737,58 @@ static classinfo_t* find_class(char*name)
     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, name);
+    c = registry_find(internal_filename_package, name);
     if(c) return c;
 
     return 0;
 }
+typedcode_t push_class(slotinfo_t*a)
+{
+    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 {
+            varinfo_t*v = (varinfo_t*)a;
+            x.t = v->type;
+        }
+    } else {
+        classinfo_t*c = (classinfo_t*)a;
+        if(c->slot) {
+            x.c = abc_getglobalscope(x.c);
+            x.c = abc_getslot(x.c, c->slot);
+        } else {
+            MULTINAME(m, c);
+            x.c = abc_getlex2(x.c, &m);
+        }
+        x.t = TYPE_CLASS(c);
+    }
+    return x;
+}
 
 static char is_getlocal(code_t*c)
 {
@@ -1236,7 +1821,6 @@ static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char r
 
        [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
     */
-    
     if(in && in->opcode == OPCODE_COERCE_A) {
         in = code_cutlast(in);
     }
@@ -1252,7 +1836,7 @@ static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char r
     } else {
         prefix = 0;
     }
-
+        
     char use_temp_var = readbefore;
 
     /* generate the write instruction, and maybe append a dup to the prefix code */
@@ -1301,6 +1885,10 @@ static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char r
         write->opcode = OPCODE_SETLOCAL_2;
     } else if(r->opcode == OPCODE_GETLOCAL_3) { 
         write->opcode = OPCODE_SETLOCAL_3;
+    } else if(r->opcode == OPCODE_GETSUPER) { 
+        write->opcode = OPCODE_SETSUPER;
+        multiname_t*m = (multiname_t*)r->data[0];
+        write->data[0] = multiname_clone(m);
     } else {
         code_dump(r);
         syntaxerror("illegal lvalue: can't assign a value to this expression");
@@ -1356,6 +1944,7 @@ static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char r
             c = code_append(c, write);
             c = code_append(c, r);
         } else {
+            code_free(r);r=0;
             temp = gettempvar();
             if(prefix) {
                 c = code_append(c, prefix);
@@ -1386,7 +1975,6 @@ char is_break_or_jump(code_t*c)
     return 0;
 }
 
-
 #define IS_FINALLY_TARGET(op) \
         ((op) == OPCODE___CONTINUE__ || \
          (op) == OPCODE___BREAK__ || \
@@ -1494,18 +2082,24 @@ code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
     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 PASS12END }} if(as3_pass == 2) {{
 
 
-/* Line 264 of yacc.c  */
-#line 1509 "parser.tab.c"
+
+/* Line 273 of skeleton.m4  */
+#line 2103 "parser.tab.c"
 
 #ifdef short
 # undef short
@@ -1718,22 +2312,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  119
+#define YYFINAL  147
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   2463
+#define YYLAST   3001
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  130
+#define YYNTOKENS  134
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  105
+#define YYNNTS  114
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  285
+#define YYNRULES  309
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  478
+#define YYNSTATES  521
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   360
+#define YYMAXUTOK   363
 
 #define YYTRANSLATE(YYX)                                               \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -1744,16 +2338,16 @@ static const yytype_uint8 yytranslate[] =
        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,   118,     2,     2,     2,   116,   108,     2,
+     122,   133,   115,   113,   100,   112,   127,   114,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,   105,    99,
+     109,   102,   110,   104,   128,     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,   124,     2,   125,   107,     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,   126,   106,   132,   117,     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,
@@ -1776,8 +2370,8 @@ static const yytype_uint8 yytranslate[] =
       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,   103,   111,   119,   120,   121,
+     123,   129,   130,   131
 };
 
 #if YYDEBUG
@@ -1786,158 +2380,169 @@ static const yytype_uint8 yytranslate[] =
 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,   499,   501,   505,   507,   509,   511,   515,   517,   519,
-     521,   524,   525,   526,   530,   531,   533,   535,   539,   543,
-     548,   553,   556,   558,   561,   563,   565,   569,   571,   573,
-     575,   577,   579,   581,   583,   585,   587,   589,   591,   593,
-     595,   597,   599,   601,   603,   605,   609,   613,   617,   621,
-     625,   629,   633,   637,   641,   645,   648,   651,   655,   659,
-     663,   667,   671,   675,   679,   683,   687,   691,   695,   699,
-     703,   707,   711,   716,   719,   721,   725,   728,   733,   737,
-     738,   740,   744,   750,   754,   758,   762,   766,   770,   774,
-     778,   782,   786,   790,   794,   800,   803,   806,   809,   812,
-     816,   820,   822,   826,   832,   838
+      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,   619,   621,   623,   625,   627,   629,
+     631,   633,   635,   637,   639,   641,   643,   645,   647,   649,
+     651,   653,   655,   659,   663,   667,   671,   675,   679,   683,
+     687,   691,   695,   698,   701,   705,   709,   713,   717,   721,
+     725,   729,   733,   737,   741,   745,   749,   753,   757,   761,
+     766,   769,   771,   775,   778,   783,   787,   788,   790,   794,
+     800,   804,   808,   812,   816,   820,   824,   828,   832,   836,
+     840,   844,   848,   854,   857,   860,   863,   866,   870,   873,
+     878,   884,   888,   894,   898,   900,   903,   908,   913,   916
 };
 
 /* 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,   227,    -1,    96,    -1,   140,    -1,   145,
-      -1,   160,    -1,   161,    -1,   224,    -1,   176,    -1,   233,
-      -1,   234,    -1,   122,   139,   128,    -1,   122,   128,    -1,
-     141,    96,    -1,   141,    -1,   140,    -1,    99,   225,    -1,
-      -1,    45,   146,    -1,    31,   146,    -1,   147,    -1,   146,
-      97,   147,    -1,     3,   217,   144,    -1,    -1,    64,   142,
-      -1,    -1,    63,   126,   150,   226,   129,   142,   148,    -1,
-      -1,   145,    -1,   227,    -1,    45,     3,   217,    -1,     3,
-      -1,    12,   126,    -1,    12,    49,   126,    -1,   153,   151,
-      96,   226,    96,   227,   129,   142,    -1,   153,   152,    67,
-     226,   129,   142,    -1,    -1,    13,   126,   157,   226,   129,
-     142,    -1,    -1,    14,   159,   142,    13,   126,   226,   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,   228,   103,   138,    -1,    61,
-     103,   138,    -1,    -1,    15,   126,   167,   228,   129,   122,
-     162,   128,    -1,    -1,    32,   126,     3,   217,   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,   226,    -1,    36,    -1,    38,   126,   226,   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,   214,    -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,   214,    -1,    -1,    53,   215,    -1,    -1,
-      16,   215,    -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,
-     217,    -1,    45,    -1,    31,    -1,   184,   200,     3,   217,
-     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,   216,   202,    -1,     3,   202,    -1,    50,    -1,    34,
-      -1,    -1,    -1,   184,    26,   207,     3,   126,   204,   129,
-     217,   122,   209,   138,   128,    -1,     3,    -1,    -1,    26,
-     210,   126,   204,   129,   217,   122,   138,   128,    -1,     3,
-      -1,   179,   123,     3,    -1,   213,    -1,   212,    -1,   214,
-      -1,   215,    97,   214,    -1,   214,    -1,   113,    -1,    35,
-      -1,   103,   216,    -1,    -1,    -1,   126,   219,   129,    -1,
-      -1,   220,    -1,   225,    -1,   220,    97,   225,    -1,    24,
-     212,   218,    -1,   228,   126,   219,   129,    -1,    52,   126,
-     219,   129,    -1,    62,   228,    -1,    41,    -1,    41,   226,
-      -1,   228,    -1,   228,    -1,   226,    97,   228,    -1,   226,
-      -1,   211,    -1,   229,    -1,   232,    -1,   221,    -1,   223,
-      -1,     5,    -1,     9,    -1,    10,    -1,     7,    -1,     8,
-      -1,    11,    -1,     4,    -1,    28,    -1,    55,    -1,    54,
-      -1,    44,    -1,   222,    -1,   228,   107,   228,    -1,   228,
-     108,   228,    -1,   228,    73,   228,    -1,   228,    74,   228,
-      -1,   228,    69,   228,    -1,   228,    70,   228,    -1,   228,
-      72,   228,    -1,   228,    71,   228,    -1,   228,    84,   228,
-      -1,   228,    85,   228,    -1,   116,   228,    -1,   115,   228,
-      -1,   228,   106,   228,    -1,   228,   105,   228,    -1,   228,
-     104,   228,    -1,   228,    93,   228,    -1,   228,    92,   228,
-      -1,   228,    91,   228,    -1,   228,   112,   228,    -1,   228,
-     114,   228,    -1,   228,   111,   228,    -1,   228,   110,   228,
-      -1,   228,   113,   228,    -1,   228,    67,   228,    -1,   228,
-      68,   228,    -1,   228,    39,   228,    -1,   228,    66,   228,
-      -1,    42,   126,   228,   129,    -1,    35,   228,    -1,    35,
-      -1,   126,   226,   129,    -1,   110,   228,    -1,   228,   120,
-     228,   121,    -1,   120,   219,   121,    -1,    -1,   231,    -1,
-     225,   103,   225,    -1,   231,    97,   225,   103,   225,    -1,
-     122,   230,   128,    -1,   228,    78,   228,    -1,   228,    77,
-     228,    -1,   228,    82,   228,    -1,   228,    81,   228,    -1,
-     228,    83,   228,    -1,   228,    76,   228,    -1,   228,    75,
-     228,    -1,   228,    79,   228,    -1,   228,    80,   228,    -1,
-     228,    99,   228,    -1,   228,   102,   228,   103,   228,    -1,
-     228,    88,    -1,   228,    87,    -1,    88,   228,    -1,    87,
-     228,    -1,    52,   123,     3,    -1,   228,   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
+     135,     0,    -1,   136,    -1,    -1,   137,    -1,   138,    -1,
+     137,   138,    -1,   186,    -1,   198,    -1,   196,    -1,   217,
+      -1,   207,    -1,   147,    -1,   148,   126,   136,   132,    -1,
+      99,    -1,    -1,   140,    -1,   141,    -1,   140,   141,    -1,
+     198,    -1,   196,    -1,   217,    -1,   207,    -1,   147,    -1,
+     148,   126,   139,   132,    -1,    99,    -1,   143,    -1,    -1,
+     143,   145,    -1,   145,    -1,   189,    -1,   159,    -1,   160,
+      -1,   161,    -1,   163,    -1,   171,    -1,   154,    -1,   183,
+      -1,   179,    -1,   239,    -1,   247,    -1,   246,    -1,   126,
+     143,   132,    -1,   126,   132,    -1,    99,    -1,   144,    -1,
+     150,    -1,   165,    -1,   166,    -1,   236,    -1,   181,    -1,
+     148,   126,   143,   132,    -1,   145,    99,    -1,   145,    -1,
+     144,    -1,     3,    89,     3,    -1,   102,   237,    -1,    -1,
+      46,   151,    -1,    32,   151,    -1,   152,    -1,   151,   100,
+     152,    -1,     3,   227,   149,    -1,    -1,    65,   146,    -1,
+      -1,    64,   122,   155,   238,   133,   146,   153,    -1,    -1,
+     150,    -1,   239,    -1,    46,     3,   227,    -1,     3,    -1,
+      13,   122,    -1,    13,    50,   122,    -1,   158,   156,    99,
+     238,    99,   239,   133,   146,    -1,   158,   157,    68,   238,
+     133,   146,    -1,    -1,    14,   122,   162,   238,   133,   146,
+      -1,    -1,    15,   164,   146,    14,   122,   238,   133,    -1,
+      66,    -1,    66,     3,    -1,    30,    -1,    30,     3,    -1,
+      -1,   168,    -1,   170,    -1,   168,   170,    -1,   169,    -1,
+     168,   169,    -1,    34,   240,   105,   142,    -1,    62,   105,
+     142,    -1,    -1,    16,   122,   172,   240,   133,   126,   167,
+     132,    -1,    -1,    33,   122,     3,   227,   133,   174,   126,
+     142,   132,    -1,    -1,    28,   126,   176,   142,   132,    -1,
+     173,    -1,   177,   173,    -1,   177,    -1,   177,   175,    -1,
+     175,    -1,    -1,    52,   126,   180,   142,   132,   178,    -1,
+      37,   238,    -1,    37,    -1,    39,   122,   238,   133,    -1,
+     182,   146,    -1,     3,    -1,    19,    -1,     4,    -1,   185,
+     127,   184,    -1,   184,    -1,    -1,    19,   185,   126,   187,
+     139,   132,    -1,    -1,    19,   126,   188,   139,   132,    -1,
+      41,   223,    -1,    41,   185,   127,   115,    -1,    -1,   191,
+      -1,   192,    -1,   191,   192,    -1,    21,    -1,    22,    -1,
+      20,    -1,    38,    -1,    47,    -1,    49,    -1,    48,    -1,
+      26,    -1,    24,    -1,     4,    -1,    -1,    54,   224,    -1,
+      -1,    54,   225,    -1,    -1,    17,   225,    -1,    -1,   190,
+      31,     3,   193,   195,   126,   197,   200,   132,    -1,    -1,
+     190,    44,     3,   194,   126,   199,   203,   132,    -1,    -1,
+     201,    -1,   202,    -1,   201,   202,    -1,    99,    -1,   148,
+     126,   200,   132,    -1,   207,    -1,   217,    -1,   144,    -1,
+      -1,   204,    -1,   205,    -1,   204,   205,    -1,    99,    -1,
+      46,     3,    -1,   190,    27,   216,     3,   122,   213,   133,
+     227,    -1,    46,    -1,    32,    -1,    -1,   190,   206,   208,
+     209,    -1,   210,    -1,   209,   100,   210,    -1,     3,   227,
+     149,    -1,    -1,   102,   212,    -1,    10,    -1,     8,    -1,
+       9,    -1,    12,    -1,     5,    -1,    56,    -1,    55,    -1,
+      45,    -1,     3,    -1,    -1,   214,    -1,    93,   215,    -1,
+     214,   100,    93,   215,    -1,   214,   100,   215,    -1,   215,
+      -1,     3,   105,   226,   211,    -1,     3,   211,    -1,    51,
+      -1,    35,    -1,    -1,    -1,   190,    27,   216,     3,   122,
+     213,   133,   227,   126,   218,   142,   132,    -1,     3,    -1,
+      -1,    -1,    27,   219,   122,   213,   133,   227,   126,   221,
+     142,   132,    -1,   184,    -1,   185,   127,   184,    -1,   223,
+      -1,   222,    -1,   224,    -1,   225,   100,   224,    -1,   224,
+      -1,   115,    -1,    36,    -1,   105,   226,    -1,    -1,    -1,
+     122,   229,   133,    -1,    -1,   230,    -1,   231,    -1,   237,
+      -1,   230,   100,    -1,   231,   237,    -1,    -1,    25,   240,
+     232,   228,    -1,   240,   122,   229,   133,    -1,    53,   122,
+     229,   133,    -1,    63,   240,    -1,    42,    -1,    42,   238,
+      -1,   240,    -1,   240,    -1,   238,   100,   240,    -1,   238,
+      -1,   220,    -1,   241,    -1,   244,    -1,   233,    -1,   235,
+      -1,   234,    -1,     6,    -1,    10,    -1,    11,    -1,     8,
+      -1,     9,    -1,    12,    -1,     5,    -1,    29,    -1,    56,
+      -1,    55,    -1,    45,    -1,   240,   109,   240,    -1,   240,
+     110,   240,    -1,   240,    75,   240,    -1,   240,    76,   240,
+      -1,   240,    71,   240,    -1,   240,    72,   240,    -1,   240,
+      74,   240,    -1,   240,    73,   240,    -1,   240,    87,   240,
+      -1,   240,    88,   240,    -1,   118,   240,    -1,   117,   240,
+      -1,   240,   108,   240,    -1,   240,   107,   240,    -1,   240,
+     106,   240,    -1,   240,    96,   240,    -1,   240,    95,   240,
+      -1,   240,    94,   240,    -1,   240,   114,   240,    -1,   240,
+     116,   240,    -1,   240,   113,   240,    -1,   240,   112,   240,
+      -1,   240,   115,   240,    -1,   240,    68,   240,    -1,   240,
+      69,   240,    -1,   240,    40,   240,    -1,   240,    67,   240,
+      -1,    43,   122,   240,   133,    -1,    36,   240,    -1,    36,
+      -1,   122,   238,   133,    -1,   112,   240,    -1,   240,   124,
+     240,   125,    -1,   124,   229,   125,    -1,    -1,   243,    -1,
+     237,   105,   237,    -1,   243,   100,   237,   105,   237,    -1,
+      70,   242,   132,    -1,   240,    80,   240,    -1,   240,    79,
+     240,    -1,   240,    85,   240,    -1,   240,    84,   240,    -1,
+     240,    86,   240,    -1,   240,    78,   240,    -1,   240,    77,
+     240,    -1,   240,    83,   240,    -1,   240,    81,   240,    -1,
+     240,    82,   240,    -1,   240,   102,   240,    -1,   240,   104,
+     240,   105,   240,    -1,   240,    91,    -1,   240,    90,    -1,
+      91,   240,    -1,    90,   240,    -1,    53,   127,     3,    -1,
+     128,     3,    -1,   240,   127,   128,     3,    -1,   240,   127,
+       3,    89,     3,    -1,   240,    92,     3,    -1,   240,   127,
+     122,   240,   133,    -1,   240,   127,     3,    -1,     3,    -1,
+      18,     3,    -1,    18,     3,   102,     3,    -1,    18,     3,
+     102,     5,    -1,   190,   245,    -1,    23,    18,   224,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,  1484,  1484,  1486,  1486,  1487,  1488,  1490,  1491,  1492,
-    1493,  1494,  1495,  1496,  1498,  1498,  1499,  1500,  1502,  1503,
-    1504,  1505,  1506,  1507,  1509,  1510,  1512,  1513,  1516,  1517,
-    1518,  1519,  1520,  1521,  1522,  1523,  1524,  1525,  1528,  1529,
-    1530,  1531,  1532,  1533,  1534,  1536,  1537,  1539,  1540,  1541,
-    1542,  1546,  1552,  1553,  1557,  1558,  1560,  1561,  1563,  1604,
-    1605,  1608,  1608,  1627,  1628,  1629,  1632,  1635,  1639,  1640,
-    1642,  1662,  1705,  1705,  1724,  1724,  1739,  1742,  1745,  1748,
-    1752,  1753,  1754,  1755,  1756,  1757,  1759,  1770,  1773,  1773,
-    1802,  1802,  1822,  1822,  1839,  1840,  1841,  1842,  1850,  1859,
-    1859,  1904,  1908,  1919,  1928,  1929,  1931,  1932,  1934,  1934,
-    1935,  1935,  1937,  1945,  1955,  1956,  1957,  1958,  1960,  1961,
-    1962,  1963,  1964,  1965,  1966,  1967,  1968,  1970,  1971,  1973,
-    1974,  1976,  1977,  1981,  1979,  1987,  1985,  1993,  1994,  1995,
-    1996,  1997,  1998,  1999,  2001,  2007,  2008,  2009,  2010,  2011,
-    2012,  2015,  2026,  2026,  2028,  2086,  2087,  2089,  2090,  2091,
-    2092,  2093,  2095,  2096,  2097,  2102,  2105,  2110,  2115,  2122,
-    2126,  2131,  2137,  2143,  2144,  2145,  2148,  2147,  2165,  2166,
-    2167,  2175,  2182,  2188,  2189,  2191,  2192,  2194,  2195,  2196,
-    2205,  2206,  2210,  2211,  2213,  2214,  2215,  2218,  2223,  2247,
-    2295,  2315,  2336,  2339,  2346,  2347,  2348,  2354,  2360,  2362,
-    2364,  2366,  2368,  2370,  2387,  2392,  2395,  2398,  2401,  2404,
-    2407,  2410,  2413,  2416,  2420,  2421,  2424,  2427,  2430,  2433,
-    2436,  2439,  2442,  2446,  2457,  2475,  2480,  2485,  2490,  2495,
-    2500,  2504,  2508,  2513,  2517,  2521,  2530,  2539,  2549,  2554,
-    2566,  2572,  2577,  2583,  2589,  2593,  2595,  2606,  2615,  2622,
-    2623,  2625,  2631,  2640,  2647,  2659,  2665,  2671,  2677,  2683,
-    2689,  2695,  2708,  2719,  2726,  2739,  2766,  2780,  2794,  2808,
-    2823,  2857,  2944,  2945,  2946,  2948
+       0,  2081,  2081,  2083,  2083,  2084,  2085,  2087,  2088,  2089,
+    2090,  2091,  2092,  2093,  2094,  2096,  2096,  2097,  2098,  2100,
+    2101,  2102,  2103,  2104,  2105,  2106,  2108,  2109,  2111,  2112,
+    2115,  2116,  2117,  2118,  2119,  2120,  2121,  2122,  2123,  2124,
+    2125,  2126,  2127,  2128,  2131,  2132,  2133,  2134,  2135,  2136,
+    2137,  2138,  2142,  2143,  2147,  2154,  2158,  2159,  2163,  2164,
+    2166,  2167,  2169,  2230,  2231,  2234,  2234,  2253,  2254,  2255,
+    2260,  2264,  2269,  2270,  2272,  2292,  2340,  2340,  2359,  2359,
+    2374,  2377,  2380,  2383,  2387,  2388,  2389,  2390,  2391,  2392,
+    2394,  2405,  2408,  2408,  2439,  2439,  2464,  2464,  2480,  2481,
+    2482,  2483,  2491,  2500,  2500,  2549,  2553,  2564,  2574,  2591,
+    2592,  2593,  2595,  2596,  2598,  2598,  2600,  2600,  2603,  2619,
+    2636,  2637,  2638,  2639,  2646,  2647,  2648,  2649,  2650,  2651,
+    2652,  2653,  2654,  2655,  2659,  2660,  2662,  2663,  2665,  2666,
+    2670,  2668,  2676,  2674,  2683,  2684,  2685,  2686,  2687,  2688,
+    2689,  2690,  2692,  2698,  2699,  2700,  2701,  2702,  2703,  2706,
+    2719,  2719,  2721,  2721,  2723,  2724,  2726,  2801,  2802,  2804,
+    2805,  2806,  2807,  2808,  2810,  2811,  2812,  2813,  2825,  2829,
+    2835,  2841,  2849,  2854,  2860,  2868,  2876,  2877,  2878,  2881,
+    2880,  2897,  2898,  2900,  2899,  2923,  2942,  2956,  2957,  2959,
+    2960,  2962,  2963,  2964,  2973,  2974,  2978,  2979,  2981,  2982,
+    2983,  2985,  2989,  2990,  2995,  2996,  3032,  3078,  3099,  3120,
+    3123,  3130,  3131,  3132,  3138,  3144,  3146,  3148,  3150,  3152,
+    3154,  3156,  3173,  3178,  3181,  3184,  3187,  3190,  3193,  3196,
+    3199,  3202,  3206,  3209,  3212,  3215,  3218,  3221,  3224,  3227,
+    3231,  3242,  3260,  3265,  3270,  3275,  3280,  3285,  3289,  3293,
+    3298,  3302,  3306,  3315,  3324,  3334,  3339,  3351,  3357,  3362,
+    3368,  3374,  3378,  3380,  3391,  3400,  3407,  3408,  3410,  3416,
+    3425,  3432,  3444,  3450,  3456,  3462,  3468,  3474,  3480,  3486,
+    3499,  3510,  3517,  3530,  3557,  3571,  3585,  3599,  3614,  3621,
+    3628,  3635,  3642,  3653,  3703,  3808,  3815,  3822,  3829,  3844
 };
 #endif
 
@@ -1946,51 +2551,54 @@ static const yytype_uint16 yyrline[] =
    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_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\"",
   "\"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",
-  "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",
-  "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",
-  "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", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
+  "\"{ (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_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", "$@12", "SLOT_LIST",
+  "ONE_SLOT", "MAYBESTATICCONSTANT", "STATICCONSTANT", "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", "VOIDEXPRESSION", "E",
+  "CONSTANT", "MAYBE_EXPRPAIR_LIST", "EXPRPAIR_LIST", "VAR_READ",
+  "NAMESPACE_ID", "NAMESPACE_DECLARATION", "USE_NAMESPACE", 0
 };
 #endif
 
@@ -2008,79 +2616,84 @@ static const yytype_uint16 yytoknum[] =
      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,   355,    63,    58,   124,    94,    38,    60,
+      62,   356,    45,    43,    47,    42,    37,   126,    33,   357,
+     358,   359,    40,   360,    91,    93,   123,    46,    64,   361,
+     362,   363,   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,
-     211,   212,   213,   214,   214,   215,   215,   216,   216,   216,
-     217,   217,   218,   218,   219,   219,   220,   220,   221,   222,
-     222,   223,   224,   224,   225,   226,   226,   227,   228,   228,
-     228,   228,   228,   228,   229,   229,   229,   229,   229,   229,
-     229,   229,   229,   229,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,   230,
-     230,   231,   231,   228,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   232,   233,   233,   233,   234
+       0,   134,   135,   136,   136,   137,   137,   138,   138,   138,
+     138,   138,   138,   138,   138,   139,   139,   140,   140,   141,
+     141,   141,   141,   141,   141,   141,   142,   142,   143,   143,
+     144,   144,   144,   144,   144,   144,   144,   144,   144,   144,
+     144,   144,   144,   144,   145,   145,   145,   145,   145,   145,
+     145,   145,   146,   146,   147,   148,   149,   149,   150,   150,
+     151,   151,   152,   153,   153,   155,   154,   156,   156,   156,
+     157,   157,   158,   158,   159,   160,   162,   161,   164,   163,
+     165,   165,   166,   166,   167,   167,   167,   167,   168,   168,
+     169,   170,   172,   171,   174,   173,   176,   175,   177,   177,
+     178,   178,   178,   180,   179,   181,   181,   182,   183,   184,
+     184,   184,   185,   185,   187,   186,   188,   186,   189,   189,
+     190,   190,   191,   191,   192,   192,   192,   192,   192,   192,
+     192,   192,   192,   192,   193,   193,   194,   194,   195,   195,
+     197,   196,   199,   198,   200,   200,   201,   201,   202,   202,
+     202,   202,   202,   203,   203,   204,   204,   205,   205,   205,
+     206,   206,   208,   207,   209,   209,   210,   211,   211,   212,
+     212,   212,   212,   212,   212,   212,   212,   212,   213,   213,
+     213,   213,   214,   214,   215,   215,   216,   216,   216,   218,
+     217,   219,   219,   221,   220,   222,   223,   224,   224,   225,
+     225,   226,   226,   226,   227,   227,   228,   228,   229,   229,
+     229,   230,   231,   230,   232,   233,   234,   234,   235,   236,
+     236,   237,   238,   238,   239,   240,   240,   240,   240,   240,
+     240,   240,   241,   241,   241,   241,   241,   241,   241,   241,
+     241,   241,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,   242,   242,   243,   243,
+     240,   240,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   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,
-       9,     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,     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,     3,     1,     1,     1,     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,     3,
+       1,     1,     3,     3,     3,     3,     3,     3,     3,     3,
+       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,     0,     1,     3,     5,
        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,     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
@@ -2088,702 +2701,827 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
-     114,   281,   219,   213,   216,   217,   214,   215,   218,     0,
-       0,    74,     0,     0,   120,   118,   119,   126,     0,   125,
-     179,   220,   254,   121,     0,     0,     0,   223,   122,   124,
-     123,     0,     0,   222,   221,     0,     0,     0,     0,    13,
-       0,     0,     0,   194,   259,     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,
-     208,   211,   224,   212,   207,    37,   205,   209,   210,     0,
-      68,    72,   114,    88,   104,   105,   110,   107,     0,   181,
-     192,   178,     0,   253,     0,   181,     0,   184,   183,   112,
-       0,    99,     0,   194,   201,    61,   278,   277,   256,   236,
-     235,     0,   195,   196,   204,     0,     0,   260,     0,     1,
-       6,   281,     0,     0,    64,     0,     0,    65,   175,     0,
-     153,     0,   152,     0,   117,     0,     0,     0,     0,     0,
+     120,   304,   133,   237,   231,   234,   235,   232,   233,   236,
+       0,     0,    78,     0,     0,   126,   124,   125,     0,   132,
+       0,   131,   192,   238,   271,   127,     0,     0,     0,   241,
+     128,   130,   129,     0,     0,   240,   239,     0,     0,   276,
+       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,    10,   225,   228,   230,   229,
+     224,    39,   222,   226,   227,    41,    40,     0,     0,    72,
+      76,   120,    92,   109,   111,   110,   116,   113,     0,     0,
+     304,   214,   191,     0,   270,     0,     0,   118,     0,   103,
+     208,     0,   218,    65,     0,   221,     0,   277,   296,   295,
+     273,   253,   252,     0,     0,   209,   210,   211,    82,     0,
+     106,   219,     0,    80,    44,    43,   120,    45,    29,     0,
+      46,    47,    48,    50,     0,    49,   298,     1,     6,   120,
+     304,     0,    68,     0,     0,    69,    53,   108,     0,   188,
+       0,   161,     0,   160,   162,   308,   123,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   276,   275,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   194,    69,     0,     0,
-      78,   102,   202,     0,    76,    38,   114,    39,    50,     0,
-      40,    41,    42,    44,     0,    43,    45,    46,     0,   114,
-     108,     0,   194,   198,   165,     0,     0,     0,    25,   279,
-       0,     0,   258,     0,     0,   263,     0,   255,   191,    55,
-      56,   191,    54,     0,     0,   174,   173,     0,   127,   129,
-     191,   206,   250,   251,   248,   249,   229,   230,   232,   231,
-     227,   228,   270,   269,   265,   264,   271,   272,   267,   266,
-     268,   233,   234,   242,   241,   240,   273,     0,   239,   238,
-     237,   225,   226,   246,   245,   243,   247,   244,     0,   280,
-       0,     0,     0,    79,   101,   203,    77,    48,   114,    27,
-     205,    49,     0,     0,     0,    23,     0,   114,    16,    22,
-      19,    18,    21,    20,   114,   106,     0,   155,     0,     0,
-     166,   170,   114,   182,   113,   252,     0,    24,   200,     0,
-     197,   261,     0,     0,    53,     0,    53,     0,     0,     0,
-       0,   131,     0,     0,    53,     0,   257,   199,   114,   285,
-      47,    26,     0,   282,     0,   111,    17,     0,   193,     0,
-       0,   172,   167,   191,     0,   103,     0,   114,     0,   189,
-     188,     0,   187,   190,     0,    58,    57,     0,   114,   165,
-     128,     0,     0,   185,   130,   135,   154,   274,    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,   262,     0,    52,     0,    71,     0,   132,
-     133,     0,   114,    75,   283,   284,     0,     0,     0,    81,
-      84,    82,   171,    25,   168,    92,     0,    95,    97,   114,
-      62,   114,   191,   114,   186,     0,   149,     0,     0,   114,
-     147,     0,    25,    89,    85,    83,     0,    25,   191,    60,
-      70,     0,   141,   144,     0,     0,   114,   139,   142,   143,
-     150,   175,   136,   148,    25,    87,   180,     0,     0,   176,
-     134,   140,     0,    86,    93,    90,    25,     0,     0,     0,
-     165,    25,   177,     0,     0,   191,    91,   151
+     294,   293,     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,   309,   206,   178,     0,     0,     0,    27,
+       0,   297,     0,     0,   280,     0,   272,   275,   212,   213,
+      83,   205,    59,    60,   105,   220,    58,    81,    42,    28,
+     120,     0,   205,     0,     0,    52,   305,   187,   186,     0,
+     134,   136,     0,   223,   267,   268,   265,   266,   246,   247,
+     249,   248,   244,   245,   287,   286,   282,   281,   289,   290,
+     288,   284,   283,   285,   250,   251,   301,   259,   258,   257,
+     291,     0,   256,   255,   254,   242,   243,   263,   262,   260,
+     264,   261,     0,     0,   303,     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,   269,     0,    26,   217,     0,   278,     0,
+       0,    57,     0,   120,    13,    57,     0,     0,     0,     0,
+       0,   138,     0,     0,   205,   163,   164,     0,   216,   274,
+       0,     0,   299,   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,
+     306,   307,   178,   135,     0,     0,   199,   137,   142,    57,
+       0,   292,   300,   302,    77,     0,    84,     0,   115,   207,
+     177,   173,   170,   171,   169,   172,   176,   175,   174,   168,
+     167,     0,     0,   182,     0,     0,    98,   102,   100,   104,
+      63,   279,    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,   468,
-     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,   466,
-      92,    70,    97,    98,   352,   364,   353,   314,   203,   111,
-     112,    71,    72,    73,   195,   113,    74,    75,    76,    77,
-     116,   117,    78,   196,   197
+      -1,    50,    51,    52,    53,   311,   312,   313,   334,   335,
+     137,   138,   157,   314,   139,   385,   140,   246,   243,   458,
+      57,   232,   153,   154,    58,    59,    60,    61,   213,    62,
+      91,   141,   142,   445,   446,   447,   448,    63,   215,   426,
+     510,   427,   475,   428,   429,    64,   229,   143,    65,    66,
+     219,   220,    67,   320,   216,    68,   144,    70,    71,   351,
+     353,   395,   316,   461,   317,   439,   484,   485,   486,   466,
+     467,   468,   164,   318,   262,   355,   356,   373,   419,   327,
+     328,   329,   259,   319,   507,   103,    76,   474,   221,   222,
+     382,   397,   383,   341,   324,   124,   125,   126,   224,    77,
+      78,    79,   145,   127,    80,    81,    82,    83,   116,   117,
+      84,   165,    85,    86
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -308
+#define YYPACT_NINF -403
 static const yytype_int16 yypact[] =
 {
-     349,  -308,  -308,  -308,  -308,  -308,  -308,  -308,  -308,   -38,
-     -86,  -308,   -72,    35,  -308,  -308,  -308,  -308,    30,  -308,
-      97,  -308,    52,  -308,   -14,    18,    36,  -308,  -308,  -308,
-    -308,    57,    44,  -308,  -308,  1538,    40,  1538,  1538,  -308,
-    1538,  1538,  1538,  1538,  1538,  1538,   102,  -308,   473,  -308,
-    -308,  -308,  -308,   211,  -308,  -308,  -308,  -308,  -308,  -308,
-    -308,  -308,  -308,   275,   640,  -308,  -308,  -308,  -308,  -308,
-    -308,  -308,  -308,  -308,    96,  -308,  1971,  -308,  -308,    82,
-    -308,  -308,  1469,  -308,  -308,  -308,  -308,  -308,   -32,  -308,
-      83,  -308,    84,   104,  1538,    88,    89,  -308,  -308,  -308,
-    1538,  -308,   186,  1538,   104,  -308,   104,   104,   163,   104,
-     104,   108,   116,  -308,  1971,   114,   105,   128,   -88,  -308,
-    -308,   165,   231,   233,  -308,   144,   174,  -308,    -5,   240,
-    -308,   241,  -308,   244,  -308,  1538,  1538,  1538,  1538,  1538,
-    1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,
-    1538,  1538,  1538,  1538,  1538,  1538,  1538,  -308,  -308,  1538,
-    1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,  1538,
-    1538,  1538,  1538,  1538,  1538,   245,  1538,  -308,  1538,   232,
-     255,  1538,  1538,   231,   256,  -308,   593,  -308,   164,   248,
-    -308,  -308,  -308,  -308,   247,  -308,  -308,  -308,  1538,   845,
-    -308,    90,  1538,  -308,     9,   -82,    68,  1599,  1349,  -308,
-     138,  1538,  -308,  1538,  1538,  -308,  1538,  -308,   166,   171,
-    -308,   166,   171,  1538,  1538,  -308,  -308,   267,   219,   221,
-     166,  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,   104,   104,   104,  1788,  -308,
-     149,   -62,   276,  -308,    96,    96,  -308,  -308,   719,  -308,
-    1849,  -308,   154,   278,  1663,  -308,   156,   971,  -308,  -308,
-    -308,  -308,  -308,  -308,   845,  -308,   161,   -69,   282,   167,
-     195,  -308,  1469,    88,  -308,  -308,   169,  1349,  -308,   -55,
-    -308,  -308,   190,    63,   204,   231,   -24,    86,    74,   178,
-      18,   292,    18,   187,   204,  1538,  -308,  -308,  1469,  -308,
-    -308,  -308,  1538,   213,   188,  -308,  -308,   185,  -308,    61,
-      63,  -308,  -308,   166,    11,  -308,    62,  1469,  1538,  -308,
-    -308,   191,  -308,  -308,  1538,  -308,  -308,  1538,  1469,     9,
-    -308,    18,   194,  -308,   220,  -308,  -308,  1971,  -308,    76,
-     182,   136,  -308,  -308,  -308,  -308,  -308,  -308,  -308,  -308,
-    -308,  -308,   224,   197,   282,  -308,   202,   199,  -308,  -308,
-      62,  -308,   265,  -308,    92,  -308,   203,  -308,   205,   220,
-    -308,    18,   394,  -308,  -308,  -308,  1538,   235,   207,   136,
-    -308,  -308,  -308,  1349,  -308,  -308,   336,  -308,  -308,  1469,
-    -308,  1469,   166,  1097,  -308,   337,  -308,   316,   216,   529,
-    -308,  1910,  1349,  -308,  -308,  -308,   218,  1349,   166,  -308,
-    -308,   225,  -308,  -308,    66,   222,  1223,  -308,  -308,  -308,
-    -308,    -5,  -308,  -308,  1349,  -308,  -308,   223,   226,  -308,
-    -308,  -308,   345,  -308,  -308,  -308,  1349,   239,   249,   238,
-       9,  1349,  -308,   246,   250,   166,  -308,  -308
+    1674,   -70,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,
+     -15,   -72,  -403,   -52,    19,  -403,  -403,  -403,    80,  -403,
+    2094,  -403,    99,  -403,  2164,  -403,   -16,    42,    -5,  -403,
+    -403,  -403,  -403,    -1,     5,  -403,  -403,  2094,    13,  2094,
+    2094,  2094,  -403,  2094,  2094,  2094,  2094,  2094,   634,   123,
+     128,  -403,   504,  -403,  -403,  -403,     8,  -403,  2024,  -403,
+    -403,  -403,  -403,  -403,  -403,  1926,  -403,  -403,  -403,   240,
+     361,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,
+      38,  -403,  2569,  -403,  -403,  -403,  -403,   137,    20,  -403,
+    -403,  1926,  -403,  -403,  -403,  -403,  -403,  -403,   -87,    42,
+    -403,   -67,  -403,    21,   -48,  2094,    79,  -403,  2094,  -403,
+    2094,   138,   -48,  -403,    43,  2569,    76,   107,   -48,   -48,
+     604,   -48,   -48,   -29,    84,   110,  2094,  -403,   210,   211,
+    2094,  2094,   211,   212,  -403,  -403,   764,  -403,  -403,    85,
+    -403,  -403,  -403,  -403,   209,  -403,  -403,  -403,  -403,  1024,
+     158,   232,  -403,   139,   171,  -403,   141,  -403,   238,    12,
+     239,  -403,   247,  -403,  -403,  -403,  -403,  2094,  2094,  2094,
+    2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,
+    2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,
+    -403,  -403,   249,  2094,  2094,  2094,  2094,  2094,  2094,  2094,
+    2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,  2094,
+      11,  -403,  -403,  2094,   229,  2094,  1154,  -403,    42,   133,
+     135,  -403,  -403,  -403,   142,    15,   -10,    90,  2189,  1800,
+     130,  -403,  2094,  2094,  -403,  2094,  -403,  -403,  -403,  -403,
+    -403,   161,   169,  -403,    38,    38,   169,  -403,  -403,  -403,
+    1926,   149,   161,  2094,  2094,  -403,   168,  -403,  -403,   280,
+     231,   233,   286,  2569,  1016,   496,   496,   496,   322,   322,
+     322,   322,  1016,  1016,  2569,  2569,  2569,  2569,  2569,  2569,
+    2569,  2569,  2569,  2569,  2630,  2691,  -403,   368,   368,   368,
+    2569,  2386,  2752,  2813,  2874,  1016,  1016,   604,   604,   -48,
+     -48,   -48,   157,  2447,   202,  2094,   291,    14,   173,  2260,
+    -403,   165,  1284,  -403,  -403,   172,  -403,  -403,  -403,  -403,
+    1154,  -403,    42,  2094,  -403,   -43,   296,   167,   201,  -403,
+    -403,  -403,   175,  -403,   174,  1800,  -403,    44,  -403,   200,
+      63,   207,   211,   894,  -403,   -27,   -11,    46,   113,   189,
+      42,   298,    42,   190,   161,   217,  -403,  2094,  -403,  -403,
+     315,  2323,  -403,  1926,  2094,   193,  -403,  -403,  1154,   192,
+     194,    75,    63,  -403,  -403,   161,    26,    96,  1926,  2094,
+    -403,  -403,  -403,  -403,  2094,  -403,  -403,  -403,  2094,  1926,
+    -403,  -403,    15,  -403,    42,   199,  -403,   230,  -403,   207,
+     286,  2569,  -403,  -403,  -403,   103,    24,   197,  -403,  -403,
+    -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,
+     234,   205,   296,  -403,   206,   213,  -403,  -403,    96,  -403,
+     268,  -403,  -403,   204,  -403,   215,   230,  -403,    42,   208,
+    -403,  -403,  -403,  2094,   236,   214,    24,  -403,  -403,  -403,
+    -403,  -403,  -403,  -403,   335,  -403,  -403,  1926,  -403,  1926,
+     161,  1414,  -403,   339,  -403,   316,   219,   227,  -403,  2508,
+    1800,  -403,  -403,  -403,  1800,  1800,   161,  -403,  -403,   223,
+    -403,  -403,   226,   250,   221,  1544,  -403,  -403,  -403,  -403,
+      12,  -403,  -403,  1800,  -403,   222,   224,   225,  -403,  1414,
+    -403,  -403,   354,  -403,  -403,  -403,  -403,  1800,   228,   241,
+     235,   243,  -403,    15,  1800,  -403,   244,   246,   161,  -403,
+    -403
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -308,  -308,  -308,  -308,   328,    85,  -308,    93,  -209,   196,
-       1,   -76,  -244,    16,    59,   332,   268,    77,  -308,  -308,
-    -308,  -308,  -308,  -308,  -308,  -308,  -308,  -308,  -308,  -308,
-    -308,  -308,  -308,  -308,   -15,   -11,  -308,  -308,    15,  -308,
-      17,  -308,  -308,  -308,  -308,  -308,  -308,  -308,  -193,    19,
-    -308,  -308,  -308,  -308,     0,  -308,   335,  -308,  -308,  -308,
-      31,  -308,    39,  -308,  -308,  -308,   -40,  -308,  -308,   -21,
-    -308,     2,    27,  -308,  -307,  -308,  -271,   -41,     3,  -308,
-    -308,  -308,   398,  -308,   -20,    60,    78,  -184,  -308,   -93,
-    -308,  -308,  -308,  -308,  -308,   -26,   -17,   -46,   -18,  -308,
-    -308,  -308,  -308,  -308,  -308
+    -403,  -403,   218,  -403,   312,  -299,  -403,    61,  -402,   -31,
+       1,   -55,   -85,    48,     2,   -23,   321,   251,    58,  -403,
+    -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,
+    -403,  -403,  -403,  -403,  -403,   -62,   -60,  -403,  -403,   -40,
+    -403,   -36,  -403,  -403,  -403,  -403,  -403,  -403,  -403,  -403,
+       6,    50,  -403,  -403,  -403,  -403,     0,  -403,   331,  -403,
+    -403,  -403,    49,  -403,    51,  -403,   -96,  -403,   -80,  -403,
+    -403,   -61,  -403,     3,  -403,  -403,     7,     9,  -403,  -376,
+    -403,  -311,   -79,     4,  -403,  -403,  -403,  -403,  -403,   388,
+     -91,    25,    52,  -239,  -403,   -98,  -403,  -403,  -403,  -403,
+    -403,  -403,  -403,   -34,    -9,   -49,   -13,  -403,  -403,  -403,
+    -403,  -403,  -403,  -403
 };
 
 /* 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 -205
+#define YYTABLE_NINF -155
 static const yytype_int16 yytable[] =
 {
-      63,    50,    68,    69,    93,    99,   188,   127,   295,   135,
-     210,    79,   297,   295,   297,   135,    51,   104,   115,   106,
-     107,    95,   108,   109,   110,   114,   114,   342,   118,   225,
-     339,    66,    88,    89,   340,   135,    85,   316,    84,    67,
-      81,   217,   135,   -66,    96,   226,   324,   302,    63,    50,
-      68,    69,   398,    85,    83,     1,     2,     3,   345,     4,
-       5,     6,     7,     8,    51,   373,    95,   328,   374,   375,
-     376,   303,   377,   385,   347,   354,    18,   205,    20,    66,
-      21,    85,   207,   270,   368,   114,    85,    67,    80,   386,
-     200,   201,   128,    84,   387,   303,    27,   130,   349,   298,
-      91,   384,   119,   392,    32,   378,    33,    34,    85,   296,
-      85,   132,    94,   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,   100,   473,   274,   275,   105,   102,   280,   406,
-     103,   135,    43,   135,    44,   439,   350,   440,    45,   101,
-     284,   304,   357,   135,   114,   404,   405,   310,   311,   209,
-     312,   157,   158,   135,   309,   114,   114,   407,   114,    63,
-      50,   295,   331,   358,   436,   403,   317,   318,   177,   202,
-     204,  -104,   206,   213,   121,     2,     3,   214,     4,     5,
-       6,     7,     8,   455,   174,   216,   188,   175,   457,   212,
-     176,   331,   -67,   215,   218,    18,   221,    20,   441,    21,
-     223,   224,   122,   228,   229,   463,    22,   230,   269,   272,
-     157,   158,   188,    26,   458,    27,   123,   469,   273,   276,
-     281,   282,   474,    32,   283,    33,    34,   308,   315,   313,
-     319,   188,   320,    35,   322,   171,   172,   173,   327,   329,
-     332,   333,   188,   174,   335,   297,   175,    63,    50,   176,
-     338,   477,   344,   348,    63,    50,   343,   346,    37,    38,
-     360,   128,   363,   354,   359,   129,   130,   367,   361,   365,
-     371,   396,   370,   372,   394,   369,   400,   401,   131,   413,
-     132,    40,   393,   339,   415,   416,    41,    42,   395,   419,
-     114,    43,   421,    44,   422,   433,   114,    45,   432,   438,
-     450,   363,   451,   188,   452,   188,   456,   459,   467,    -3,
-     460,   464,     1,     2,     3,   465,     4,     5,     6,     7,
-       8,     9,    10,    11,    12,   470,   472,    13,    14,    15,
-      16,   471,    17,    18,    19,   475,   120,    21,   476,   337,
-     336,   424,   278,   366,    22,   124,    23,    24,   431,    25,
-     219,    26,   356,    27,   434,    28,    29,    30,   435,   134,
-      31,    32,   427,    33,    34,   417,   461,   418,   453,   412,
-     462,    35,    36,    14,    15,    16,    90,    17,   382,    19,
-       0,   399,     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,
+      69,    54,    56,    74,    75,   114,   214,   101,   223,   155,
+     156,   104,   230,   345,   304,   374,   435,   136,   325,    87,
+      97,   369,    93,    94,   112,   192,   115,   118,   119,   325,
+     120,   121,   122,    97,   115,    88,   156,   123,    95,   217,
+     218,   -70,   190,   191,   192,    93,    94,   257,    55,    72,
+      90,    73,    69,    54,    56,    74,    75,   209,   443,   371,
+     210,    95,   372,   258,    98,   423,    93,    94,   494,   407,
+      92,   167,   495,   496,   208,   384,   209,   106,   410,   210,
+     411,   249,    95,   412,   413,   414,   444,   415,   388,   167,
+     167,   503,   239,    93,    94,   228,   226,   115,    99,   380,
+      55,    72,   102,    73,   236,   511,   105,    89,   326,    95,
+     302,   452,   517,   115,   167,   399,   390,   108,   391,   422,
+     416,   244,   245,   330,   424,   109,   146,   110,   147,   425,
+     417,   418,   111,   305,   149,   113,   421,   516,   167,   306,
+     211,   231,   212,   225,   167,    96,   167,   363,   233,    69,
+      54,    56,    74,    75,   263,   264,   265,   266,   267,   268,
+     269,   270,   271,   272,   273,   274,   275,   276,   277,   278,
+     279,   280,   281,   282,   283,   284,   285,   378,   381,   389,
+     287,   288,   289,   290,   291,   292,   293,   294,   295,   296,
+     297,   298,   299,   300,   301,   115,   303,    55,    72,   338,
+      73,   339,   309,   167,   307,   331,   227,   235,   234,   237,
+     238,   250,     2,   240,   241,   247,    69,    54,   315,   343,
+     115,   479,   115,   337,   321,   370,   -71,   158,    15,    16,
+      17,     2,    19,   332,    21,   252,   442,   497,   253,   254,
+     255,   256,   260,   308,   346,   347,    25,    15,    16,    17,
+     261,    19,   286,    21,   463,    30,    31,    32,   158,   393,
+    -113,   396,   322,   336,   323,    25,   340,   159,   158,   342,
+     348,   160,   161,   463,    30,    31,    32,   159,   404,   520,
+     249,   344,   161,   349,   162,   350,   163,   352,   249,   354,
+     358,   360,   361,   430,   362,   364,   163,   366,   368,   325,
+     375,   376,  -112,   396,   434,   379,   377,   464,   156,   384,
+     115,   392,    69,    54,   315,   394,   398,   400,   402,   406,
+      69,    54,   315,   156,   408,   437,   464,   409,   332,   449,
+     438,   451,   453,   457,   156,   454,   371,   459,   476,   433,
+    -153,   470,   489,   490,   401,   431,   471,   462,   460,   498,
+     432,   491,   499,   500,   504,   405,   505,   509,   506,  -154,
+     512,   514,   168,   513,   148,     2,   115,   251,    69,    54,
+     315,   115,   477,   367,   478,   515,   440,   518,   519,   152,
+     242,    15,    16,    17,   472,    19,   473,    21,   455,   169,
+     170,   171,   456,  -155,  -155,  -155,  -155,   176,   177,    25,
+     386,   166,   156,   508,   156,   501,   492,   441,    30,    31,
+      32,   502,   190,   191,   192,   107,   193,   194,   195,   436,
+       0,     0,     0,     0,   420,     0,     0,     0,     0,   450,
+     469,   201,   202,     0,   203,   204,   205,   206,   207,   465,
+       0,     0,     0,     0,   208,     0,   209,     0,     0,   210,
+       0,     0,     0,     0,     0,     0,     0,     0,   190,   191,
+     192,   483,   481,   482,   487,   488,     0,   465,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     203,   204,   205,   206,   207,   483,   481,   482,   487,   488,
+     208,     0,   209,     0,     0,   210,     0,     0,     0,   483,
+     481,   482,   487,   488,    -4,     0,     0,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,    14,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,   168,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,  -155,  -155,  -155,     0,    37,    38,     0,
+       0,   176,   177,     0,    39,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   190,   191,   192,     0,
+     193,   194,   195,     0,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,    42,     0,   201,   202,     0,   203,   204,
+     205,   206,   207,     0,     0,     0,    43,     0,   208,     0,
+     209,    44,    45,   210,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,    -4,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,    22,     0,    23,   128,     0,   129,     0,     0,     0,
+      24,   130,    25,    26,     0,    27,   131,    28,     0,    29,
+     132,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,   190,   191,   192,    37,    38,     0,
+     133,     0,     0,     0,    39,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   205,   206,
+     207,     0,     0,     0,    40,    41,   208,     0,   209,     0,
+       0,   210,     0,   134,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,   135,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,    22,     0,    23,   128,     0,   129,     0,     0,     0,
+      24,   130,    25,    26,     0,    27,   131,    28,     0,    29,
+     132,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+     133,     0,     0,     0,    39,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,   134,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,   248,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,    22,     0,    23,   128,     0,   129,     0,     0,     0,
+      24,   130,    25,    26,     0,    27,   131,    28,     0,    29,
+     132,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+     133,     0,     0,     0,    39,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,   134,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,   387,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,    14,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,  -155,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+       0,  -155,  -155,     0,    39,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   190,   191,   192,     0,
+     193,   194,   195,     0,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,    42,     0,  -155,  -155,     0,   203,   204,
+     205,   206,   207,     0,     0,     0,    43,     0,   208,     0,
+     209,    44,    45,   210,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,    -3,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,     0,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+       0,     0,     0,     0,    39,     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,   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,
+       0,     0,     0,     0,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,   310,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,   -15,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,     0,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+       0,     0,     0,     0,    39,     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,     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,  -205,  -205,  -205,     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,  -205,     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,  -205,  -205,     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,  -205,
-    -205,     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,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,   310,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,   -16,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,     0,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+       0,     0,     0,     0,    39,     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,   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,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,   480,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,     0,     0,  -144,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,     0,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+       0,     0,     0,     0,    39,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,   480,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     0,    -3,     0,  -145,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,    14,    15,    16,    17,    18,    19,    20,
+      21,     0,     0,    23,     0,     0,     0,     0,     0,     0,
+      24,     0,    25,    26,     0,    27,     0,    28,     0,    29,
+       0,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
+       0,     0,     0,     0,    39,     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,    40,    41,     0,     0,     0,     0,
+       0,     0,     0,    42,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,     0,
+       0,    44,    45,     0,     0,     0,    46,     0,    47,     0,
+      48,     0,    49,     1,     2,     3,     4,     0,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,     0,  -120,     0,
+      15,    16,    17,    18,    19,    20,    21,    22,     0,    23,
+     128,     0,   129,     0,     0,     0,    24,   130,    25,    26,
+       0,    27,   131,    28,     0,    29,   132,    30,    31,    32,
+       0,     0,    33,    34,     0,    35,    36,     0,     0,     0,
+       0,     0,     0,    37,    38,     0,   133,     0,     0,     0,
+      39,     0,     0,     0,     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,
+      40,    41,     0,     0,     0,     0,     0,     0,     0,   134,
        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,    43,     0,     0,     0,     0,    44,    45,     0,
+       0,     0,    46,     0,    47,     0,    48,     0,    49,     1,
+       2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,     0,     0,     0,    15,    16,    17,    18,
+      19,    20,    21,    22,     0,    23,   128,     0,   129,     0,
+       0,     0,    24,   130,    25,    26,     0,    27,   131,    28,
+       0,    29,   132,    30,    31,    32,     0,     0,    33,    34,
+       0,    35,    36,     0,     0,     0,     0,     0,     0,    37,
+      38,     0,   133,     0,     0,     0,    39,     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,  -204,   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,     0,     0,     0,     0,    40,    41,     0,     0,
+       0,     0,     0,     0,     0,   134,     0,   150,     0,     3,
+       4,     0,     5,     6,     7,     8,     9,     0,    43,     0,
+       0,     0,     0,    44,    45,     0,     0,     0,    46,    20,
+      47,    22,    48,    23,    49,     0,   129,     0,     0,     0,
+      24,     0,     0,     0,     0,     0,     0,    28,     0,    29,
+     151,     0,     0,     0,     0,     0,     0,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,     0,     0,
+       0,     0,     0,     0,    39,     0,     0,   100,     0,     3,
+       4,     0,     5,     6,     7,     8,     9,     0,     0,     0,
+       0,     0,     0,     0,    40,    41,     0,     0,     0,    20,
+       0,    22,     0,    23,     0,     0,     0,     0,     0,     0,
+      24,     0,     0,     0,     0,     0,    43,    28,     0,    29,
+       0,    44,    45,     0,     0,     0,    46,    34,    47,    35,
+      36,     0,    49,     0,     0,     0,     0,    37,     0,     0,
+       0,     0,     0,     0,    39,     0,     0,   100,     0,     3,
+       4,     0,     5,     6,     7,     8,     9,     0,     0,     0,
+       0,     0,     0,     0,    40,    41,     0,     0,     0,    20,
+       0,    22,     0,    23,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    43,     0,     0,    29,
+       0,    44,    45,     0,     0,     0,    46,    34,    47,    35,
+      36,     0,    49,     0,     0,     0,     0,     0,     0,   168,
+       0,     0,     0,     0,    39,     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,     0,     0,     0,    40,    41,   169,   170,   171,     0,
+     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
+     182,   183,   184,   185,   186,   187,   188,   189,     0,   190,
+     191,   192,     0,   193,   194,   195,    46,     0,    47,     0,
+       0,   196,    49,   197,     0,   198,   199,   200,   201,   202,
+     168,   203,   204,   205,   206,   207,     0,     0,     0,     0,
+       0,   208,     0,   209,     0,     0,   210,     0,     0,     0,
+       0,     0,   333,     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,     0,
+     190,   191,   192,     0,   193,   194,   195,     0,     0,     0,
+       0,     0,   196,   168,   197,     0,   198,   199,   200,   201,
+     202,     0,   203,   204,   205,   206,   207,     0,     0,     0,
+       0,     0,   208,     0,   209,     0,     0,   210,     0,     0,
+     169,   170,   171,   365,   172,   173,   174,   175,   176,   177,
+     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
+     188,   189,     0,   190,   191,   192,     0,   193,   194,   195,
+       0,     0,     0,     0,     0,   196,   168,   197,     0,   198,
+     199,   200,   201,   202,     0,   203,   204,   205,   206,   207,
+       0,     0,     0,     0,     0,   208,     0,   209,     0,     0,
+     210,     0,     0,   169,   170,   171,   403,   172,   173,   174,
+     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
+     185,   186,   187,   188,   189,     0,   190,   191,   192,     0,
+     193,   194,   195,     0,     0,     0,     0,   168,   196,     0,
+     197,   357,   198,   199,   200,   201,   202,     0,   203,   204,
+     205,   206,   207,     0,     0,     0,     0,     0,   208,     0,
+     209,     0,     0,   210,   169,   170,   171,     0,   172,   173,
+     174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
+     184,   185,   186,   187,   188,   189,     0,   190,   191,   192,
+       0,   193,   194,   195,     0,     0,     0,     0,   168,   196,
+       0,   197,     0,   198,   199,   200,   201,   202,     0,   203,
+     204,   205,   206,   207,     0,     0,     0,     0,     0,   208,
+       0,   209,   359,     0,   210,   169,   170,   171,     0,   172,
+     173,   174,   175,   176,   177,   178,   179,   180,   181,   182,
+     183,   184,   185,   186,   187,   188,   189,     0,   190,   191,
+     192,     0,   193,   194,   195,     0,     0,     0,     0,   168,
+     196,     0,   197,   493,   198,   199,   200,   201,   202,     0,
+     203,   204,   205,   206,   207,     0,     0,     0,     0,     0,
+     208,     0,   209,     0,     0,   210,   169,   170,   171,     0,
+     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
+     182,   183,   184,   185,   186,   187,   188,   189,     0,   190,
+     191,   192,     0,   193,   194,   195,     0,     0,     0,     0,
+     168,   196,     0,   197,     0,   198,   199,   200,   201,   202,
+       0,   203,   204,   205,   206,   207,     0,     0,     0,     0,
+       0,   208,     0,   209,     0,     0,   210,   169,   170,   171,
+       0,   172,   173,   174,   175,   176,   177,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   189,     0,
+     190,   191,   192,     0,   193,   194,   195,     0,     0,     0,
+       0,   168,     0,     0,     0,     0,   198,   199,   200,   201,
+     202,     0,   203,   204,   205,   206,   207,     0,     0,     0,
+       0,     0,   208,     0,   209,     0,     0,   210,   169,   170,
+     171,     0,   172,   173,   174,   175,   176,   177,     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,   190,   191,   192,     0,   193,   194,   195,     0,     0,
+       0,     0,   168,     0,     0,     0,     0,   198,   199,   200,
+     201,   202,     0,   203,   204,   205,   206,   207,     0,     0,
+       0,     0,     0,   208,     0,   209,     0,     0,   210,   169,
+     170,   171,     0,   172,   173,   174,   175,   176,   177,     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,  -205,   167,   168,     0,   169,   170,   171,   172,
-     173,     0,     0,     0,     0,     0,   174,     0,     0,   175,
-       0,     0,   176,   137,   138,   139,  -205,  -205,  -205,  -205,
-     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,     0,   190,   191,   192,     0,   193,   194,   195,     0,
+       0,     0,     0,   168,     0,     0,     0,     0,     0,   199,
+     200,   201,   202,     0,   203,   204,   205,   206,   207,     0,
+       0,     0,     0,     0,   208,     0,   209,     0,     0,   210,
+     169,   170,   171,     0,   172,   173,   174,   175,   176,   177,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   190,   191,   192,     0,   193,   194,   195,
+       0,     0,     0,     0,   168,     0,     0,     0,     0,     0,
+       0,   200,   201,   202,     0,   203,   204,   205,   206,   207,
+       0,     0,     0,     0,     0,   208,     0,   209,     0,     0,
+     210,   169,   170,   171,     0,   172,   173,   174,   175,   176,
+     177,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   190,   191,   192,     0,   193,   194,
+     195,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  -155,   201,   202,     0,   203,   204,   205,   206,
+     207,     0,     0,     0,     0,     0,   208,     0,   209,     0,
+       0,   210
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,     0,     0,     0,    22,    25,    82,    53,   201,    97,
-     103,    49,     3,   206,     3,    97,     0,    35,    44,    37,
-      38,     3,    40,    41,    42,    43,    44,   298,    45,    34,
-      99,     0,    13,     3,   103,    97,    18,   221,     3,     0,
-     126,   129,    97,    67,    25,    50,   230,   129,    48,    48,
-      48,    48,   359,    18,   126,     3,     4,     5,   302,     7,
-       8,     9,    10,    11,    48,     4,     3,   129,     7,     8,
-       9,     3,    11,   344,   129,    99,    24,    94,    26,    48,
-      28,    18,   100,   176,   328,   103,    18,    48,   126,    27,
-     122,   123,    26,     3,    32,     3,    44,    31,    35,    90,
-       3,    90,     0,   347,    52,    44,    54,    55,    18,   202,
-      18,    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,   126,   470,   181,   182,   126,   123,   186,    33,
-     126,    97,   120,    97,   122,   419,   113,   421,   126,   122,
-     198,   113,    96,    97,   202,     3,     4,   213,   214,     3,
-     216,    87,    88,    97,   211,   213,   214,    61,   216,   199,
-     199,   394,   278,   129,   413,   129,   223,   224,   126,   126,
-     126,   123,   123,    97,     3,     4,     5,   103,     7,     8,
-       9,    10,    11,   432,   120,    97,   302,   123,   437,   121,
-     126,   307,    67,   128,     3,    24,     3,    26,   422,    28,
-      96,    67,    31,     3,     3,   454,    35,     3,     3,    17,
-      87,    88,   328,    42,   438,    44,    45,   466,     3,     3,
-      96,    13,   471,    52,    17,    54,    55,   129,    97,   103,
-       3,   347,    53,    62,    53,   112,   113,   114,   129,     3,
-     126,     3,   358,   120,   128,     3,   123,   287,   287,   126,
-     129,   475,    97,   103,   294,   294,   129,   128,    87,    88,
-     320,    26,   322,    99,   126,    30,    31,   325,    16,   122,
-     122,   357,    99,   128,   123,   332,   122,    97,    43,   122,
-      45,   110,   348,    99,   122,   126,   115,   116,   354,    64,
-     348,   120,   129,   122,   129,   128,   354,   126,   103,     3,
-       3,   361,    26,   419,   128,   421,   128,   122,     3,     0,
-     128,   128,     3,     4,     5,   129,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,   126,   128,    18,    19,    20,
-      21,   122,    23,    24,    25,   129,    48,    28,   128,   294,
-     287,   401,   186,   324,    35,    53,    37,    38,   406,    40,
-     122,    42,   315,    44,   409,    46,    47,    48,   409,    64,
-      51,    52,   402,    54,    55,   390,   446,   390,   429,   382,
-     451,    62,    63,    19,    20,    21,    18,    23,   340,    25,
-      -1,   361,    -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,    39,    91,    20,    99,    58,
+      65,    24,   110,   252,     3,   326,   392,    48,     3,    89,
+      14,   320,     3,     4,    37,    92,    39,    40,    41,     3,
+      43,    44,    45,    27,    47,    50,    91,    46,    19,   126,
+     127,    68,    90,    91,    92,     3,     4,    35,     0,     0,
+     122,     0,    52,    52,    52,    52,    52,   124,    34,   102,
+     127,    19,   105,    51,    14,   376,     3,     4,   470,   368,
+     122,   100,   474,   475,   122,   102,   124,    27,     3,   127,
+       5,   136,    19,     8,     9,    10,    62,    12,    99,   100,
+     100,   493,   126,     3,     4,   108,   105,   110,    18,    36,
+      52,    52,     3,    52,   133,   507,   122,   122,    93,    19,
+     208,   422,   514,   126,   100,   354,     3,   122,     5,    93,
+      45,   130,   131,   133,    28,   126,     3,   122,     0,    33,
+      55,    56,   127,   122,   126,   122,   375,   513,   100,   128,
+       3,     3,   122,   122,   100,   126,   100,   133,   105,   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,   133,   115,   133,
+     193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
+     203,   204,   205,   206,   207,   208,   209,   149,   149,   233,
+     149,   235,   215,   100,   213,   115,   127,   100,   132,   125,
+     100,   126,     4,     3,     3,     3,   216,   216,   216,   250,
+     233,   460,   235,   232,   218,   323,    68,    18,    20,    21,
+      22,     4,    24,   227,    26,     3,   133,   476,    99,    68,
+      99,     3,     3,    14,   253,   254,    38,    20,    21,    22,
+       3,    24,     3,    26,    46,    47,    48,    49,    18,   350,
+     127,   352,   127,   133,   122,    38,   105,    27,    18,   100,
+     102,    31,    32,    46,    47,    48,    49,    27,   363,   518,
+     335,   132,    32,     3,    44,    54,    46,    54,   343,     3,
+     133,    89,   305,   378,     3,   122,    46,   132,   126,     3,
+     133,   100,   127,   394,   389,   105,   132,    99,   363,   102,
+     323,   122,   312,   312,   312,    17,   126,   100,     3,   126,
+     320,   320,   320,   378,   132,   126,    99,   133,   322,   132,
+     100,   126,   126,    65,   389,   122,   102,   133,     3,   388,
+     132,   105,     3,    27,   357,   379,   132,   438,   133,   126,
+     384,   132,   126,   132,   132,   364,   132,     3,   133,   132,
+     132,   126,    40,   122,    52,     4,   379,   149,   368,   368,
+     368,   384,   457,   312,   459,   132,   399,   133,   132,    58,
+     129,    20,    21,    22,   446,    24,   446,    26,   428,    67,
+      68,    69,   428,    71,    72,    73,    74,    75,    76,    38,
+     342,    70,   457,   499,   459,   485,   467,   400,    47,    48,
+      49,   490,    90,    91,    92,    27,    94,    95,    96,   394,
+      -1,    -1,    -1,    -1,   372,    -1,    -1,    -1,    -1,   420,
+     443,   109,   110,    -1,   112,   113,   114,   115,   116,   439,
+      -1,    -1,    -1,    -1,   122,    -1,   124,    -1,    -1,   127,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    90,    91,
+      92,   461,   461,   461,   461,   461,    -1,   467,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     112,   113,   114,   115,   116,   485,   485,   485,   485,   485,
+     122,    -1,   124,    -1,    -1,   127,    -1,    -1,    -1,   499,
+     499,   499,   499,   499,     0,    -1,    -1,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    19,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    40,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    67,    68,    69,    -1,    63,    64,    -1,
+      -1,    75,    76,    -1,    70,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    90,    91,    92,    -1,
+      94,    95,    96,    -1,    90,    91,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    99,    -1,   109,   110,    -1,   112,   113,
+     114,   115,   116,    -1,    -1,    -1,   112,    -1,   122,    -1,
+     124,   117,   118,   127,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    27,    -1,    29,    30,    -1,    32,    -1,    -1,    -1,
+      36,    37,    38,    39,    -1,    41,    42,    43,    -1,    45,
+      46,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    90,    91,    92,    63,    64,    -1,
+      66,    -1,    -1,    -1,    70,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   114,   115,
+     116,    -1,    -1,    -1,    90,    91,   122,    -1,   124,    -1,
+      -1,   127,    -1,    99,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    27,    -1,    29,    30,    -1,    32,    -1,    -1,    -1,
+      36,    37,    38,    39,    -1,    41,    42,    43,    -1,    45,
+      46,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      66,    -1,    -1,    -1,    70,    -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,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    27,    -1,    29,    30,    -1,    32,    -1,    -1,    -1,
+      36,    37,    38,    39,    -1,    41,    42,    43,    -1,    45,
+      46,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      66,    -1,    -1,    -1,    70,    -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,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    19,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    40,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      -1,    75,    76,    -1,    70,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    90,    91,    92,    -1,
+      94,    95,    96,    -1,    90,    91,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    99,    -1,   109,   110,    -1,   112,   113,
+     114,   115,   116,    -1,    -1,    -1,   112,    -1,   122,    -1,
+     124,   117,   118,   127,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      -1,    -1,    -1,    -1,    70,    -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,    -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,    -1,    -1,    -1,    90,    91,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    99,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      -1,    -1,    -1,    -1,    70,    -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,    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,
-      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,
+      -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,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      -1,    -1,    -1,    -1,    70,    -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,
-      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,    90,    91,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    99,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,    -1,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      -1,    -1,    -1,    -1,    70,    -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,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,    -1,     0,    -1,   132,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    -1,    -1,    19,    20,    21,    22,    23,    24,    25,
+      26,    -1,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      36,    -1,    38,    39,    -1,    41,    -1,    43,    -1,    45,
+      -1,    47,    48,    49,    -1,    -1,    52,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    -1,
+      -1,    -1,    -1,    -1,    70,    -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,    90,    91,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    99,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,
+      -1,   117,   118,    -1,    -1,    -1,   122,    -1,   124,    -1,
+     126,    -1,   128,     3,     4,     5,     6,    -1,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    -1,    18,    -1,
+      20,    21,    22,    23,    24,    25,    26,    27,    -1,    29,
+      30,    -1,    32,    -1,    -1,    -1,    36,    37,    38,    39,
+      -1,    41,    42,    43,    -1,    45,    46,    47,    48,    49,
+      -1,    -1,    52,    53,    -1,    55,    56,    -1,    -1,    -1,
+      -1,    -1,    -1,    63,    64,    -1,    66,    -1,    -1,    -1,
+      70,    -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,
+      90,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    99,
       -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,   112,    -1,    -1,    -1,    -1,   117,   118,    -1,
+      -1,    -1,   122,    -1,   124,    -1,   126,    -1,   128,     3,
+       4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    -1,    -1,    -1,    20,    21,    22,    23,
+      24,    25,    26,    27,    -1,    29,    30,    -1,    32,    -1,
+      -1,    -1,    36,    37,    38,    39,    -1,    41,    42,    43,
+      -1,    45,    46,    47,    48,    49,    -1,    -1,    52,    53,
+      -1,    55,    56,    -1,    -1,    -1,    -1,    -1,    -1,    63,
+      64,    -1,    66,    -1,    -1,    -1,    70,    -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,
+      -1,    -1,    -1,    -1,    -1,    -1,    90,    91,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    99,    -1,     3,    -1,     5,
+       6,    -1,     8,     9,    10,    11,    12,    -1,   112,    -1,
+      -1,    -1,    -1,   117,   118,    -1,    -1,    -1,   122,    25,
+     124,    27,   126,    29,   128,    -1,    32,    -1,    -1,    -1,
+      36,    -1,    -1,    -1,    -1,    -1,    -1,    43,    -1,    45,
+      46,    -1,    -1,    -1,    -1,    -1,    -1,    53,    -1,    55,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,
+      -1,    -1,    -1,    -1,    70,    -1,    -1,     3,    -1,     5,
+       6,    -1,     8,     9,    10,    11,    12,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    90,    91,    -1,    -1,    -1,    25,
+      -1,    27,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      36,    -1,    -1,    -1,    -1,    -1,   112,    43,    -1,    45,
+      -1,   117,   118,    -1,    -1,    -1,   122,    53,   124,    55,
+      56,    -1,   128,    -1,    -1,    -1,    -1,    63,    -1,    -1,
+      -1,    -1,    -1,    -1,    70,    -1,    -1,     3,    -1,     5,
+       6,    -1,     8,     9,    10,    11,    12,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    90,    91,    -1,    -1,    -1,    25,
+      -1,    27,    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    45,
+      -1,   117,   118,    -1,    -1,    -1,   122,    53,   124,    55,
+      56,    -1,   128,    -1,    -1,    -1,    -1,    -1,    -1,    40,
+      -1,    -1,    -1,    -1,    70,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    90,    91,    67,    68,    69,    -1,
       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,
+      81,    82,    83,    84,    85,    86,    87,    88,    -1,    90,
+      91,    92,    -1,    94,    95,    96,   122,    -1,   124,    -1,
+      -1,   102,   128,   104,    -1,   106,   107,   108,   109,   110,
+      40,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
+      -1,   122,    -1,   124,    -1,    -1,   127,    -1,    -1,    -1,
+      -1,    -1,   133,    -1,    -1,    -1,    -1,    67,    68,    69,
+      -1,    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,
+      -1,    -1,   102,    40,   104,    -1,   106,   107,   108,   109,
+     110,    -1,   112,   113,   114,   115,   116,    -1,    -1,    -1,
+      -1,    -1,   122,    -1,   124,    -1,    -1,   127,    -1,    -1,
+      67,    68,    69,   133,    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,    -1,    -1,   102,    40,   104,    -1,   106,
+     107,   108,   109,   110,    -1,   112,   113,   114,   115,   116,
+      -1,    -1,    -1,    -1,    -1,   122,    -1,   124,    -1,    -1,
+     127,    -1,    -1,    67,    68,    69,   133,    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,    -1,    40,   102,    -1,
+     104,   105,   106,   107,   108,   109,   110,    -1,   112,   113,
+     114,   115,   116,    -1,    -1,    -1,    -1,    -1,   122,    -1,
+     124,    -1,    -1,   127,    67,    68,    69,    -1,    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,    40,   102,
+      -1,   104,    -1,   106,   107,   108,   109,   110,    -1,   112,
+     113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,   122,
+      -1,   124,   125,    -1,   127,    67,    68,    69,    -1,    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,    40,
+     102,    -1,   104,   105,   106,   107,   108,   109,   110,    -1,
+     112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,
+     122,    -1,   124,    -1,    -1,   127,    67,    68,    69,    -1,
       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,   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,
+      81,    82,    83,    84,    85,    86,    87,    88,    -1,    90,
+      91,    92,    -1,    94,    95,    96,    -1,    -1,    -1,    -1,
+      40,   102,    -1,   104,    -1,   106,   107,   108,   109,   110,
+      -1,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
+      -1,   122,    -1,   124,    -1,    -1,   127,    67,    68,    69,
+      -1,    71,    72,    73,    74,    75,    76,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,    -1,
+      90,    91,    92,    -1,    94,    95,    96,    -1,    -1,    -1,
+      -1,    40,    -1,    -1,    -1,    -1,   106,   107,   108,   109,
+     110,    -1,   112,   113,   114,   115,   116,    -1,    -1,    -1,
+      -1,    -1,   122,    -1,   124,    -1,    -1,   127,    67,    68,
+      69,    -1,    71,    72,    73,    74,    75,    76,    -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,   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,    90,    91,    92,    -1,    94,    95,    96,    -1,    -1,
+      -1,    -1,    40,    -1,    -1,    -1,    -1,   106,   107,   108,
+     109,   110,    -1,   112,   113,   114,   115,   116,    -1,    -1,
+      -1,    -1,    -1,   122,    -1,   124,    -1,    -1,   127,    67,
+      68,    69,    -1,    71,    72,    73,    74,    75,    76,    -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,    90,    91,    92,    -1,    94,    95,    96,    -1,
+      -1,    -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,   107,
+     108,   109,   110,    -1,   112,   113,   114,   115,   116,    -1,
+      -1,    -1,    -1,    -1,   122,    -1,   124,    -1,    -1,   127,
+      67,    68,    69,    -1,    71,    72,    73,    74,    75,    76,
       -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,    -1,    90,    91,    92,    -1,    94,    95,    96,
+      -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,
+      -1,   108,   109,   110,    -1,   112,   113,   114,   115,   116,
+      -1,    -1,    -1,    -1,    -1,   122,    -1,   124,    -1,    -1,
+     127,    67,    68,    69,    -1,    71,    72,    73,    74,    75,
+      76,    -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,   110,    -1,   112,   113,   114,   115,
+     116,    -1,    -1,    -1,    -1,    -1,   122,    -1,   124,    -1,
+      -1,   127
 };
 
 /* 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,   221,   222,   223,   226,   227,   228,   229,   232,    49,
-     126,   126,   159,   126,     3,    18,   122,   178,   179,     3,
-     212,     3,   210,   228,   126,     3,   179,   212,   213,   214,
-     126,   122,   123,   126,   228,   126,   228,   228,   228,   228,
-     228,   219,   220,   225,   228,   225,   230,   231,   226,     0,
-     134,     3,    31,    45,   145,   151,   152,   227,    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,   224,   233,   234,   167,   182,
-     122,   123,   126,   218,   126,   226,   123,   228,   175,     3,
-     219,   150,   121,    97,   103,   128,    97,   129,     3,   146,
-     147,     3,   146,    96,    67,    34,    50,   207,     3,     3,
-       3,   228,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   228,   228,   228,   228,   228,   228,   228,   228,     3,
-     219,   226,    17,     3,   226,   226,     3,   128,   139,   141,
-     228,    96,    13,    17,   228,    96,   135,   136,   137,   143,
-     190,   192,   201,   208,   181,   178,   219,     3,    90,   204,
-     205,   206,   129,     3,   113,   129,   138,   139,   129,   226,
-     225,   225,   225,   103,   217,    97,   217,   226,   226,     3,
-      53,   187,    53,   188,   217,   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,   214,   216,    99,   144,   147,    96,   129,   126,
-     214,    16,   189,   214,   215,   122,   144,   228,   142,   226,
-      99,   122,   128,     4,     7,     8,     9,    11,    44,    54,
-      55,   203,   216,   217,    90,   206,    27,    32,   168,   170,
-     172,   173,   142,   225,   123,   225,   227,   142,   204,   215,
-     122,    97,   193,   129,     3,     4,    33,    61,   162,   163,
-     164,   165,   202,   122,   206,   122,   126,   168,   170,    64,
-     148,   129,   129,   191,   214,    45,    96,   184,   197,   198,
-     199,   228,   103,   128,   164,   165,   138,   171,     3,   142,
-     142,   217,    96,   140,   184,   194,   195,   196,   201,   208,
-       3,    26,   128,   199,   103,   138,   128,   138,   217,   122,
-     128,   196,   207,   138,   128,   129,   209,     3,   169,   138,
-     126,   122,   128,   204,   138,   129,   128,   217
+       0,     3,     4,     5,     6,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    29,    36,    38,    39,    41,    43,    45,
+      47,    48,    49,    52,    53,    55,    56,    63,    64,    70,
+      90,    91,    99,   112,   117,   118,   122,   124,   126,   128,
+     135,   136,   137,   138,   144,   147,   148,   154,   158,   159,
+     160,   161,   163,   171,   179,   182,   183,   186,   189,   190,
+     191,   192,   196,   198,   207,   217,   220,   233,   234,   235,
+     238,   239,   240,   241,   244,   246,   247,    89,    50,   122,
+     122,   164,   122,     3,     4,    19,   126,   184,   185,    18,
+       3,   240,     3,   219,   240,   122,   185,   223,   122,   126,
+     122,   127,   240,   122,   237,   240,   242,   243,   240,   240,
+     240,   240,   240,   238,   229,   230,   231,   237,    30,    32,
+      37,    42,    46,    66,    99,   132,   143,   144,   145,   148,
+     150,   165,   166,   181,   190,   236,     3,     0,   138,   126,
+       3,    46,   150,   156,   157,   239,   145,   146,    18,    27,
+      31,    32,    44,    46,   206,   245,   192,   100,    40,    67,
+      68,    69,    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,   104,   106,   107,
+     108,   109,   110,   112,   113,   114,   115,   116,   122,   124,
+     127,     3,   122,   162,   146,   172,   188,   126,   127,   184,
+     185,   222,   223,   224,   232,   122,   238,   127,   240,   180,
+     229,     3,   155,   105,   132,   100,   133,   125,   100,   237,
+       3,     3,   151,   152,   238,   238,   151,     3,   132,   145,
+     126,   136,     3,    99,    68,    99,     3,    35,    51,   216,
+       3,     3,   208,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,     3,   240,   240,   240,
+     240,   240,   240,   240,   240,   240,   240,   240,   240,   240,
+     240,   240,   229,   240,     3,   122,   128,   238,    14,   240,
+      99,   139,   140,   141,   147,   148,   196,   198,   207,   217,
+     187,   184,   127,   122,   228,     3,    93,   213,   214,   215,
+     133,   115,   184,   133,   142,   143,   133,   238,   237,   237,
+     105,   227,   100,   143,   132,   227,   238,   238,   102,     3,
+      54,   193,    54,   194,     3,   209,   210,   105,   133,   125,
+      89,   240,     3,   133,   122,   133,   132,   141,   126,   139,
+     229,   102,   105,   211,   215,   133,   100,   132,   133,   105,
+      36,   115,   224,   226,   102,   149,   152,   132,    99,   133,
+       3,     5,   122,   224,    17,   195,   224,   225,   126,   227,
+     100,   240,     3,   133,   146,   238,   126,   139,   132,   133,
+       3,     5,     8,     9,    10,    12,    45,    55,    56,   212,
+     226,   227,    93,   215,    28,    33,   173,   175,   177,   178,
+     146,   237,   237,   239,   146,   213,   225,   126,   100,   199,
+     149,   210,   133,    34,    62,   167,   168,   169,   170,   132,
+     211,   126,   215,   126,   122,   173,   175,    65,   153,   133,
+     133,   197,   224,    46,    99,   190,   203,   204,   205,   240,
+     105,   132,   169,   170,   221,   176,     3,   146,   146,   227,
+      99,   144,   148,   190,   200,   201,   202,   207,   217,     3,
+      27,   132,   205,   105,   142,   142,   142,   227,   126,   126,
+     132,   202,   216,   142,   132,   132,   133,   218,   200,     3,
+     174,   142,   132,   122,   126,   132,   213,   142,   133,   132,
+     227
 };
 
 #define yyerrok                (yyerrstatus = 0)
@@ -3594,204 +4332,304 @@ yyreduce:
   YY_REDUCE_PRINT (yyn);
   switch (yyn)
     {
-        case 24:
+        
+    case 26:
+    if(as3_pass==2) {
 
-/* Line 1455 of yacc.c  */
-#line 1509 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);;}
+/* Line 1464 of skeleton.m4  */
+#line 2108 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 25:
 
-/* Line 1455 of yacc.c  */
-#line 1510 "parser.y"
-    {(yyval.code)=code_new();;}
-    break;
-
-  case 26:
+  
+    case 27:
+    if(as3_pass==2) {
 
-/* Line 1455 of yacc.c  */
-#line 1512 "parser.y"
-    {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));;}
+/* Line 1464 of skeleton.m4  */
+#line 2109 "parser.y"
+    {(yyval.code)=code_new();}
+    }
     break;
 
-  case 27:
 
-/* Line 1455 of yacc.c  */
-#line 1513 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);;}
+  
+    case 28:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2111 "parser.y"
+    {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
+    }
     break;
 
-  case 38:
 
-/* Line 1455 of yacc.c  */
-#line 1528 "parser.y"
-    {(yyval.code)=0;;}
+  
+    case 29:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2112 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 45:
 
-/* Line 1455 of yacc.c  */
-#line 1536 "parser.y"
-    {/*TODO*/(yyval.code)=0;;}
+  
+    case 42:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2127 "parser.y"
+    {(yyval.code)=(yyvsp[(2) - (3)].code);}
+    }
     break;
 
-  case 46:
 
-/* Line 1455 of yacc.c  */
-#line 1537 "parser.y"
-    {/*TODO*/(yyval.code)=0;;}
+  
+    case 43:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2128 "parser.y"
+    {(yyval.code)=0;}
+    }
     break;
 
-  case 47:
 
-/* Line 1455 of yacc.c  */
-#line 1539 "parser.y"
-    {(yyval.code)=(yyvsp[(2) - (3)].code);;}
+  
+    case 44:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2131 "parser.y"
+    {(yyval.code)=0;}
+    }
     break;
 
-  case 48:
 
-/* Line 1455 of yacc.c  */
-#line 1540 "parser.y"
-    {(yyval.code)=0;;}
+  
+    case 51:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2138 "parser.y"
+    {(yyval.code)=(yyvsp[(3) - (4)].code);}
+    }
     break;
 
-  case 49:
 
-/* Line 1455 of yacc.c  */
-#line 1541 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (2)].code);;}
+  
+    case 52:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2142 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (2)].code);}
+    }
     break;
 
-  case 50:
 
-/* Line 1455 of yacc.c  */
-#line 1542 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);;}
+  
+    case 53:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2143 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 51:
 
-/* Line 1455 of yacc.c  */
-#line 1546 "parser.y"
+  
+    case 54:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2147 "parser.y"
     {
-    if((yyvsp[(1) - (1)].code)) as3_warning("code ignored");
-;}
+    code_t**cc = &global->init->method->body->code;
+    *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
+}
+    }
     break;
 
-  case 52:
 
-/* Line 1455 of yacc.c  */
-#line 1552 "parser.y"
-    {(yyval.value)=(yyvsp[(2) - (2)].value);;}
+  
+    case 56:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2158 "parser.y"
+    {(yyval.value)=(yyvsp[(2) - (2)].value);}
+    }
     break;
 
-  case 53:
 
-/* Line 1455 of yacc.c  */
-#line 1553 "parser.y"
+  
+    case 57:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2159 "parser.y"
     {(yyval.value).c=abc_pushundefined(0);
                                   (yyval.value).t=TYPE_ANY;
-                                 ;}
+                                 }
+    }
     break;
 
-  case 54:
 
-/* Line 1455 of yacc.c  */
-#line 1557 "parser.y"
-    {(yyval.code)=(yyvsp[(2) - (2)].code);;}
+  
+    case 58:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2163 "parser.y"
+    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+    }
     break;
 
-  case 55:
 
-/* Line 1455 of yacc.c  */
-#line 1558 "parser.y"
-    {(yyval.code)=(yyvsp[(2) - (2)].code);;}
+  
+    case 59:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2164 "parser.y"
+    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+    }
     break;
 
-  case 56:
 
-/* Line 1455 of yacc.c  */
-#line 1560 "parser.y"
-    {(yyval.code) = (yyvsp[(1) - (1)].code);;}
+  
+    case 60:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2166 "parser.y"
+    {(yyval.code) = (yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 57:
 
-/* Line 1455 of yacc.c  */
-#line 1561 "parser.y"
-    {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));;}
+  
+    case 61:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2167 "parser.y"
+    {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
+    }
     break;
 
-  case 58:
 
-/* Line 1455 of yacc.c  */
-#line 1564 "parser.y"
+  
+    case 62:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2170 "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:
 
-/* Line 1455 of yacc.c  */
-#line 1604 "parser.y"
-    {(yyval.code) = code_new();;}
+  
+    case 63:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2230 "parser.y"
+    {(yyval.code) = code_new();}
+    }
     break;
 
-  case 60:
 
-/* Line 1455 of yacc.c  */
-#line 1605 "parser.y"
-    {(yyval.code)=(yyvsp[(2) - (2)].code);;}
+  
+    case 64:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2231 "parser.y"
+    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+    }
     break;
 
-  case 61:
 
-/* Line 1455 of yacc.c  */
-#line 1608 "parser.y"
-    {new_state();;}
+  
+    case 65:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2234 "parser.y"
+    {PASS12 new_state();}
+    }
     break;
 
-  case 62:
 
-/* Line 1455 of yacc.c  */
-#line 1608 "parser.y"
+  
+    case 66:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2234 "parser.y"
     {
      
     (yyval.code) = code_new();
@@ -3808,53 +4646,79 @@ yyreduce:
         myjmp->branch = (yyval.code) = abc_nop((yyval.code));
     }
     (yyval.code) = var_block((yyval.code));
-    old_state();
-;}
+    PASS12 old_state();
+}
+    }
     break;
 
-  case 63:
 
-/* Line 1455 of yacc.c  */
-#line 1627 "parser.y"
-    {(yyval.code)=code_new();;}
+  
+    case 67:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2253 "parser.y"
+    {(yyval.code)=code_new();}
+    }
     break;
 
-  case 66:
 
-/* Line 1455 of yacc.c  */
-#line 1632 "parser.y"
+  
+    case 70:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2260 "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:
 
-/* Line 1455 of yacc.c  */
-#line 1635 "parser.y"
+  
+    case 71:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2264 "parser.y"
     {
+    PASS12
     (yyval.id)=(yyvsp[(1) - (1)].id);
-;}
+}
+    }
     break;
 
-  case 68:
 
-/* Line 1455 of yacc.c  */
-#line 1639 "parser.y"
-    {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;;}
+  
+    case 72:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2269 "parser.y"
+    {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
+    }
     break;
 
-  case 69:
 
-/* Line 1455 of yacc.c  */
-#line 1640 "parser.y"
-    {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;;}
+  
+    case 73:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2270 "parser.y"
+    {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
+    }
     break;
 
-  case 70:
 
-/* Line 1455 of yacc.c  */
-#line 1642 "parser.y"
+  
+    case 74:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2272 "parser.y"
     {
     if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
     (yyval.code) = code_new();
@@ -3872,20 +4736,28 @@ yyreduce:
     myif->branch = out;
 
     (yyval.code) = var_block((yyval.code));
-    old_state();
-;}
+    PASS12 old_state();
+}
+    }
     break;
 
-  case 71:
 
-/* Line 1455 of yacc.c  */
-#line 1662 "parser.y"
+  
+    case 75:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2292 "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);
@@ -3917,24 +4789,33 @@ yyreduce:
     myif->branch = out;
 
     (yyval.code) = var_block((yyval.code));
-    old_state();
 
     free(tmp1name);
     free(tmp2name);
-;}
+
+    PASS12 old_state();
+}
+    }
     break;
 
-  case 72:
 
-/* Line 1455 of yacc.c  */
-#line 1705 "parser.y"
-    {new_state();;}
+  
+    case 76:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2340 "parser.y"
+    {PASS12 new_state();}
+    }
     break;
 
-  case 73:
 
-/* Line 1455 of yacc.c  */
-#line 1705 "parser.y"
+  
+    case 77:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2340 "parser.y"
     {
 
     (yyval.code) = code_new();
@@ -3951,21 +4832,29 @@ yyreduce:
     continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
 
     (yyval.code) = var_block((yyval.code));
-    old_state();
-;}
+    PASS12 old_state();
+}
+    }
     break;
 
-  case 74:
 
-/* Line 1455 of yacc.c  */
-#line 1724 "parser.y"
-    {new_state();;}
+  
+    case 78:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2359 "parser.y"
+    {PASS12 new_state();}
+    }
     break;
 
-  case 75:
 
-/* Line 1455 of yacc.c  */
-#line 1724 "parser.y"
+  
+    case 79:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2359 "parser.y"
     {
     (yyval.code) = code_new();
     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
@@ -3978,94 +4867,138 @@ yyreduce:
     continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
     
     (yyval.code) = var_block((yyval.code));
-    old_state();
-;}
+    PASS12 old_state();
+}
+    }
     break;
 
-  case 76:
 
-/* Line 1455 of yacc.c  */
-#line 1739 "parser.y"
+  
+    case 80:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2374 "parser.y"
     {
     (yyval.code) = abc___break__(0, "");
-;}
+}
+    }
     break;
 
-  case 77:
 
-/* Line 1455 of yacc.c  */
-#line 1742 "parser.y"
+  
+    case 81:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2377 "parser.y"
     {
     (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
-;}
+}
+    }
     break;
 
-  case 78:
 
-/* Line 1455 of yacc.c  */
-#line 1745 "parser.y"
+  
+    case 82:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2380 "parser.y"
     {
     (yyval.code) = abc___continue__(0, "");
-;}
+}
+    }
     break;
 
-  case 79:
 
-/* Line 1455 of yacc.c  */
-#line 1748 "parser.y"
+  
+    case 83:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2383 "parser.y"
     {
     (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
-;}
+}
+    }
     break;
 
-  case 80:
 
-/* Line 1455 of yacc.c  */
-#line 1752 "parser.y"
-    {(yyval.code)=0;;}
+  
+    case 84:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2387 "parser.y"
+    {(yyval.code)=0;}
+    }
     break;
 
-  case 81:
 
-/* Line 1455 of yacc.c  */
-#line 1753 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);;}
+  
+    case 85:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2388 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 82:
 
-/* Line 1455 of yacc.c  */
-#line 1754 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);;}
+  
+    case 86:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2389 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 83:
 
-/* Line 1455 of yacc.c  */
-#line 1755 "parser.y"
-    {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));;}
+  
+    case 87:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2390 "parser.y"
+    {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
+    }
     break;
 
-  case 84:
 
-/* Line 1455 of yacc.c  */
-#line 1756 "parser.y"
+  
+    case 88:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2391 "parser.y"
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
+    }
     break;
 
-  case 85:
 
-/* Line 1455 of yacc.c  */
-#line 1757 "parser.y"
-    {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));;}
+  
+    case 89:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2392 "parser.y"
+    {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
+    }
     break;
 
-  case 86:
 
-/* Line 1455 of yacc.c  */
-#line 1759 "parser.y"
+  
+    case 90:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2394 "parser.y"
     {
-    (yyval.code) = abc_dup(0);
+    (yyval.code) = abc_getlocal(0, state->switch_var);
     (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
     code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
@@ -4074,33 +5007,47 @@ yyreduce:
     }
     code_t*e = (yyval.code) = abc_nop((yyval.code));
     j->branch = e;
-;}
+}
+    }
     break;
 
-  case 87:
 
-/* Line 1455 of yacc.c  */
-#line 1770 "parser.y"
+  
+    case 91:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2405 "parser.y"
     {
     (yyval.code) = (yyvsp[(3) - (3)].code);
-;}
+}
+    }
     break;
 
-  case 88:
 
-/* Line 1455 of yacc.c  */
-#line 1773 "parser.y"
-    {new_state();;}
+  
+    case 92:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2408 "parser.y"
+    {PASS12 new_state();state->switch_var=alloc_local();}
+    }
     break;
 
-  case 89:
 
-/* Line 1455 of yacc.c  */
-#line 1773 "parser.y"
+  
+    case 93:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2408 "parser.y"
     {
     (yyval.code)=(yyvsp[(4) - (8)].value).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;
@@ -4121,21 +5068,33 @@ yyreduce:
     }
    
     (yyval.code) = var_block((yyval.code));
-    old_state();
-;}
+    PASS12 old_state();
+}
+    }
     break;
 
-  case 90:
 
-/* Line 1455 of yacc.c  */
-#line 1802 "parser.y"
-    {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);;}
+  
+    case 94:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2439 "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:
 
-/* Line 1455 of yacc.c  */
-#line 1803 "parser.y"
+  
+    case 95:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2444 "parser.y"
     {
     namespace_t name_ns = {ACCESS_PACKAGE, ""};
     multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
@@ -4146,33 +5105,41 @@ yyreduce:
     (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:
 
-/* Line 1455 of yacc.c  */
-#line 1822 "parser.y"
-    {new_state();state->exception_name=0;;}
+  
+    case 96:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2464 "parser.y"
+    {PASS12 new_state();state->exception_name=0;}
+    }
     break;
 
-  case 93:
 
-/* Line 1455 of yacc.c  */
-#line 1822 "parser.y"
+  
+    case 97:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2464 "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
@@ -4180,37 +5147,53 @@ yyreduce:
         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:
 
-/* Line 1455 of yacc.c  */
-#line 1839 "parser.y"
-    {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));;}
+  
+    case 98:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2480 "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:
 
-/* Line 1455 of yacc.c  */
-#line 1840 "parser.y"
-    {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));;}
+  
+    case 99:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2481 "parser.y"
+    {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
+    }
     break;
 
-  case 96:
 
-/* Line 1455 of yacc.c  */
-#line 1841 "parser.y"
+  
+    case 100:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2482 "parser.y"
     {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
+    }
     break;
 
-  case 97:
 
-/* Line 1455 of yacc.c  */
-#line 1842 "parser.y"
+  
+    case 101:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2483 "parser.y"
     {
     (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
     (yyval.catch_list).finally = 0;
@@ -4218,13 +5201,17 @@ yyreduce:
         list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));
         (yyval.catch_list).finally = (yyvsp[(2) - (2)].exception)->to;(yyvsp[(2) - (2)].exception)->to=0;
     }
-;}
+}
+    }
     break;
 
-  case 98:
 
-/* Line 1455 of yacc.c  */
-#line 1850 "parser.y"
+  
+    case 102:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2491 "parser.y"
     {
     (yyval.catch_list).l=list_new();
     (yyval.catch_list).finally = 0;
@@ -4232,20 +5219,31 @@ yyreduce:
         list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));
         (yyval.catch_list).finally = (yyvsp[(1) - (1)].exception)->to;(yyvsp[(1) - (1)].exception)->to=0;
     }
-;}
+}
+    }
     break;
 
-  case 99:
 
-/* Line 1455 of yacc.c  */
-#line 1859 "parser.y"
-    {new_state();;}
+  
+    case 103:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2500 "parser.y"
+    {PASS12 new_state();
+                 state->method->has_exceptions=1;
+                 state->method->late_binding=1;//for invariant scope_code
+                }
+    }
     break;
 
-  case 100:
 
-/* Line 1455 of yacc.c  */
-#line 1859 "parser.y"
+  
+    case 104:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2503 "parser.y"
     {
     code_t*out = abc_nop(0);
 
@@ -4258,7 +5256,7 @@ yyreduce:
   
     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;
@@ -4271,6 +5269,7 @@ yyreduce:
             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));
         }
         
@@ -4286,353 +5285,645 @@ yyreduce:
     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:
 
-/* Line 1455 of yacc.c  */
-#line 1904 "parser.y"
+  
+    case 105:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2549 "parser.y"
     {
     (yyval.code)=(yyvsp[(2) - (2)].value).c;
     (yyval.code)=abc_throw((yyval.code));
-;}
+}
+    }
     break;
 
-  case 102:
 
-/* Line 1455 of yacc.c  */
-#line 1908 "parser.y"
+  
+    case 106:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2553 "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));
-;}
+}
+    }
     break;
 
-  case 103:
 
-/* Line 1455 of yacc.c  */
-#line 1919 "parser.y"
+  
+    case 107:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2564 "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 2574 "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 110:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2592 "parser.y"
+    {PASS12 (yyval.id)="package";}
+    }
     break;
 
-  case 105:
 
-/* Line 1455 of yacc.c  */
-#line 1929 "parser.y"
-    {(yyval.id)="package";;}
+  
+    case 111:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2593 "parser.y"
+    {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
+    }
     break;
 
-  case 106:
 
-/* Line 1455 of yacc.c  */
-#line 1931 "parser.y"
-    {(yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;;}
+  
+    case 112:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2595 "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:
 
-/* Line 1455 of yacc.c  */
-#line 1932 "parser.y"
-    {(yyval.id)=strdup((yyvsp[(1) - (1)].id));;}
+  
+    case 113:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2596 "parser.y"
+    {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
+    }
     break;
 
-  case 108:
 
-/* Line 1455 of yacc.c  */
-#line 1934 "parser.y"
-    {startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;;}
+  
+    case 114:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2598 "parser.y"
+    {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
+    }
     break;
 
-  case 109:
 
-/* Line 1455 of yacc.c  */
-#line 1934 "parser.y"
-    {endpackage();(yyval.code)=0;;}
+  
+    case 115:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2599 "parser.y"
+    {PASS12 endpackage();(yyval.code)=0;}
+    }
     break;
 
-  case 110:
 
-/* Line 1455 of yacc.c  */
-#line 1935 "parser.y"
-    {startpackage("");}
+  
+    case 116:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2600 "parser.y"
+    {PASS12 startpackage("");}
+    }
     break;
 
-  case 111:
 
-/* Line 1455 of yacc.c  */
-#line 1935 "parser.y"
-    {endpackage();(yyval.code)=0;;}
+  
+    case 117:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2601 "parser.y"
+    {PASS12 endpackage();(yyval.code)=0;}
+    }
     break;
 
-  case 112:
 
-/* Line 1455 of yacc.c  */
-#line 1937 "parser.y"
+  
+    case 118:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2603 "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);
+       }
+
+       PASS2
        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;
-;}
+}
+    }
     break;
 
-  case 113:
 
-/* Line 1455 of yacc.c  */
-#line 1945 "parser.y"
+  
+    case 119:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2619 "parser.y"
     {
+       PASS12
+       if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
+           as3_schedule_package((yyvsp[(2) - (4)].id));
+       }
+
+       PASS2
        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;
-;}
+}
+    }
+    break;
+
+
+  
+    case 120:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2636 "parser.y"
+    {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 114:
 
-/* Line 1455 of yacc.c  */
-#line 1955 "parser.y"
-    {(yyval.flags)=0;;}
+  
+    case 121:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2637 "parser.y"
+    {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
+    }
     break;
 
-  case 115:
 
-/* Line 1455 of yacc.c  */
-#line 1956 "parser.y"
-    {(yyval.flags)=(yyvsp[(1) - (1)].flags);}
+  
+    case 122:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2638 "parser.y"
+    {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
+    }
     break;
 
-  case 116:
 
-/* Line 1455 of yacc.c  */
-#line 1957 "parser.y"
-    {(yyval.flags)=(yyvsp[(1) - (1)].token);;}
+  
+    case 123:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2639 "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 117:
 
-/* Line 1455 of yacc.c  */
-#line 1958 "parser.y"
-    {(yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);;}
+  
+    case 124:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2646 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 118:
 
-/* Line 1455 of yacc.c  */
-#line 1960 "parser.y"
-    {(yyval.token)=FLAG_PUBLIC;;}
+  
+    case 125:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2647 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 119:
 
-/* Line 1455 of yacc.c  */
-#line 1961 "parser.y"
-    {(yyval.token)=FLAG_PRIVATE;;}
+  
+    case 126:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2648 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 120:
 
-/* Line 1455 of yacc.c  */
-#line 1962 "parser.y"
-    {(yyval.token)=FLAG_PROTECTED;;}
+  
+    case 127:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2649 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 121:
 
-/* Line 1455 of yacc.c  */
-#line 1963 "parser.y"
-    {(yyval.token)=FLAG_STATIC;;}
+  
+    case 128:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2650 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 122:
 
-/* Line 1455 of yacc.c  */
-#line 1964 "parser.y"
-    {(yyval.token)=FLAG_DYNAMIC;;}
+  
+    case 129:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2651 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 123:
 
-/* Line 1455 of yacc.c  */
-#line 1965 "parser.y"
-    {(yyval.token)=FLAG_FINAL;;}
+  
+    case 130:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2652 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 124:
 
-/* Line 1455 of yacc.c  */
-#line 1966 "parser.y"
-    {(yyval.token)=FLAG_OVERRIDE;;}
+  
+    case 131:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2653 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 125:
 
-/* Line 1455 of yacc.c  */
-#line 1967 "parser.y"
-    {(yyval.token)=FLAG_NATIVE;;}
+  
+    case 132:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2654 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
+    }
     break;
 
-  case 126:
 
-/* Line 1455 of yacc.c  */
-#line 1968 "parser.y"
-    {(yyval.token)=FLAG_PACKAGEINTERNAL;;}
+  
+    case 133:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2655 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
+                               (yyval.flags).ns=(yyvsp[(1) - (1)].id);
+                       }
+    }
     break;
 
-  case 127:
 
-/* Line 1455 of yacc.c  */
-#line 1970 "parser.y"
-    {(yyval.classinfo)=registry_getobjectclass();;}
+  
+    case 134:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2659 "parser.y"
+    {PASS12 (yyval.classinfo)=0;}
+    }
     break;
 
-  case 128:
 
-/* Line 1455 of yacc.c  */
-#line 1971 "parser.y"
-    {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);;}
+  
+    case 135:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2660 "parser.y"
+    {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+    }
     break;
 
-  case 129:
 
-/* Line 1455 of yacc.c  */
-#line 1973 "parser.y"
-    {(yyval.classinfo_list)=list_new();;}
+  
+    case 136:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2662 "parser.y"
+    {PASS12 (yyval.classinfo_list)=list_new();}
+    }
     break;
 
-  case 130:
 
-/* Line 1455 of yacc.c  */
-#line 1974 "parser.y"
-    {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);;}
+  
+    case 137:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2663 "parser.y"
+    {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
+    }
     break;
 
-  case 131:
 
-/* Line 1455 of yacc.c  */
-#line 1976 "parser.y"
-    {(yyval.classinfo_list)=list_new();;}
+  
+    case 138:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2665 "parser.y"
+    {PASS12 (yyval.classinfo_list)=list_new();}
+    }
     break;
 
-  case 132:
 
-/* Line 1455 of yacc.c  */
-#line 1977 "parser.y"
-    {(yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);;}
+  
+    case 139:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2666 "parser.y"
+    {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
+    }
     break;
 
-  case 133:
 
-/* Line 1455 of yacc.c  */
-#line 1981 "parser.y"
-    {startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list), 0);;}
+  
+    case 140:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2670 "parser.y"
+    {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
+    }
     break;
 
-  case 134:
 
-/* Line 1455 of yacc.c  */
-#line 1983 "parser.y"
-    {endclass();(yyval.code)=0;;}
+  
+    case 141:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2672 "parser.y"
+    {PASS12 endclass();(yyval.code)=0;}
+    }
     break;
 
-  case 135:
 
-/* Line 1455 of yacc.c  */
-#line 1987 "parser.y"
-    {startclass((yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list),1);;}
+  
+    case 142:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2676 "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:
 
-/* Line 1455 of yacc.c  */
-#line 1989 "parser.y"
-    {endclass();(yyval.code)=0;;}
+  
+    case 143:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2679 "parser.y"
+    {PASS12 endclass();(yyval.code)=0;}
+    }
     break;
 
-  case 144:
 
-/* Line 1455 of yacc.c  */
-#line 2001 "parser.y"
+  
+    case 152:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2692 "parser.y"
     {
-    code_t*c = state->cls->static_init;
+    code_t*c = state->cls->static_init->header;
     c = code_append(c, (yyvsp[(1) - (1)].code));  
-    state->cls->static_init = c;
-;}
+    state->cls->static_init->header = c;
+}
+    }
     break;
 
-  case 150:
 
-/* Line 1455 of yacc.c  */
-#line 2012 "parser.y"
+  
+    case 158:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2703 "parser.y"
     {
     syntaxerror("variable declarations not allowed in interfaces");
-;}
+}
+    }
     break;
 
-  case 151:
 
-/* Line 1455 of yacc.c  */
-#line 2015 "parser.y"
+  
+    case 159:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2706 "parser.y"
     {
-    (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
-    if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
+    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");
     }
-    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);
-;}
+    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 162:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2721 "parser.y"
+    {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
+    }
+    break;
+
+
+  
+    case 163:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2721 "parser.y"
+    {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
+    }
+    break;
+
+
+  
+    case 164:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2723 "parser.y"
+    {(yyval.code) = (yyvsp[(1) - (1)].code);}
+    }
+    break;
+
+
+  
+    case 165:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2724 "parser.y"
+    {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
+    }
     break;
 
-  case 154:
 
-/* Line 1455 of yacc.c  */
-#line 2028 "parser.y"
+  
+    case 166:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2727 "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);
+    int flags = slotstate_flags->flags;
+    namespace_t ns = modifiers2access(slotstate_flags);
+
+    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[(4) - (5)].classinfo);
+    info->type = (yyvsp[(2) - (3)].classinfo);
     info->flags = flags;
 
     /* slot name */
-    namespace_t mname_ns = {flags2access(flags), ""};
-    multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
+    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;
+        code = &state->cls->static_init->header;
     } else {
         // instance variable
         traits = &state->cls->abc->traits;
-        code = &state->cls->init;
+        code = &state->cls->init->header;
     }
     
     trait_t*t=0;
-    if((yyvsp[(4) - (5)].classinfo)) {
-        MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
+    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);
@@ -4641,383 +5932,621 @@ yyreduce:
     
     /* initalization code (if needed) */
     code_t*c = 0;
-    if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
+    if((yyvsp[(3) - (3)].value).c && !is_pushundefined((yyvsp[(3) - (3)].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 = 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((yyvsp[(2) - (5)].token)==KW_CONST) {
+    if(slotstate_varconst==KW_CONST) {
         t->kind= TRAIT_CONST;
     }
 
     (yyval.code)=0;
-;}
+}
+    }
     break;
 
-  case 155:
-
-/* Line 1455 of yacc.c  */
-#line 2086 "parser.y"
-    {(yyval.constant)=0;;}
-    break;
 
-  case 156:
+  
+    case 167:
+    if(as3_pass==2) {
 
-/* Line 1455 of yacc.c  */
-#line 2087 "parser.y"
-    {(yyval.constant)=(yyvsp[(2) - (2)].constant);;}
+/* Line 1464 of skeleton.m4  */
+#line 2801 "parser.y"
+    {(yyval.constant)=0;}
+    }
     break;
 
-  case 157:
 
-/* Line 1455 of yacc.c  */
-#line 2089 "parser.y"
-    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));;}
+  
+    case 168:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2802 "parser.y"
+    {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
+    }
     break;
 
-  case 158:
 
-/* Line 1455 of yacc.c  */
-#line 2090 "parser.y"
-    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));;}
+  
+    case 169:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2804 "parser.y"
+    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
+    }
     break;
 
-  case 159:
 
-/* Line 1455 of yacc.c  */
-#line 2091 "parser.y"
-    {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));;}
+  
+    case 170:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2805 "parser.y"
+    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
+    }
     break;
 
-  case 160:
 
-/* Line 1455 of yacc.c  */
-#line 2092 "parser.y"
-    {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));;}
+  
+    case 171:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2806 "parser.y"
+    {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
+    }
     break;
 
-  case 161:
 
-/* Line 1455 of yacc.c  */
-#line 2093 "parser.y"
-    {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);;}
+  
+    case 172:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2807 "parser.y"
+    {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
+    }
     break;
 
-  case 162:
 
-/* Line 1455 of yacc.c  */
-#line 2095 "parser.y"
-    {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));;}
+  
+    case 173:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2808 "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 163:
 
-/* Line 1455 of yacc.c  */
-#line 2096 "parser.y"
-    {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));;}
+  
+    case 174:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2810 "parser.y"
+    {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
+    }
     break;
 
-  case 164:
 
-/* Line 1455 of yacc.c  */
-#line 2097 "parser.y"
-    {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));;}
+  
+    case 175:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2811 "parser.y"
+    {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
+    }
+    break;
+
+
+  
+    case 176:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2812 "parser.y"
+    {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
+    }
+    break;
+
+
+  
+    case 177:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2813 "parser.y"
+    {
+    if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) {
+        (yyval.constant) = constant_new_float(__builtin_nan(""));
+    } else {
+        as3_warning("Couldn't evaluate constant value of %s", (yyvsp[(1) - (1)].id));
+        (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
+    }
+}
+    }
     break;
 
-  case 165:
 
-/* Line 1455 of yacc.c  */
-#line 2102 "parser.y"
+  
+    case 178:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2825 "parser.y"
     {
+    PASS12
     memset(&(yyval.params),0,sizeof((yyval.params)));
-;}
+}
+    }
     break;
 
-  case 166:
 
-/* Line 1455 of yacc.c  */
-#line 2105 "parser.y"
+  
+    case 179:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2829 "parser.y"
     {
+    PASS12
     (yyval.params)=(yyvsp[(1) - (1)].params);
-;}
+}
+    }
     break;
 
-  case 167:
 
-/* Line 1455 of yacc.c  */
-#line 2110 "parser.y"
+  
+    case 180:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2835 "parser.y"
     {
+    PASS12
     memset(&(yyval.params),0,sizeof((yyval.params)));
     (yyval.params).varargs=1;
     list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
-;}
+}
+    }
     break;
 
-  case 168:
 
-/* Line 1455 of yacc.c  */
-#line 2115 "parser.y"
+  
+    case 181:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2841 "parser.y"
     {
+    PASS12
     (yyval.params) =(yyvsp[(1) - (4)].params);
     (yyval.params).varargs=1;
     list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
-;}
+}
+    }
     break;
 
-  case 169:
 
-/* Line 1455 of yacc.c  */
-#line 2122 "parser.y"
+  
+    case 182:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2849 "parser.y"
     {
+    PASS12
     (yyval.params) = (yyvsp[(1) - (3)].params);
     list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
-;}
+}
+    }
     break;
 
-  case 170:
 
-/* Line 1455 of yacc.c  */
-#line 2126 "parser.y"
+  
+    case 183:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2854 "parser.y"
     {
+    PASS12
     memset(&(yyval.params),0,sizeof((yyval.params)));
     list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
-;}
+}
+    }
     break;
 
-  case 171:
 
-/* Line 1455 of yacc.c  */
-#line 2131 "parser.y"
+  
+    case 184:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2860 "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);
-;}
+}
+    }
     break;
 
-  case 172:
 
-/* Line 1455 of yacc.c  */
-#line 2137 "parser.y"
+  
+    case 185:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2868 "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);
-;}
+}
+    }
     break;
 
-  case 173:
 
-/* Line 1455 of yacc.c  */
-#line 2143 "parser.y"
-    {(yyval.token)=(yyvsp[(1) - (1)].token);;}
+  
+    case 188:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2878 "parser.y"
+    {PASS12 (yyval.token)=0;}
+    }
     break;
 
-  case 174:
 
-/* Line 1455 of yacc.c  */
-#line 2144 "parser.y"
-    {(yyval.token)=(yyvsp[(1) - (1)].token);;}
+  
+    case 189:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2881 "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 175:
 
-/* Line 1455 of yacc.c  */
-#line 2145 "parser.y"
-    {(yyval.token)=0;;}
-    break;
+  
+    case 190:
+    if(as3_pass==2) {
 
-  case 176:
+/* Line 1464 of skeleton.m4  */
+#line 2882 "parser.y"
+    {
+    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 = method_header(state->method);
+    c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
 
-/* Line 1455 of yacc.c  */
-#line 2148 "parser.y"
-    {startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
+    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;
+}
+    }
     break;
 
-  case 177:
 
-/* Line 1455 of yacc.c  */
-#line 2149 "parser.y"
-    {
-    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);
+  
+    case 192:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2898 "parser.y"
+    {PASS12 (yyval.id)=0;}
     }
-    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);
-    (yyval.code)=0;
-;}
     break;
 
-  case 179:
 
-/* Line 1455 of yacc.c  */
-#line 2166 "parser.y"
-    {(yyval.id)=0;;}
+  
+    case 193:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2900 "parser.y"
+    {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
+    }
     break;
 
-  case 180:
 
-/* Line 1455 of yacc.c  */
-#line 2168 "parser.y"
+  
+    case 194:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2901 "parser.y"
     {
-    syntaxerror("nested functions not supported yet");
-;}
+    PASS1
+    endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
+    PASS2
+    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));
+
+    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_getlocal(0, index);
+    (yyval.value).t = TYPE_FUNCTION(f);
+
+    PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
+}
+    }
     break;
 
-  case 181:
 
-/* Line 1455 of yacc.c  */
-#line 2175 "parser.y"
-    {
+  
+    case 195:
+    if(as3_pass==2) {
 
-    /* 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));
-;}
+/* Line 1464 of skeleton.m4  */
+#line 2923 "parser.y"
+    {
+    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
+    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 182:
 
-/* Line 1455 of yacc.c  */
-#line 2182 "parser.y"
+  
+    case 196:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2942 "parser.y"
     {
-    (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));
+    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
+    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 185:
 
-/* Line 1455 of yacc.c  */
-#line 2191 "parser.y"
-    {(yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));;}
+  
+    case 199:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2959 "parser.y"
+    {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
+    }
     break;
 
-  case 186:
 
-/* Line 1455 of yacc.c  */
-#line 2192 "parser.y"
-    {(yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));;}
+  
+    case 200:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2960 "parser.y"
+    {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
+    }
     break;
 
-  case 187:
 
-/* Line 1455 of yacc.c  */
-#line 2194 "parser.y"
-    {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);;}
+  
+    case 201:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2962 "parser.y"
+    {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
+    }
     break;
 
-  case 188:
 
-/* Line 1455 of yacc.c  */
-#line 2195 "parser.y"
-    {(yyval.classinfo)=registry_getanytype();;}
+  
+    case 202:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2963 "parser.y"
+    {PASS12 (yyval.classinfo)=registry_getanytype();}
+    }
     break;
 
-  case 189:
 
-/* Line 1455 of yacc.c  */
-#line 2196 "parser.y"
-    {(yyval.classinfo)=registry_getanytype();;}
+  
+    case 203:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2964 "parser.y"
+    {PASS12 (yyval.classinfo)=registry_getanytype();}
+    }
     break;
 
-  case 190:
 
-/* Line 1455 of yacc.c  */
-#line 2205 "parser.y"
-    {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);;}
+  
+    case 204:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2973 "parser.y"
+    {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+    }
     break;
 
-  case 191:
 
-/* Line 1455 of yacc.c  */
-#line 2206 "parser.y"
-    {(yyval.classinfo)=0;;}
+  
+    case 205:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2974 "parser.y"
+    {PASS12 (yyval.classinfo)=0;}
+    }
     break;
 
-  case 192:
 
-/* Line 1455 of yacc.c  */
-#line 2210 "parser.y"
-    {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
+  
+    case 206:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2978 "parser.y"
+    {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
+    }
     break;
 
-  case 193:
 
-/* Line 1455 of yacc.c  */
-#line 2211 "parser.y"
+  
+    case 207:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2979 "parser.y"
     {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
+    }
     break;
 
-  case 194:
 
-/* Line 1455 of yacc.c  */
-#line 2213 "parser.y"
-    {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
+  
+    case 208:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2981 "parser.y"
+    {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
+    }
     break;
 
-  case 196:
 
-/* Line 1455 of yacc.c  */
-#line 2215 "parser.y"
-    {(yyval.value_list).len=1;
+  
+    case 211:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2985 "parser.y"
+    {(yyval.value_list).number=1;
                                                   (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
-                                                 ;}
+                                                 }
+    }
     break;
 
-  case 197:
 
-/* Line 1455 of yacc.c  */
-#line 2218 "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);
-                                                  ;}
+  
+    case 212:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2989 "parser.y"
+    {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
+    }
     break;
 
-  case 198:
 
-/* Line 1455 of yacc.c  */
-#line 2223 "parser.y"
-    {
-    MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
-    (yyval.value).c = code_new();
+  
+    case 213:
+    if(as3_pass==2) {
 
-    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);
-    } else {
-        (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
+/* Line 1464 of skeleton.m4  */
+#line 2990 "parser.y"
+    {
+                                                  (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;
 
-    (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);
-;}
+  
+    case 215:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 2996 "parser.y"
+    {
+    (yyval.value).c = (yyvsp[(2) - (4)].value).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 = 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((yyvsp[(2) - (4)].value).t) && (yyvsp[(2) - (4)].value).t->data) {
+        (yyval.value).t = (yyvsp[(2) - (4)].value).t->data;
+    } else {
+        (yyval.value).c = abc_coerce_a((yyval.value).c);
+        (yyval.value).t = TYPE_ANY;
+    }
+}
+    }
     break;
 
-  case 199:
 
-/* Line 1455 of yacc.c  */
-#line 2247 "parser.y"
+  
+    case 216:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3032 "parser.y"
     {
     
     (yyval.value).c = (yyvsp[(1) - (4)].value).c;
@@ -5031,11 +6560,11 @@ yyreduce:
         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.
         }
@@ -5043,35 +6572,36 @@ yyreduce:
         (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((yyvsp[(1) - (4)].value).t) && (yyvsp[(1) - (4)].value).t->data) {
+        (yyval.value).t = ((methodinfo_t*)((yyvsp[(1) - (4)].value).t->data))->return_type;
     } else {
         (yyval.value).c = abc_coerce_a((yyval.value).c);
         (yyval.value).t = TYPE_ANY;
     }
-
-;}
+}
+    }
     break;
 
-  case 200:
 
-/* Line 1455 of yacc.c  */
-#line 2295 "parser.y"
+  
+    case 217:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3078 "parser.y"
     {
     if(!state->cls) syntaxerror("super() not allowed outside of a class");
     if(!state->method) syntaxerror("super() not allowed outside of a function");
@@ -5087,16 +6617,21 @@ yyreduce:
         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;
-;}
+}
+    }
     break;
 
-  case 201:
 
-/* Line 1455 of yacc.c  */
-#line 2315 "parser.y"
+  
+    case 218:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3099 "parser.y"
     {
     (yyval.value).c = (yyvsp[(2) - (2)].value).c;
     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
@@ -5107,7 +6642,7 @@ yyreduce:
         (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 {
@@ -5116,95 +6651,139 @@ yyreduce:
         (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
     }
     (yyval.value).t = TYPE_BOOLEAN;
-;}
+}
+    }
     break;
 
-  case 202:
 
-/* Line 1455 of yacc.c  */
-#line 2336 "parser.y"
+  
+    case 219:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3120 "parser.y"
     {
     (yyval.code) = abc_returnvoid(0);
-;}
+}
+    }
     break;
 
-  case 203:
 
-/* Line 1455 of yacc.c  */
-#line 2339 "parser.y"
+  
+    case 220:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3123 "parser.y"
     {
     (yyval.code) = (yyvsp[(2) - (2)].value).c;
     (yyval.code) = abc_returnvalue((yyval.code));
-;}
+}
+    }
     break;
 
-  case 204:
 
-/* Line 1455 of yacc.c  */
-#line 2346 "parser.y"
-    {(yyval.value)=(yyvsp[(1) - (1)].value);;}
+  
+    case 221:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3130 "parser.y"
+    {(yyval.value)=(yyvsp[(1) - (1)].value);}
+    }
     break;
 
-  case 205:
 
-/* Line 1455 of yacc.c  */
-#line 2347 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);;}
+  
+    case 222:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3131 "parser.y"
+    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+    }
     break;
 
-  case 206:
 
-/* Line 1455 of yacc.c  */
-#line 2348 "parser.y"
+  
+    case 223:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3132 "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;
-;}
+}
+    }
     break;
 
-  case 207:
 
-/* Line 1455 of yacc.c  */
-#line 2354 "parser.y"
+  
+    case 224:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3138 "parser.y"
     {
     (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
-;}
+}
+    }
     break;
 
-  case 208:
 
-/* Line 1455 of yacc.c  */
-#line 2360 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);;}
+  
+    case 225:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3144 "parser.y"
+    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+    }
     break;
 
-  case 210:
 
-/* Line 1455 of yacc.c  */
-#line 2364 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);;}
+  
+    case 227:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3148 "parser.y"
+    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+    }
     break;
 
-  case 211:
 
-/* Line 1455 of yacc.c  */
-#line 2366 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);;}
+  
+    case 228:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3150 "parser.y"
+    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+    }
     break;
 
-  case 212:
 
-/* Line 1455 of yacc.c  */
-#line 2368 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);;}
+  
+    case 229:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3152 "parser.y"
+    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+    }
     break;
 
-  case 213:
 
-/* Line 1455 of yacc.c  */
-#line 2370 "parser.y"
+  
+    case 231:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3156 "parser.y"
     {
     (yyval.value).c = 0;
     namespace_t ns = {ACCESS_PACKAGE, ""};
@@ -5220,177 +6799,253 @@ yyreduce:
         (yyval.value).c = abc_construct((yyval.value).c, 2);
     }
     (yyval.value).t = TYPE_REGEXP;
-;}
+}
+    }
     break;
 
-  case 214:
 
-/* Line 1455 of yacc.c  */
-#line 2387 "parser.y"
+  
+    case 232:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3173 "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;
-                  ;}
+                  }
+    }
     break;
 
-  case 215:
 
-/* Line 1455 of yacc.c  */
-#line 2392 "parser.y"
+  
+    case 233:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3178 "parser.y"
     {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
                     (yyval.value).t = TYPE_INT;
-                   ;}
+                   }
+    }
     break;
 
-  case 216:
 
-/* Line 1455 of yacc.c  */
-#line 2395 "parser.y"
+  
+    case 234:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3181 "parser.y"
     {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
                   (yyval.value).t = TYPE_INT;
-                 ;}
+                 }
+    }
     break;
 
-  case 217:
 
-/* Line 1455 of yacc.c  */
-#line 2398 "parser.y"
+  
+    case 235:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3184 "parser.y"
     {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
                    (yyval.value).t = TYPE_UINT;
-                  ;}
+                  }
+    }
     break;
 
-  case 218:
 
-/* Line 1455 of yacc.c  */
-#line 2401 "parser.y"
+  
+    case 236:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3187 "parser.y"
     {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
                     (yyval.value).t = TYPE_FLOAT;
-                   ;}
+                   }
+    }
     break;
 
-  case 219:
 
-/* Line 1455 of yacc.c  */
-#line 2404 "parser.y"
-    {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));
+  
+    case 237:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3190 "parser.y"
+    {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
                      (yyval.value).t = TYPE_STRING;
-                    ;}
+                    }
+    }
     break;
 
-  case 220:
 
-/* Line 1455 of yacc.c  */
-#line 2407 "parser.y"
+  
+    case 238:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3193 "parser.y"
     {(yyval.value).c = abc_pushundefined(0);
                     (yyval.value).t = TYPE_ANY;
-                   ;}
+                   }
+    }
     break;
 
-  case 221:
 
-/* Line 1455 of yacc.c  */
-#line 2410 "parser.y"
+  
+    case 239:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3196 "parser.y"
     {(yyval.value).c = abc_pushtrue(0);
                     (yyval.value).t = TYPE_BOOLEAN;
-                   ;}
+                   }
+    }
     break;
 
-  case 222:
 
-/* Line 1455 of yacc.c  */
-#line 2413 "parser.y"
+  
+    case 240:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3199 "parser.y"
     {(yyval.value).c = abc_pushfalse(0);
                      (yyval.value).t = TYPE_BOOLEAN;
-                    ;}
+                    }
+    }
     break;
 
-  case 223:
 
-/* Line 1455 of yacc.c  */
-#line 2416 "parser.y"
+  
+    case 241:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3202 "parser.y"
     {(yyval.value).c = abc_pushnull(0);
                     (yyval.value).t = TYPE_NULL;
-                   ;}
+                   }
+    }
     break;
 
-  case 225:
 
-/* Line 1455 of yacc.c  */
-#line 2421 "parser.y"
+  
+    case 242:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3206 "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;
-            ;}
+            }
+    }
     break;
 
-  case 226:
 
-/* Line 1455 of yacc.c  */
-#line 2424 "parser.y"
+  
+    case 243:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3209 "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;
-            ;}
+            }
+    }
     break;
 
-  case 227:
 
-/* Line 1455 of yacc.c  */
-#line 2427 "parser.y"
+  
+    case 244:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3212 "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;
-             ;}
+             }
+    }
     break;
 
-  case 228:
 
-/* Line 1455 of yacc.c  */
-#line 2430 "parser.y"
+  
+    case 245:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3215 "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;
-             ;}
+             }
+    }
     break;
 
-  case 229:
 
-/* Line 1455 of yacc.c  */
-#line 2433 "parser.y"
+  
+    case 246:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3218 "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;
-             ;}
+             }
+    }
     break;
 
-  case 230:
 
-/* Line 1455 of yacc.c  */
-#line 2436 "parser.y"
+  
+    case 247:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3221 "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;
-              ;}
+              }
+    }
     break;
 
-  case 231:
 
-/* Line 1455 of yacc.c  */
-#line 2439 "parser.y"
+  
+    case 248:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3224 "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;
-             ;}
+             }
+    }
     break;
 
-  case 232:
 
-/* Line 1455 of yacc.c  */
-#line 2442 "parser.y"
+  
+    case 249:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3227 "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;
-             ;}
+             }
+    }
     break;
 
-  case 233:
 
-/* Line 1455 of yacc.c  */
-#line 2446 "parser.y"
+  
+    case 250:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3231 "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);
@@ -5401,13 +7056,17 @@ yyreduce:
               (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;
-             ;}
+             }
+    }
     break;
 
-  case 234:
 
-/* Line 1455 of yacc.c  */
-#line 2457 "parser.y"
+  
+    case 251:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3242 "parser.y"
     {
               (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
               /*printf("%08x:\n",$1.t);
@@ -5424,113 +7083,157 @@ yyreduce:
               (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;              
-             ;}
+             }
+    }
     break;
 
-  case 235:
 
-/* Line 1455 of yacc.c  */
-#line 2475 "parser.y"
+  
+    case 252:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3260 "parser.y"
     {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
               (yyval.value).c = abc_not((yyval.value).c);
               (yyval.value).t = TYPE_BOOLEAN;
-             ;}
+             }
+    }
     break;
 
-  case 236:
 
-/* Line 1455 of yacc.c  */
-#line 2480 "parser.y"
+  
+    case 253:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3265 "parser.y"
     {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
               (yyval.value).c = abc_bitnot((yyval.value).c);
               (yyval.value).t = TYPE_INT;
-             ;}
+             }
+    }
     break;
 
-  case 237:
 
-/* Line 1455 of yacc.c  */
-#line 2485 "parser.y"
+  
+    case 254:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3270 "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;
-            ;}
+            }
+    }
     break;
 
-  case 238:
 
-/* Line 1455 of yacc.c  */
-#line 2490 "parser.y"
+  
+    case 255:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3275 "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;
-            ;}
+            }
+    }
     break;
 
-  case 239:
 
-/* Line 1455 of yacc.c  */
-#line 2495 "parser.y"
+  
+    case 256:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3280 "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;
-            ;}
+            }
+    }
     break;
 
-  case 240:
 
-/* Line 1455 of yacc.c  */
-#line 2500 "parser.y"
+  
+    case 257:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3285 "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;
-            ;}
+            }
+    }
     break;
 
-  case 241:
 
-/* Line 1455 of yacc.c  */
-#line 2504 "parser.y"
+  
+    case 258:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3289 "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;
-            ;}
+            }
+    }
     break;
 
-  case 242:
 
-/* Line 1455 of yacc.c  */
-#line 2508 "parser.y"
+  
+    case 259:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3293 "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;
-            ;}
+            }
+    }
     break;
 
-  case 243:
 
-/* Line 1455 of yacc.c  */
-#line 2513 "parser.y"
+  
+    case 260:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3298 "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;
-            ;}
+            }
+    }
     break;
 
-  case 244:
 
-/* Line 1455 of yacc.c  */
-#line 2517 "parser.y"
+  
+    case 261:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3302 "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;
-            ;}
+            }
+    }
     break;
 
-  case 245:
 
-/* Line 1455 of yacc.c  */
-#line 2521 "parser.y"
+  
+    case 262:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3306 "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);
@@ -5539,13 +7242,17 @@ yyreduce:
                 (yyval.value).c = abc_add((yyval.value).c);
                 (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
              }
-            ;}
+            }
+    }
     break;
 
-  case 246:
 
-/* Line 1455 of yacc.c  */
-#line 2530 "parser.y"
+  
+    case 263:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3315 "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);
@@ -5554,13 +7261,17 @@ yyreduce:
                 (yyval.value).c = abc_subtract((yyval.value).c);
                 (yyval.value).t = TYPE_NUMBER;
              }
-            ;}
+            }
+    }
     break;
 
-  case 247:
 
-/* Line 1455 of yacc.c  */
-#line 2539 "parser.y"
+  
+    case 264:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3324 "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);
@@ -5569,98 +7280,134 @@ yyreduce:
                 (yyval.value).c = abc_multiply((yyval.value).c);
                 (yyval.value).t = TYPE_NUMBER;
              }
-            ;}
+            }
+    }
     break;
 
-  case 248:
 
-/* Line 1455 of yacc.c  */
-#line 2549 "parser.y"
+  
+    case 265:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3334 "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;
-             ;}
+             }
+    }
     break;
 
-  case 249:
 
-/* Line 1455 of yacc.c  */
-#line 2554 "parser.y"
+  
+    case 266:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3339 "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);
+              if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) {
+                MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data));
                 (yyval.value).c = abc_astype2((yyvsp[(1) - (3)].value).c, &m);
-                (yyval.value).t = (yyvsp[(3) - (3)].value).t->cls;
+                (yyval.value).t = (yyvsp[(3) - (3)].value).t->data;
               } 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;
               }
-             ;}
+             }
+    }
     break;
 
-  case 250:
 
-/* Line 1455 of yacc.c  */
-#line 2567 "parser.y"
+  
+    case 267:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3352 "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;
-             ;}
+             }
+    }
     break;
 
-  case 251:
 
-/* Line 1455 of yacc.c  */
-#line 2572 "parser.y"
+  
+    case 268:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3357 "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;
-             ;}
+             }
+    }
     break;
 
-  case 252:
 
-/* Line 1455 of yacc.c  */
-#line 2577 "parser.y"
+  
+    case 269:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3362 "parser.y"
     {
               (yyval.value).c = (yyvsp[(3) - (4)].value).c;
               (yyval.value).c = abc_typeof((yyval.value).c);
               (yyval.value).t = TYPE_STRING;
-             ;}
+             }
+    }
     break;
 
-  case 253:
 
-/* Line 1455 of yacc.c  */
-#line 2583 "parser.y"
+  
+    case 270:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3368 "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;
-             ;}
+             }
+    }
     break;
 
-  case 254:
 
-/* Line 1455 of yacc.c  */
-#line 2589 "parser.y"
+  
+    case 271:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3374 "parser.y"
     { (yyval.value).c = abc_pushundefined(0);
              (yyval.value).t = TYPE_ANY;
-           ;}
+           }
+    }
     break;
 
-  case 255:
 
-/* Line 1455 of yacc.c  */
-#line 2593 "parser.y"
-    {(yyval.value)=(yyvsp[(2) - (3)].value);;}
+  
+    case 272:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3378 "parser.y"
+    {(yyval.value)=(yyvsp[(2) - (3)].value);}
+    }
     break;
 
-  case 256:
 
-/* Line 1455 of yacc.c  */
-#line 2595 "parser.y"
+  
+    case 273:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3380 "parser.y"
     {
   (yyval.value)=(yyvsp[(2) - (2)].value);
   if(IS_INT((yyvsp[(2) - (2)].value).t)) {
@@ -5670,89 +7417,121 @@ yyreduce:
    (yyval.value).c=abc_negate((yyval.value).c);
    (yyval.value).t = TYPE_NUMBER;
   }
-;}
+}
+    }
     break;
 
-  case 257:
 
-/* Line 1455 of yacc.c  */
-#line 2606 "parser.y"
+  
+    case 274:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3391 "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
-;}
+}
+    }
     break;
 
-  case 258:
 
-/* Line 1455 of yacc.c  */
-#line 2615 "parser.y"
+  
+    case 275:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3400 "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).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).number);
     (yyval.value).t = registry_getarrayclass();
-;}
+}
+    }
     break;
 
-  case 259:
 
-/* Line 1455 of yacc.c  */
-#line 2622 "parser.y"
-    {(yyval.value_list).cc=0;(yyval.value_list).len=0;;}
+  
+    case 276:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3407 "parser.y"
+    {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
+    }
     break;
 
-  case 260:
 
-/* Line 1455 of yacc.c  */
-#line 2623 "parser.y"
+  
+    case 277:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3408 "parser.y"
     {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
+    }
     break;
 
-  case 261:
 
-/* Line 1455 of yacc.c  */
-#line 2625 "parser.y"
+  
+    case 278:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3410 "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;
-;}
+    (yyval.value_list).number = 2;
+}
+    }
     break;
 
-  case 262:
 
-/* Line 1455 of yacc.c  */
-#line 2631 "parser.y"
+  
+    case 279:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3416 "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).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 263:
 
-/* Line 1455 of yacc.c  */
-#line 2640 "parser.y"
+  
+    case 280:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3425 "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).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).number/2);
     (yyval.value).t = registry_getobjectclass();
-;}
+}
+    }
     break;
 
-  case 264:
 
-/* Line 1455 of yacc.c  */
-#line 2647 "parser.y"
+  
+    case 281:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3432 "parser.y"
     { 
                code_t*c = (yyvsp[(3) - (3)].value).c;
                if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
@@ -5763,85 +7542,129 @@ yyreduce:
                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;
-              ;}
+              }
+    }
     break;
 
-  case 265:
 
-/* Line 1455 of yacc.c  */
-#line 2659 "parser.y"
+  
+    case 282:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3444 "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;
-              ;}
+              }
+    }
     break;
 
-  case 266:
 
-/* Line 1455 of yacc.c  */
-#line 2665 "parser.y"
+  
+    case 283:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3450 "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;
-              ;}
+              }
+    }
     break;
 
-  case 267:
 
-/* Line 1455 of yacc.c  */
-#line 2671 "parser.y"
+  
+    case 284:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3456 "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;
-              ;}
+              }
+    }
     break;
 
-  case 268:
 
-/* Line 1455 of yacc.c  */
-#line 2677 "parser.y"
+  
+    case 285:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3462 "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;
-              ;}
+              }
+    }
     break;
 
-  case 269:
 
-/* Line 1455 of yacc.c  */
-#line 2683 "parser.y"
+  
+    case 286:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3468 "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;
-              ;}
+              }
+    }
     break;
 
-  case 270:
 
-/* Line 1455 of yacc.c  */
-#line 2689 "parser.y"
+  
+    case 287:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3474 "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;
-              ;}
+              }
+    }
+    break;
+
+
+  
+    case 288:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3480 "parser.y"
+    { 
+               code_t*c = abc_bitxor((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;
+              }
+    }
     break;
 
-  case 271:
 
-/* Line 1455 of yacc.c  */
-#line 2695 "parser.y"
+  
+    case 289:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3486 "parser.y"
     { 
                code_t*c = (yyvsp[(3) - (3)].value).c;
 
@@ -5854,13 +7677,17 @@ yyreduce:
                
                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              ;}
+              }
+    }
     break;
 
-  case 272:
 
-/* Line 1455 of yacc.c  */
-#line 2708 "parser.y"
+  
+    case 290:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3499 "parser.y"
     { code_t*c = (yyvsp[(3) - (3)].value).c; 
                if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
                 c=abc_subtract_i(c);
@@ -5871,25 +7698,33 @@ yyreduce:
                
                (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
                (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-             ;}
+             }
+    }
     break;
 
-  case 273:
 
-/* Line 1455 of yacc.c  */
-#line 2719 "parser.y"
+  
+    case 291:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3510 "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;
-            ;}
+            }
+    }
     break;
 
-  case 274:
 
-/* Line 1455 of yacc.c  */
-#line 2726 "parser.y"
+  
+    case 292:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3517 "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;
@@ -5899,18 +7734,22 @@ yyreduce:
               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 = converttype((yyval.value).c, (yyvsp[(5) - (5)].value).t, (yyval.value).t);
               (yyval.value).c = j2->branch = abc_label((yyval.value).c);
-            ;}
+            }
+    }
     break;
 
-  case 275:
 
-/* Line 1455 of yacc.c  */
-#line 2739 "parser.y"
+  
+    case 293:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3530 "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)) {
+             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)) {
@@ -5932,13 +7771,17 @@ yyreduce:
                  (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
                  (yyval.value).t = (yyvsp[(1) - (2)].value).t;
              }
-           ;}
+           }
+    }
     break;
 
-  case 276:
 
-/* Line 1455 of yacc.c  */
-#line 2766 "parser.y"
+  
+    case 294:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3557 "parser.y"
     { code_t*c = 0;
              classinfo_t*type = (yyvsp[(1) - (2)].value).t;
              if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
@@ -5951,13 +7794,17 @@ yyreduce:
              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;
-            ;}
+            }
+    }
     break;
 
-  case 277:
 
-/* Line 1455 of yacc.c  */
-#line 2780 "parser.y"
+  
+    case 295:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3571 "parser.y"
     { code_t*c = 0;
              classinfo_t*type = (yyvsp[(2) - (2)].value).t;
              if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
@@ -5970,13 +7817,17 @@ yyreduce:
              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;
-           ;}
+           }
+    }
     break;
 
-  case 278:
 
-/* Line 1455 of yacc.c  */
-#line 2794 "parser.y"
+  
+    case 296:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3585 "parser.y"
     { code_t*c = 0;
              classinfo_t*type = (yyvsp[(2) - (2)].value).t;
              if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
@@ -5989,140 +7840,272 @@ yyreduce:
              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;
-           ;}
+           }
+    }
     break;
 
-  case 279:
 
-/* Line 1455 of yacc.c  */
-#line 2809 "parser.y"
+  
+    case 297:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3600 "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, "");
+              memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
+
               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);
-           ;}
+              (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
+           }
+    }
     break;
 
-  case 280:
 
-/* Line 1455 of yacc.c  */
-#line 2824 "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();
-             }
-            ;}
+  
+    case 298:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3614 "parser.y"
+    {
+              // attribute TODO
+              (yyval.value).c = abc_pushundefined(0);
+              (yyval.value).t = 0;
+              as3_warning("ignored @ operator");
+           }
+    }
+    break;
+
+
+  
+    case 299:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3621 "parser.y"
+    {
+              // child attribute  TODO
+              (yyval.value).c = abc_pushundefined(0);
+              (yyval.value).t = 0;
+              as3_warning("ignored .@ operator");
+           }
+    }
+    break;
+
+
+  
+    case 300:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3628 "parser.y"
+    {
+              // namespace declaration TODO
+              (yyval.value).c = abc_pushundefined(0);
+              (yyval.value).t = 0;
+              as3_warning("ignored :: operator");
+           }
+    }
+    break;
+
+
+  
+    case 301:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3635 "parser.y"
+    {
+              // descendants TODO
+              (yyval.value).c = abc_pushundefined(0);
+              (yyval.value).t = 0;
+              as3_warning("ignored .. operator");
+           }
+    }
+    break;
+
+
+  
+    case 302:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3642 "parser.y"
+    {
+              // filter TODO
+              (yyval.value).c = abc_pushundefined(0);
+              (yyval.value).t = 0;
+              as3_warning("ignored .() operator");
+           }
+    }
+    break;
+
+
+  
+    case 303:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3653 "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->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 {
+            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((yyvsp[(1) - (3)].value).c && (yyvsp[(1) - (3)].value).c->opcode == OPCODE___PUSHPACKAGE__) {
+        string_t*package = (yyvsp[(1) - (3)].value).c->data[0];
+        char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
+        if(dict_contains(state->import_toplevel_packages, package2)) {
+            (yyval.value).c = (yyvsp[(1) - (3)].value).c;
+            (yyval.value).c->data[0] = string_new4(package2);
+            (yyval.value).t = 0;
+        } else {
+            slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
+            if(!a) 
+                syntaxerror("couldn't resolve %s", package2);
+            (yyval.value) = push_class(a);
+        }
+    } 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();
+    }
+}
+    }
     break;
 
-  case 281:
 
-/* Line 1455 of yacc.c  */
-#line 2857 "parser.y"
+  
+    case 304:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3703 "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 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 */
-    } else if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1))) {
+    if(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);
-        int i_am_static = ((state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC);
-        if(var_is_static != i_am_static) {
-            /* there doesn't seem to be any "static" way to access
-               static properties of a class */
+
+        if(f->kind == INFOTYPE_METHOD) {
+            (yyval.value).t = TYPE_FUNCTION(f);
+        } else {
+            (yyval.value).t = f->type;
+        }
+        if(var_is_static && !i_am_static) {
+        /* access to a static member from a non-static location.
+           do this via findpropstrict:
+           there doesn't seem to be any non-lookup way to access
+           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, ""};
             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);
+            break;
+        } else if(f->slot>0) {
+            (yyval.value).c = abc_getlocal_0((yyval.value).c);
+            (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
+            break;
         } else {
-            if(f->slot>0) {
-                (yyval.value).c = abc_getlocal_0((yyval.value).c);
-                (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
-            } else {
-                namespace_t ns = {flags2access(f->flags), ""};
-                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);
-            }
-        }
-        if(f->kind == MEMBER_METHOD) {
-            (yyval.value).t = TYPE_FUNCTION(f);
-        } else {
-            (yyval.value).t = f->type;
+            namespace_t ns = {f->access, ""};
+            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);
+            break;
         }
+    } 
     
     /* look at actual classes, in the current package and imported */
-    } else 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);
-        }
+    if((a = find_class((yyvsp[(1) - (1)].id)))) {
+        (yyval.value) = push_class(a);
+        break;
+    }
+
+    /* look through package prefixes */
+    if(dict_contains(state->import_toplevel_packages, (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 */
-    } else {
-        if(strcmp((yyvsp[(1) - (1)].id),"trace"))
-            as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
+    if(1) {
+        //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)};
@@ -6131,41 +8114,106 @@ yyreduce:
         (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
         (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
     }
-;}
+}
+    }
+    break;
+
+
+  
+    case 305:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3808 "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 282:
 
-/* Line 1455 of yacc.c  */
-#line 2944 "parser.y"
-    {(yyval.code)=0;;}
+  
+    case 306:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3815 "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 283:
 
-/* Line 1455 of yacc.c  */
-#line 2945 "parser.y"
-    {(yyval.code)=0;;}
+  
+    case 307:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3822 "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 284:
 
-/* Line 1455 of yacc.c  */
-#line 2946 "parser.y"
-    {(yyval.code)=0;;}
+  
+    case 308:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3829 "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 285:
 
-/* Line 1455 of yacc.c  */
-#line 2948 "parser.y"
-    {(yyval.token)=0;;}
+  
+    case 309:
+    if(as3_pass==2) {
+
+/* Line 1464 of skeleton.m4  */
+#line 3844 "parser.y"
+    {
+    PASS12
+    char*url = 0;
+    trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, url);
+    (yyval.code)=0;
+}
+    }
     break;
 
 
 
-/* Line 1455 of yacc.c  */
-#line 6169 "parser.tab.c"
+
+/* Line 1464 of skeleton.m4  */
+#line 8217 "parser.tab.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);