small adjustments
[swftools.git] / lib / as3 / parser.tab.c
index b9826cf..b5ee375 100644 (file)
@@ -1,21 +1,21 @@
 
 
-/* A Bison parser, made by GNU Bison 2.4.  */
+/* A Bison parser, made by GNU Bison 2.4.277-62c99-dirty.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-   
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
+   Software Foundation, Inc.
+
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -28,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
@@ -46,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4"
+#define YYBISON_VERSION "2.4.277-62c99-dirty"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "./skeleton.m4"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "./skeleton.m4"
@@ -74,7 +74,6 @@
 
 
 /* Copy the first part of user declarations.  */
 
 
 /* Copy the first part of user declarations.  */
-
 /* Line 198 of skeleton.m4  */
 #line 23 "parser.y"
 
 /* Line 198 of skeleton.m4  */
 #line 23 "parser.y"
 
 #include "abc.h"
 #include "pool.h"
 #include "files.h"
 #include "abc.h"
 #include "pool.h"
 #include "files.h"
+#include "common.h"
 #include "tokenizer.h"
 #include "registry.h"
 #include "code.h"
 #include "opcodes.h"
 #include "compiler.h"
 #include "tokenizer.h"
 #include "registry.h"
 #include "code.h"
 #include "opcodes.h"
 #include "compiler.h"
+#include "expr.h"
+#include "initcode.h"
 
 extern int a3_lex();
 
 
 
 extern int a3_lex();
 
 
-
 /* Line 198 of skeleton.m4  */
 /* Line 198 of skeleton.m4  */
-#line 99 "parser.tab.c"
+#line 100 "parser.tab.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
-# define YYDEBUG 0
+# define YYDEBUG b4_debug_flag
 #endif
 
 /* Enabling verbose error messages.  */
 #endif
 
 /* Enabling verbose error messages.  */
@@ -107,7 +108,7 @@ extern int a3_lex();
 # undef YYERROR_VERBOSE
 # define YYERROR_VERBOSE 1
 #else
 # undef YYERROR_VERBOSE
 # define YYERROR_VERBOSE 1
 #else
-# define YYERROR_VERBOSE 1
+# define YYERROR_VERBOSE b4_error_verbose_flag
 #endif
 
 /* Enabling the token table.  */
 #endif
 
 /* Enabling the token table.  */
@@ -129,26 +130,26 @@ extern int a3_lex();
      T_EMPTY = 262,
      T_INT = 263,
      T_UINT = 264,
      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,
+     T_FLOAT = 265,
+     T_FOR = 266,
+     T_WHILE = 267,
+     T_DO = 268,
+     T_SWITCH = 269,
+     KW_IMPLEMENTS = 270,
+     KW_NAMESPACE = 271,
+     KW_PACKAGE = 272,
+     KW_PROTECTED = 273,
+     KW_ARGUMENTS = 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_NAN = 284,
      KW_CONTINUE = 285,
      KW_CLASS = 286,
      KW_CONST = 287,
      KW_CONTINUE = 285,
      KW_CLASS = 286,
      KW_CONST = 287,
@@ -182,69 +183,73 @@ extern int a3_lex();
      KW_NUMBER = 315,
      KW_STRING = 316,
      KW_DEFAULT = 317,
      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_EQEQ = 325,
-     T_EQEQEQ = 326,
-     T_NE = 327,
-     T_NEE = 328,
-     T_LE = 329,
-     T_GE = 330,
-     T_ORBY = 331,
-     T_DIVBY = 332,
-     T_MODBY = 333,
-     T_MULBY = 334,
-     T_PLUSBY = 335,
-     T_MINUSBY = 336,
-     T_SHRBY = 337,
-     T_SHLBY = 338,
-     T_USHRBY = 339,
-     T_OROR = 340,
-     T_ANDAND = 341,
-     T_COLONCOLON = 342,
-     T_MINUSMINUS = 343,
-     T_PLUSPLUS = 344,
-     T_DOTDOT = 345,
-     T_DOTDOTDOT = 346,
-     T_SHL = 347,
-     T_USHR = 348,
-     T_SHR = 349,
-     prec_none = 350,
-     below_semicolon = 351,
-     below_assignment = 352,
-     below_minus = 355,
-     minusminus_prefix = 356,
-     plusplus_prefix = 357,
-     below_curly = 358,
-     new2 = 359,
-     above_identifier = 360,
-     below_else = 361,
-     above_function = 362
+     KW_DEFAULT_XML = 318,
+     KW_DELETE = 319,
+     KW_IF = 320,
+     KW_ELSE = 321,
+     KW_BREAK = 322,
+     KW_IS = 323,
+     KW_IN = 324,
+     KW_AS = 325,
+     T_DICTSTART = 326,
+     T_EQEQ = 327,
+     T_EQEQEQ = 328,
+     T_NE = 329,
+     T_NEE = 330,
+     T_LE = 331,
+     T_GE = 332,
+     T_ORBY = 333,
+     T_DIVBY = 334,
+     T_MODBY = 335,
+     T_MULBY = 336,
+     T_ANDBY = 337,
+     T_PLUSBY = 338,
+     T_MINUSBY = 339,
+     T_XORBY = 340,
+     T_SHRBY = 341,
+     T_SHLBY = 342,
+     T_USHRBY = 343,
+     T_OROR = 344,
+     T_ANDAND = 345,
+     T_COLONCOLON = 346,
+     T_MINUSMINUS = 347,
+     T_PLUSPLUS = 348,
+     T_DOTDOT = 349,
+     T_DOTDOTDOT = 350,
+     T_SHL = 351,
+     T_USHR = 352,
+     T_SHR = 353,
+     prec_none = 354,
+     below_semicolon = 355,
+     below_assignment = 356,
+     below_lt = 357,
+     below_minus = 358,
+     minusminus_prefix = 359,
+     plusplus_prefix = 360,
+     below_curly = 361,
+     new2 = 362,
+     above_identifier = 363,
+     below_else = 364,
+     above_function = 365
    };
 #endif
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
    };
 #endif
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union 
-/* Line 223 of skeleton.m4  */
-#line 44 "parser.y"
+typedef union /* Line 223 of skeleton.m4  */
+#line 47 "parser.y"
 tokenunion
 {
 tokenunion
 {
-
 /* Line 223 of skeleton.m4  */
 /* Line 223 of skeleton.m4  */
-#line 44 "parser.y"
+#line 47 "parser.y"
 
     enum yytokentype token;
 
     enum yytokentype token;
-    int flags;
 
     classinfo_t*classinfo;
     classinfo_list_t*classinfo_list;
 
     classinfo_t*classinfo;
     classinfo_list_t*classinfo_list;
+    slotinfo_t*slotinfo;
+    slotinfo_list_t*slotinfo_list;
 
     int number_int;
     unsigned int number_uint;
 
     int number_int;
     unsigned int number_uint;
@@ -261,15 +266,17 @@ tokenunion
     for_start_t for_start;
     abc_exception_t *exception;
     regexp_t regexp;
     for_start_t for_start;
     abc_exception_t *exception;
     regexp_t regexp;
+    modifiers_t flags;
+    namespace_decl_t* namespace_decl;
+    node_t*node;
     struct {
         abc_exception_list_t *l;
         code_t*finally;
     } catch_list;
 
 
     struct {
         abc_exception_list_t *l;
         code_t*finally;
     } catch_list;
 
 
-
 /* Line 223 of skeleton.m4  */
 /* Line 223 of skeleton.m4  */
-#line 273 "parser.tab.c"
+#line 280 "parser.tab.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -278,9 +285,8 @@ tokenunion
 
 
 /* Copy the second part of user declarations.  */
 
 
 /* Copy the second part of user declarations.  */
-
 /* Line 273 of skeleton.m4  */
 /* Line 273 of skeleton.m4  */
-#line 257 "parser.y"
+#line 276 "parser.y"
 
 
 static int a3_error(char*s)
 
 
 static int a3_error(char*s)
@@ -289,6 +295,13 @@ static int a3_error(char*s)
    return 0; //make gcc happy
 }
 
    return 0; //make gcc happy
 }
 
+static void parsererror(const char*file, int line, const char*f)
+{
+    syntaxerror("internal error in %s, %s:%d", f, file, line);
+}
+
+#define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
+
 
 static char* concat2(const char* t1, const char* t2)
 {
 
 static char* concat2(const char* t1, const char* t2)
 {
@@ -316,37 +329,66 @@ static char* concat3(const char* t1, const char* t2, const char* t3)
 typedef struct _import {
     char*package;
 } import_t;
 typedef struct _import {
     char*package;
 } import_t;
-
 DECLARE_LIST(import);
 
 DECLARE_LIST(import);
 
+DECLARE(methodstate);
+DECLARE_LIST(methodstate);
+
 typedef struct _classstate {
     /* class data */
     classinfo_t*info;
     abc_class_t*abc;
 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;
+    parsedclass_t*dependencies;
+
     char has_constructor;
 } classstate_t;
 
     char has_constructor;
 } classstate_t;
 
-DECLARE_LIST(methodstate);
-
-typedef struct _methodstate {
+struct _methodstate {
     /* method data */
     methodinfo_t*info;
     /* method data */
     methodinfo_t*info;
+    char has_exceptions;
     char late_binding;
     char is_constructor;
     char has_super;
     char is_global;
     char late_binding;
     char is_constructor;
     char has_super;
     char is_global;
+    char is_static;
     int variable_count;
 
     int variable_count;
 
+    dict_t*unresolved_variables;
+
     char inner;
     char inner;
+    char uses_parent_function;
+    char no_variable_scoping;
+    int uses_slots;
+    dict_t*slots;
+    int activation_var;
+
+    int need_arguments;
+
     abc_method_t*abc;
     int var_index; // for inner methods
     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_list_t*innerfunctions;
     abc_exception_list_t*exceptions;
     
     methodstate_list_t*innerfunctions;
-} methodstate_t;
+};
+
+void methodstate_destroy(methodstate_t*m) 
+{
+    dict_destroy(m->unresolved_variables);
+    m->unresolved_variables = 0;
+    list_free(m->innerfunctions);m->innerfunctions=0;
+}
 
 typedef struct _state {
     struct _state*old;
 
 typedef struct _state {
     struct _state*old;
@@ -354,21 +396,34 @@ typedef struct _state {
     
     char*package;     
     import_list_t*wildcard_imports;
     
     char*package;     
     import_list_t*wildcard_imports;
+    dict_t*import_toplevel_packages;
     dict_t*imports;
     dict_t*imports;
+
+    namespace_list_t*active_namespace_urls;
+    
     char has_own_imports;
     char new_vars; // e.g. transition between two functions
     char has_own_imports;
     char new_vars; // e.g. transition between two functions
+    char xmlfilter; // are we inside a xmlobj..() filter?
   
     classstate_t*cls;   
     methodstate_t*method;
 
     char*exception_name;
   
     classstate_t*cls;   
     methodstate_t*method;
 
     char*exception_name;
+
+    int switch_var;
     
     dict_t*vars;
     
     dict_t*vars;
+    dict_t*allvars; // also contains variables from sublevels
 } state_t;
 
 typedef struct _global {
     abc_file_t*file;
 } state_t;
 
 typedef struct _global {
     abc_file_t*file;
-    abc_script_t*init;
+
+    parsedclass_list_t*classes;
+    abc_script_t*classinit;
+
+    abc_script_t*init; //package-level code
+
     dict_t*token2info;
     dict_t*file2token2info;
 } global_t;
     dict_t*token2info;
     dict_t*file2token2info;
 } global_t;
@@ -378,22 +433,25 @@ static state_t* state = 0;
 
 DECLARE_LIST(state);
 
 
 DECLARE_LIST(state);
 
-#define MULTINAME(m,x) \
-    multiname_t m;\
-    namespace_t m##_ns;\
-    (x)->package; \
-    registry_fill_multiname(&m, &m##_ns, (slotinfo_t*)(x));
-                    
+/* protected handling here is a big hack: we just assume the protectedns
+   is package:class. the correct approach would be to add the proper
+   namespace to all protected members in the registry, even though that
+   would slow down searching */
 #define MEMBER_MULTINAME(m,f,n) \
     multiname_t m;\
     namespace_t m##_ns;\
     if(f) { \
 #define MEMBER_MULTINAME(m,f,n) \
     multiname_t m;\
     namespace_t m##_ns;\
     if(f) { \
-        m##_ns.access = (f)->access; \
-        m##_ns.name = ""; \
+        m##_ns.access = ((slotinfo_t*)(f))->access; \
+        if(m##_ns.access == ACCESS_NAMESPACE) \
+            m##_ns.name = ((slotinfo_t*)(f))->package; \
+        else if(m##_ns.access == ACCESS_PROTECTED && (f)->parent) \
+            m##_ns.name = concat3((f)->parent->package,":",(f)->parent->name); \
+        else \
+            m##_ns.name = ""; \
         m.type = QNAME; \
         m.ns = &m##_ns; \
         m.namespace_set = 0; \
         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; \
     } else { \
         m.type = MULTINAME; \
         m.ns =0; \
@@ -414,13 +472,22 @@ DECLARE_LIST(state);
 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
 static namespace_t ns1 = {ACCESS_PRIVATE, ""};
 static namespace_t ns2 = {ACCESS_PROTECTED, ""};
 static namespace_t ns3 = {ACCESS_PACKAGEINTERNAL, ""};
-static namespace_t ns4 = {ACCESS_PACKAGE, ""};
-static namespace_list_t nl4 = {&ns4,0};
+static namespace_t stdns = {ACCESS_PACKAGE, ""};
+static namespace_list_t nl4 = {&stdns,0};
 static namespace_list_t nl3 = {&ns3,&nl4};
 static namespace_list_t nl2 = {&ns2,&nl3};
 static namespace_list_t nl1 = {&ns1,&nl2};
 static namespace_set_t nopackage_namespace_set = {&nl1};
 
 static namespace_list_t nl3 = {&ns3,&nl4};
 static namespace_list_t nl2 = {&ns2,&nl3};
 static namespace_list_t nl1 = {&ns1,&nl2};
 static namespace_set_t nopackage_namespace_set = {&nl1};
 
+static dict_t*definitions=0;
+void as3_set_define(const char*c)
+{
+    if(!definitions) 
+        definitions = dict_new();
+    if(!dict_contains(definitions,c))
+        dict_put(definitions,c,0);
+}
+
 static void new_state()
 {
     NEW(state_t, s);
 static void new_state()
 {
     NEW(state_t, s);
@@ -430,17 +497,20 @@ static void new_state()
     if(!s->imports) {
         s->imports = dict_new();
     }
     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 = s;
     state->level++;
     state->has_own_imports = 0;    
     state->vars = dict_new(); 
     state->old = oldstate;
-}
-static void state_has_imports()
-{
-    state->wildcard_imports = list_clone(state->wildcard_imports);
-    state->imports = dict_clone(state->imports);
-    state->has_own_imports = 1;
+    state->new_vars = 0;
+
+    trie_remember(active_namespaces);
+   
+    if(oldstate)
+        state->active_namespace_urls = list_clone(oldstate->active_namespace_urls);
 }
 
 static void state_destroy(state_t*state)
 }
 
 static void state_destroy(state_t*state)
@@ -453,52 +523,61 @@ static void state_destroy(state_t*state)
         dict_destroy(state->imports);state->imports=0;
     }
     if(state->vars) {
         dict_destroy(state->imports);state->imports=0;
     }
     if(state->vars) {
-        int t;
-        for(t=0;t<state->vars->hashsize;t++) {
-            dictentry_t*e =state->vars->slots[t];
-            while(e) {
-                free(e->data);e->data=0;
-                e = e->next;
-            }
-        }
         dict_destroy(state->vars);state->vars=0;
     }
         dict_destroy(state->vars);state->vars=0;
     }
+    if(state->new_vars && state->allvars) {
+        parserassert(!state->old || state->old->allvars != state->allvars);
+        DICT_ITERATE_DATA(state->allvars, void*, data) {
+            free(data);
+        }
+        dict_destroy(state->allvars);
+    }
+    
+    list_free(state->active_namespace_urls)
+    state->active_namespace_urls = 0;
     
     free(state);
 }
 
 static void old_state()
 {
     
     free(state);
 }
 
 static void old_state()
 {
+    trie_rollback(active_namespaces);
+
     if(!state || !state->old)
         syntaxerror("invalid nesting");
     state_t*leaving = state;
     
     state = state->old;
     if(!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) {
     if(as3_pass>1 && leaving->method && leaving->method != state->method && !leaving->method->inner) {
-        free(leaving->method);
-        leaving->method=0;
+        methodstate_destroy(leaving->method);leaving->method=0;
     }
     }
-    if(leaving->cls && leaving->cls != state->cls) {
+    if(as3_pass>1 && leaving->cls && leaving->cls != state->cls) {
         free(leaving->cls);
         leaving->cls=0;
     }
         free(leaving->cls);
         leaving->cls=0;
     }
-    
+
     state_destroy(leaving);
 }
 
     state_destroy(leaving);
 }
 
+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, char has_params, 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");
     }
 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 = internal_filename_package = strdup(filename);
     new_state();
     state->package = internal_filename_package = strdup(filename);
+    state->allvars = dict_new();
     
     
-    state->method = rfx_calloc(sizeof(methodstate_t));
-    state->method->variable_count = 1;
-
     global->token2info = dict_lookup(global->file2token2info, 
                                      current_filename // use long version
                                     );
     global->token2info = dict_lookup(global->file2token2info, 
                                      current_filename // use long version
                                     );
@@ -506,6 +585,19 @@ void initialize_file(char*filename)
         global->token2info = dict_new2(&ptr_type);
         dict_put(global->file2token2info, current_filename, 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);
+        state->method->variable_count = 0;
+        if(!state->method)
+            syntaxerror("internal error: skewed tokencount");
+        function_initvars(state->method, 0, 0, 0, 1);
+        global->init = 0;
+    }
 }
 
 void finish_file()
 }
 
 void finish_file()
@@ -513,10 +605,19 @@ void finish_file()
     if(!state || state->level!=1) {
         syntaxerror("unexpected end of file in pass %d", as3_pass);
     }
     if(!state || state->level!=1) {
         syntaxerror("unexpected end of file in pass %d", as3_pass);
     }
-    free(state->method);state->method=0;
+    
+    if(as3_pass==2) {
+        dict_del(global->file2token2info, current_filename);
+        code_t*header = method_header(state->method);
+        //if(global->init->method->body->code || global->init->traits) {
+        if(global->init) {
+            code_t*c = wrap_function(header, 0, global->init->method->body->code);
+            global->init->method->body->code = abc_returnvoid(c);
+            free(state->method);state->method=0;
+        }
+    }
 
     //free(state->package);state->package=0; // used in registry
 
     //free(state->package);state->package=0; // used in registry
-
     state_destroy(state);state=0;
 }
 
     state_destroy(state);state=0;
 }
 
@@ -527,132 +628,161 @@ void initialize_parser()
     global->file->flags &= ~ABCFILE_LAZY;
     global->file2token2info = dict_new();
     global->token2info = 0;
     global->file->flags &= ~ABCFILE_LAZY;
     global->file2token2info = dict_new();
     global->token2info = 0;
-    
-    global->init = abc_initscript(global->file);
-    code_t*c = global->init->method->body->code;
-    c = abc_getlocal_0(c);
-    c = abc_pushscope(c);
-    global->init->method->body->code = c;
+    global->classinit = abc_initscript(global->file);
 }
 
 void* finish_parser()
 {
 }
 
 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);
     dict_free_all(global->file2token2info, 1, (void*)dict_destroy);
-
     global->token2info=0;
     global->token2info=0;
-
-    return global->file;
-}
-
-
-static void xx_scopetest() 
-{
-    /* findpropstrict doesn't just return a scope object- it
-       also makes it "active" somehow. Push local_0 on the
-       scope stack and read it back with findpropstrict, it'll
-       contain properties like "trace". Trying to find the same
-       property on a "vanilla" local_0 yields only a "undefined" */
-    //c = abc_findpropstrict(c, "[package]::trace");
     
     
-    /*c = abc_getlocal_0(c);
-    c = abc_findpropstrict(c, "[package]::trace");
-    c = abc_coerce_a(c);
-    c = abc_setlocal_1(c);
+    initcode_add_classlist(global->classinit, global->classes);
 
 
-    c = abc_pushbyte(c, 0);
-    c = abc_setlocal_2(c);
-   
-    code_t*xx = c = abc_label(c);
-    c = abc_findpropstrict(c, "[package]::trace");
-    c = abc_pushstring(c, "prop:");
-    c = abc_hasnext2(c, 1, 2);
-    c = abc_dup(c);
-    c = abc_setlocal_3(c);
-    c = abc_callpropvoid(c, "[package]::trace", 2);
-    c = abc_getlocal_3(c);
-    c = abc_kill(c, 3);
-    c = abc_iftrue(c,xx);*/
+    return global->file;
 }
 
 }
 
-
 typedef struct _variable {
     int index;
     classinfo_t*type;
     char init;
 typedef struct _variable {
     int index;
     classinfo_t*type;
     char init;
+    char kill;
+    char is_parameter;
+    methodstate_t*is_inner_method;
 } variable_t;
 
 } 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)
+    if(s->method->no_variable_scoping) {
+        return dict_lookup(s->allvars, name);
+    } else {
+        state_t*top = s;
+        while(s) {
+            variable_t*v = 0;
             v = dict_lookup(s->vars, name);
             v = dict_lookup(s->vars, name);
-        if(v) {
-            return v;
+            if(v) return v;
+            if(s->new_vars) break;
+            s = s->old;
         }
         }
-        if(s->new_vars)
-            break;
-        s = s->old;
+        return 0;
     }
     }
+}
+static variable_t* find_slot(methodstate_t*m, const char*name)
+{
+    if(m && m->slots)
+        return dict_lookup(m->slots, name);
     return 0;
     return 0;
-} 
-static variable_t* find_variable_safe(char*name)
+}
+
+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;
 }
     if(!v)
         syntaxerror("undefined variable: %s", name);
     return v;
 }
+
 static char variable_exists(char*name) 
 {
 static char variable_exists(char*name) 
 {
-    return dict_lookup(state->vars, name)!=0;
+    return dict_contains(state->vars, name);
+}
+
+static code_t*defaultvalue(code_t*c, classinfo_t*type)
+{
+    if(TYPE_IS_INT(type)) {
+       c = abc_pushbyte(c, 0);
+    } else if(TYPE_IS_UINT(type)) {
+       c = abc_pushuint(c, 0);
+    } else if(TYPE_IS_FLOAT(type)) {
+       c = abc_pushnan(c);
+    } else if(TYPE_IS_BOOLEAN(type)) {
+       c = abc_pushfalse(c);
+    } else if(TYPE_IS_STRING(type)) {
+       c = abc_pushnull(c);
+       c = abc_coerce_s(c);
+    } else if(!type) {
+       //c = abc_pushundefined(c);
+        syntaxerror("internal error: can't generate default value for * type");
+    } else {
+       c = abc_pushnull(c);
+       MULTINAME(m, type);
+       c = abc_coerce2(c, &m);
+    }
+    return c;
+}
+
+static int alloc_local()
+{
+    return state->method->variable_count++;
 }
 }
-code_t*defaultvalue(code_t*c, classinfo_t*type);
-static int new_variable(const char*name, classinfo_t*type, char init)
+
+static variable_t* new_variable2(methodstate_t*method, const char*name, classinfo_t*type, char init, char maybeslot)
 {
 {
+    if(maybeslot) {
+        variable_t*v = find_slot(method, name);
+        if(v) {
+            alloc_local(); 
+            return v;
+        }
+    }
+
     NEW(variable_t, v);
     NEW(variable_t, v);
-    v->index = state->method->variable_count;
+    v->index = alloc_local();
     v->type = type;
     v->type = type;
-    v->init = init;
-    
-    dict_put(state->vars, name, v);
+    v->init = v->kill = init;
+    if(name) {
+        if(!method->no_variable_scoping) 
+        {
+            if(dict_contains(state->vars, name)) {
+                *(int*)0=0;
+                syntaxerror("variable %s already defined", name);
+            }
+            dict_put(state->vars, name, v);
+        }
+        if(method->no_variable_scoping && 
+           as3_pass==2 && 
+           dict_contains(state->allvars, name)) 
+        {
+            variable_t*v = dict_lookup(state->allvars, name);
+            if(v->type != type)
+                syntaxerror("variable %s already defined.", name);
+            return v;
+        }
+        dict_put(state->allvars, name, v);
+    }
 
 
-    return state->method->variable_count++;
+    return v;
 }
 }
+static int new_variable(methodstate_t*method, const char*name, classinfo_t*type, char init, char maybeslot)
+{
+    return new_variable2(method, name, type, init, maybeslot)->index;
+}
+
 #define TEMPVARNAME "__as3_temp__"
 #define TEMPVARNAME "__as3_temp__"
-static int gettempvar()
+int gettempvar()
 {
 {
-    variable_t*v = find_variable(TEMPVARNAME);
+    variable_t*v = find_variable(state, TEMPVARNAME);
+    int i;
     if(v) 
     if(v) 
-        return v->index;
-    return new_variable(TEMPVARNAME, 0, 0);
+        i = v->index;
+    else
+        i = new_variable(state->method, TEMPVARNAME, 0, 0, 0);
+    parserassert(i);
+    return i;
 }
 
 }
 
-code_t* var_block(code_t*body) 
+static code_t* var_block(code_t*body, dict_t*vars) 
 {
     code_t*c = 0;
     code_t*k = 0;
     int t;
 {
     code_t*c = 0;
     code_t*k = 0;
     int t;
-    int num=0;
-    for(t=0;t<state->vars->hashsize;t++) {
-        dictentry_t*e = state->vars->slots[t];
-        while(e) {
-            variable_t*v = (variable_t*)e->data;
-            if(v->type && v->init) {
-                c = defaultvalue(c, v->type);
-                c = abc_setlocal(c, v->index);
-                k = abc_kill(k, v->index); 
-                num++;
-            }
-            e = e->next;
+    DICT_ITERATE_DATA(vars, variable_t*, v) {
+        if(v->type && v->init) {
+            c = defaultvalue(c, v->type);
+            c = abc_setlocal(c, v->index);
+        }
+        if(v->type && v->kill) {
+            k = abc_kill(k, v->index); 
         }
     }
 
         }
     }
 
@@ -680,40 +810,85 @@ code_t* var_block(code_t*body)
     return c;
 }
 
     return c;
 }
 
-#define parserassert(b) {if(!(b)) parsererror(__FILE__, __LINE__,__func__);}
-
-static void parsererror(const char*file, int line, const char*f)
+static void unknown_variable(char*name) 
 {
 {
-    syntaxerror("internal error in %s, %s:%d", f, file, line);
+    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);
 }
 
 }
 
-   
-code_t* method_header()
+static code_t* add_scope_code(code_t*c, methodstate_t*m, char init)
 {
 {
-    code_t*c = 0;
-    if(state->method->late_binding && !state->method->inner) {
+    if(m->uses_slots || m->innerfunctions || (m->late_binding && !m->inner)) {
         c = abc_getlocal_0(c);
         c = abc_pushscope(c);
     }
         c = abc_getlocal_0(c);
         c = abc_pushscope(c);
     }
-    /*if(state->method->innerfunctions) {
-        c = abc_newactivation(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);
+    if(m->uses_slots) {
+        /* FIXME: this alloc_local() causes variable indexes to be
+           different in pass2 than in pass1 */
+        if(!m->activation_var) {
+            m->activation_var = alloc_local();
+        }
+        if(init) {
+            c = abc_newactivation(c);
+            c = abc_dup(c);
+            c = abc_pushscope(c);
+            c = abc_setlocal(c, m->activation_var);
+        } else {
+            c = abc_getlocal(c, m->activation_var);
+            c = abc_pushscope(c);
+        }
     }
     }
-    methodstate_list_t*l = state->method->innerfunctions;
+    return c;
+}
+
+static code_t* method_header(methodstate_t*m)
+{
+    code_t*c = 0;
+
+    c = add_scope_code(c, m, 1);
+
+    methodstate_list_t*l = m->innerfunctions;
     while(l) {
         parserassert(l->methodstate->abc);
     while(l) {
         parserassert(l->methodstate->abc);
-        c = abc_newfunction(c, l->methodstate->abc);
-        c = abc_setlocal(c, l->methodstate->var_index);
+        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;
     }
         free(l->methodstate);l->methodstate=0;
         l = l->next;
     }
-    list_free(state->method->innerfunctions);
-    state->method->innerfunctions = 0;
+    if(m->header) {
+        c = code_append(c, m->header);
+        m->header = 0;
+    }
+    if(m->is_constructor && !m->has_super) {
+        // call default constructor
+        c = abc_getlocal_0(c);
+        c = abc_constructsuper(c, 0);
+    }
+
+    if(m->slots) {
+        /* all parameters that are used by inner functions
+           need to be copied from local to slot */
+        parserassert(m->activation_var);
+        DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) {
+            if(v->is_parameter) {
+                c = abc_getlocal(c, m->activation_var); 
+                c = abc_getlocal(c, v->index); 
+                c = abc_setslot(c, v->index); 
+            }
+        }
+    }
+    list_free(m->innerfunctions);
+    m->innerfunctions = 0;
     return c;
 }
     
     return c;
 }
     
@@ -721,7 +896,7 @@ code_t* method_header()
 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
 {
     c = code_append(c, header);
 static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
 {
     c = code_append(c, header);
-    c = code_append(c, var_block(body));
+    c = code_append(c, var_block(body, state->method->no_variable_scoping?state->allvars:state->vars));
     /* append return if necessary */
     if(!c || (c->opcode != OPCODE_RETURNVOID && 
               c->opcode != OPCODE_RETURNVALUE)) {
     /* append return if necessary */
     if(!c || (c->opcode != OPCODE_RETURNVOID && 
               c->opcode != OPCODE_RETURNVALUE)) {
@@ -730,20 +905,15 @@ static code_t* wrap_function(code_t*c,code_t*header, code_t*body)
     return c;
 }
 
     return c;
 }
 
-
 static void startpackage(char*name)
 {
     new_state();
 static void startpackage(char*name)
 {
     new_state();
-    /*printf("entering package \"%s\"\n", name);*/
     state->package = strdup(name);
 }
 static void endpackage()
 {
     state->package = strdup(name);
 }
 static void endpackage()
 {
-    /*printf("leaving package \"%s\"\n", state->package);*/
-
     //used e.g. in classinfo_register:
     //free(state->package);state->package=0;
     //used e.g. in classinfo_register:
     //free(state->package);state->package=0;
-
     old_state();
 }
 
     old_state();
 }
 
@@ -753,52 +923,149 @@ static void endpackage()
 #define FLAG_PACKAGEINTERNAL 2048
 #define FLAG_NAMESPACE 4096
 
 #define FLAG_PACKAGEINTERNAL 2048
 #define FLAG_NAMESPACE 4096
 
-static int flags2access(int flags)
+static namespace_t modifiers2access(modifiers_t*mod)
 {
 {
-    int access = 0;
-    if(flags&FLAG_PUBLIC)  {
-        if(access&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
+    namespace_t ns;
+    ns.access = 0;
+    ns.name = "";
+    if(mod->flags&FLAG_NAMESPACE)  {
+        if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
+            syntaxerror("invalid combination of access levels and namespaces");
+        ns.access = ACCESS_NAMESPACE;
+        state_t*s = state;
+        const char*url = (const char*)trie_lookup(active_namespaces, mod->ns);
+        if(!url) {
+            /* shouldn't happen- the tokenizer only reports something as a namespace
+               if it was already registered */
+            trie_dump(active_namespaces);
+            syntaxerror("unknown namespace: %s", mod->ns);
+        }
+        ns.name = url;
+    } else if(mod->flags&FLAG_PUBLIC)  {
+        if(mod->flags&(FLAG_PRIVATE|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
             syntaxerror("invalid combination of access levels");
             syntaxerror("invalid combination of access levels");
-        access = ACCESS_PACKAGE;
-    } else if(flags&FLAG_PRIVATE) {
-        if(access&(FLAG_PUBLIC|FLAG_PROTECTED|FLAG_PACKAGEINTERNAL)) 
+        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");
             syntaxerror("invalid combination of access levels");
-        access = ACCESS_PRIVATE;
-    } else if(flags&FLAG_PROTECTED) {
-        if(access&(FLAG_PUBLIC|FLAG_PRIVATE|FLAG_PACKAGEINTERNAL)) 
+        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");
             syntaxerror("invalid combination of access levels");
-        access = ACCESS_PROTECTED;
+        ns.access = ACCESS_PROTECTED;
     } else {
     } else {
-        access = ACCESS_PACKAGEINTERNAL;
+        ns.access = ACCESS_PACKAGEINTERNAL;
+    }
+    return ns;
+}
+static slotinfo_t* find_class(const char*name);
+
+static memberinfo_t* findmember_nsset(classinfo_t*cls, const char*name, char recurse)
+{
+    return registry_findmember_nsset(cls, state->active_namespace_urls, name, recurse);
+}
+
+static void innerfunctions2vars(methodstate_t*m)
+{
+    methodstate_list_t*l = m->innerfunctions;
+    while(l) {
+        methodstate_t*m = l->methodstate;
+        
+        variable_t* v = new_variable2(state->method, m->info->name, TYPE_FUNCTION(m->info), 0, 0);
+        m->var_index = v->index;
+        if(m->is_a_slot)
+            m->slot_index = m->is_a_slot;
+        v->is_inner_method = m;
+        l = l->next;
+    }
+}
+
+static void function_initvars(methodstate_t*m, char has_params, params_t*params, int flags, char var0)
+{
+    if(var0) {
+        int index = -1;
+        if(m->inner)
+            index = new_variable(m, "this", 0, 0, 0);
+        else if(!m->is_global)
+            index = new_variable(m, (flags&FLAG_STATIC)?"class":"this", state->cls?state->cls->info:0, 0, 0);
+        else
+            index = new_variable(m, "globalscope", 0, 0, 0);
+        if(index) {
+            DICT_ITERATE_ITEMS(state->vars, char*, name, variable_t*, v) {
+                printf("%s %d\n", name, v->index);
+            }
+        }
+        parserassert(!index);
+    }
+
+    if(has_params) {
+        param_list_t*p=0;
+        for(p=params->list;p;p=p->next) {
+            variable_t*v = new_variable2(m, p->param->name, p->param->type, 0, 1);
+            v->is_parameter = 1;
+        }
+        if(as3_pass==2 && m->need_arguments) {
+            /* arguments can never be used by an innerfunction (the inner functions
+               have their own arguments var), so it's ok to  not initialize this until
+               pass 2. (We don't know whether we need it before, anyway) */
+            variable_t*v = new_variable2(m, "arguments", TYPE_ARRAY, 0, 0);
+            m->need_arguments = v->index;
+        }
+    }
+    
+    innerfunctions2vars(m);
+    
+    if(as3_pass==2) {
+        m->scope_code = add_scope_code(m->scope_code, m, 0);
+        if(m->slots) {
+            /* exchange unresolved identifiers with the actual objects */
+            DICT_ITERATE_ITEMS(m->slots, char*, name, variable_t*, v) {
+                if(v->type && v->type->kind == INFOTYPE_UNRESOLVED) {
+                    classinfo_t*type = (classinfo_t*)registry_resolve((slotinfo_t*)v->type);
+                    if(!type || type->kind != INFOTYPE_CLASS) {
+                        syntaxerror("Couldn't find class %s::%s (%s)", v->type->package, v->type->name, name);
+                    }
+                    v->type = type;
+                }
+            }
+        }
     }
     }
-    return access;
 }
 
 }
 
+
 char*as3_globalclass=0;
 char*as3_globalclass=0;
-static void startclass(int flags, char*classname, classinfo_t*extends, classinfo_list_t*implements)
+static void startclass(modifiers_t* mod, char*classname, classinfo_t*extends, classinfo_list_t*implements)
 {
     if(state->cls) {
         syntaxerror("inner classes now allowed"); 
     }
 {
     if(state->cls) {
         syntaxerror("inner classes now allowed"); 
     }
-    new_state();
-    state->cls = rfx_calloc(sizeof(classstate_t));
 
 
+    new_state();
     token_list_t*t=0;
     classinfo_list_t*mlist=0;
 
     token_list_t*t=0;
     classinfo_list_t*mlist=0;
 
-    if(flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
+    if(mod->flags&~(FLAG_PACKAGEINTERNAL|FLAG_PUBLIC|FLAG_FINAL|FLAG_DYNAMIC|FLAG_INTERFACE))
         syntaxerror("invalid modifier(s)");
 
         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.");
         syntaxerror("public and internal not supported at the same time.");
+    
+    if((mod->flags&(FLAG_PROTECTED|FLAG_STATIC)) == (FLAG_PROTECTED|FLAG_STATIC))
+        syntaxerror("protected and static 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;
 
 
     /* create the class name, together with the proper attributes */
     int access=0;
     char*package=0;
 
-    if(!(flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
+    if(!(mod->flags&FLAG_PUBLIC) && state->package==internal_filename_package) {
         access = ACCESS_PRIVATE; package = internal_filename_package;
         access = ACCESS_PRIVATE; package = internal_filename_package;
-    } else if(!(flags&FLAG_PUBLIC) && state->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!=internal_filename_package) {
         access = ACCESS_PACKAGE; package = state->package;
         access = ACCESS_PACKAGEINTERNAL; package = state->package;
     } else if(state->package!=internal_filename_package) {
         access = ACCESS_PACKAGE; package = state->package;
@@ -807,9 +1074,19 @@ static void startclass(int flags, char*classname, classinfo_t*extends, classinfo
     }
 
     if(as3_pass==1) {
     }
 
     if(as3_pass==1) {
-        state->method = rfx_calloc(sizeof(methodstate_t)); // method state, for static constructor
-        state->method->variable_count = 1;
-        dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
+        state->cls = rfx_calloc(sizeof(classstate_t));
+        state->cls->init = rfx_calloc(sizeof(methodstate_t));
+        state->cls->static_init = rfx_calloc(sizeof(methodstate_t));
+        state->cls->static_init->is_static=FLAG_STATIC;
+        /* notice: we make no effort to initialize the top variable (local0) here,
+           even though it has special meaning. We just rely on the fact
+           that pass 1 won't do anything with variables */
+        
+        dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->cls);
+
+        /* set current method to constructor- all code within the class-level (except
+           static variable initializations) will be executed during construction time */
+        state->method = state->cls->init;
 
         if(registry_find(package, classname)) {
             syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
 
         if(registry_find(package, classname)) {
             syntaxerror("Package \"%s\" already contains a class called \"%s\"", package, classname);
@@ -817,99 +1094,64 @@ static void startclass(int flags, char*classname, classinfo_t*extends, classinfo
         /* build info struct */
         int num_interfaces = (list_length(implements));
         state->cls->info = classinfo_register(access, package, classname, num_interfaces);
         /* build info struct */
         int num_interfaces = (list_length(implements));
         state->cls->info = classinfo_register(access, package, classname, num_interfaces);
-        state->cls->info->flags |= flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
+        state->cls->info->flags |= mod->flags & (FLAG_DYNAMIC|FLAG_INTERFACE|FLAG_FINAL);
+        state->cls->info->superclass = extends;
+        
+        int pos = 0;
+        classinfo_list_t*l = implements;
+        for(l=implements;l;l=l->next) {
+            state->cls->info->interfaces[pos++] = l->classinfo;
+        }
     }
     
     if(as3_pass == 2) {
     }
     
     if(as3_pass == 2) {
-        state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+        state->cls = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+    
+        parserassert(state->cls && state->cls->info);
+       
+        state->method = state->cls->static_init;
 
 
-        state->cls->info = (classinfo_t*)registry_find(package, classname);
-        parserassert((int)state->cls->info);
+        function_initvars(state->cls->init, 0, 0, 0, 1);
+        state->cls->static_init->variable_count=1;
+        function_initvars(state->cls->static_init, 0, 0, 0, 0);
 
         if(extends && (extends->flags & FLAG_FINAL))
             syntaxerror("Can't extend final class '%s'", extends->name);
 
         if(extends && (extends->flags & FLAG_FINAL))
             syntaxerror("Can't extend final class '%s'", extends->name);
-
-        /* fill out interfaces and extends (we couldn't resolve those during the first pass) */
-        state->cls->info->superclass = extends?extends:TYPE_OBJECT;
+        
         int pos = 0;
         int pos = 0;
-        classinfo_list_t*l = implements;
-        for(l=implements;l;l=l->next) {
-            if(!(l->classinfo->flags & FLAG_INTERFACE))
-                syntaxerror("'%s' is not an interface", l->classinfo->name);
-            state->cls->info->interfaces[pos++] = l->classinfo;
+        while(state->cls->info->interfaces[pos]) {
+            if(!(state->cls->info->interfaces[pos]->flags & FLAG_INTERFACE))
+                syntaxerror("'%s' is not an interface", 
+                    state->cls->info->interfaces[pos]->name);
+            pos++;
         }
 
         /* generate the abc code for this class */
         MULTINAME(classname2,state->cls->info);
         multiname_t*extends2 = sig2mname(extends);
 
         }
 
         /* generate the abc code for this class */
         MULTINAME(classname2,state->cls->info);
         multiname_t*extends2 = sig2mname(extends);
 
-        state->cls->abc = abc_class_new(global->file, &classname2, extends2);
+        /* don't add the class to the class index just yet- that will be done later
+           by initscript */
+        state->cls->abc = abc_class_new(0, &classname2, extends2);
+        state->cls->abc->file = global->file;
+
+        multiname_destroy(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);
         }
 
         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);
         }
 
-        abc_class_protectedNS(state->cls->abc, classname);
-
         for(mlist=implements;mlist;mlist=mlist->next) {
             MULTINAME(m, mlist->classinfo);
             abc_class_add_interface(state->cls->abc, &m);
         }
 
         for(mlist=implements;mlist;mlist=mlist->next) {
             MULTINAME(m, mlist->classinfo);
             abc_class_add_interface(state->cls->abc, &m);
         }
 
-        /* write the construction code for this class to the global init
-           function */
-        int slotindex = abc_initscript_addClassTrait(global->init, &classname2, state->cls->abc);
-
-        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 {
-            __ 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);
+        state->cls->dependencies = parsedclass_new(state->cls->info, state->cls->abc);
+        list_append(global->classes, state->cls->dependencies);
 
         /* flash.display.MovieClip handling */
 
         /* flash.display.MovieClip handling */
-
-        if(!as3_globalclass && (flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
+        if(!as3_globalclass && (mod->flags&FLAG_PUBLIC) && slotinfo_equals((slotinfo_t*)registry_getMovieClip(),(slotinfo_t*)extends)) {
             if(state->package && state->package[0]) {
                 as3_globalclass = concat3(state->package, ".", classname);
             } else {
             if(state->package && state->package[0]) {
                 as3_globalclass = concat3(state->package, ".", classname);
             } else {
@@ -926,23 +1168,38 @@ static void endclass()
             code_t*c = 0;
             c = abc_getlocal_0(c);
             c = abc_constructsuper(c, 0);
             code_t*c = 0;
             c = abc_getlocal_0(c);
             c = abc_constructsuper(c, 0);
-            state->cls->init = code_append(state->cls->init, c);
-        }
-        if(!state->method->late_binding) {
-            // class initialization code uses late binding
-            code_t*c = 0;
-            c = abc_getlocal_0(c);
-            c = abc_pushscope(c);
-            state->cls->static_init = code_append(c, state->cls->static_init);
+            state->cls->init->header = code_append(state->cls->init->header, c);
+            state->cls->has_constructor=1;
         }
         }
-
         if(state->cls->init) {
         if(state->cls->init) {
-            abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
-            m->body->code = wrap_function(0, state->cls->init, m->body->code);
+            if(state->cls->info->flags&FLAG_INTERFACE) {
+                if(state->cls->init->header) 
+                    syntaxerror("interface can not have class-level code");
+            } else {
+                abc_method_t*m = abc_class_getconstructor(state->cls->abc, 0);
+                code_t*c = method_header(state->cls->init);
+                m->body->code = wrap_function(c, 0, m->body->code);
+            }
         }
         if(state->cls->static_init) {
             abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
         }
         if(state->cls->static_init) {
             abc_method_t*m = abc_class_getstaticconstructor(state->cls->abc, 0);
-            m->body->code = wrap_function(0, state->cls->static_init, m->body->code);
+            code_t*c = method_header(state->cls->static_init);
+            m->body->code = wrap_function(c, 0, m->body->code);
+        }
+      
+        trait_list_t*trait = state->cls->abc->traits;
+        /* switch all protected members to the protected ns of this class */
+        while(trait) {
+            trait_t*t = trait->trait;
+            if(t->name->ns->access == ACCESS_PROTECTED) {
+                if(!state->cls->abc->protectedNS) {
+                    char*n = concat3(state->cls->info->package, ":", state->cls->info->name);
+                    state->cls->abc->protectedNS = namespace_new_protected(n);
+                    state->cls->abc->flags |= CLASS_PROTECTED_NS;
+                }
+                t->name->ns->name = strdup(state->cls->abc->protectedNS->name);
+            }
+            trait = trait->next;
         }
     }
 
         }
     }
 
@@ -960,11 +1217,20 @@ void check_code_for_break(code_t*c)
             char*name = string_cstr(c->data[0]);
             syntaxerror("Unresolved \"continue %s\"", name);
         }
             char*name = string_cstr(c->data[0]);
             syntaxerror("Unresolved \"continue %s\"", name);
         }
+        if(c->opcode == OPCODE___RETHROW__) {
+            syntaxerror("Unresolved \"rethrow\"");
+        }
+        if(c->opcode == OPCODE___FALLTHROUGH__) {
+            syntaxerror("Unresolved \"fallthrough\"");
+        }
+        if(c->opcode == OPCODE___PUSHPACKAGE__) {
+            char*name = string_cstr(c->data[0]);
+            syntaxerror("Can't reference a package (%s) as such", name);
+        }
         c=c->prev;
     }
 }
 
         c=c->prev;
     }
 }
 
-
 static void check_constant_against_type(classinfo_t*t, constant_t*c)
 {
 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
 static void check_constant_against_type(classinfo_t*t, constant_t*c)
 {
 #define xassert(b) if(!(b)) syntaxerror("Invalid default value %s for type '%s'", constant_tostring(c), t->name)
@@ -974,7 +1240,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_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)) {
    } else if(TYPE_IS_INT(t)) {
         xassert(c->type == CONSTANT_INT);
    } else if(TYPE_IS_BOOLEAN(t)) {
@@ -995,12 +1261,15 @@ static void check_override(memberinfo_t*m, int flags)
         return;
     if(m->flags & FLAG_FINAL)
         syntaxerror("can't override final member %s", m->name);
         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))
     if((m->flags & FLAG_STATIC) && !(flags&FLAG_STATIC))
-        syntaxerror("can't override static member %s", m->name);
+        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(!(m->flags & FLAG_STATIC) && (flags&FLAG_STATIC))
         syntaxerror("can't override non-static member %s with static declaration", m->name);
 
-    if(!(flags&FLAG_OVERRIDE)) {
+    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");
         if(m->parent && !(m->parent->flags&FLAG_INTERFACE)) {
             if(m->kind == INFOTYPE_METHOD)
                 syntaxerror("can't override without explicit 'override' declaration");
@@ -1010,21 +1279,21 @@ static void check_override(memberinfo_t*m, int flags)
     }
 }
 
     }
 }
 
-static methodinfo_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)
 {
     methodinfo_t*minfo = 0;
 {
     methodinfo_t*minfo = 0;
-    U8 access = flags2access(flags);
+    namespace_t ns = modifiers2access(mod);
     if(!state->cls) {
         //package method
     if(!state->cls) {
         //package method
-        minfo = methodinfo_register_global(access, state->package, name);
+        minfo = methodinfo_register_global(ns.access, state->package, name);
         minfo->return_type = return_type;
     } else if(getset != KW_GET && getset != KW_SET) {
         //class method
         minfo->return_type = return_type;
     } else if(getset != KW_GET && getset != KW_SET) {
         //class method
-        memberinfo_t* m = registry_findmember(state->cls->info, name, 0);
+        memberinfo_t* m = registry_findmember(state->cls->info, ns.name, name, 0);
         if(m) {
             syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
         }
         if(m) {
             syntaxerror("class already contains a %s '%s'", infotypename((slotinfo_t*)m), m->name);
         }
-        minfo = methodinfo_register_onclass(state->cls->info, access, name);
+        minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
         minfo->return_type = return_type;
         // getslot on a member slot only returns "undefined", so no need
         // to actually store these
         minfo->return_type = return_type;
         // getslot on a member slot only returns "undefined", so no need
         // to actually store these
@@ -1033,14 +1302,16 @@ static methodinfo_t*registerfunction(enum yytokentype getset, int flags, char*na
         //class getter/setter
         int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
         classinfo_t*type=0;
         //class getter/setter
         int gs = getset==KW_GET?SUBTYPE_GET:SUBTYPE_SET;
         classinfo_t*type=0;
-        if(getset == KW_GET)
+        if(getset == KW_GET) {
             type = return_type;
             type = return_type;
-        else if(params->list && params->list->param)
+        } else if(params->list && params->list->param && !params->list->next) {
             type = params->list->param->type;
             type = params->list->param->type;
+        } else
+            syntaxerror("setter function needs to take exactly one argument");
         // not sure wether to look into superclasses here, too
         // not sure wether to look into superclasses here, too
-        minfo = (methodinfo_t*)registry_findmember(state->cls->info, name, 1);
+        minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
         if(minfo) {
         if(minfo) {
-            if(minfo->kind!=INFOTYPE_SLOT)
+            if(minfo->kind!=INFOTYPE_VAR)
                 syntaxerror("class already contains a method called '%s'", name);
             if(!(minfo->subtype & (SUBTYPE_GETSET)))
                 syntaxerror("class already contains a field called '%s'", name);
                 syntaxerror("class already contains a method called '%s'", name);
             if(!(minfo->subtype & (SUBTYPE_GETSET)))
                 syntaxerror("class already contains a field called '%s'", name);
@@ -1048,100 +1319,100 @@ static methodinfo_t*registerfunction(enum yytokentype getset, int flags, char*na
                 syntaxerror("getter/setter for '%s' already defined", name);
             /* make a setter or getter into a getset */
             minfo->subtype |= gs;
                 syntaxerror("getter/setter for '%s' already defined", name);
             /* make a setter or getter into a getset */
             minfo->subtype |= gs;
-            if(!minfo->return_type) {
-                minfo->return_type = type;
-            } else {
-                if(minfo && minfo->return_type != type)
-                    syntaxerror("different type in getter and setter");
-            }
+            
+            /*
+            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 {
         } else {
-            minfo = methodinfo_register_onclass(state->cls->info, access, name);
-            minfo->kind = INFOTYPE_SLOT; //hack
+            minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
+            minfo->kind = INFOTYPE_VAR; //hack
             minfo->subtype = gs;
             minfo->return_type = type;
         }
             minfo->subtype = gs;
             minfo->return_type = type;
         }
+
         /* can't assign a slot as getter and setter might have different slots */
         //minfo->slot = slot;
     }
         /* can't assign a slot as getter and setter might have different slots */
         //minfo->slot = slot;
     }
-    if(flags&FLAG_FINAL) minfo->flags |= FLAG_FINAL;
-    if(flags&FLAG_STATIC) minfo->flags |= FLAG_STATIC;
-    if(flags&FLAG_OVERRIDE) minfo->flags |= FLAG_OVERRIDE;
-    return minfo;
-}
-
-static void function_initvars(params_t*params, int flags)
-{
-    if(state->method->inner)
-        new_variable("this", 0, 0);
-    else if(!state->method->is_global)
-        new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
-    else
-        new_variable("globalscope", 0, 0);
+    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;
 
 
-    param_list_t*p=0;
-    for(p=params->list;p;p=p->next) {
-        new_variable(p->param->name, p->param->type, 0);
-    }
-    
-    methodstate_list_t*l = state->method->innerfunctions;
-    while(l) {
-        methodstate_t*m = l->methodstate;
-        m->var_index = new_variable(m->info->name, TYPE_FUNCTION(m->info), 0);
-        l = l->next;
-    }
+    return minfo;
 }
 
 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
 {
 }
 
 static void innerfunction(char*name, params_t*params, classinfo_t*return_type)
 {
-    parserassert(state->method && state->method->info);
+    //parserassert(state->method && state->method->info);
 
     methodstate_t*parent_method = state->method;
 
     methodstate_t*parent_method = state->method;
+    variable_t*v = 0;
 
     if(as3_pass==1) {
 
     if(as3_pass==1) {
-        // not valid yet
-        params = 0;
-        return_type = 0;
+        return_type = 0; // not valid in pass 1
+        if(name) {
+            v = new_variable2(parent_method, name, 0, 0, 0);
+        }
     }
 
     new_state();
     state->new_vars = 1;
     }
 
     new_state();
     state->new_vars = 1;
+    state->allvars = dict_new();
    
     if(as3_pass == 1) {
         state->method = rfx_calloc(sizeof(methodstate_t));
         state->method->inner = 1;
    
     if(as3_pass == 1) {
         state->method = rfx_calloc(sizeof(methodstate_t));
         state->method->inner = 1;
+        state->method->is_static = parent_method->is_static;
         state->method->variable_count = 0;
         state->method->abc = rfx_calloc(sizeof(abc_method_t));
         state->method->variable_count = 0;
         state->method->abc = rfx_calloc(sizeof(abc_method_t));
+        if(v) {
+            v->is_inner_method = state->method;
+        }
 
         NEW(methodinfo_t,minfo);
 
         NEW(methodinfo_t,minfo);
+        minfo->kind = INFOTYPE_METHOD;
+        minfo->access = ACCESS_PACKAGEINTERNAL;
         minfo->name = name;
         state->method->info = minfo;
 
         minfo->name = name;
         state->method->info = minfo;
 
-        list_append(parent_method->innerfunctions, state->method);
+        if(parent_method)
+            list_append(parent_method->innerfunctions, state->method);
 
         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
 
         dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, state->method);
+    
+        function_initvars(state->method, 1, params, 0, 1);
     }
 
     if(as3_pass == 2) {
         state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
     }
 
     if(as3_pass == 2) {
         state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+        state->method->variable_count = 0;
         parserassert(state->method);
 
         state->method->info->return_type = return_type;
         parserassert(state->method);
 
         state->method->info->return_type = return_type;
-        function_initvars(params, 0);
+        function_initvars(state->method, 1, params, 0, 1);
     }
 }
 
     }
 }
 
-static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
+static void startfunction(modifiers_t*mod, enum yytokentype getset, char*name,
                           params_t*params, classinfo_t*return_type)
 {
     if(state->method && state->method->info) {
         syntaxerror("not able to start another method scope");
     }
     new_state();
                           params_t*params, classinfo_t*return_type)
 {
     if(state->method && state->method->info) {
         syntaxerror("not able to start another method scope");
     }
     new_state();
-    
+    state->new_vars = 1;
+    state->allvars = dict_new();
+
     if(as3_pass == 1) {
         state->method = rfx_calloc(sizeof(methodstate_t));
         state->method->has_super = 0;
     if(as3_pass == 1) {
         state->method = rfx_calloc(sizeof(methodstate_t));
         state->method->has_super = 0;
-        state->method->variable_count = 0;
+        state->method->is_static = mod->flags&FLAG_STATIC;
 
         if(state->cls) {
             state->method->is_constructor = !strcmp(state->cls->info->name,name);
 
         if(state->cls) {
             state->method->is_constructor = !strcmp(state->cls->info->name,name);
@@ -1152,104 +1423,188 @@ static void startfunction(token_t*ns, int flags, enum yytokentype getset, char*n
         if(state->method->is_constructor)
             name = "__as3_constructor__";
 
         if(state->method->is_constructor)
             name = "__as3_constructor__";
 
-        return_type = 0;
-        state->method->info = registerfunction(getset, flags, name, params, return_type, 0);
+        state->method->info = registerfunction(getset, mod, name, params, return_type, 0);
+       
+        function_initvars(state->method, 1, 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);
         
         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);
         parserassert(state->method);
-
+                
         if(state->cls) {
         if(state->cls) {
-            memberinfo_t*m = registry_findmember(state->cls->info, name, 2);
-            check_override(m, flags);
+            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;
         }
         
         }
             
         if(state->cls) { 
             state->cls->has_constructor |= state->method->is_constructor;
         }
         
-        state->method->info->return_type = return_type;
-        function_initvars(params, flags);
+        function_initvars(state->method, 1, params, mod->flags, 1);
     } 
 }
 
     } 
 }
 
-static abc_method_t* endfunction(token_t*ns, int flags, enum yytokentype getset, char*name,
+static void insert_unresolved(methodstate_t*m, dict_t*xvars, dict_t*allvars)
+{
+    parserassert(m->inner);
+    if(m->unresolved_variables) {
+        dict_t*d = m->unresolved_variables;
+        int t;
+        DICT_ITERATE_KEY(d, char*, id) {
+            /* check parent method's variables */
+            variable_t*v;
+            if(dict_contains(allvars, id)) {
+                m->uses_parent_function = 1;
+                state->method->uses_slots = 1;
+                dict_put(xvars, id, 0);
+            }
+        }
+    }
+    methodstate_list_t*ml = m->innerfunctions;
+    while(ml) {
+        insert_unresolved(ml->methodstate, xvars, allvars);
+        ml = ml->next;
+    }
+}
+
+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) {
                           params_t*params, classinfo_t*return_type, code_t*body)
 {
     if(as3_pass==1) {
+        dict_t*xvars = dict_new();
+        
+        if(state->method->unresolved_variables) {
+            DICT_ITERATE_KEY(state->method->unresolved_variables, char*, vname) {
+                if(!state->method->no_variable_scoping && dict_contains(state->allvars, vname)) {
+                    variable_t*v = dict_lookup(state->allvars, vname);
+                    if(!v->is_inner_method) {
+                        state->method->no_variable_scoping = 1;
+                        as3_warning("function %s uses forward or outer block variable references (%s): switching into compatiblity mode", name, vname);
+                    }
+                }
+            }
+        }
+
+        methodstate_list_t*ml = state->method->innerfunctions;
+        while(ml) {
+            insert_unresolved(ml->methodstate, xvars, state->allvars);
+            ml = ml->next;
+        }
+        
+        if(state->method->uses_slots) {
+            state->method->slots = dict_new();
+            int i = 1;
+            DICT_ITERATE_ITEMS(state->allvars, char*, name, variable_t*, v) {
+                if(!name) syntaxerror("internal error");
+                if(v->index && dict_contains(xvars, name)) {
+                    v->init = v->kill = 0;
+                    v->index = i;
+                    if(v->is_inner_method) {
+                        v->is_inner_method->is_a_slot = i;
+                    }
+                    i++;
+                    dict_put(state->method->slots, name, v);
+                }
+            }
+            state->method->uses_slots = i;
+            dict_destroy(state->vars);state->vars = 0;
+            parserassert(state->new_vars);
+            dict_destroy(state->allvars);state->allvars = 0;
+        }
         old_state();
         return 0;
     }
 
         old_state();
         return 0;
     }
 
-    abc_method_t*f = 0;
+    if(as3_pass==2) {
+        /*if(state->method->uses_parent_function){
+            syntaxerror("accessing variables of parent function from inner functions not supported yet");
+        }*/
 
 
-    multiname_t*type2 = sig2mname(return_type);
-    int slot = 0;
-    if(state->method->inner) {
-        f = 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 = {state->method->info->access, ""};
-        multiname_t mname = {QNAME, &mname_ns, 0, name};
+        abc_method_t*f = 0;
 
 
-        if(flags&FLAG_STATIC)
-            f = abc_class_staticmethod(state->cls->abc, type2, &mname);
-        else
-            f = abc_class_method(state->cls->abc, type2, &mname);
-        slot = f->trait->slot_id;
-    } else {
-        namespace_t mname_ns = {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(flags&FLAG_OVERRIDE) f->trait->attributes |= TRAIT_ATTR_OVERRIDE;
-    if(getset == KW_GET) f->trait->kind = TRAIT_GETTER;
-    if(getset == KW_SET) f->trait->kind = TRAIT_SETTER;
-    if(params->varargs) f->flags |= METHOD_NEED_REST;
-
-    char opt=0;
-    param_list_t*p=0;
-    for(p=params->list;p;p=p->next) {
-        if(params->varargs && !p->next) {
-            break; //varargs: omit last parameter in function signature
+        multiname_t*type2 = sig2mname(return_type);
+        int slot = 0;
+        if(state->method->inner) {
+            f = state->method->abc;
+            abc_method_init(f, global->file, type2, 1);
+        } else if(state->method->is_constructor) {
+            f = abc_class_getconstructor(state->cls->abc, type2);
+        } else if(!state->method->is_global) {
+            namespace_t ns = modifiers2access(mod);
+            multiname_t mname = {QNAME, &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);
+            if(!global->init) global->init = abc_initscript(global->file);
+            trait_t*t = trait_new_method(&global->init->traits, multiname_clone(&mname), f);
+            //abc_code_t*c = global->init->method->body->code;
         }
         }
-        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");
+        //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;
+        if(state->method->need_arguments) f->flags |= METHOD_NEED_ARGUMENTS;
+
+        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("function %s: non-optional parameter not allowed after optional parameters", name);
+            }
+        }
+        if(state->method->slots) {
+            DICT_ITERATE_ITEMS(state->method->slots, char*, name, variable_t*, v) {
+                if(v->index) {
+                    multiname_t*mname = multiname_new(namespace_new(ACCESS_PACKAGE, ""), name);
+                    multiname_t*type = sig2mname(v->type);
+                    trait_t*t = trait_new_member(&f->body->traits, type, mname, 0);
+                    t->slot_id = v->index;
+                }
+            }
         }
         }
-    }
-    check_code_for_break(body);
 
 
-    if(f->body) {
-        f->body->code = body;
-        f->body->exceptions = state->method->exceptions;
-    } else { //interface
-        if(body)
-            syntaxerror("interface methods can't have a method body");
-    }
-       
-    old_state();
-    return f;
-}
+        check_code_for_break(body);
 
 
-char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
-{
-    return 1; // FIXME
+        /* Seems this works now.
+        if(state->method->exceptions && state->method->uses_slots) {
+           as3_warning("try/catch and activation not supported yet within the same method");
+        }*/
+
+        if(f->body) {
+            f->body->code = body;
+            f->body->exceptions = state->method->exceptions;
+        } else { //interface
+            if(body)
+                syntaxerror("interface methods can't have a method body");
+        }
+
+        old_state();
+        return f;
+    }
+        
+    return 0;
 }
 
 void breakjumpsto(code_t*c, char*name, code_t*jump) 
 }
 
 void breakjumpsto(code_t*c, char*name, code_t*jump) 
@@ -1279,29 +1634,6 @@ void continuejumpsto(code_t*c, char*name, code_t*jump)
     }
 }
 
     }
 }
 
-#define IS_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)))
-#define IS_NUMBER_OR_INT(a) (TYPE_IS_INT((a)) || TYPE_IS_UINT((a)) || TYPE_IS_NUMBER((a)))
-#define BOTH_INT(a,b) (IS_INT(a) && IS_INT(b))
-
-classinfo_t*join_types(classinfo_t*type1, classinfo_t*type2, char op)
-{
-    if(!type1 || !type2) 
-        return registry_getanytype();
-    if(TYPE_IS_ANY(type1) || TYPE_IS_ANY(type2))
-        return registry_getanytype();
-
-    if(op=='+') {
-        if(IS_NUMBER_OR_INT(type1) && IS_NUMBER_OR_INT(type2)) {
-            return TYPE_NUMBER;
-        } else {
-            return TYPE_ANY;
-        }
-    }
-
-    if(type1 == type2)
-        return type1;
-    return registry_getanytype();
-}
 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
 {
     if(from==to)
 code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
 {
     if(from==to)
@@ -1319,15 +1651,35 @@ code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
     if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
        (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
         // allow conversion between number types
     if((TYPE_IS_NUMBER(from) || TYPE_IS_UINT(from) || TYPE_IS_INT(from)) &&
        (TYPE_IS_NUMBER(to) || TYPE_IS_UINT(to) || TYPE_IS_INT(to))) {
         // allow conversion between number types
+        if(TYPE_IS_UINT(to))
+            return abc_convert_u(c);
+        else if(TYPE_IS_INT(to))
+            return abc_convert_i(c);
+        else if(TYPE_IS_NUMBER(to))
+            return abc_convert_d(c);
         return abc_coerce2(c, &m);
     }
         return abc_coerce2(c, &m);
     }
-    //printf("%s.%s\n", from.package, from.name);
-    //printf("%s.%s\n", to.package, to.name);
+
+    if(TYPE_IS_XMLLIST(to) && TYPE_IS_XML(from))
+        return c;
+
+    if(TYPE_IS_BOOLEAN(to))
+        return abc_convert_b(c);
+    if(TYPE_IS_STRING(to))
+        return abc_convert_s(c);
+    if(TYPE_IS_OBJECT(to))
+        return abc_coerce2(c, &m);
+    if(TYPE_IS_OBJECT(from) && TYPE_IS_XMLLIST(to))
+        return abc_coerce2(c, &m);
+    if(TYPE_IS_OBJECT(from) && TYPE_IS_ARRAY(to))
+        return abc_coerce2(c, &m);
 
     classinfo_t*supertype = from;
     while(supertype) {
         if(supertype == to) {
 
     classinfo_t*supertype = from;
     while(supertype) {
         if(supertype == to) {
-             // target type is one of from's superclasses
+             /* target type is one of from's superclasses.
+                (not sure we need this coerce - as far as the verifier
+                 is concerned, object==object (i think) */
              return abc_coerce2(c, &m);
         }
         int t=0;
              return abc_coerce2(c, &m);
         }
         int t=0;
@@ -1346,28 +1698,23 @@ code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
         return c;
     if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
         return c;
         return c;
     if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
         return c;
-    syntaxerror("can't convert type %s to %s", from->name, to->name);
-    return 0; // make gcc happy
-}
 
 
-code_t*defaultvalue(code_t*c, classinfo_t*type)
+    as3_error("can't convert type %s%s%s to %s%s%s", 
+        from->package, from->package[0]?".":"", from->name, 
+        to->package, to->package[0]?".":"", to->name);
+
+    return c;
+}
+code_t* coerce_to_type(code_t*c, classinfo_t*t)
 {
 {
-    if(TYPE_IS_INT(type)) {
-       c = abc_pushbyte(c, 0);
-    } else if(TYPE_IS_UINT(type)) {
-       c = abc_pushuint(c, 0);
-    } else if(TYPE_IS_FLOAT(type)) {
-       c = abc_pushnan(c);
-    } else if(TYPE_IS_BOOLEAN(type)) {
-       c = abc_pushfalse(c);
-    } else if(!type) {
-       //c = abc_pushundefined(c);
+    if(!t) {
+        return abc_coerce_a(c);
+    } else if(TYPE_IS_STRING(t)) {
+        return abc_coerce_s(c);
     } else {
     } else {
-       c = abc_pushnull(c);
-       MULTINAME(m, type);
-       c = abc_coerce2(c, &m);
+        MULTINAME(m, t);
+        return abc_coerce2(c, &m);
     }
     }
-    return c;
 }
 
 char is_pushundefined(code_t*c)
 }
 
 char is_pushundefined(code_t*c)
@@ -1375,7 +1722,37 @@ char is_pushundefined(code_t*c)
     return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
 }
 
     return (c && !c->prev && !c->next && c->opcode == OPCODE_PUSHUNDEFINED);
 }
 
-static slotinfo_t* find_class(char*name)
+static const char* get_package_from_name(const char*name)
+{
+    /* try explicit imports */
+    dictentry_t* e = dict_get_slot(state->imports, name);
+    while(e) {
+        if(!strcmp(e->key, name)) {
+            slotinfo_t*c = (slotinfo_t*)e->data;
+            if(c) return c->package;
+        }
+        e = e->next;
+    }
+    return 0;
+}
+static namespace_list_t*get_current_imports()
+{
+    namespace_list_t*searchlist = 0;
+    
+    list_append(searchlist, namespace_new_package(state->package));
+
+    import_list_t*l = state->wildcard_imports;
+    while(l) {
+        namespace_t*ns = namespace_new_package(l->import->package);
+        list_append(searchlist, ns);
+        l = l->next;
+    }
+    list_append(searchlist, namespace_new_package(""));
+    list_append(searchlist, namespace_new_package(internal_filename_package));
+    return searchlist;
+}
+
+static slotinfo_t* find_class(const char*name)
 {
     slotinfo_t*c=0;
 
 {
     slotinfo_t*c=0;
 
@@ -1412,173 +1789,53 @@ static slotinfo_t* find_class(char*name)
 
     return 0;
 }
 
     return 0;
 }
-
-static char is_getlocal(code_t*c)
-{
-    if(!c || c->prev || c->next)
-        return 0;
-    return(c->opcode == OPCODE_GETLOCAL
-        || c->opcode == OPCODE_GETLOCAL_0
-        || c->opcode == OPCODE_GETLOCAL_1
-        || c->opcode == OPCODE_GETLOCAL_2
-        || c->opcode == OPCODE_GETLOCAL_3);
-}
-static int getlocalnr(code_t*c)
-{
-    if(c->opcode == OPCODE_GETLOCAL) {return (ptroff_t)c->data[0];}
-    else if(c->opcode == OPCODE_GETLOCAL_0) {return 0;}
-    else if(c->opcode == OPCODE_GETLOCAL_1) {return 1;}
-    else if(c->opcode == OPCODE_GETLOCAL_2) {return 2;}
-    else if(c->opcode == OPCODE_GETLOCAL_3) {return 3;}
-    else syntaxerror("Internal error: opcode %02x is not a getlocal call", c->opcode);
-    return 0;
-}
-
-static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char readbefore)
+typedcode_t push_class(slotinfo_t*a)
 {
 {
-    /* converts this:
-
-       [prefix code] [read instruction]
-
-       to this:
-
-       [prefix code] ([dup]) [read instruction] [middlepart] [setvar] [write instruction] [getvar]
-    */
-    if(in && in->opcode == OPCODE_COERCE_A) {
-        in = code_cutlast(in);
-    }
-    if(in->next)
-        syntaxerror("internal error");
-
-    /* chop off read instruction */
-    code_t*prefix = in;
-    code_t*r = in;
-    if(r->prev) {
-        prefix = r->prev;r->prev = 0;
-        prefix->next=0;
-    } else {
-        prefix = 0;
-    }
-
-    char use_temp_var = readbefore;
-
-    /* generate the write instruction, and maybe append a dup to the prefix code */
-    code_t* write = abc_nop(0);
-    if(r->opcode == OPCODE_GETPROPERTY) {
-        write->opcode = OPCODE_SETPROPERTY;
-        multiname_t*m = (multiname_t*)r->data[0];
-        write->data[0] = multiname_clone(m);
-        if(m->type == QNAME || m->type == MULTINAME) {
-            if(!justassign) {
-                prefix = abc_dup(prefix); // we need the object, too
-            }
-            use_temp_var = 1;
-        } else if(m->type == MULTINAMEL) {
-            if(!justassign) {
-                /* dupping two values on the stack requires 5 operations and one register- 
-                   couldn't adobe just have given us a dup2? */
-                int temp = gettempvar();
-                prefix = abc_setlocal(prefix, temp);
-                prefix = abc_dup(prefix);
-                prefix = abc_getlocal(prefix, temp);
-                prefix = abc_swap(prefix);
-                prefix = abc_getlocal(prefix, temp);
-                if(!use_temp_var);
-                    prefix = abc_kill(prefix, temp);
-            }
-            use_temp_var = 1;
+    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 {
         } else {
-            syntaxerror("illegal lvalue: can't assign a value to this expression (not a qname/multiname)");
+            varinfo_t*v = (varinfo_t*)a;
+            x.t = v->type;
         }
         }
-    } else if(r->opcode == OPCODE_GETSLOT) {
-        write->opcode = OPCODE_SETSLOT;
-        write->data[0] = r->data[0];
-        if(!justassign) {
-            prefix = abc_dup(prefix); // we need the object, too
-        }
-        use_temp_var = 1;
-    } else if(r->opcode == OPCODE_GETLOCAL) { 
-        write->opcode = OPCODE_SETLOCAL;
-        write->data[0] = r->data[0];
-    } else if(r->opcode == OPCODE_GETLOCAL_0) { 
-        write->opcode = OPCODE_SETLOCAL_0;
-    } else if(r->opcode == OPCODE_GETLOCAL_1) { 
-        write->opcode = OPCODE_SETLOCAL_1;
-    } else if(r->opcode == OPCODE_GETLOCAL_2) { 
-        write->opcode = OPCODE_SETLOCAL_2;
-    } else if(r->opcode == OPCODE_GETLOCAL_3) { 
-        write->opcode = OPCODE_SETLOCAL_3;
+        return x;
     } else {
     } else {
-        code_dump(r);
-        syntaxerror("illegal lvalue: can't assign a value to this expression");
-    }
-    code_t* c = 0;
-    
-    int temp = -1;
-    if(!justassign) {
-        if(use_temp_var) {
-            /* with getproperty/getslot, we have to be extra careful not
-               to execute the read code twice, as it might have side-effects
-               (e.g. if the property is in fact a setter/getter combination)
-
-               So read the value, modify it, and write it again,
-               using prefix only once and making sure (by using a temporary
-               register) that the return value is what we just wrote */
-            temp = gettempvar();
-            c = code_append(c, prefix);
-            c = code_append(c, r);
-            if(readbefore) {
-                c = abc_dup(c);
-                c = abc_setlocal(c, temp);
-            }
-            c = code_append(c, middlepart);
-            if(!readbefore) {
-                c = abc_dup(c);
-                c = abc_setlocal(c, temp);
-            }
-            c = code_append(c, write);
-            c = abc_getlocal(c, temp);
-            c = abc_kill(c, temp);
-        } else {
-            /* if we're allowed to execute the read code twice *and*
-               the middlepart doesn't modify the code, things are easier.
-            */
-            code_t* r2 = code_dup(r);
-            //c = code_append(c, prefix);
-            parserassert(!prefix);
-            c = code_append(c, r);
-            c = code_append(c, middlepart);
-            c = code_append(c, write);
-            c = code_append(c, r2);
+        if(state->cls && state->method == state->cls->static_init) {
+            /* we're in the static initializer. 
+               record the fact that we're using this class here */
+            parsedclass_add_dependency(state->cls->dependencies, (classinfo_t*)a);
         }
         }
-    } else {
-        /* even smaller version: overwrite the value without reading
-           it out first */
-        if(!use_temp_var) {
-            if(prefix) {
-                c = code_append(c, prefix);
-                c = abc_dup(c);
-            }
-            c = code_append(c, middlepart);
-            c = code_append(c, write);
-            c = code_append(c, r);
+        classinfo_t*c = (classinfo_t*)a;
+        //if(c->slot) {
+        if(0) { //Error #1026: Slot 1 exceeds slotCount=0 of global
+            x.c = abc_getglobalscope(x.c);
+            x.c = abc_getslot(x.c, c->slot);
         } else {
         } else {
-            code_free(r);r=0;
-            temp = gettempvar();
-            if(prefix) {
-                c = code_append(c, prefix);
-            }
-            c = code_append(c, middlepart);
-            c = abc_dup(c);
-            c = abc_setlocal(c, temp);
-            c = code_append(c, write);
-            c = abc_getlocal(c, temp);
-            c = abc_kill(c, temp);
+            MULTINAME(m, c);
+            x.c = abc_getlex2(x.c, &m);
         }
         }
+        x.t = TYPE_CLASS(c);
     }
     }
-    return c;
+    return x;
 }
 
 }
 
+
 char is_break_or_jump(code_t*c)
 {
     if(!c)
 char is_break_or_jump(code_t*c)
 {
     if(!c)
@@ -1594,7 +1851,6 @@ char is_break_or_jump(code_t*c)
     return 0;
 }
 
     return 0;
 }
 
-
 #define IS_FINALLY_TARGET(op) \
         ((op) == OPCODE___CONTINUE__ || \
          (op) == OPCODE___BREAK__ || \
 #define IS_FINALLY_TARGET(op) \
         ((op) == OPCODE___CONTINUE__ || \
          (op) == OPCODE___BREAK__ || \
@@ -1702,10 +1958,10 @@ 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) {
     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 {
         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);
     }
 }
         return insert_finally_simple(c, finally, tempvar);
     }
 }
@@ -1713,13 +1969,247 @@ code_t* insert_finally(code_t*c, code_t*finally, int tempvar)
 #define PASS1 }} if(as3_pass == 1) {{
 #define PASS1END }} if(as3_pass == 2) {{
 #define PASS2 }} if(as3_pass == 2) {{
 #define PASS1 }} if(as3_pass == 1) {{
 #define PASS1END }} if(as3_pass == 2) {{
 #define PASS2 }} if(as3_pass == 2) {{
-#define PASS12 }} {{
+#define PASS12 }} if(as3_pass == 1 || as3_pass == 2) {{
 #define PASS12END }} if(as3_pass == 2) {{
 #define PASS12END }} if(as3_pass == 2) {{
-
+#define PASS_ALWAYS }} {{
 
 
 /* Line 273 of skeleton.m4  */
 
 
 /* Line 273 of skeleton.m4  */
-#line 1723 "parser.tab.c"
+#line 1979 "parser.tab.c"
+/* Unqualified %code blocks.  */
+/* Line 274 of skeleton.m4  */
+#line 2077 "parser.y"
+
+    char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
+    {
+        return 1; // FIXME
+    }
+    char do_init_variable(char*name)
+    {
+        if(!state->method->no_variable_scoping)
+            return 0;
+        if(!state->new_vars)
+            return 1;
+        return 1;
+    }
+
+/* Line 274 of skeleton.m4  */
+#line 2528 "parser.y"
+
+    static void state_has_imports()
+    {
+        state->wildcard_imports = list_clone(state->wildcard_imports);
+        state->imports = dict_clone(state->imports);
+        state->has_own_imports = 1;
+    }
+    static void import_toplevel(const char*package)
+    {
+        char* s = strdup(package);
+        while(1) {
+            dict_put(state->import_toplevel_packages, s, 0);
+            char*x = strrchr(s, '.');
+            if(!x)
+                break;
+            *x = 0;
+        }
+        free(s);
+    }
+
+/* Line 274 of skeleton.m4  */
+#line 2667 "parser.y"
+
+    static int slotstate_varconst = 0;
+    static modifiers_t*slotstate_flags = 0;
+    static void setslotstate(modifiers_t* flags, int varconst)
+    {
+        slotstate_varconst = varconst;
+        slotstate_flags = flags;
+        if(state->cls) {
+            if(flags) {
+                if(flags->flags&FLAG_STATIC) {
+                    state->method = state->cls->static_init;
+                } else {
+                    state->method = state->cls->init;
+                }
+            } else {
+                // reset to "default" state (all in class code is static by default) */
+                state->method = state->cls->static_init;
+            }
+        } else {
+            parserassert(state->method);
+        }
+    }
+    static trait_t* add_abc_slot(modifiers_t* modifiers, const char*name, multiname_t*m, code_t***c)
+    {
+        int flags = modifiers->flags;
+        namespace_t ns = modifiers2access(modifiers);
+
+        /* slot name */
+        multiname_t mname = {QNAME, &ns, 0, name};
+      
+        trait_list_t**traits;
+        code_t**code=0;
+        if(!state->cls) {
+            // global variable
+            if(!global->init) global->init = abc_initscript(global->file);
+            ns.name = state->package;
+            traits = &global->init->traits;
+            code = &global->init->method->body->code;
+        } else if(flags&FLAG_STATIC) {
+            // static variable
+            traits = &state->cls->abc->static_traits;
+            code = &state->cls->static_init->header;
+        } else {
+            // instance variable
+            traits = &state->cls->abc->traits;
+            code = &state->cls->init->header;
+            
+            if(ns.access == ACCESS_PROTECTED) {
+                ns.name = concat3(state->cls->info->package,":",state->cls->info->name);
+            }
+        }
+        if(c)
+            *c = code;
+        if(m) 
+            *m = *multiname_clone(&mname);
+            
+        return trait_new_member(traits, 0, multiname_clone(&mname), 0);
+    }
+
+/* Line 274 of skeleton.m4  */
+#line 2847 "parser.y"
+
+    static int xml_level = 0;
+
+/* Line 274 of skeleton.m4  */
+#line 3655 "parser.y"
+
+    node_t* resolve_identifier(char*name)
+    {
+        typedcode_t o;
+        o.t = 0;
+        o.c = 0;
+
+        slotinfo_t*a = 0;
+        memberinfo_t*f = 0;
+
+        variable_t*v;
+        /* look at variables */
+        if((v = find_variable(state, name))) {
+            // name is a local variable
+            o.c = abc_getlocal(o.c, v->index);
+            o.t = v->type;
+            return mkcodenode(o);
+        }
+        if((v = find_slot(state->method, name))) {
+            o.c = abc_getscopeobject(o.c, 1);
+            o.c = abc_getslot(o.c, v->index);
+            o.t = v->type;
+            return mkcodenode(o);
+        }
+
+        int i_am_static = state->method->is_static;
+
+        /* look at current class' members */
+        if(!state->method->inner && 
+           !state->xmlfilter &&
+            state->cls && 
+            (f = findmember_nsset(state->cls->info, name, 1)))
+        {
+            // name is a member or attribute in this class
+            int var_is_static = (f->flags&FLAG_STATIC);
+
+            if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
+                /* if the variable is a constant (and we know what is evaluates to), we
+                   can just use the value itself */
+                varinfo_t*v = (varinfo_t*)f;
+                if(v->value) {
+                    return mkconstnode(v->value);
+                }
+            }
+           
+            if(var_is_static >= i_am_static) {
+                if(f->kind == INFOTYPE_METHOD) {
+                    o.t = TYPE_FUNCTION(f);
+                } else {
+                    o.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;
+                    o.t = f->type;
+                    namespace_t ns = {f->access, f->package};
+                    multiname_t m = {QNAME, &ns, 0, name};
+                    o.c = abc_findpropstrict2(o.c, &m);
+                    o.c = abc_getproperty2(o.c, &m);
+                    return mkcodenode(o);
+                } else if(f->slot>0) {
+                    o.c = abc_getlocal_0(o.c);
+                    o.c = abc_getslot(o.c, f->slot);
+                    return mkcodenode(o);
+                } else {
+                    MEMBER_MULTINAME(m, f, name);
+                    o.c = abc_getlocal_0(o.c);
+                    o.c = abc_getproperty2(o.c, &m);
+                    return mkcodenode(o);
+                }
+            }
+        } 
+        
+        /* look at actual classes, in the current package and imported */
+        if(!state->xmlfilter && (a = find_class(name))) {
+            if(state->cls && state->cls->info == (classinfo_t*)a && i_am_static) {
+                o.c = abc_getlocal_0(0);
+                o.t = TYPE_CLASS((classinfo_t*)a);
+            } else {
+                o = push_class(a);
+            }
+            return mkcodenode(o);
+        }
+
+        /* look through package prefixes */
+        if(!state->xmlfilter && 
+           (dict_contains(state->import_toplevel_packages, name) || 
+            registry_ispackage(name))) {
+            o.c = abc___pushpackage__(o.c, name);
+            o.t = 0;
+            return mkcodenode(o); //?
+        }
+
+        /* unknown object, let the avm2 resolve it */
+        if(1) {
+            if(!state->method->inner && !state->xmlfilter) {
+                /* we really should make inner functions aware of the class context */
+                as3_warning("Couldn't resolve '%s', doing late binding", name);
+            }
+            state->method->late_binding = 1;
+                    
+            multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, name};
+
+            o.t = 0;
+            o.c = abc_findpropstrict2(o.c, &m);
+            o.c = abc_getproperty2(o.c, &m);
+            return mkcodenode(o);
+        }
+    }
+
+/* Line 274 of skeleton.m4  */
+#line 3795 "parser.y"
+
+    void add_active_url(const char*url)
+    {
+        NEW(namespace_t,n);
+        n->name = url;
+        list_append(state->active_namespace_urls, n);
+    }
+
+
+/* Line 274 of skeleton.m4  */
+#line 2213 "parser.tab.c"
 
 #ifdef short
 # undef short
 
 #ifdef short
 # undef short
@@ -1932,22 +2422,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  125
+#define YYFINAL  164
 /* YYLAST -- Last index in YYTABLE.  */
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   3223
+#define YYLAST   3411
 
 /* YYNTOKENS -- Number of terminals.  */
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  133
+#define YYNTOKENS  136
 /* YYNNTS -- Number of nonterminals.  */
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  109
+#define YYNNTS  135
 /* YYNRULES -- Number of rules.  */
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  301
+#define YYNRULES  354
 /* YYNRULES -- Number of states.  */
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  512
+#define YYNSTATES  601
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   362
+#define YYMAXUTOK   365
 
 #define YYTRANSLATE(YYX)                                               \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
 #define YYTRANSLATE(YYX)                                               \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -1958,16 +2448,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,
        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,   117,     2,     2,     2,   115,   107,     2,
-     121,   132,   114,   112,    98,   111,   126,   113,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,   104,    97,
-     108,   100,   109,   103,   127,     2,     2,     2,     2,     2,
+       2,     2,     2,   120,     2,     2,     2,   118,   109,     2,
+     124,   135,   117,   115,   102,   114,   129,   116,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,   106,   101,
+     111,   104,   112,   105,   130,     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,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   123,     2,   124,   106,     2,     2,     2,     2,     2,
+       2,   126,     2,   127,   108,     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,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   125,   105,   131,   116,     2,     2,     2,
+       2,     2,     2,   128,   107,   134,   119,     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,
        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,
@@ -1990,178 +2480,63 @@ 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,
       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,    96,    99,   101,   102,   110,   118,   119,   120,   122,
-     128,   129,   130
+      95,    96,    97,    98,    99,   100,   103,   110,   113,   121,
+     122,   123,   125,   131,   132,   133
 };
 
 #if YYDEBUG
 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
    YYRHS.  */
 };
 
 #if YYDEBUG
 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
    YYRHS.  */
-static const yytype_uint16 yyprhs[] =
+static const int yyprhs[] =
 {
 {
-       0,     0,     3,     5,     6,     8,    10,    13,    15,    17,
-      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,    91,    93,    95,    97,    99,   101,   106,
-     108,   112,   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,   301,   303,
-     305,   309,   311,   312,   319,   320,   326,   329,   334,   335,
-     337,   339,   342,   344,   346,   348,   350,   352,   354,   356,
-     358,   360,   362,   363,   366,   367,   370,   371,   374,   375,
-     385,   386,   395,   396,   398,   400,   403,   405,   410,   412,
-     414,   416,   417,   419,   421,   424,   426,   429,   438,   440,
-     442,   448,   449,   452,   454,   456,   458,   460,   462,   464,
-     466,   468,   470,   471,   473,   476,   481,   485,   487,   492,
-     495,   497,   499,   500,   501,   514,   516,   517,   518,   529,
-     531,   535,   537,   539,   541,   545,   547,   549,   551,   554,
-     555,   556,   560,   561,   563,   565,   567,   570,   573,   574,
-     579,   584,   589,   592,   594,   597,   599,   601,   605,   607,
-     609,   611,   613,   615,   617,   619,   621,   623,   625,   627,
-     629,   631,   633,   635,   637,   639,   641,   645,   649,   653,
-     657,   661,   665,   669,   673,   677,   681,   684,   687,   691,
-     695,   699,   703,   707,   711,   715,   719,   723,   727,   731,
-     735,   739,   743,   747,   752,   755,   757,   761,   764,   769,
-     773,   774,   776,   780,   786,   790,   794,   798,   802,   806,
-     810,   814,   818,   822,   826,   830,   836,   839,   842,   845,
-     848,   852,   855,   860,   866,   870,   876,   880,   882,   886,
-     892,   898
+  b4_prhs
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int16 yyrhs[] =
+static const int yyrhs[] =
 {
 {
-     134,     0,    -1,   135,    -1,    -1,   136,    -1,   137,    -1,
-     136,   137,    -1,   184,    -1,   196,    -1,   194,    -1,   212,
-      -1,   205,    -1,   146,    -1,   147,   125,   135,   131,    -1,
-      97,    -1,    -1,   139,    -1,   140,    -1,   139,   140,    -1,
-     196,    -1,   194,    -1,   212,    -1,   205,    -1,   146,    -1,
-     147,   125,   138,   131,    -1,    97,    -1,   142,    -1,    -1,
-     142,   144,    -1,   144,    -1,   187,    -1,   158,    -1,   159,
-      -1,   160,    -1,   162,    -1,   170,    -1,   153,    -1,   181,
-      -1,   178,    -1,   234,    -1,   241,    -1,    97,    -1,   143,
-      -1,   149,    -1,   164,    -1,   165,    -1,   231,    -1,   180,
-      -1,   147,   125,   142,   131,    -1,   240,    -1,   125,   142,
-     131,    -1,   125,   131,    -1,   144,    97,    -1,   144,    -1,
-     143,    -1,     3,    87,     3,    -1,   100,   232,    -1,    -1,
-      46,   150,    -1,    32,   150,    -1,   151,    -1,   150,    98,
-     151,    -1,     3,   222,   148,    -1,    -1,    65,   145,    -1,
-      -1,    64,   121,   154,   233,   132,   145,   152,    -1,    -1,
-     149,    -1,   234,    -1,    46,     3,   222,    -1,     3,    -1,
-      13,   121,    -1,    13,    50,   121,    -1,   157,   155,    97,
-     233,    97,   234,   132,   145,    -1,   157,   156,    68,   233,
-     132,   145,    -1,    -1,    14,   121,   161,   233,   132,   145,
-      -1,    -1,    15,   163,   145,    14,   121,   233,   132,    -1,
-      66,    -1,    66,     3,    -1,    30,    -1,    30,     3,    -1,
-      -1,   167,    -1,   169,    -1,   167,   169,    -1,   168,    -1,
-     167,   168,    -1,    34,   235,   104,   141,    -1,    62,   104,
-     141,    -1,    -1,    16,   121,   171,   235,   132,   125,   166,
-     131,    -1,    -1,    33,   121,     3,   222,   132,   173,   125,
-     141,   131,    -1,    -1,    28,   125,   175,   141,   131,    -1,
-     172,    -1,   176,   172,    -1,   176,    -1,   176,   174,    -1,
-     174,    -1,    -1,    52,   125,   179,   141,   131,   177,    -1,
-      37,   233,    -1,    37,    -1,    39,   121,   233,   132,   145,
-      -1,     3,    -1,    19,    -1,   183,   126,   182,    -1,   182,
-      -1,    -1,    19,   183,   125,   185,   138,   131,    -1,    -1,
-      19,   125,   186,   138,   131,    -1,    41,   218,    -1,    41,
-     183,   126,   114,    -1,    -1,   189,    -1,   190,    -1,   189,
-     190,    -1,    21,    -1,    22,    -1,    20,    -1,    38,    -1,
-      47,    -1,    49,    -1,    48,    -1,    26,    -1,    24,    -1,
-       4,    -1,    -1,    54,   219,    -1,    -1,    54,   220,    -1,
-      -1,    17,   220,    -1,    -1,   188,    31,     3,   191,   193,
-     125,   195,   198,   131,    -1,    -1,   188,    44,     3,   192,
-     125,   197,   201,   131,    -1,    -1,   199,    -1,   200,    -1,
-     199,   200,    -1,    97,    -1,   147,   125,   198,   131,    -1,
-     205,    -1,   212,    -1,   143,    -1,    -1,   202,    -1,   203,
-      -1,   202,   203,    -1,    97,    -1,    46,     3,    -1,   188,
-      27,   211,     3,   121,   208,   132,   222,    -1,    46,    -1,
-      32,    -1,   188,   204,     3,   222,   148,    -1,    -1,   100,
-     207,    -1,    10,    -1,     8,    -1,     9,    -1,    12,    -1,
-       5,    -1,    56,    -1,    55,    -1,    45,    -1,     3,    -1,
-      -1,   209,    -1,    91,   210,    -1,   209,    98,    91,   210,
-      -1,   209,    98,   210,    -1,   210,    -1,     3,   104,   221,
-     206,    -1,     3,   206,    -1,    51,    -1,    35,    -1,    -1,
-      -1,   188,    27,   211,     3,   121,   208,   132,   222,   125,
-     213,   141,   131,    -1,     3,    -1,    -1,    -1,    27,   214,
-     121,   208,   132,   222,   125,   216,   141,   131,    -1,     3,
-      -1,   183,   126,     3,    -1,   218,    -1,   217,    -1,   219,
-      -1,   220,    98,   219,    -1,   219,    -1,   114,    -1,    36,
-      -1,   104,   221,    -1,    -1,    -1,   121,   224,   132,    -1,
-      -1,   225,    -1,   226,    -1,   232,    -1,   225,    98,    -1,
-     226,   232,    -1,    -1,    25,   235,   227,   223,    -1,   235,
-     121,   224,   132,    -1,    53,   121,   224,   132,    -1,    63,
-     235,    -1,    42,    -1,    42,   233,    -1,   235,    -1,   235,
-      -1,   233,    98,   235,    -1,   233,    -1,   215,    -1,   236,
-      -1,   239,    -1,   228,    -1,   230,    -1,   229,    -1,     6,
-      -1,    10,    -1,    11,    -1,     8,    -1,     9,    -1,    12,
-      -1,     5,    -1,    29,    -1,    56,    -1,    55,    -1,    45,
-      -1,   235,   108,   235,    -1,   235,   109,   235,    -1,   235,
-      74,   235,    -1,   235,    75,   235,    -1,   235,    70,   235,
-      -1,   235,    71,   235,    -1,   235,    73,   235,    -1,   235,
-      72,   235,    -1,   235,    85,   235,    -1,   235,    86,   235,
-      -1,   117,   235,    -1,   116,   235,    -1,   235,   107,   235,
-      -1,   235,   106,   235,    -1,   235,   105,   235,    -1,   235,
-      94,   235,    -1,   235,    93,   235,    -1,   235,    92,   235,
-      -1,   235,   113,   235,    -1,   235,   115,   235,    -1,   235,
-     112,   235,    -1,   235,   111,   235,    -1,   235,   114,   235,
-      -1,   235,    68,   235,    -1,   235,    69,   235,    -1,   235,
-      40,   235,    -1,   235,    67,   235,    -1,    43,   121,   235,
-     132,    -1,    36,   235,    -1,    36,    -1,   121,   233,   132,
-      -1,   111,   235,    -1,   235,   123,   235,   124,    -1,   123,
-     224,   124,    -1,    -1,   238,    -1,   232,   104,   232,    -1,
-     238,    98,   232,   104,   232,    -1,   125,   237,   131,    -1,
-     235,    79,   235,    -1,   235,    78,   235,    -1,   235,    83,
-     235,    -1,   235,    82,   235,    -1,   235,    84,   235,    -1,
-     235,    77,   235,    -1,   235,    76,   235,    -1,   235,    80,
-     235,    -1,   235,    81,   235,    -1,   235,   100,   235,    -1,
-     235,   103,   235,   104,   235,    -1,   235,    89,    -1,   235,
-      88,    -1,    89,   235,    -1,    88,   235,    -1,    53,   126,
-       3,    -1,   127,     3,    -1,   235,   126,   127,     3,    -1,
-     235,   126,     3,    87,     3,    -1,   235,    90,     3,    -1,
-     235,   126,   121,   235,   132,    -1,   235,   126,     3,    -1,
-       3,    -1,   188,    18,     3,    -1,   188,    18,     3,   100,
-       3,    -1,   188,    18,     3,   100,     5,    -1,    23,    18,
-       3,    -1
+  b4_rhs
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,  1698,  1698,  1700,  1700,  1701,  1702,  1704,  1705,  1706,
-    1707,  1708,  1709,  1710,  1711,  1713,  1713,  1714,  1715,  1717,
-    1718,  1719,  1720,  1721,  1722,  1723,  1725,  1726,  1728,  1729,
-    1732,  1733,  1734,  1735,  1736,  1737,  1738,  1739,  1740,  1741,
-    1742,  1745,  1746,  1747,  1748,  1749,  1750,  1751,  1752,  1754,
-    1756,  1757,  1758,  1759,  1763,  1770,  1774,  1775,  1779,  1780,
-    1782,  1783,  1785,  1828,  1829,  1832,  1832,  1851,  1852,  1853,
-    1856,  1859,  1863,  1864,  1866,  1886,  1929,  1929,  1948,  1948,
-    1963,  1966,  1969,  1972,  1976,  1977,  1978,  1979,  1980,  1981,
-    1983,  1994,  1997,  1997,  2026,  2026,  2046,  2046,  2063,  2064,
-    2065,  2066,  2074,  2083,  2083,  2128,  2132,  2143,  2152,  2153,
-    2155,  2156,  2158,  2158,  2160,  2160,  2163,  2177,  2193,  2194,
-    2195,  2196,  2198,  2199,  2200,  2201,  2202,  2203,  2204,  2205,
-    2206,  2207,  2209,  2210,  2212,  2213,  2215,  2216,  2220,  2218,
-    2226,  2224,  2232,  2233,  2234,  2235,  2236,  2237,  2238,  2239,
-    2241,  2247,  2248,  2249,  2250,  2251,  2252,  2255,  2268,  2268,
-    2270,  2343,  2344,  2346,  2347,  2348,  2349,  2350,  2352,  2353,
-    2354,  2355,  2364,  2368,  2374,  2380,  2388,  2393,  2399,  2407,
-    2415,  2416,  2417,  2420,  2419,  2434,  2435,  2437,  2436,  2458,
-    2467,  2480,  2481,  2483,  2484,  2486,  2487,  2488,  2497,  2498,
-    2502,  2503,  2505,  2506,  2507,  2509,  2513,  2514,  2519,  2520,
-    2556,  2602,  2623,  2644,  2647,  2654,  2655,  2656,  2662,  2668,
-    2670,  2672,  2674,  2676,  2678,  2680,  2697,  2702,  2705,  2708,
-    2711,  2714,  2717,  2720,  2723,  2726,  2730,  2733,  2736,  2739,
-    2742,  2745,  2748,  2751,  2755,  2766,  2784,  2789,  2794,  2799,
-    2804,  2809,  2813,  2817,  2822,  2826,  2830,  2839,  2848,  2858,
-    2863,  2875,  2881,  2886,  2892,  2898,  2902,  2904,  2915,  2924,
-    2931,  2932,  2934,  2940,  2949,  2956,  2968,  2974,  2980,  2986,
-    2992,  2998,  3004,  3017,  3028,  3035,  3048,  3075,  3089,  3103,
-    3117,  3132,  3139,  3146,  3153,  3160,  3171,  3205,  3307,  3308,
-    3309,  3311
+       0,  1968,  1968,  1970,  1970,  1971,  1972,  1974,  1975,  1976,
+    1977,  1978,  1979,  1980,  1981,  1983,  1983,  1984,  1985,  1987,
+    1988,  1989,  1990,  1991,  1992,  1993,  1994,  1996,  1997,  1999,
+    2002,  2005,  2006,  2007,  2008,  2009,  2010,  2011,  2012,  2013,
+    2014,  2015,  2016,  2017,  2018,  2019,  2022,  2023,  2024,  2025,
+    2026,  2027,  2028,  2029,  2041,  2042,  2046,  2057,  2065,  2092,
+    2093,  2095,  2096,  2098,  2099,  2101,  2162,  2162,  2166,  2167,
+    2170,  2186,  2187,  2188,  2193,  2197,  2202,  2203,  2205,  2225,
+    2269,  2285,  2297,  2300,  2303,  2306,  2310,  2311,  2312,  2313,
+    2314,  2315,  2317,  2328,  2331,  2331,  2362,  2362,  2387,  2387,
+    2403,  2404,  2405,  2406,  2414,  2423,  2423,  2472,  2476,  2487,
+    2497,  2514,  2515,  2516,  2517,  2518,  2520,  2521,  2523,  2523,
+    2525,  2525,  2549,  2557,  2568,  2584,  2585,  2586,  2587,  2594,
+    2595,  2596,  2597,  2598,  2599,  2600,  2601,  2602,  2603,  2607,
+    2608,  2610,  2611,  2613,  2614,  2618,  2616,  2624,  2622,  2631,
+    2632,  2633,  2634,  2635,  2636,  2637,  2638,  2640,  2646,  2647,
+    2648,  2649,  2650,  2651,  2654,  2727,  2727,  2729,  2729,  2731,
+    2732,  2734,  2818,  2819,  2828,  2829,  2832,  2833,  2834,  2835,
+    2836,  2837,  2838,  2851,  2862,  2863,  2864,  2866,  2866,  2869,
+    2869,  2872,  2873,  2876,  2881,  2884,  2887,  2890,  2893,  2897,
+    2900,  2904,  2908,  2913,  2919,  2922,  2925,  2928,  2933,  2936,
+    2939,  2949,  2953,  2959,  2965,  2973,  2978,  2984,  2992,  3000,
+    3001,  3002,  3005,  3004,  3021,  3022,  3024,  3023,  3047,  3066,
+    3080,  3081,  3083,  3084,  3086,  3087,  3088,  3097,  3098,  3102,
+    3103,  3105,  3106,  3107,  3109,  3113,  3114,  3119,  3120,  3167,
+    3217,  3238,  3260,  3263,  3270,  3273,  3276,  3279,  3282,  3285,
+    3290,  3291,  3293,  3294,  3295,  3296,  3297,  3299,  3305,  3314,
+    3315,  3316,  3317,  3318,  3319,  3321,  3325,  3330,  3348,  3359,
+    3369,  3378,  3379,  3380,  3381,  3382,  3383,  3384,  3385,  3386,
+    3387,  3388,  3389,  3390,  3391,  3392,  3393,  3394,  3395,  3396,
+    3397,  3398,  3399,  3400,  3401,  3402,  3403,  3404,  3405,  3406,
+    3407,  3408,  3409,  3410,  3411,  3412,  3413,  3414,  3415,  3416,
+    3417,  3418,  3419,  3420,  3421,  3422,  3423,  3425,  3426,  3427,
+    3428,  3430,  3445,  3453,  3453,  3507,  3508,  3509,  3510,  3511,
+    3519,  3537,  3544,  3555,  3562,  3569,  3579,  3590,  3770,  3804,
+    3811,  3818,  3825,  3847,  3853
 };
 #endif
 
 };
 #endif
 
@@ -2171,52 +2546,58 @@ static const yytype_uint16 yyrline[] =
 static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "T_IDENTIFIER", "T_NAMESPACE",
 static const char *const yytname[] =
 {
   "$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\"",
+  "T_STRING", "T_REGEXP", "T_EMPTY", "T_INT", "T_UINT", "T_FLOAT",
+  "\"for\"", "\"while\"", "\"do\"", "\"switch\"", "\"implements\"",
+  "\"namespace\"", "\"package\"", "\"protected\"", "\"arguments\"",
   "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
   "\"public\"", "\"private\"", "\"use\"", "\"internal\"", "\"new\"",
-  "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"",
+  "\"native\"", "\"function\"", "\"finally\"", "\"undefined\"", "\"NaN\"",
   "\"continue\"", "\"class\"", "\"const\"", "\"catch\"", "\"case\"",
   "\"set\"", "\"void\"", "\"throw\"", "\"static\"", "\"with\"",
   "\"instanceof\"", "\"import\"", "\"return\"", "\"typeof\"",
   "\"interface\"", "\"null\"", "\"var\"", "\"dynamic\"", "\"override\"",
   "\"final\"", "\"each\"", "\"get\"", "\"try\"", "\"super\"",
   "\"extends\"", "\"false\"", "\"true\"", "\"Boolean\"", "\"uint\"",
   "\"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", "'('", "new2", "'['", "']'", "'{'",
-  "'.'", "'@'", "above_identifier", "below_else", "above_function", "'}'",
-  "')'", "$accept", "PROGRAM", "MAYBE_PROGRAM_CODE_LIST",
-  "PROGRAM_CODE_LIST", "PROGRAM_CODE", "MAYBE_INPACKAGE_CODE_LIST",
-  "INPACKAGE_CODE_LIST", "INPACKAGE_CODE", "MAYBECODE", "CODE",
-  "CODE_STATEMENT", "CODEPIECE", "CODEBLOCK", "PACKAGE_INITCODE",
-  "CONDITIONAL_COMPILATION", "MAYBEEXPRESSION", "VARIABLE_DECLARATION",
-  "VARIABLE_LIST", "ONE_VARIABLE", "MAYBEELSE", "IF", "$@1", "FOR_INIT",
-  "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "$@2", "DO_WHILE",
-  "$@3", "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE",
-  "DEFAULT", "SWITCH", "$@4", "CATCH", "$@5", "FINALLY", "$@6",
-  "CATCH_LIST", "CATCH_FINALLY_LIST", "TRY", "$@7", "THROW", "WITH",
-  "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@8", "$@9", "IMPORT",
+  "\"int\"", "\"Number\"", "\"String\"", "\"default\"", "\"default xml\"",
+  "\"delete\"", "\"if\"", "\"else\"", "\"break\"", "\"is\"", "\"in\"",
+  "\"as\"", "\"{ (dictionary)\"", "\"==\"", "\"===\"", "\"!=\"", "\"!==\"",
+  "\"<=\"", "\">=\"", "\"|=\"", "\"/=\"", "\"%=\"", "\"*=\"", "\"&=\"",
+  "\"+=\"", "\"-=\"", "\"^=\"", "\">>=\"", "\"<<=\"", "\">>>=\"", "\"||\"",
+  "\"&&\"", "\"::\"", "\"--\"", "\"++\"", "\"..\"", "\"...\"", "\"<<\"",
+  "\">>>\"", "\">>\"", "prec_none", "below_semicolon", "';'", "','",
+  "below_assignment", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "below_lt",
+  "'<'", "'>'", "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", "EMBED_START", "CONDITIONAL_COMPILATION",
+  "MAYBEEXPRESSION", "VARIABLE_DECLARATION", "VARIABLE_LIST",
+  "ONE_VARIABLE", "IF_CODEBLOCK", "$@1", "MAYBEELSE", "IF", "FOR_INIT",
+  "FOR_IN_INIT", "FOR_START", "FOR", "FOR_IN", "WHILE", "DO_WHILE",
+  "BREAK", "CONTINUE", "MAYBE_CASE_LIST", "CASE_LIST", "CASE", "DEFAULT",
+  "SWITCH", "$@2", "CATCH", "$@3", "FINALLY", "$@4", "CATCH_LIST",
+  "CATCH_FINALLY_LIST", "TRY", "$@5", "THROW", "WITH_HEAD", "WITH",
+  "X_IDENTIFIER", "PACKAGE", "PACKAGE_DECLARATION", "$@6", "$@7", "IMPORT",
   "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
   "MAYBE_MODIFIERS", "MODIFIER_LIST", "MODIFIER", "EXTENDS",
-  "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@10",
-  "INTERFACE_DECLARATION", "$@11", "MAYBE_CLASS_BODY", "CLASS_BODY",
+  "EXTENDS_LIST", "IMPLEMENTS_LIST", "CLASS_DECLARATION", "$@8",
+  "INTERFACE_DECLARATION", "$@9", "MAYBE_CLASS_BODY", "CLASS_BODY",
   "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
   "CLASS_BODY_ITEM", "MAYBE_INTERFACE_BODY", "INTERFACE_BODY",
-  "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "MAYBESTATICCONSTANT",
-  "STATICCONSTANT", "MAYBE_PARAM_LIST", "PARAM_LIST", "PARAM", "GETSET",
-  "FUNCTION_DECLARATION", "$@12", "MAYBE_IDENTIFIER", "INNERFUNCTION",
-  "$@13", "CLASS", "PACKAGEANDCLASS", "CLASS_SPEC", "CLASS_SPEC_LIST",
+  "IDECLARATION", "VARCONST", "SLOT_DECLARATION", "$@10", "SLOT_LIST",
+  "ONE_SLOT", "MAYBECONSTANT", "CONSTANT", "XML", "OPEN", "CLOSE",
+  "CLOSE2", "XMLEXPR1", "$@11", "XMLEXPR2", "$@12", "XMLTEXT", "XML2",
+  "XML_ID_OR_EXPR", "MAYBE_XMLATTRIBUTES", "XMLNODE", "XMLATTRIBUTES",
+  "XMLATTRIBUTE", "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",
   "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_DECLARATION", "USE_NAMESPACE", 0
+  "COMMA_EXPRESSION", "VOIDEXPRESSION", "MAYBE_DICT_EXPRPAIR_LIST",
+  "DICTLH", "DICT_EXPRPAIR_LIST", "E", "$@15", "ID_OR_NS", "SUBNODE",
+  "MEMBER", "VAR_READ", "NAMESPACE_ID", "NAMESPACE_DECLARATION",
+  "DEFAULT_NAMESPACE", "USE_NAMESPACE", 0
 };
 #endif
 
 };
 #endif
 
@@ -2234,48 +2615,53 @@ 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,
      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,   351,    59,    44,   352,
-      61,   353,   354,    63,    58,   124,    94,    38,    60,    62,
-     355,    45,    43,    47,    42,    37,   126,    33,   356,   357,
-     358,    40,   359,    91,    93,   123,    46,    64,   360,   361,
-     362,   125,    41
+     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
+     355,    59,    44,   356,    61,    63,    58,   124,    94,    38,
+     357,    60,    62,   358,    45,    43,    47,    42,    37,   126,
+      33,   359,   360,   361,    40,   362,    91,    93,   123,    46,
+      64,   363,   364,   365,   125,    41
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
+static const yytype_uint16 yyr1[] =
 {
 {
-       0,   133,   134,   135,   135,   136,   136,   137,   137,   137,
-     137,   137,   137,   137,   137,   138,   138,   139,   139,   140,
-     140,   140,   140,   140,   140,   140,   141,   141,   142,   142,
-     143,   143,   143,   143,   143,   143,   143,   143,   143,   143,
-     143,   144,   144,   144,   144,   144,   144,   144,   144,   144,
-     145,   145,   145,   145,   146,   147,   148,   148,   149,   149,
-     150,   150,   151,   152,   152,   154,   153,   155,   155,   155,
-     156,   156,   157,   157,   158,   159,   161,   160,   163,   162,
-     164,   164,   165,   165,   166,   166,   166,   166,   167,   167,
-     168,   169,   171,   170,   173,   172,   175,   174,   176,   176,
-     177,   177,   177,   179,   178,   180,   180,   181,   182,   182,
-     183,   183,   185,   184,   186,   184,   187,   187,   188,   188,
-     189,   189,   190,   190,   190,   190,   190,   190,   190,   190,
-     190,   190,   191,   191,   192,   192,   193,   193,   195,   194,
-     197,   196,   198,   198,   199,   199,   200,   200,   200,   200,
-     200,   201,   201,   202,   202,   203,   203,   203,   204,   204,
-     205,   206,   206,   207,   207,   207,   207,   207,   207,   207,
-     207,   207,   208,   208,   208,   208,   209,   209,   210,   210,
-     211,   211,   211,   213,   212,   214,   214,   216,   215,   217,
-     218,   219,   219,   220,   220,   221,   221,   221,   222,   222,
-     223,   223,   224,   224,   224,   225,   226,   225,   227,   228,
-     229,   229,   230,   231,   231,   232,   233,   233,   234,   235,
-     235,   235,   235,   235,   235,   235,   236,   236,   236,   236,
-     236,   236,   236,   236,   236,   236,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   235,   235,
-     237,   237,   238,   238,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   239,   240,   240,
-     240,   241
+       0,   136,   137,   138,   138,   139,   139,   140,   140,   140,
+     140,   140,   140,   140,   140,   141,   141,   142,   142,   143,
+     143,   143,   143,   143,   143,   143,   143,   144,   144,   145,
+     145,   146,   146,   146,   146,   146,   146,   146,   146,   146,
+     146,   146,   146,   146,   146,   146,   147,   147,   147,   147,
+     147,   147,   147,   147,   148,   148,   149,   150,   151,   152,
+     152,   153,   153,   154,   154,   155,   157,   156,   158,   158,
+     159,   160,   160,   160,   161,   161,   162,   162,   163,   164,
+     165,   166,   167,   167,   168,   168,   169,   169,   169,   169,
+     170,   170,   171,   172,   174,   173,   176,   175,   178,   177,
+     179,   179,   180,   180,   180,   182,   181,   183,   183,   184,
+     185,   186,   186,   186,   186,   186,   187,   187,   189,   188,
+     190,   188,   191,   191,   191,   192,   192,   193,   193,   194,
+     194,   194,   194,   194,   194,   194,   194,   194,   194,   195,
+     195,   196,   196,   197,   197,   199,   198,   201,   200,   202,
+     202,   203,   203,   204,   204,   204,   204,   204,   205,   205,
+     206,   206,   207,   207,   207,   208,   208,   210,   209,   211,
+     211,   212,   213,   213,   214,   214,   214,   214,   214,   214,
+     214,   214,   214,   215,   216,   217,   218,   220,   219,   222,
+     221,   223,   223,   223,   223,   224,   224,   225,   225,   226,
+     226,   227,   227,   227,   228,   228,   229,   229,   229,   229,
+     229,   230,   230,   230,   230,   231,   231,   232,   232,   233,
+     233,   233,   235,   234,   236,   236,   238,   237,   239,   240,
+     241,   241,   242,   242,   243,   243,   243,   244,   244,   245,
+     245,   246,   246,   246,   247,   248,   247,   249,   250,   251,
+     251,   252,   253,   253,   254,   255,   256,   256,   257,   257,
+     258,   258,   259,   259,   259,   259,   259,   260,   260,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   262,   261,   263,   263,   263,   264,   264,
+     261,   261,   261,   261,   261,   261,   261,   265,   266,   267,
+     267,   267,   268,   269,   270
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -2283,35 +2669,40 @@ static const yytype_uint8 yyr2[] =
 {
        0,     2,     1,     0,     1,     1,     2,     1,     1,     1,
        1,     1,     1,     4,     1,     0,     1,     1,     2,     1,
 {
        0,     2,     1,     0,     1,     1,     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,     1,     4,     1,
-       3,     2,     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,     5,     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,
-       5,     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,     4,     4,     1,     1,     0,     2,
        1,     1,     1,     1,     1,     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,
+       1,     1,     1,     1,     3,     2,     1,     1,     1,     1,
+       1,     1,     1,     4,     2,     1,     1,     0,     3,     2,
+       0,     2,     2,     1,     3,     3,     0,     2,     0,     2,
+       6,     0,     1,     1,     3,     1,     2,     3,     8,     6,
+       5,     6,     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,     1,     1,     3,     1,     0,     6,
+       0,     5,     2,     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,     1,     1,     1,     0,     0,     4,     0,
+       4,     0,     2,     2,     2,     2,     3,     1,     1,     0,
+       1,     6,    10,    11,     1,     2,     1,     3,     3,     3,
+       3,     0,     1,     2,     4,     3,     1,     4,     2,     1,
+       1,     0,     0,    12,     1,     0,     0,    10,     1,     3,
+       1,     1,     1,     3,     1,     1,     1,     2,     0,     0,
+       3,     0,     1,     1,     1,     2,     2,     0,     4,     4,
+       4,     2,     1,     2,     1,     1,     1,     3,     1,     3,
+       0,     1,     1,     1,     1,     1,     1,     3,     5,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     3,
        3,     3,     3,     3,     3,     3,     3,     3,     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,     5,     2,     2,     2,     2,
-       3,     2,     4,     5,     3,     5,     3,     1,     3,     5,
-       5,     3
+       3,     2,     2,     3,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     2,     2,
+       1,     3,     2,     4,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     5,     2,     2,     2,
+       2,     3,     2,     0,     6,     1,     1,     1,     1,     1,
+       5,     3,     5,     4,     4,     6,     6,     3,     1,     2,
+       4,     4,     2,     4,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -2319,866 +2710,937 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
-     118,   297,   131,   231,   225,   228,   229,   226,   227,   230,
-       0,     0,    78,     0,     0,   124,   122,   123,     0,   130,
-       0,   129,   186,   232,   265,   125,     0,     0,     0,   235,
-     126,   128,   127,     0,     0,   234,   233,     0,     0,     0,
-       0,    14,     0,     0,     0,     0,   202,   270,     0,     0,
-       2,   118,     5,    54,    12,     0,    36,    67,    31,    32,
-      33,    34,    35,    38,    37,     7,    30,     0,   119,   120,
-       9,     8,    11,    10,   219,   222,   224,   223,   218,    39,
-     216,   220,   221,    40,     0,     0,    72,    76,   118,    92,
-     108,   109,   114,   111,     0,     0,   297,   208,   185,     0,
-     264,     0,     0,   116,     0,   103,   202,     0,   212,    65,
-     289,   288,   267,   247,   246,     0,     0,   203,   204,   205,
-     215,     0,     0,   271,   291,     1,     6,   118,   297,     0,
-       0,    68,     0,     0,    69,   182,     0,   159,     0,   158,
-       0,   121,     0,     0,     0,     0,     0,     0,     0,     0,
+     125,   348,   138,   177,   277,   174,   175,   176,     0,     0,
+      66,     0,     0,   131,   278,   129,   130,     0,   137,     0,
+     136,   225,   181,   182,   310,   132,     0,     0,     0,   180,
+     133,   135,   134,     0,     0,   179,   178,     0,     0,     0,
+     260,     0,     0,    14,   184,     0,     0,     0,     0,   241,
+     125,     0,     0,     2,   125,     5,    56,    12,     0,    38,
+      71,    33,    34,    35,    36,    37,    40,   125,    39,     7,
+      32,     0,   126,   127,     9,     8,    11,   275,   276,     0,
+     183,    10,   269,   271,   273,   272,    41,   258,   270,   274,
+      43,    31,    42,     0,     0,    76,     0,     0,   125,    94,
+     111,   115,   113,   112,   114,   120,   117,     0,     0,   348,
+     247,   224,     0,   309,     0,   122,     0,   123,   308,   105,
+     241,     0,     0,   251,     0,   262,   263,   264,   265,   266,
+       0,     0,   261,   330,   329,   312,   292,   291,     0,   256,
+       0,   242,   243,   244,   254,    84,     0,   108,   252,     0,
+      82,    46,    45,   125,    47,    30,     0,    48,    49,    50,
+      52,     0,    51,   332,     1,     6,   125,   348,     0,    72,
+       0,     0,    73,    55,   110,     0,   221,     0,   166,     0,
+     165,   167,   352,   128,   197,     0,   198,   199,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   287,   286,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   202,     0,     0,    55,    73,     0,    82,   106,
-     213,     0,    80,    41,   118,    42,    53,     0,     0,    43,
-      44,    45,    47,     0,    46,    49,     0,   118,   112,     0,
-     301,   200,   172,     0,     0,     0,    27,     0,   290,     0,
-     266,   269,   206,   207,     0,   274,     0,     0,   199,    59,
-      60,   199,    58,     0,     0,   181,   180,     0,   132,   134,
-     199,   217,   261,   262,   259,   260,   240,   241,   243,   242,
-     238,   239,   281,   280,   276,   275,   282,   283,   278,   277,
-     279,   244,   245,   294,   253,   252,   251,   284,     0,   250,
-     249,   248,   236,   237,   257,   256,   254,   258,   255,     0,
-       0,   296,     0,     0,     0,    83,   105,   214,    81,    51,
-     118,    29,   216,    52,     0,   118,     0,     0,    25,     0,
-     118,    17,    23,     0,    20,    19,    22,    21,   118,   110,
-     202,   209,   161,     0,     0,   173,   177,   118,   190,   117,
-     263,     0,    26,   211,     0,   272,     0,    13,     0,    57,
-       0,    57,     0,     0,     0,     0,   136,     0,     0,    57,
-       0,   210,   268,     0,     0,   292,   118,    50,    28,     0,
-     118,   298,     0,   115,    18,   118,     0,     0,     0,     0,
-     179,   174,   199,     0,   107,     0,   118,     0,   189,   197,
-     196,     0,   192,   191,   195,   198,     0,    62,    61,     0,
-     118,   172,   133,     0,     0,   193,   135,   140,   160,   285,
-     293,   295,    77,     0,    48,     0,    84,     0,   113,   201,
-     171,   167,   164,   165,   163,   166,   170,   169,   168,   162,
-     161,     0,     0,   176,     0,     0,    98,   102,   100,   104,
-      63,   273,     0,    56,     0,    75,     0,   137,   138,     0,
-     118,    79,   299,   300,     0,     0,     0,    85,    88,    86,
-      24,   178,   187,   175,    96,     0,    99,   101,   118,    66,
-     118,   199,   118,   194,     0,   155,     0,     0,   118,   153,
-       0,    27,    93,    89,    87,    27,    27,   199,    64,    74,
-       0,   146,   150,     0,     0,     0,   118,   144,   148,   149,
-     156,   182,   141,   154,    27,    91,     0,     0,     0,   183,
-     118,   139,   145,     0,    90,   188,    97,    94,    27,     0,
-       0,     0,     0,   147,   172,    27,   184,     0,     0,   199,
-      95,   157
+       0,     0,   328,   327,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     241,     0,     0,    58,    77,     0,   255,     0,    67,     0,
+     125,   118,     0,   228,     0,   231,   230,   354,   239,   211,
+       0,     0,    28,     0,   331,     0,     0,   280,     0,     0,
+       0,   311,   279,   245,   246,    85,   238,    62,    63,   107,
+     253,    61,    83,    44,    29,   125,     0,   238,     0,     0,
+      54,   349,   220,   219,     0,   139,   141,     0,   189,     0,
+     206,     0,   200,   204,   259,   306,   307,   304,   305,   285,
+     286,   288,   287,   283,   284,   320,   319,   315,   314,   322,
+     323,   324,   321,   317,   316,   318,   289,   290,   339,     0,
+     338,   341,   298,   297,   296,   325,     0,   295,   294,   293,
+     281,   282,   302,   301,   299,   303,   300,     0,     0,   111,
+     115,   339,   333,     0,     0,     0,   347,    66,     0,     0,
+      26,    57,     0,   125,    17,    23,     0,    20,    19,    22,
+      21,   125,   116,     0,   241,   248,   172,     0,     0,   212,
+     216,   109,   124,   229,     0,    27,   250,   353,    66,   267,
+       0,   257,     0,    60,     0,   125,    13,    60,     0,     0,
+       0,     0,     0,   143,     0,     0,   238,   168,   169,     0,
+       0,     0,   185,   186,   191,   205,     0,   344,     0,   249,
+     313,     0,     0,     0,   343,     0,    80,     0,     0,     0,
+     121,    18,   125,     0,     0,     0,     0,   218,   213,   238,
+       0,     0,    68,     0,   236,   235,   234,   237,     0,    65,
+      64,    53,     0,    66,   350,   351,   211,   140,     0,     0,
+     232,   142,   147,    60,     0,   190,   210,   209,   207,   208,
+       0,     0,     0,   326,     0,   342,     0,   340,    81,    86,
+       0,     0,   119,   240,   173,   172,     0,     0,   215,     0,
+       0,   100,   104,   102,   106,    66,    70,   268,    59,     0,
+      79,     0,   144,   145,     0,   125,   171,   170,   201,   193,
+     184,   194,     0,   192,     0,   191,   346,   334,   345,     0,
+       0,     0,    87,    90,    88,    25,    24,   217,   226,   214,
+      98,     0,   101,   103,    69,    66,   238,   125,   233,     0,
+     162,     0,     0,   125,   160,     0,   187,   184,   191,   195,
+       0,    28,    95,    91,    89,    28,    28,   238,    78,     0,
+     153,   157,     0,     0,     0,   125,   151,   155,   156,   163,
+     221,   148,   161,   186,     0,     0,   196,    28,    93,     0,
+       0,     0,   222,   125,   146,   152,     0,     0,   188,   186,
+      92,   227,    99,    96,    28,     0,     0,   202,     0,     0,
+       0,   154,   211,   203,    28,   223,     0,     0,   238,    97,
+     164
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    49,    50,    51,    52,   299,   300,   301,   321,   322,
-     195,   291,   197,   302,   198,   377,   199,   232,   230,   449,
-      56,   219,   132,   133,    57,    58,    59,    60,   187,    61,
-      88,   200,   201,   436,   437,   438,   439,    62,   206,   416,
-     501,   417,   466,   418,   419,    63,   216,   202,    64,    93,
-     371,    65,   308,   207,    66,   203,    68,    69,   336,   338,
-     384,   304,   452,   305,   430,   475,   476,   477,   457,   458,
-     459,   140,   306,   360,   409,   314,   315,   316,   237,   307,
-     498,    99,    74,   465,   372,   373,   374,   386,   375,   329,
-     311,   116,   117,   118,   211,    75,    76,    77,   204,   119,
-      78,    79,    80,    81,   122,   123,    82,   205,    83
+      -1,    52,    53,    54,    55,   352,   353,   354,   374,   375,
+     154,   155,   174,   355,   419,   156,   439,   157,   271,   268,
+      97,    98,   486,    59,   170,   171,    60,    61,    62,    63,
+      64,   158,   159,   511,   512,   513,   514,    65,   239,   481,
+     589,   482,   546,   483,   484,    66,   252,   160,    67,    68,
+     243,   244,    69,   361,   240,    70,   161,    72,    73,   393,
+     395,   449,   357,   527,   358,   495,   554,   555,   556,   532,
+     533,   534,   181,   359,   287,   397,   398,   427,    77,    78,
+      79,   404,   460,   503,   564,   186,   399,   461,   504,   187,
+     291,    80,   292,   293,   368,   369,   370,   284,   360,   584,
+     112,    82,   545,   245,   246,   436,   451,   437,   383,   365,
+     140,   141,   142,   248,    83,    84,    85,   162,   143,   235,
+     236,    86,   130,   131,   132,    87,   411,   345,   321,    88,
+      89,   182,    90,    91,    92
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -348
+#define YYPACT_NINF -515
 static const yytype_int16 yypact[] =
 {
 static const yytype_int16 yypact[] =
 {
-    1656,   -44,  -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,
-     -31,   -41,  -348,   -30,     7,  -348,  -348,  -348,    82,  -348,
-    2221,  -348,   100,  -348,   336,  -348,    -1,    19,    13,  -348,
-    -348,  -348,  -348,    -2,   -77,  -348,  -348,  2221,    38,  2221,
-    2221,  -348,  2221,  2221,  2221,  2221,  2221,  2221,   179,   196,
-    -348,   495,  -348,  -348,  -348,    78,  -348,  2128,  -348,  -348,
-    -348,  -348,  -348,  -348,  -348,  -348,  -348,   166,   240,  -348,
-    -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,   115,  -348,
-    2736,  -348,  -348,  -348,   213,   102,  -348,  -348,  1906,  -348,
-    -348,  -348,  -348,  -348,  -102,   222,  -348,    -4,  -348,   109,
-     -25,  2221,   110,  -348,  2221,  -348,  2221,   237,   -25,  -348,
-     -25,   -25,   305,   -25,   -25,   -56,   118,   145,  2221,  -348,
-    2736,   141,   116,   150,  -348,  -348,  -348,  1011,   181,   247,
-     248,  -348,   155,   190,  -348,   -10,   253,  -348,   260,  -348,
-     262,  -348,  2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,
-    2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,
-    2221,  2221,  2221,  2221,  -348,  -348,   266,  2221,  2221,  2221,
-    2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,  2221,
-    2221,  2221,  2221,  2221,    64,  -348,  -348,  2221,   273,  2221,
-    2221,   247,   281,  -348,   624,  -348,   189,   271,   167,  -348,
-    -348,  -348,  -348,   275,  -348,  -348,  2221,  1140,  -348,    19,
-    -348,   173,    24,   -38,    66,  2282,  1781,   163,  -348,  2221,
-    -348,  -348,  -348,  -348,  2221,  -348,  2221,   165,   193,   200,
-    -348,   193,   200,  2221,  2221,  -348,  -348,   296,   252,   259,
-     193,  2736,   998,   487,   487,   487,  3097,  3097,  3097,  3097,
-     998,   998,  2736,  2736,  2736,  2736,  2736,  2736,  2736,  2736,
-    2736,  2797,  2857,  -348,   287,   287,   287,  2736,  2492,  2917,
-    2977,  3037,   998,   998,   305,   305,   -25,   -25,   -25,   175,
-    2553,   227,  2221,   312,   -28,  -348,   115,   115,  -348,  -348,
-     753,  -348,  2614,  -348,   195,  2031,   314,  2352,  -348,   187,
-    1269,  -348,  -348,   194,  -348,  -348,  -348,  -348,  1140,  -348,
-    2221,  -348,   131,   317,   191,   223,  -348,  1906,   198,  -348,
-    -348,   197,  1781,  -348,   -27,  -348,   218,  -348,    12,   226,
-     247,   -39,   135,   -14,   208,    89,   315,    89,   209,   226,
-    2221,  -348,  -348,   332,  2422,  -348,  1906,  -348,  -348,  2221,
-     882,   236,   212,  -348,  -348,  1140,   207,   211,    69,    12,
-    -348,  -348,   193,    25,  -348,    60,  1906,  2221,   198,  -348,
-    -348,   224,  -348,  -348,  -348,  -348,  2221,  -348,  -348,  2221,
-    1906,    24,  -348,    89,   228,  -348,   251,  -348,  -348,  2736,
-    -348,  -348,  -348,   -11,  -348,   178,    11,   220,  -348,  -348,
-    -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,
-     258,   234,   317,  -348,   241,   231,  -348,  -348,    60,  -348,
-     297,  -348,   202,  -348,   235,  -348,   238,   251,  -348,    89,
-     180,  -348,  -348,  -348,  2221,   264,   242,    11,  -348,  -348,
-    -348,  -348,  -348,  -348,  -348,   368,  -348,  -348,  1906,  -348,
-    1906,   193,  1398,  -348,   375,  -348,   352,   249,   233,  -348,
-    2675,  1781,  -348,  -348,  -348,  1781,  1781,   193,  -348,  -348,
-     257,  -348,  -348,   261,   188,   254,  1527,  -348,  -348,  -348,
-    -348,   -10,  -348,  -348,  1781,  -348,   256,   265,   272,  -348,
-    1398,  -348,  -348,   380,  -348,  -348,  -348,  -348,  1781,   274,
-     263,   278,   276,  -348,    24,  1781,  -348,   277,   280,   193,
-    -348,  -348
+    1766,    12,  -515,  -515,  -515,  -515,  -515,  -515,   -28,    -6,
+    -515,    16,    94,  -515,  -515,  -515,  -515,   108,  -515,  2220,
+    -515,   122,  -515,  -515,  2277,  -515,    17,   363,  2220,  -515,
+    -515,  -515,  -515,    24,    27,  -515,  -515,   112,  2220,    29,
+     332,  2220,  2220,  -515,  -515,  2220,  2220,  2220,  2220,  2220,
+     710,   158,   165,  -515,   578,  -515,  -515,  -515,    44,  -515,
+    2148,  -515,  -515,  -515,  -515,  -515,  -515,  2022,  -515,  -515,
+    -515,   288,   766,  -515,  -515,  -515,  -515,  -515,  -515,    11,
+    -515,  -515,  -515,  -515,  -515,  -515,   118,  2972,  -515,  -515,
+    -515,  -515,  -515,   218,   101,  -515,  2220,   221,  2022,  -515,
+    -515,  -515,  -515,  -515,  -515,  -515,  -515,   -83,   373,  -515,
+     -50,  -515,   111,   -51,  2220,   110,   124,  -515,   -51,  -515,
+    2220,   253,   155,   -51,  2220,  -515,  -515,  -515,  -515,  -515,
+     127,   159,   162,   -51,   -51,   702,   -51,   -51,   -52,  2910,
+     141,   168,  2220,  -515,  2910,   268,   272,  2220,  2220,   272,
+     273,  -515,  -515,   842,  -515,  -515,   149,  -515,  -515,  -515,
+    -515,   266,  -515,  -515,  -515,  -515,  1106,   214,   282,  -515,
+     191,   225,   118,   202,  -515,   302,    54,   304,  -515,   305,
+    -515,  -515,  -515,  -515,  -515,  2220,  -515,    20,  2220,  2220,
+    2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,
+    2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,
+    2220,  2220,  -515,  -515,   130,  2220,  2220,  2220,  2220,  2220,
+    2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,  2220,
+    2220,  2220,   128,  -515,  -515,   174,   209,   188,  -515,  2220,
+    1238,  -515,   373,   184,   187,  -515,  -515,  -515,   194,    21,
+     186,    84,  1894,   193,  -515,  2220,   198,  -515,  2220,   332,
+    2220,  -515,  -515,  -515,  -515,  -515,   216,   236,  -515,  -515,
+    -515,   236,  -515,  -515,  -515,  2022,   226,   216,  2220,  2220,
+    -515,   239,  -515,  -515,   345,   311,   314,   366,  2910,   278,
+     280,   -49,    20,  -515,  2910,   408,   570,   570,   570,  3282,
+    3282,  3282,  3282,   408,   408,  2910,  2910,  2910,  2910,  2910,
+    2910,  2910,  2910,  2910,  2910,  2910,   365,  3034,  -515,   146,
+    -515,  -515,   424,   424,   424,  2910,  2476,  3096,  3158,  3220,
+     408,   408,   702,   702,   -51,   -51,   -51,   250,  2538,   295,
+     306,   307,  -515,  2220,   233,   312,  -515,  -515,  2220,  2336,
+    -515,   279,   259,  1370,  -515,  -515,   267,  -515,  -515,  -515,
+    -515,  1238,  -515,   373,  2220,  -515,   126,   401,   274,   308,
+    -515,  -515,  -515,   283,   281,  1894,  -515,  2910,  -515,  -515,
+     310,  2910,   270,   313,   272,   974,  -515,   -30,   317,   284,
+     104,   290,   373,   393,   373,   292,   216,   323,  -515,   294,
+      14,    15,  -515,  -515,  -515,  -515,  2220,  -515,  2220,  -515,
+    -515,  2220,  2600,  2220,  -515,   354,  -515,   296,   301,  2220,
+    -515,  -515,  1238,   298,   309,  2220,   270,  -515,  -515,   216,
+      22,    39,   364,  2220,  -515,  -515,  -515,  -515,  2220,  -515,
+    -515,  -515,  2220,  -515,  -515,  -515,    21,  -515,   373,   315,
+    -515,   334,  -515,   313,   366,  -515,  -515,  -515,  -515,  -515,
+     333,    43,  2662,  2910,  2406,  -515,  2724,  -515,  -515,    28,
+    2786,   316,  -515,  -515,  2910,   342,   319,   401,  -515,   321,
+     327,  -515,  -515,    39,  -515,  -515,  -515,  -515,  2910,   -41,
+    -515,   318,   334,  -515,   373,   277,  -515,  -515,  -515,  -515,
+     338,  -515,  2220,  -515,   353,  -515,  -515,  -515,  -515,  2220,
+     350,   331,    28,  -515,  -515,  -515,  -515,  -515,  -515,  -515,
+    -515,   463,  -515,  -515,  -515,  -515,   216,  1502,  -515,   464,
+    -515,   442,   335,   326,  -515,    11,  2910,   359,  -515,    46,
+    2848,  1894,  -515,  -515,  -515,  1894,  1894,   216,  -515,   358,
+    -515,  -515,   360,   264,   336,  1634,  -515,  -515,  -515,  -515,
+      54,  -515,  -515,  -515,   344,    11,    46,  1894,  -515,   362,
+     369,   352,  -515,  1502,  -515,  -515,   489,   381,  -515,  -515,
+    -515,  -515,  -515,  -515,  1894,   374,   375,  -515,   386,   379,
+     376,  -515,    21,  -515,  1894,  -515,   377,   380,   216,  -515,
+    -515
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -348,  -348,   270,  -348,   337,  -287,  -348,    90,  -193,  -178,
-       1,   -76,  -271,     6,     2,    67,   355,   285,    85,  -348,
-    -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,  -348,
-    -348,  -348,  -348,  -348,  -348,   -21,   -20,  -348,  -348,    14,
-    -348,    15,  -348,  -348,  -348,  -348,  -348,  -348,  -348,  -200,
-      75,  -348,  -348,  -348,  -348,     0,  -348,   353,  -348,  -348,
-    -348,    59,  -348,    62,  -348,   -68,  -348,   -53,  -348,  -348,
-     -29,  -348,     3,    26,  -348,  -347,  -348,  -305,   -47,     4,
-    -348,  -348,  -348,  -348,  -348,   408,  -317,    54,    79,  -184,
-    -348,   -99,  -348,  -348,  -348,  -348,  -348,  -348,  -348,   -36,
-       5,   -52,    -7,  -348,  -348,  -348,  -348,  -348,  -348
+    -515,  -515,   343,  -515,   457,  -340,  -515,   160,  -514,   -37,
+       1,   -58,   417,    60,  -515,     2,    82,   461,   390,   161,
+    -241,  -515,  -515,  -515,  -515,  -515,  -515,  -515,  -515,  -515,
+    -515,  -515,  -515,  -515,  -515,    31,    32,  -515,  -515,    63,
+    -515,    64,  -515,  -515,  -515,  -515,  -515,  -515,  -515,  -515,
+      37,    59,  -515,  -515,  -515,  -515,     0,  -515,   477,  -515,
+    -515,  -515,    65,  -515,    68,  -515,   -22,  -515,    -3,  -515,
+    -515,    30,  -515,     3,  -515,  -515,   100,    85,  -515,  -515,
+    -515,  -515,  -464,  -515,  -515,  -172,  -515,  -453,  -515,  -488,
+    -515,  -423,  -515,   269,  -428,  -515,  -339,     5,     4,  -515,
+    -515,  -515,  -515,  -515,   535,  -103,   116,   140,  -269,  -515,
+    -109,  -515,  -515,  -515,  -515,  -515,  -515,  -515,  -132,   -55,
+     519,   -54,  -515,   320,  -515,   -12,  -515,  -515,  -215,  -515,
+    -515,  -515,  -515,  -515,  -515
 };
 
 /* 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.  */
 };
 
 /* 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 -216
+#define YYTABLE_NINF -338
 static const yytype_int16 yytable[] =
 {
 static const yytype_int16 yytable[] =
 {
-      67,    53,    55,    72,    73,   134,    54,   217,   361,   309,
-      90,   121,   196,    97,   309,   368,   290,   100,   382,    85,
-     385,   356,    90,   208,   209,   235,    91,   312,   312,   -70,
-     108,    91,   110,   111,   426,   112,   113,   114,    91,   120,
-     120,   236,   142,    84,   106,   434,   364,   331,   369,   107,
-     115,    67,    53,    55,    72,    73,   339,    54,   413,    70,
-     142,   376,    71,   164,   165,   166,   385,   281,   397,   318,
-     142,   142,   400,   435,   401,   392,   220,   402,   403,   404,
-      87,   405,   223,   279,   142,    91,   166,   142,   414,    94,
-      86,    89,   368,   415,   317,   420,   182,   215,   183,   120,
-      95,   184,   102,    98,   346,   366,   213,   443,    91,   425,
-      70,   120,   453,    71,   406,   313,   412,   350,   380,   183,
-     101,   431,   184,   105,   407,   408,   370,    67,    53,    55,
-      72,    73,    92,    54,   104,   241,   242,   243,   244,   245,
-     246,   247,   248,   249,   250,   251,   252,   253,   254,   255,
-     256,   257,   258,   259,   260,   261,   262,   507,   121,   109,
-     264,   265,   266,   267,   268,   269,   270,   271,   272,   273,
-     274,   275,   276,   277,   278,   120,   280,   468,   411,   469,
-     319,   432,   124,   433,     2,   282,    70,   292,   325,    71,
-     326,   283,   284,   135,   286,   287,   125,   136,   137,   297,
-      15,    16,    17,   127,    19,   318,    21,    67,    53,   303,
-     138,   357,   139,   142,   348,   135,   185,   120,    25,   120,
-     137,    91,   309,   186,   324,   210,   454,    30,    31,    32,
-     212,   358,   379,   142,   139,   359,   214,     2,   332,   333,
-     218,   196,   221,   222,     2,   224,   348,   225,   226,   -71,
-     228,   231,   233,    15,    16,    17,   238,    19,   234,    21,
-      15,    16,    17,   239,    19,   240,    21,   470,   485,   263,
-     196,    25,   486,   487,   348,   344,   285,   455,    25,   454,
-      30,    31,    32,   488,   288,   294,   293,    30,    31,    32,
-     196,   494,   295,   296,   310,   323,   327,   328,   330,   334,
-      67,    53,   303,   120,   196,   502,   335,   341,    67,    53,
-     303,  -151,   508,   337,   343,   345,   349,   351,   353,   355,
-     312,   363,   367,   362,  -108,   511,   376,   424,   365,   381,
-     455,   421,   383,   389,   387,   390,   395,   396,   398,    96,
-     423,     3,     4,   399,     5,     6,     7,     8,     9,   429,
-     422,   440,   445,   428,   393,    67,    53,   303,   358,   442,
-     120,    20,   448,    22,  -152,    23,   444,   450,   461,   120,
-     451,   467,   196,   462,   196,   164,   165,   166,   480,   481,
-     482,    29,   489,   500,   504,   491,   490,   495,   126,    34,
-     354,    35,    36,   164,   165,   166,   496,   227,   177,   178,
-     179,   180,   181,   505,   497,   503,   388,   506,   182,   509,
-     183,   510,   131,   184,   229,   378,   463,   464,   179,   180,
-     181,   141,   499,   492,    39,    40,   182,   460,   183,   483,
-     456,   184,   446,   447,   493,   103,   441,   427,   410,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   474,   472,   473,   478,   479,    45,   456,    46,
-       0,    47,     0,    48,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   474,   472,   473,   478,
-     479,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     474,   472,   473,   478,   479,    -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,   143,     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,  -216,  -216,  -216,     0,    37,    38,
-       0,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,    39,    40,     0,     0,     0,     0,     0,
-       0,     0,    41,     0,     0,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,    42,     0,   182,     0,
-     183,    43,    44,   184,     0,     0,    45,     0,    46,     0,
-      47,     0,    48,     0,     0,     0,    -4,     1,     2,     3,
-       4,     0,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,     0,     0,     0,    15,    16,    17,    18,    19,    20,
-      21,    22,     0,    23,   188,     0,   129,     0,     0,     0,
-      24,   189,    25,    26,     0,    27,   190,    28,     0,    29,
-     191,    30,    31,    32,     0,     0,    33,    34,     0,    35,
-      36,     0,     0,     0,     0,     0,     0,    37,    38,     0,
-     192,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    39,    40,     0,     0,     0,     0,     0,     0,
-       0,   193,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    42,     0,     0,     0,     0,
-      43,    44,     0,     0,     0,    45,     0,    46,     0,    47,
-       0,    48,     0,     0,     0,   289,     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,   188,     0,   129,     0,     0,     0,    24,
-     189,    25,    26,     0,    27,   190,    28,     0,    29,   191,
-      30,    31,    32,     0,     0,    33,    34,     0,    35,    36,
-       0,     0,     0,     0,     0,     0,    37,    38,     0,   192,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      71,    56,    58,    76,    81,   247,   172,   110,   387,   173,
+     264,   253,   113,   153,   184,   290,   118,   346,   491,   456,
+     458,   423,    94,   289,   366,   366,   123,   568,   428,   133,
+     134,   569,   570,   135,   136,   137,   139,   144,   505,   -74,
+     173,   212,   213,   214,   214,   241,   242,   563,   499,   106,
+     260,   499,   539,   580,    71,    56,    58,    76,    81,   250,
+      57,   188,   509,   402,   106,    74,   479,   403,    75,   256,
+     590,   107,   480,   230,   438,   231,   231,   579,   232,   232,
+     597,   538,   471,   261,   139,   566,   116,   100,   101,   282,
+     510,   478,   269,   270,   525,   274,    95,   100,   101,   577,
+     102,   103,   139,    93,   407,   283,   416,   444,   144,   445,
+     102,   103,   139,   104,    57,   588,   367,   477,    96,    74,
+     290,   337,    75,   104,   108,   111,   379,   453,   122,   414,
+     144,   339,   340,   100,   101,   139,   139,   432,   519,   185,
+      99,   114,   185,   185,   102,   103,   102,   103,   185,   100,
+     101,   120,   119,   124,   500,   501,   121,   104,   501,   104,
+     476,   163,   102,   103,   596,   164,    71,    56,    58,    76,
+      81,   502,   166,   288,   502,   104,   294,   295,   296,   297,
+     298,   299,   300,   301,   302,   303,   304,   305,   306,   307,
+     308,   309,   310,   311,   312,   313,   314,   315,   316,   317,
+     467,   372,   490,   322,   323,   324,   325,   326,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   144,   338,
+     188,   233,   105,   388,   389,   234,    57,   349,   457,   459,
+     425,    74,   426,   237,    75,   249,   100,   101,   385,  -111,
+      71,    56,   356,   377,   524,   341,   144,   318,   381,   102,
+     103,   320,   342,   251,   343,   424,   254,   549,   344,   255,
+     319,   257,   104,   318,   259,   258,   139,   139,   262,   320,
+     263,   265,   406,   100,   101,   266,   272,   275,   571,   362,
+     175,     2,   175,   -75,   548,   277,   102,   103,   373,   447,
+     176,   450,   278,   417,   279,    13,   178,    15,    16,   104,
+      18,   487,    20,   280,   175,   281,   434,   285,   286,   347,
+     180,   260,   348,  -117,   176,    25,   363,   274,   364,   177,
+     178,   371,   382,   529,    30,    31,    32,   274,   376,   600,
+       2,   412,   179,   378,   180,   125,   139,   126,   384,   144,
+     127,   128,   129,   390,    13,   450,    15,    16,   391,    18,
+     318,    20,   144,    71,    56,   356,   320,   100,   101,   413,
+     386,    71,    56,   356,    25,   392,   115,   101,   394,   396,
+     102,   103,   529,    30,    31,    32,   100,   101,   530,   102,
+     103,   320,   400,   104,   401,   409,  -335,   435,   489,   102,
+     103,   528,   104,   420,   462,   422,   463,  -337,  -336,   464,
+     373,   466,   104,   415,   366,   189,  -241,   470,   448,   429,
+     430,  -158,  -116,   474,   446,   431,   433,   438,   442,   443,
+     452,   144,    71,    56,   356,   454,   488,   530,   455,   469,
+     485,   468,   472,   190,   191,   192,   494,   193,   194,   195,
+     196,   197,   198,   493,   473,   498,   425,   518,  -338,   520,
+     516,   521,   320,   526,   535,   211,   541,   212,   213,   214,
+    -159,   215,   216,   217,   537,   542,   547,   559,   560,   561,
+     574,   318,   220,   221,   222,   565,   223,   224,   578,   225,
+     226,   227,   228,   229,  -338,  -338,   572,   583,   573,   230,
+     536,   231,   586,   587,   232,   531,   581,   540,   593,   592,
+     212,   213,   214,   582,   215,   216,   217,   594,   591,   276,
+     595,   165,   598,   421,   599,   238,   212,   213,   214,  -338,
+    -338,   169,   225,   226,   227,   228,   229,   553,   551,   552,
+     557,   558,   230,   531,   231,   496,   267,   232,   225,   226,
+     227,   228,   229,   543,   544,   440,   522,   523,   230,   183,
+     231,   585,   575,   232,   497,   553,   551,   552,   557,   558,
+     517,   405,   117,   562,   492,   576,   475,   138,     0,     0,
+       0,     0,     0,   553,   551,   552,   557,   558,    -4,   380,
+       0,     1,     2,     3,     4,     0,     5,     6,     7,     8,
+       9,    10,    11,     0,     0,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,     0,     0,    22,    23,     0,     0,
+     189,     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,  -338,  -338,
+    -338,    37,    38,    39,     0,     0,   197,   198,     0,    40,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    39,    40,     0,     0,     0,     0,     0,     0,     0,
-     193,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    42,     0,     0,     0,     0,    43,
-      44,     0,     0,     0,    45,     0,    46,     0,    47,     0,
-      48,     0,     0,     0,   347,     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,   188,     0,   129,     0,     0,     0,    24,   189,
-      25,    26,     0,    27,   190,    28,     0,    29,   191,    30,
+       0,     0,   212,   213,   214,     0,   215,   216,   217,     0,
+      41,    42,     0,     0,     0,     0,     0,     0,     0,    43,
+       0,   223,   224,     0,   225,   226,   227,   228,   229,    44,
+       0,     0,    45,     0,   230,     0,   231,    46,    47,   232,
+       0,     0,    48,     0,    49,     0,    50,     0,    51,     0,
+       0,     0,    -4,     1,     2,     3,     4,     0,     5,     6,
+       7,     8,     9,    10,    11,     0,     0,     0,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,     0,    22,    23,
+     145,     0,   146,     0,     0,     0,    24,   147,    25,    26,
+       0,    27,   148,    28,     0,    29,   149,    30,    31,    32,
+       0,     0,    33,    34,     0,    35,    36,     0,     0,     0,
+       2,     0,     0,    37,    38,    39,     0,   150,     0,     0,
+       0,    40,     0,     0,    13,     0,    15,    16,     0,    18,
+       0,    20,     0,     0,   212,   213,   214,     0,     0,     0,
+       0,     0,    41,    42,    25,     0,     0,     0,     0,     0,
+       0,   151,     0,    30,    31,    32,     0,     0,   227,   228,
+     229,    44,     0,     0,    45,     0,   230,     0,   231,    46,
+      47,   232,     0,     0,    48,     0,    49,     0,    50,     0,
+      51,     0,     0,     0,   152,     1,     2,     3,     4,     0,
+       5,     6,     7,     8,     9,    10,    11,     0,     0,     0,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,     0,
+      22,    23,   145,     0,   146,     0,     0,     0,    24,   147,
+      25,    26,     0,    27,   148,    28,     0,    29,   149,    30,
       31,    32,     0,     0,    33,    34,     0,    35,    36,     0,
       31,    32,     0,     0,    33,    34,     0,    35,    36,     0,
-       0,     0,     0,     0,     0,    37,    38,     0,   192,     0,
+       0,     0,     0,     0,     0,    37,    38,    39,     0,   150,
+       0,     0,     0,    40,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    41,    42,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    44,     0,     0,    45,     0,     0,     0,
+       0,    46,    47,     0,     0,     0,    48,     0,    49,     0,
+      50,     0,    51,     0,     0,     0,   273,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,     0,
+       0,     0,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,     0,    22,    23,   145,     0,   146,     0,     0,     0,
+      24,   147,    25,    26,     0,    27,   148,    28,     0,    29,
+     149,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,    39,
+       0,   150,     0,     0,     0,    40,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      39,    40,     0,     0,     0,     0,     0,     0,     0,   193,
+       0,     0,     0,     0,     0,     0,    41,    42,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    44,     0,     0,    45,     0,
+       0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
+      49,     0,    50,     0,    51,     0,     0,     0,   441,     1,
+       2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
+      11,     0,     0,    12,    13,    14,    15,    16,    17,    18,
+      19,    20,     0,     0,    22,    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,    39,     0,     0,     0,     0,     0,    40,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    42,     0,     0,     0,     0,    43,    44,
-       0,     0,     0,    45,     0,    46,     0,    47,     0,    48,
-       0,     0,     0,   394,     1,     2,     3,     4,     0,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,     0,     0,
-      14,    15,    16,    17,    18,    19,    20,    21,  -216,     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,  -216,  -216,    37,    38,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   164,   165,   166,     0,
-     167,   168,   169,     0,     0,     0,     0,     0,     0,    39,
-      40,     0,     0,     0,     0,     0,  -216,  -216,    41,   177,
-     178,   179,   180,   181,     0,     0,     0,     0,     0,   182,
-       0,   183,    42,     0,   184,     0,     0,    43,    44,     0,
-       0,     0,    45,     0,    46,     0,    47,     0,    48,     0,
-       0,     0,    -3,     1,     2,     3,     4,     0,     5,     6,
-       7,     8,     9,    10,    11,    12,    13,     0,     0,     0,
-      15,    16,    17,    18,    19,    20,    21,     0,     0,    23,
+       0,     0,     0,     0,     0,     0,     0,     0,    41,    42,
+       0,     0,     0,     0,     0,     0,     0,    43,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    44,     0,     0,
+      45,     0,     0,     0,     0,    46,    47,     0,     0,     0,
+      48,     0,    49,     0,    50,     0,    51,     0,     0,     0,
+      -3,     1,     2,     3,     4,     0,     5,     6,     7,     8,
+       9,    10,    11,     0,     0,     0,    13,    14,    15,    16,
+      17,    18,    19,    20,     0,     0,    22,    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,    39,     0,     0,     0,     0,     0,    40,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      41,    42,     0,     0,     0,     0,     0,     0,     0,   350,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    44,
+       0,     0,    45,     0,     0,     0,     0,    46,    47,     0,
+       0,     0,    48,     0,   351,     0,    50,     0,    51,     0,
+       0,     0,   -15,     1,     2,     3,     4,     0,     5,     6,
+       7,     8,     9,    10,    11,     0,     0,     0,    13,    14,
+      15,    16,    17,    18,    19,    20,     0,     0,    22,    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,     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,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    39,    40,
-       0,     0,     0,     0,     0,     0,     0,   298,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    42,     0,     0,     0,     0,    43,    44,     0,     0,
-       0,    45,     0,    46,     0,    47,     0,    48,     0,     0,
-       0,   -15,     1,     2,     3,     4,     0,     5,     6,     7,
-       8,     9,    10,    11,    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,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    39,    40,     0,
-       0,     0,     0,     0,     0,     0,   298,     0,     0,     0,
+       0,     0,     0,    37,    38,    39,     0,     0,     0,     0,
+       0,    40,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      42,     0,     0,     0,     0,    43,    44,     0,     0,     0,
-      45,     0,    46,     0,    47,     0,    48,     0,     0,     0,
-     -16,     1,     2,     3,     4,     0,     5,     6,     7,     8,
-       9,    10,    11,    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,     0,     0,
+       0,     0,    41,    42,     0,     0,     0,     0,     0,     0,
+       0,   350,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    44,     0,     0,    45,     0,     0,     0,     0,    46,
+      47,     0,     0,     0,    48,     0,   351,     0,    50,     0,
+      51,     0,     0,     0,   -16,     1,     2,     3,     4,     0,
+       5,     6,     7,     8,     9,    10,    11,     0,     0,     0,
+      13,    14,    15,    16,    17,    18,    19,    20,     0,     0,
+      22,    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,    39,     0,     0,
+       0,     0,     0,    40,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    39,    40,     0,     0,
-       0,     0,     0,     0,     0,   471,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    42,
-       0,     0,     0,     0,    43,    44,     0,     0,     0,    45,
-       0,    46,     0,    47,     0,    48,     0,     0,     0,  -142,
-       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,     0,     0,     0,
+       0,     0,     0,     0,    41,    42,     0,     0,     0,     0,
+       0,     0,     0,   550,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    44,     0,     0,    45,     0,     0,     0,
+       0,    46,    47,     0,     0,     0,    48,     0,    49,     0,
+      50,     0,    51,     0,     0,     0,  -149,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,     0,
+       0,     0,    13,    14,    15,    16,    17,    18,    19,    20,
+       0,     0,    22,    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,    39,
+       0,     0,     0,     0,     0,    40,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    39,    40,     0,     0,     0,
-       0,     0,     0,     0,   471,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    42,     0,
-       0,     0,     0,    43,    44,     0,     0,     0,    45,     0,
-      46,     0,    47,     0,    48,     0,    -3,     0,  -143,     1,
+       0,     0,     0,     0,     0,     0,    41,    42,     0,     0,
+       0,     0,     0,     0,     0,   550,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    44,     0,     0,    45,     0,
+       0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
+      49,     0,    50,     0,    51,     0,    -3,     0,  -150,     1,
        2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
        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,
+      11,     0,     0,    12,    13,    14,    15,    16,    17,    18,
+      19,    20,     0,     0,    22,    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,
        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,     0,     0,     0,     0,
+      38,    39,     0,     0,     0,     0,     0,    40,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    39,    40,     0,     0,     0,     0,
-       0,     0,     0,    41,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    42,     0,     0,
-       0,     0,    43,    44,     0,     0,     0,    45,     0,    46,
-       0,    47,     0,    48,     1,     2,     3,     4,     0,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,     0,  -118,
-       0,    15,    16,    17,    18,    19,    20,    21,    22,     0,
-      23,   188,     0,   129,     0,     0,     0,    24,   189,    25,
-      26,     0,    27,   190,    28,     0,    29,   191,    30,    31,
-      32,     0,     0,    33,    34,     0,    35,    36,     0,     0,
-       0,     0,     0,     0,    37,    38,     0,   192,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    41,    42,
+       0,     0,     0,     0,     0,     0,     0,    43,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    44,     0,     0,
+      45,     0,     0,     0,     0,    46,    47,     0,     0,     0,
+      48,     0,    49,     0,    50,     0,    51,     1,     2,     3,
+       4,     0,     5,     6,     7,     8,     9,    10,    11,     0,
+    -125,     0,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,     0,    22,    23,   145,     0,   146,     0,     0,     0,
+      24,   147,    25,    26,     0,    27,   148,    28,     0,    29,
+     149,    30,    31,    32,     0,     0,    33,    34,     0,    35,
+      36,     0,     0,     0,     0,     0,     0,    37,    38,    39,
+       0,   150,     0,     0,     0,    40,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    39,
-      40,     0,     0,     0,     0,     0,     0,     0,   193,     0,
+       0,     0,     0,     0,     0,     0,    41,    42,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    44,     0,     0,    45,     0,
+       0,     0,     0,    46,    47,     0,     0,     0,    48,     0,
+      49,     0,    50,     0,    51,     1,     2,     3,     4,     0,
+       5,     6,     7,     8,     9,    10,    11,     0,     0,     0,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,     0,
+      22,    23,   145,     0,   146,     0,     0,     0,    24,   147,
+      25,    26,     0,    27,   148,    28,     0,    29,   149,    30,
+      31,    32,     0,     0,    33,    34,     0,    35,    36,     0,
+       0,     0,     0,     0,     0,    37,    38,    39,     0,   150,
+       0,     0,     0,    40,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    42,     0,     0,     0,     0,    43,    44,     0,
-       0,     0,    45,     0,    46,     0,    47,     0,    48,     1,
-       2,     3,     4,     0,     5,     6,     7,     8,     9,    10,
-      11,    12,    13,     0,     0,     0,    15,    16,    17,    18,
-      19,    20,    21,    22,     0,    23,   188,     0,   129,     0,
-       0,     0,    24,   189,    25,    26,     0,    27,   190,    28,
-       0,    29,   191,    30,    31,    32,     0,     0,    33,    34,
-       0,    35,    36,     0,     0,     0,     0,     0,     0,    37,
-      38,     0,   192,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    41,    42,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    44,     0,     0,    45,     0,     0,     0,
+       0,    46,    47,     0,     0,     0,    48,     0,    49,     0,
+      50,   167,    51,     3,     4,     0,     5,     6,     7,     0,
+       0,     0,     0,     0,     0,     0,     0,    14,     0,     0,
+       0,     0,    19,     0,    21,     0,    22,    23,     0,     0,
+     146,     0,     0,     0,    24,     0,     0,     0,     0,     0,
+       0,    28,     0,    29,   168,     0,     0,     0,     0,     0,
+       0,    34,     0,    35,    36,     0,     0,     0,     0,     0,
+       0,     0,    38,     0,     0,     0,     0,     0,     0,    40,
+       0,     0,     0,   109,     0,     3,     4,     0,     5,     6,
+       7,     0,     0,     0,     0,     0,     0,     0,     0,    14,
+      41,    42,     0,     0,    19,     0,    21,     0,    22,    23,
+       0,     0,     0,     0,     0,     0,    24,     0,     0,    44,
+       0,     0,    45,    28,     0,    29,     0,    46,    47,     0,
+       0,     0,    48,    34,    49,    35,    36,     0,    51,     0,
+     109,     0,     3,     4,    38,     5,     6,     7,     0,     0,
+       0,    40,     0,     0,     0,     0,    14,     0,     0,     0,
+       0,    19,     0,    21,     0,    22,    23,     0,     0,     0,
+       0,     0,    41,    42,     0,     0,     0,     0,     0,     0,
+       0,     0,    29,     0,     0,     0,     0,     0,     0,     0,
+      34,    44,    35,    36,    45,     0,     0,     0,     0,    46,
+      47,     0,     0,     0,    48,     0,    49,     0,    40,     0,
+      51,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    41,
+      42,     0,     0,     0,     0,     0,   189,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    39,    40,     0,     0,     0,     0,
-       0,     0,     0,   193,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    42,     0,     0,
-       0,     0,    43,    44,     0,     0,     0,    45,     0,    46,
-       0,   194,     0,    48,     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,   188,     0,   129,     0,     0,     0,    24,   189,    25,
-      26,     0,    27,   190,    28,     0,    29,   191,    30,    31,
-      32,     0,     0,    33,    34,     0,    35,    36,     0,     0,
-       0,     0,     0,     0,    37,    38,     0,   192,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    39,
-      40,     0,     0,     0,     0,     0,     0,     0,   193,     0,
-       0,   128,     0,     3,     4,     0,     5,     6,     7,     8,
-       9,     0,    42,     0,     0,     0,     0,    43,    44,     0,
-       0,     0,    45,    20,    46,    22,    47,    23,    48,     0,
-     129,     0,     0,     0,    24,     0,     0,     0,     0,     0,
-       0,    28,     0,    29,   130,     0,     0,     0,     0,     0,
-       0,    34,     0,    35,    36,     0,     0,     0,     0,     0,
-       0,    37,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    48,     0,    49,   190,   191,   192,    51,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,     0,   212,   213,
+     214,     0,   215,   216,   217,     0,     0,     0,     0,     0,
+     218,   219,     0,   220,   221,   222,   189,   223,   224,     0,
+     225,   226,   227,   228,   229,     0,     0,     0,     0,     0,
+     230,     0,   231,     0,     0,   232,     0,     0,     0,     0,
+       0,   418,     0,     0,   190,   191,   192,     0,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,     0,   212,   213,
+     214,     0,   215,   216,   217,     0,     0,     0,     0,     0,
+     218,   219,     0,   220,   221,   222,   189,   223,   224,     0,
+     225,   226,   227,   228,   229,     0,     0,     0,     0,     0,
+     230,     0,   231,     0,     0,   232,     0,     0,     0,     0,
+       0,   507,     0,     0,   190,   191,   192,     0,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,     0,   212,   213,
+     214,     0,   215,   216,   217,     0,     0,     0,   189,     0,
+     218,   219,   408,   220,   221,   222,     0,   223,   224,     0,
+     225,   226,   227,   228,   229,     0,     0,     0,     0,     0,
+     230,     0,   231,     0,     0,   232,   190,   191,   192,     0,
+     193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
+     203,   204,   205,   206,   207,   208,   209,   210,   211,     0,
+     212,   213,   214,     0,   215,   216,   217,     0,     0,     0,
+     189,     0,   218,   219,     0,   220,   221,   222,     0,   223,
+     224,     0,   225,   226,   227,   228,   229,     0,     0,     0,
+       0,     0,   230,     0,   231,   410,     0,   232,   190,   191,
+     192,     0,   193,   194,   195,   196,   197,   198,   199,   200,
+     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
+     211,     0,   212,   213,   214,     0,   215,   216,   217,     0,
+       0,     0,   189,     0,   218,   219,     0,   220,   221,   222,
+       0,   223,   224,     0,   225,   226,   227,   228,   229,     0,
+       0,     0,     0,     0,   230,     0,   231,   465,     0,   232,
+     190,   191,   192,     0,   193,   194,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   210,   211,     0,   212,   213,   214,     0,   215,   216,
+     217,     0,     0,     0,   189,     0,   218,   219,     0,   220,
+     221,   222,     0,   223,   224,     0,   225,   226,   227,   228,
+     229,     0,     0,     0,     0,     0,   230,     0,   231,   506,
+       0,   232,   190,   191,   192,     0,   193,   194,   195,   196,
+     197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
+     207,   208,   209,   210,   211,     0,   212,   213,   214,     0,
+     215,   216,   217,     0,     0,     0,   189,     0,   218,   219,
+       0,   220,   221,   222,     0,   223,   224,     0,   225,   226,
+     227,   228,   229,     0,     0,     0,     0,     0,   230,     0,
+     231,   508,     0,   232,   190,   191,   192,     0,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,     0,   212,   213,
+     214,     0,   215,   216,   217,     0,     0,     0,   189,     0,
+     218,   219,     0,   220,   221,   222,     0,   223,   224,     0,
+     225,   226,   227,   228,   229,     0,     0,     0,     0,     0,
+     230,     0,   231,   515,     0,   232,   190,   191,   192,     0,
+     193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
+     203,   204,   205,   206,   207,   208,   209,   210,   211,     0,
+     212,   213,   214,     0,   215,   216,   217,     0,     0,     0,
+     189,     0,   218,   219,   567,   220,   221,   222,     0,   223,
+     224,     0,   225,   226,   227,   228,   229,     0,     0,     0,
+       0,     0,   230,     0,   231,     0,     0,   232,   190,   191,
+     192,     0,   193,   194,   195,   196,   197,   198,   199,   200,
+     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
+     211,     0,   212,   213,   214,     0,   215,   216,   217,     0,
+       0,     0,   189,     0,   218,   219,     0,   220,   221,   222,
+       0,   223,   224,     0,   225,   226,   227,   228,   229,     0,
+       0,     0,     0,     0,   230,     0,   231,     0,     0,   232,
+     190,   191,   192,     0,   193,   194,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   210,   211,     0,   212,   213,   214,     0,   215,   216,
+     217,     0,     0,     0,   189,     0,   218,   219,     0,   220,
+     221,   222,     0,     0,   224,     0,   225,   226,   227,   228,
+     229,     0,     0,     0,     0,     0,   230,     0,   231,     0,
+       0,   232,   190,   191,   192,     0,   193,   194,   195,   196,
+     197,   198,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   212,   213,   214,     0,
+     215,   216,   217,     0,     0,     0,   189,     0,     0,     0,
+       0,   220,   221,   222,     0,   223,   224,     0,   225,   226,
+     227,   228,   229,     0,     0,     0,     0,     0,   230,     0,
+     231,     0,     0,   232,   190,   191,   192,     0,   193,   194,
+     195,   196,   197,   198,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   212,   213,
+     214,     0,   215,   216,   217,     0,     0,     0,   189,     0,
+       0,     0,     0,     0,   221,   222,     0,   223,   224,     0,
+     225,   226,   227,   228,   229,     0,     0,     0,     0,     0,
+     230,     0,   231,     0,     0,   232,   190,   191,   192,     0,
+     193,   194,   195,   196,   197,   198,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     212,   213,   214,     0,   215,   216,   217,     0,     0,     0,
+     189,     0,     0,     0,     0,     0,     0,   222,     0,   223,
+     224,     0,   225,   226,   227,   228,   229,     0,     0,     0,
+       0,     0,   230,     0,   231,     0,     0,   232,   190,   191,
+     192,     0,   193,   194,   195,   196,   197,   198,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    39,    40,     0,     0,
-       0,     0,     0,     0,    96,     0,     3,     4,     0,     5,
-       6,     7,     8,     9,     0,     0,     0,     0,     0,    42,
-       0,     0,     0,     0,    43,    44,    20,     0,    22,    45,
-      23,    46,     0,    47,     0,    48,     0,    24,     0,     0,
-       0,     0,     0,     0,    28,     0,    29,     0,     0,     0,
-       0,     0,     0,     0,    34,     0,    35,    36,     0,     0,
-       0,     0,     0,     0,    37,     0,     0,     0,     0,     0,
+       0,     0,   212,   213,   214,     0,   215,   216,   217,     0,
+       0,     0,   189,     0,     0,     0,     0,     0,     0,  -338,
+       0,   223,   224,     0,   225,   226,   227,   228,   229,     0,
+       0,     0,     0,     0,   230,     0,   231,     0,     0,   232,
+     190,   191,   192,     0,  -338,  -338,  -338,  -338,   197,   198,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    39,
-      40,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   143,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    42,     0,     0,     0,     0,    43,    44,     0,
-       0,     0,    45,     0,    46,     0,    47,     0,    48,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,     0,
-     164,   165,   166,     0,   167,   168,   169,     0,     0,     0,
-       0,     0,   170,     0,     0,   171,     0,   172,   173,   174,
-     175,   176,   143,   177,   178,   179,   180,   181,     0,     0,
-       0,     0,     0,   182,     0,   183,     0,     0,   184,     0,
-       0,     0,     0,     0,   320,     0,     0,     0,     0,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,     0,
-     164,   165,   166,     0,   167,   168,   169,     0,     0,     0,
-       0,     0,   170,     0,     0,   171,     0,   172,   173,   174,
-     175,   176,   143,   177,   178,   179,   180,   181,     0,     0,
-       0,     0,     0,   182,     0,   183,     0,     0,   184,     0,
-       0,     0,     0,     0,   352,     0,     0,     0,     0,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,     0,
-     164,   165,   166,     0,   167,   168,   169,     0,     0,     0,
-       0,     0,   170,     0,     0,   171,     0,   172,   173,   174,
-     175,   176,   143,   177,   178,   179,   180,   181,     0,     0,
-       0,     0,     0,   182,     0,   183,     0,     0,   184,     0,
-       0,     0,     0,     0,   391,     0,     0,     0,     0,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,     0,
-     164,   165,   166,     0,   167,   168,   169,     0,     0,     0,
-       0,     0,   170,   143,     0,   171,   340,   172,   173,   174,
-     175,   176,     0,   177,   178,   179,   180,   181,     0,     0,
-       0,     0,     0,   182,     0,   183,     0,     0,   184,     0,
-     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,   159,   160,   161,   162,   163,
-       0,   164,   165,   166,     0,   167,   168,   169,     0,     0,
-       0,     0,     0,   170,   143,     0,   171,     0,   172,   173,
-     174,   175,   176,     0,   177,   178,   179,   180,   181,     0,
-       0,     0,     0,     0,   182,     0,   183,   342,     0,   184,
-       0,   144,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
-     163,     0,   164,   165,   166,     0,   167,   168,   169,     0,
-       0,     0,     0,     0,   170,   143,     0,   171,  -215,   172,
-     173,   174,   175,   176,     0,   177,   178,   179,   180,   181,
-       0,     0,     0,     0,     0,   182,     0,   183,     0,     0,
-     184,     0,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,     0,   164,   165,   166,     0,   167,   168,   169,
-       0,     0,     0,     0,     0,   170,   143,     0,   171,   484,
-     172,   173,   174,   175,   176,     0,   177,   178,   179,   180,
-     181,     0,     0,     0,     0,     0,   182,     0,   183,     0,
-       0,   184,     0,   144,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
-     161,   162,   163,     0,   164,   165,   166,     0,   167,   168,
-     169,     0,     0,     0,     0,     0,   170,   143,     0,   171,
-       0,   172,   173,   174,   175,   176,     0,   177,   178,   179,
-     180,   181,     0,     0,     0,     0,     0,   182,     0,   183,
-       0,     0,   184,     0,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   163,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,     0,     0,     0,     0,   143,     0,     0,
-       0,     0,   172,   173,   174,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,     0,     0,   182,     0,
-     183,     0,     0,   184,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,     0,     0,     0,     0,   143,     0,     0,
-       0,     0,   172,   173,   174,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,     0,     0,   182,     0,
-     183,     0,     0,   184,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,     0,     0,     0,     0,   143,     0,     0,
-       0,     0,     0,   173,   174,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,     0,     0,   182,     0,
-     183,     0,     0,   184,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,     0,     0,     0,     0,   143,     0,     0,
-       0,     0,     0,     0,   174,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,     0,     0,   182,     0,
-     183,     0,     0,   184,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,     0,     0,     0,     0,   143,     0,     0,
-       0,     0,     0,     0,  -216,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,     0,     0,   182,     0,
-     183,     0,     0,   184,   144,   145,   146,  -216,  -216,  -216,
-    -216,   151,   152,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   164,   165,   166,     0,   167,
-     168,   169,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   175,   176,     0,   177,   178,
-     179,   180,   181,     0,     0,     0,     0,     0,   182,     0,
-     183,     0,     0,   184
+       0,     0,     0,     0,   212,   213,   214,     0,   215,   216,
+     217,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   223,   224,     0,   225,   226,   227,   228,
+     229,     0,     0,     0,     0,     0,   230,     0,   231,     0,
+       0,   232
 };
 
 static const yytype_int16 yycheck[] =
 {
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,     0,     0,     0,     0,    57,     0,   106,   313,   209,
-       3,    47,    88,    20,   214,     3,   194,    24,   335,    50,
-     337,   308,     3,   125,   126,    35,    19,     3,     3,    68,
-      37,    19,    39,    40,   381,    42,    43,    44,    19,    46,
-      47,    51,    98,    87,   121,    34,   317,   231,    36,   126,
-      45,    51,    51,    51,    51,    51,   240,    51,   363,     0,
-      98,   100,     0,    88,    89,    90,   383,     3,   355,     3,
-      98,    98,     3,    62,     5,   346,   132,     8,     9,    10,
-     121,    12,   118,   182,    98,    19,    90,    98,    28,    14,
-     121,   121,     3,    33,   132,   366,   121,   104,   123,   106,
-      18,   126,    27,     3,   132,   132,   101,   412,    19,   380,
-      51,   118,   429,    51,    45,    91,    91,   295,   132,   123,
-     121,   132,   126,   125,    55,    56,   114,   127,   127,   127,
-     127,   127,   125,   127,   121,   142,   143,   144,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,   159,   160,   161,   162,   163,   504,   194,   121,
-     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
-     177,   178,   179,   180,   181,   182,   183,   448,   362,   450,
-     114,     3,     3,     5,     4,   121,   127,   194,   224,   127,
-     226,   127,   187,    27,   189,   190,     0,    31,    32,   206,
-      20,    21,    22,   125,    24,     3,    26,   207,   207,   207,
-      44,   310,    46,    98,   290,    27,     3,   224,    38,   226,
-      32,    19,   422,   121,   219,     3,    46,    47,    48,    49,
-     121,   100,    97,    98,    46,   104,   126,     4,   233,   234,
-       3,   317,   124,    98,     4,   104,   322,   131,    98,    68,
-       3,     3,    97,    20,    21,    22,     3,    24,    68,    26,
-      20,    21,    22,     3,    24,     3,    26,   451,   461,     3,
-     346,    38,   465,   466,   350,   282,     3,    97,    38,    46,
-      47,    48,    49,   467,     3,    14,    97,    47,    48,    49,
-     366,   484,   125,    18,   121,   132,   131,   104,    98,     3,
-     300,   300,   300,   310,   380,   498,    54,   132,   308,   308,
-     308,   131,   505,    54,    87,     3,   121,     3,   131,   125,
-       3,    98,   104,   132,   126,   509,   100,   379,   131,   121,
-      97,   367,    17,   340,   125,     3,   100,   125,   131,     3,
-     376,     5,     6,   132,     8,     9,    10,    11,    12,    98,
-     126,   131,   121,   125,   349,   355,   355,   355,   100,   125,
-     367,    25,    65,    27,   131,    29,   125,   132,   104,   376,
-     132,     3,   448,   131,   450,    88,    89,    90,     3,    27,
-     131,    45,   125,     3,   121,   131,   125,   131,    51,    53,
-     300,    55,    56,    88,    89,    90,   131,   127,   111,   112,
-     113,   114,   115,   125,   132,   131,   339,   131,   121,   132,
-     123,   131,    57,   126,   129,   330,   437,   437,   113,   114,
-     115,    68,   490,   476,    88,    89,   121,   434,   123,   458,
-     430,   126,   418,   418,   481,    27,   410,   383,   359,    -1,
+       0,     0,     0,     0,     0,   108,    60,    19,   277,    67,
+     142,   120,    24,    50,     3,   187,    28,   232,   446,     5,
+       5,   361,    50,     3,     3,     3,    38,   541,   367,    41,
+      42,   545,   546,    45,    46,    47,    48,    49,   461,    69,
+      98,    92,    93,    94,    94,   128,   129,   535,     5,    12,
+     102,     5,   505,   567,    54,    54,    54,    54,    54,   114,
+       0,   102,    34,   112,    27,     0,    27,   116,     0,   124,
+     584,    12,    33,   124,   104,   126,   126,   565,   129,   129,
+     594,   504,   422,   135,    96,   538,    27,     3,     4,    35,
+      62,   430,   147,   148,   135,   153,   124,     3,     4,   563,
+      16,    17,   114,    91,   319,    51,   347,     3,   120,     5,
+      16,    17,   124,    29,    54,   579,    95,    95,   124,    54,
+     292,   230,    54,    29,    16,     3,   258,   396,    16,   344,
+     142,     3,     4,     3,     4,   147,   148,   378,   477,   128,
+     124,   124,   128,   128,    16,    17,    16,    17,   128,     3,
+       4,   124,   128,   124,   111,   112,   129,    29,   112,    29,
+     429,     3,    16,    17,   592,     0,   166,   166,   166,   166,
+     166,   128,   128,   185,   128,    29,   188,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     415,   117,   443,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,   225,   226,   227,   228,   229,   230,   231,
+     102,     3,   128,   278,   279,   124,   166,   239,   400,   401,
+     104,   166,   106,    12,   166,   124,     3,     4,   275,   129,
+     240,   240,   240,   255,   485,   117,   258,   117,   260,    16,
+      17,   214,   124,   129,   126,   364,     3,   526,   130,   104,
+     130,   134,    29,   117,   102,   106,   278,   279,   127,   232,
+     102,     3,   126,     3,     4,     3,     3,   128,   547,   242,
+      16,     4,    16,    69,   525,     3,    16,    17,   251,   392,
+      26,   394,   101,   348,    69,    18,    32,    20,    21,    29,
+      23,   433,    25,   101,    16,     3,    36,     3,     3,   135,
+      46,   102,   124,   129,    26,    38,   129,   375,   124,    31,
+      32,   135,   106,    46,    47,    48,    49,   385,   135,   598,
+       4,   343,    44,   135,    46,     3,   348,     5,   102,   351,
+       8,     9,    10,   104,    18,   448,    20,    21,     3,    23,
+     117,    25,   364,   353,   353,   353,   319,     3,     4,   126,
+     134,   361,   361,   361,    38,    54,     3,     4,    54,     3,
+      16,    17,    46,    47,    48,    49,     3,     4,   101,    16,
+      17,   344,   104,    29,   104,   135,    91,   117,   442,    16,
+      17,   494,    29,   134,   406,   128,   408,    91,    91,   411,
+     363,   413,    29,    91,     3,    40,   127,   419,    15,   135,
+     102,   134,   129,   425,   124,   134,   106,   104,   101,   135,
+     128,   433,   422,   422,   422,   102,   438,   101,   134,   128,
+      66,   135,   134,    68,    69,    70,   102,    72,    73,    74,
+      75,    76,    77,   128,   135,   112,   104,   128,    40,   128,
+     134,   124,   415,   135,   116,    90,   106,    92,    93,    94,
+     134,    96,    97,    98,   111,   134,     3,     3,    26,   134,
+     134,   117,   107,   108,   109,   116,   111,   112,   134,   114,
+     115,   116,   117,   118,    76,    77,   128,   135,   128,   124,
+     502,   126,     3,   112,   129,   495,   134,   509,   112,   124,
+      92,    93,    94,   134,    96,    97,    98,   128,   134,   166,
+     134,    54,   135,   353,   134,    98,    92,    93,    94,   111,
+     112,    60,   114,   115,   116,   117,   118,   527,   527,   527,
+     527,   527,   124,   533,   126,   453,   146,   129,   114,   115,
+     116,   117,   118,   512,   512,   384,   483,   483,   124,    72,
+     126,   573,   555,   129,   454,   555,   555,   555,   555,   555,
+     475,   292,    27,   533,   448,   560,   426,    48,    -1,    -1,
+      -1,    -1,    -1,   573,   573,   573,   573,   573,     0,   259,
+      -1,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
+      12,    13,    14,    -1,    -1,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    -1,    -1,    28,    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,    68,    69,
+      70,    63,    64,    65,    -1,    -1,    76,    77,    -1,    71,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
+      92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,
+      -1,   111,   112,    -1,   114,   115,   116,   117,   118,   111,
+      -1,    -1,   114,    -1,   124,    -1,   126,   119,   120,   129,
+      -1,    -1,   124,    -1,   126,    -1,   128,    -1,   130,    -1,
+      -1,    -1,   134,     3,     4,     5,     6,    -1,     8,     9,
+      10,    11,    12,    13,    14,    -1,    -1,    -1,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    -1,    28,    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,
+       4,    -1,    -1,    63,    64,    65,    -1,    67,    -1,    -1,
+      -1,    71,    -1,    -1,    18,    -1,    20,    21,    -1,    23,
+      -1,    25,    -1,    -1,    92,    93,    94,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    38,    -1,    -1,    -1,    -1,    -1,
+      -1,   101,    -1,    47,    48,    49,    -1,    -1,   116,   117,
+     118,   111,    -1,    -1,   114,    -1,   124,    -1,   126,   119,
+     120,   129,    -1,    -1,   124,    -1,   126,    -1,   128,    -1,
+     130,    -1,    -1,    -1,   134,     3,     4,     5,     6,    -1,
+       8,     9,    10,    11,    12,    13,    14,    -1,    -1,    -1,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    -1,
+      28,    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,    65,    -1,    67,
+      -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   452,   452,   452,   452,   452,   121,   458,   123,
-      -1,   125,    -1,   127,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   476,   476,   476,   476,
-     476,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     490,   490,   490,   490,   490,     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,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    88,    89,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    97,    -1,    -1,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,   111,    -1,   121,    -1,
-     123,   116,   117,   126,    -1,    -1,   121,    -1,   123,    -1,
-     125,    -1,   127,    -1,    -1,    -1,   131,     3,     4,     5,
-       6,    -1,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
-      26,    27,    -1,    29,    30,    -1,    32,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,    -1,
+      -1,   119,   120,    -1,    -1,    -1,   124,    -1,   126,    -1,
+     128,    -1,   130,    -1,    -1,    -1,   134,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    -1,
+      -1,    -1,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    -1,    28,    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,
       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,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    88,    89,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    97,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,    -1,    -1,
-     116,   117,    -1,    -1,    -1,   121,    -1,   123,    -1,   125,
-      -1,   127,    -1,    -1,    -1,   131,     3,     4,     5,     6,
-      -1,     8,     9,    10,    11,    12,    13,    14,    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,
+      56,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,    65,
+      -1,    67,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,   114,    -1,
+      -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
+     126,    -1,   128,    -1,   130,    -1,    -1,    -1,   134,     3,
+       4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
+      14,    -1,    -1,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    -1,    -1,    28,    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,    65,    -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    88,    89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      97,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   111,    -1,    -1,    -1,    -1,   116,
-     117,    -1,    -1,    -1,   121,    -1,   123,    -1,   125,    -1,
-     127,    -1,    -1,    -1,   131,     3,     4,     5,     6,    -1,
-       8,     9,    10,    11,    12,    13,    14,    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,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
+     114,    -1,    -1,    -1,    -1,   119,   120,    -1,    -1,    -1,
+     124,    -1,   126,    -1,   128,    -1,   130,    -1,    -1,    -1,
+     134,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
+      12,    13,    14,    -1,    -1,    -1,    18,    19,    20,    21,
+      22,    23,    24,    25,    -1,    -1,    28,    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,    65,    -1,    -1,    -1,    -1,    -1,    71,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      88,    89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    97,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   111,    -1,    -1,    -1,    -1,   116,   117,
-      -1,    -1,    -1,   121,    -1,   123,    -1,   125,    -1,   127,
-      -1,    -1,    -1,   131,     3,     4,     5,     6,    -1,     8,
-       9,    10,    11,    12,    13,    14,    15,    16,    -1,    -1,
-      19,    20,    21,    22,    23,    24,    25,    26,    40,    -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,    74,    75,    63,    64,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,
-      92,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,    88,
-      89,    -1,    -1,    -1,    -1,    -1,   108,   109,    97,   111,
-     112,   113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,
-      -1,   123,   111,    -1,   126,    -1,    -1,   116,   117,    -1,
-      -1,    -1,   121,    -1,   123,    -1,   125,    -1,   127,    -1,
-      -1,    -1,   131,     3,     4,     5,     6,    -1,     8,     9,
-      10,    11,    12,    13,    14,    15,    16,    -1,    -1,    -1,
-      20,    21,    22,    23,    24,    25,    26,    -1,    -1,    29,
+      92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,
+      -1,    -1,   114,    -1,    -1,    -1,    -1,   119,   120,    -1,
+      -1,    -1,   124,    -1,   126,    -1,   128,    -1,   130,    -1,
+      -1,    -1,   134,     3,     4,     5,     6,    -1,     8,     9,
+      10,    11,    12,    13,    14,    -1,    -1,    -1,    18,    19,
+      20,    21,    22,    23,    24,    25,    -1,    -1,    28,    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,    -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,
+      -1,    -1,    -1,    63,    64,    65,    -1,    -1,    -1,    -1,
+      -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,    89,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   111,    -1,    -1,    -1,    -1,   116,   117,    -1,    -1,
-      -1,   121,    -1,   123,    -1,   125,    -1,   127,    -1,    -1,
-      -1,   131,     3,     4,     5,     6,    -1,     8,     9,    10,
-      11,    12,    13,    14,    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,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,    89,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     111,    -1,    -1,    -1,    -1,   116,   117,    -1,    -1,    -1,
-     121,    -1,   123,    -1,   125,    -1,   127,    -1,    -1,    -1,
-     131,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
-      12,    13,    14,    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,    -1,    -1,
+      -1,    -1,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   111,    -1,    -1,   114,    -1,    -1,    -1,    -1,   119,
+     120,    -1,    -1,    -1,   124,    -1,   126,    -1,   128,    -1,
+     130,    -1,    -1,    -1,   134,     3,     4,     5,     6,    -1,
+       8,     9,    10,    11,    12,    13,    14,    -1,    -1,    -1,
+      18,    19,    20,    21,    22,    23,    24,    25,    -1,    -1,
+      28,    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,    65,    -1,    -1,
+      -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    88,    89,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    97,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,
-      -1,    -1,    -1,    -1,   116,   117,    -1,    -1,    -1,   121,
-      -1,   123,    -1,   125,    -1,   127,    -1,    -1,    -1,   131,
-       3,     4,     5,     6,    -1,     8,     9,    10,    11,    12,
-      13,    14,    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,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,    -1,
+      -1,   119,   120,    -1,    -1,    -1,   124,    -1,   126,    -1,
+     128,    -1,   130,    -1,    -1,    -1,   134,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    -1,
+      -1,    -1,    18,    19,    20,    21,    22,    23,    24,    25,
+      -1,    -1,    28,    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,    65,
+      -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,
-      -1,    -1,    -1,   116,   117,    -1,    -1,    -1,   121,    -1,
-     123,    -1,   125,    -1,   127,    -1,     0,    -1,   131,     3,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,   114,    -1,
+      -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
+     126,    -1,   128,    -1,   130,    -1,     0,    -1,   134,     3,
        4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
        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,
+      14,    -1,    -1,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    -1,    -1,    28,    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,
       -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,    -1,    -1,    -1,    -1,
+      64,    65,    -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    88,    89,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    97,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
-      -1,    -1,   116,   117,    -1,    -1,    -1,   121,    -1,   123,
-      -1,   125,    -1,   127,     3,     4,     5,     6,    -1,     8,
-       9,    10,    11,    12,    13,    14,    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,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
-      89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   111,    -1,    -1,    -1,    -1,   116,   117,    -1,
-      -1,    -1,   121,    -1,   123,    -1,   125,    -1,   127,     3,
-       4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
-      14,    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,    -1,    -1,    -1,    -1,
+     114,    -1,    -1,    -1,    -1,   119,   120,    -1,    -1,    -1,
+     124,    -1,   126,    -1,   128,    -1,   130,     3,     4,     5,
+       6,    -1,     8,     9,    10,    11,    12,    13,    14,    -1,
+      16,    -1,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    -1,    28,    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,    65,
+      -1,    67,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    88,    89,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    97,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,
-      -1,    -1,   116,   117,    -1,    -1,    -1,   121,    -1,   123,
-      -1,   125,    -1,   127,     3,     4,     5,     6,    -1,     8,
-       9,    10,    11,    12,    13,    14,    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,    -1,    -1,    -1,    -1,    -1,    92,    93,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   111,    -1,    -1,   114,    -1,
+      -1,    -1,    -1,   119,   120,    -1,    -1,    -1,   124,    -1,
+     126,    -1,   128,    -1,   130,     3,     4,     5,     6,    -1,
+       8,     9,    10,    11,    12,    13,    14,    -1,    -1,    -1,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    -1,
+      28,    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,    65,    -1,    67,
+      -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
-      89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,
-      -1,     3,    -1,     5,     6,    -1,     8,     9,    10,    11,
-      12,    -1,   111,    -1,    -1,    -1,    -1,   116,   117,    -1,
-      -1,    -1,   121,    25,   123,    27,   125,    29,   127,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   111,    -1,    -1,   114,    -1,    -1,    -1,
+      -1,   119,   120,    -1,    -1,    -1,   124,    -1,   126,    -1,
+     128,     3,   130,     5,     6,    -1,     8,     9,    10,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,    -1,    -1,
+      -1,    -1,    24,    -1,    26,    -1,    28,    29,    -1,    -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,
       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,    -1,    -1,
+      -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,    -1,    71,
+      -1,    -1,    -1,     3,    -1,     5,     6,    -1,     8,     9,
+      10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,
+      92,    93,    -1,    -1,    24,    -1,    26,    -1,    28,    29,
+      -1,    -1,    -1,    -1,    -1,    -1,    36,    -1,    -1,   111,
+      -1,    -1,   114,    43,    -1,    45,    -1,   119,   120,    -1,
+      -1,    -1,   124,    53,   126,    55,    56,    -1,   130,    -1,
+       3,    -1,     5,     6,    64,     8,     9,    10,    -1,    -1,
+      -1,    71,    -1,    -1,    -1,    -1,    19,    -1,    -1,    -1,
+      -1,    24,    -1,    26,    -1,    28,    29,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    45,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      53,   111,    55,    56,   114,    -1,    -1,    -1,    -1,   119,
+     120,    -1,    -1,    -1,   124,    -1,   126,    -1,    71,    -1,
+     130,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,
+      93,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    88,    89,    -1,    -1,
-      -1,    -1,    -1,    -1,     3,    -1,     5,     6,    -1,     8,
-       9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,   111,
-      -1,    -1,    -1,    -1,   116,   117,    25,    -1,    27,   121,
-      29,   123,    -1,   125,    -1,   127,    -1,    36,    -1,    -1,
-      -1,    -1,    -1,    -1,    43,    -1,    45,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    53,    -1,    55,    56,    -1,    -1,
-      -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
-      89,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   111,    -1,    -1,    -1,    -1,   116,   117,    -1,
-      -1,    -1,   121,    -1,   123,    -1,   125,    -1,   127,    67,
-      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    86,    -1,
-      88,    89,    90,    -1,    92,    93,    94,    -1,    -1,    -1,
-      -1,    -1,   100,    -1,    -1,   103,    -1,   105,   106,   107,
-     108,   109,    40,   111,   112,   113,   114,   115,    -1,    -1,
-      -1,    -1,    -1,   121,    -1,   123,    -1,    -1,   126,    -1,
-      -1,    -1,    -1,    -1,   132,    -1,    -1,    -1,    -1,    67,
-      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    86,    -1,
-      88,    89,    90,    -1,    92,    93,    94,    -1,    -1,    -1,
-      -1,    -1,   100,    -1,    -1,   103,    -1,   105,   106,   107,
-     108,   109,    40,   111,   112,   113,   114,   115,    -1,    -1,
-      -1,    -1,    -1,   121,    -1,   123,    -1,    -1,   126,    -1,
-      -1,    -1,    -1,    -1,   132,    -1,    -1,    -1,    -1,    67,
-      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    86,    -1,
-      88,    89,    90,    -1,    92,    93,    94,    -1,    -1,    -1,
-      -1,    -1,   100,    -1,    -1,   103,    -1,   105,   106,   107,
-     108,   109,    40,   111,   112,   113,   114,   115,    -1,    -1,
-      -1,    -1,    -1,   121,    -1,   123,    -1,    -1,   126,    -1,
-      -1,    -1,    -1,    -1,   132,    -1,    -1,    -1,    -1,    67,
-      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    86,    -1,
-      88,    89,    90,    -1,    92,    93,    94,    -1,    -1,    -1,
-      -1,    -1,   100,    40,    -1,   103,   104,   105,   106,   107,
-     108,   109,    -1,   111,   112,   113,   114,   115,    -1,    -1,
-      -1,    -1,    -1,   121,    -1,   123,    -1,    -1,   126,    -1,
-      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      -1,    88,    89,    90,    -1,    92,    93,    94,    -1,    -1,
-      -1,    -1,    -1,   100,    40,    -1,   103,    -1,   105,   106,
-     107,   108,   109,    -1,   111,   112,   113,   114,   115,    -1,
-      -1,    -1,    -1,    -1,   121,    -1,   123,   124,    -1,   126,
-      -1,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      -1,   124,    -1,   126,    68,    69,    70,   130,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    -1,    92,    93,
+      94,    -1,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
+     104,   105,    -1,   107,   108,   109,    40,   111,   112,    -1,
+     114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
+     124,    -1,   126,    -1,    -1,   129,    -1,    -1,    -1,    -1,
+      -1,   135,    -1,    -1,    68,    69,    70,    -1,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    -1,    92,    93,
+      94,    -1,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
+     104,   105,    -1,   107,   108,   109,    40,   111,   112,    -1,
+     114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
+     124,    -1,   126,    -1,    -1,   129,    -1,    -1,    -1,    -1,
+      -1,   135,    -1,    -1,    68,    69,    70,    -1,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    -1,    92,    93,
+      94,    -1,    96,    97,    98,    -1,    -1,    -1,    40,    -1,
+     104,   105,   106,   107,   108,   109,    -1,   111,   112,    -1,
+     114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
+     124,    -1,   126,    -1,    -1,   129,    68,    69,    70,    -1,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    86,    87,    88,    89,    90,    -1,
+      92,    93,    94,    -1,    96,    97,    98,    -1,    -1,    -1,
+      40,    -1,   104,   105,    -1,   107,   108,   109,    -1,   111,
+     112,    -1,   114,   115,   116,   117,   118,    -1,    -1,    -1,
+      -1,    -1,   124,    -1,   126,   127,    -1,   129,    68,    69,
+      70,    -1,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
+      -1,    -1,    40,    -1,   104,   105,    -1,   107,   108,   109,
+      -1,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
+      -1,    -1,    -1,    -1,   124,    -1,   126,   127,    -1,   129,
+      68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    -1,    92,    93,    94,    -1,    96,    97,
+      98,    -1,    -1,    -1,    40,    -1,   104,   105,    -1,   107,
+     108,   109,    -1,   111,   112,    -1,   114,   115,   116,   117,
+     118,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,   127,
+      -1,   129,    68,    69,    70,    -1,    72,    73,    74,    75,
       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      86,    -1,    88,    89,    90,    -1,    92,    93,    94,    -1,
-      -1,    -1,    -1,    -1,   100,    40,    -1,   103,   104,   105,
-     106,   107,   108,   109,    -1,   111,   112,   113,   114,   115,
-      -1,    -1,    -1,    -1,    -1,   121,    -1,   123,    -1,    -1,
-     126,    -1,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    -1,    88,    89,    90,    -1,    92,    93,    94,
-      -1,    -1,    -1,    -1,    -1,   100,    40,    -1,   103,   104,
-     105,   106,   107,   108,   109,    -1,   111,   112,   113,   114,
-     115,    -1,    -1,    -1,    -1,    -1,   121,    -1,   123,    -1,
-      -1,   126,    -1,    67,    68,    69,    70,    71,    72,    73,
+      86,    87,    88,    89,    90,    -1,    92,    93,    94,    -1,
+      96,    97,    98,    -1,    -1,    -1,    40,    -1,   104,   105,
+      -1,   107,   108,   109,    -1,   111,   112,    -1,   114,   115,
+     116,   117,   118,    -1,    -1,    -1,    -1,    -1,   124,    -1,
+     126,   127,    -1,   129,    68,    69,    70,    -1,    72,    73,
       74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
       74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,    86,    -1,    88,    89,    90,    -1,    92,    93,
-      94,    -1,    -1,    -1,    -1,    -1,   100,    40,    -1,   103,
-      -1,   105,   106,   107,   108,   109,    -1,   111,   112,   113,
-     114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,   123,
-      -1,    -1,   126,    -1,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    86,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,
-      -1,    -1,   105,   106,   107,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,    -1,    -1,   126,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,
-      -1,    -1,   105,   106,   107,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,    -1,    -1,   126,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,
-      -1,    -1,    -1,   106,   107,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,    -1,    -1,   126,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,
-      -1,    -1,    -1,    -1,   107,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,    -1,    -1,   126,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,
-      -1,    -1,    -1,    -1,   107,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,    -1,    -1,   126,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    88,    89,    90,    -1,    92,
-      93,    94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   108,   109,    -1,   111,   112,
-     113,   114,   115,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,    -1,    -1,   126
+      84,    85,    86,    87,    88,    89,    90,    -1,    92,    93,
+      94,    -1,    96,    97,    98,    -1,    -1,    -1,    40,    -1,
+     104,   105,    -1,   107,   108,   109,    -1,   111,   112,    -1,
+     114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
+     124,    -1,   126,   127,    -1,   129,    68,    69,    70,    -1,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    86,    87,    88,    89,    90,    -1,
+      92,    93,    94,    -1,    96,    97,    98,    -1,    -1,    -1,
+      40,    -1,   104,   105,   106,   107,   108,   109,    -1,   111,
+     112,    -1,   114,   115,   116,   117,   118,    -1,    -1,    -1,
+      -1,    -1,   124,    -1,   126,    -1,    -1,   129,    68,    69,
+      70,    -1,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
+      -1,    -1,    40,    -1,   104,   105,    -1,   107,   108,   109,
+      -1,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
+      -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,   129,
+      68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    -1,    92,    93,    94,    -1,    96,    97,
+      98,    -1,    -1,    -1,    40,    -1,   104,   105,    -1,   107,
+     108,   109,    -1,    -1,   112,    -1,   114,   115,   116,   117,
+     118,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,
+      -1,   129,    68,    69,    70,    -1,    72,    73,    74,    75,
+      76,    77,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    -1,
+      96,    97,    98,    -1,    -1,    -1,    40,    -1,    -1,    -1,
+      -1,   107,   108,   109,    -1,   111,   112,    -1,   114,   115,
+     116,   117,   118,    -1,    -1,    -1,    -1,    -1,   124,    -1,
+     126,    -1,    -1,   129,    68,    69,    70,    -1,    72,    73,
+      74,    75,    76,    77,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
+      94,    -1,    96,    97,    98,    -1,    -1,    -1,    40,    -1,
+      -1,    -1,    -1,    -1,   108,   109,    -1,   111,   112,    -1,
+     114,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    -1,
+     124,    -1,   126,    -1,    -1,   129,    68,    69,    70,    -1,
+      72,    73,    74,    75,    76,    77,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      92,    93,    94,    -1,    96,    97,    98,    -1,    -1,    -1,
+      40,    -1,    -1,    -1,    -1,    -1,    -1,   109,    -1,   111,
+     112,    -1,   114,   115,   116,   117,   118,    -1,    -1,    -1,
+      -1,    -1,   124,    -1,   126,    -1,    -1,   129,    68,    69,
+      70,    -1,    72,    73,    74,    75,    76,    77,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    -1,    96,    97,    98,    -1,
+      -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,    -1,   109,
+      -1,   111,   112,    -1,   114,   115,   116,   117,   118,    -1,
+      -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,   129,
+      68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    94,    -1,    96,    97,
+      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   111,   112,    -1,   114,   115,   116,   117,
+     118,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,
+      -1,   129
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
+static const yytype_uint16 yystos[] =
 {
        0,     3,     4,     5,     6,     8,     9,    10,    11,    12,
 {
        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,    88,
-      89,    97,   111,   116,   117,   121,   123,   125,   127,   134,
-     135,   136,   137,   143,   146,   147,   153,   157,   158,   159,
-     160,   162,   170,   178,   181,   184,   187,   188,   189,   190,
-     194,   196,   205,   212,   215,   228,   229,   230,   233,   234,
-     235,   236,   239,   241,    87,    50,   121,   121,   163,   121,
-       3,    19,   125,   182,   183,    18,     3,   235,     3,   214,
-     235,   121,   183,   218,   121,   125,   121,   126,   235,   121,
-     235,   235,   235,   235,   235,   233,   224,   225,   226,   232,
-     235,   232,   237,   238,     3,     0,   137,   125,     3,    32,
-      46,   149,   155,   156,   234,    27,    31,    32,    44,    46,
-     204,   190,    98,    40,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    88,    89,    90,    92,    93,    94,
-     100,   103,   105,   106,   107,   108,   109,   111,   112,   113,
-     114,   115,   121,   123,   126,     3,   121,   161,    30,    37,
-      42,    46,    66,    97,   125,   143,   144,   145,   147,   149,
-     164,   165,   180,   188,   231,   240,   171,   186,   125,   126,
-       3,   227,   121,   233,   126,   235,   179,   224,     3,   154,
-     132,   124,    98,   232,   104,   131,    98,   135,     3,   150,
-     151,     3,   150,    97,    68,    35,    51,   211,     3,     3,
-       3,   235,   235,   235,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,     3,   235,   235,   235,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   235,   235,   235,   224,
-     235,     3,   121,   127,   233,     3,   233,   233,     3,   131,
-     142,   144,   235,    97,    14,   125,    18,   235,    97,   138,
-     139,   140,   146,   147,   194,   196,   205,   212,   185,   182,
-     121,   223,     3,    91,   208,   209,   210,   132,     3,   114,
-     132,   141,   142,   132,   233,   232,   232,   131,   104,   222,
-      98,   222,   233,   233,     3,    54,   191,    54,   192,   222,
-     104,   132,   124,    87,   235,     3,   132,   131,   144,   121,
-     142,     3,   132,   131,   140,   125,   138,   224,   100,   104,
-     206,   210,   132,    98,   145,   131,   132,   104,     3,    36,
-     114,   183,   217,   218,   219,   221,   100,   148,   151,    97,
-     132,   121,   219,    17,   193,   219,   220,   125,   148,   235,
-       3,   132,   145,   233,   131,   100,   125,   138,   131,   132,
-       3,     5,     8,     9,    10,    12,    45,    55,    56,   207,
-     221,   222,    91,   210,    28,    33,   172,   174,   176,   177,
-     145,   232,   126,   232,   234,   145,   208,   220,   125,    98,
-     197,   132,     3,     5,    34,    62,   166,   167,   168,   169,
-     131,   206,   125,   210,   125,   121,   172,   174,    65,   152,
-     132,   132,   195,   219,    46,    97,   188,   201,   202,   203,
-     235,   104,   131,   168,   169,   216,   175,     3,   145,   145,
-     222,    97,   143,   147,   188,   198,   199,   200,   205,   212,
-       3,    27,   131,   203,   104,   141,   141,   141,   222,   125,
-     125,   131,   200,   211,   141,   131,   131,   132,   213,   198,
-       3,   173,   141,   131,   121,   125,   131,   208,   141,   132,
-     131,   222
+      13,    14,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    28,    29,    36,    38,    39,    41,    43,    45,
+      47,    48,    49,    52,    53,    55,    56,    63,    64,    65,
+      71,    92,    93,   101,   111,   114,   119,   120,   124,   126,
+     128,   130,   137,   138,   139,   140,   146,   149,   151,   159,
+     162,   163,   164,   165,   166,   173,   181,   184,   185,   188,
+     191,   192,   193,   194,   198,   200,   209,   214,   215,   216,
+     227,   234,   237,   250,   251,   252,   257,   261,   265,   266,
+     268,   269,   270,    91,    50,   124,   124,   156,   157,   124,
+       3,     4,    16,    17,    29,   128,   186,   187,    16,     3,
+     261,     3,   236,   261,   124,     3,   187,   240,   261,   128,
+     124,   129,    16,   261,   124,     3,     5,     8,     9,    10,
+     258,   259,   260,   261,   261,   261,   261,   261,   256,   261,
+     246,   247,   248,   254,   261,    30,    32,    37,    42,    46,
+      67,   101,   134,   145,   146,   147,   151,   153,   167,   168,
+     183,   192,   253,     3,     0,   140,   128,     3,    46,   153,
+     160,   161,   257,   147,   148,    16,    26,    31,    32,    44,
+      46,   208,   267,   194,     3,   128,   221,   225,   102,    40,
+      68,    69,    70,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
+      89,    90,    92,    93,    94,    96,    97,    98,   104,   105,
+     107,   108,   109,   111,   112,   114,   115,   116,   117,   118,
+     124,   126,   129,     3,   124,   255,   256,    12,   148,   174,
+     190,   128,   129,   186,   187,   239,   240,   241,   249,   124,
+     255,   129,   182,   246,     3,   104,   255,   134,   106,   102,
+     102,   135,   127,   102,   254,     3,     3,   154,   155,   255,
+     255,   154,     3,   134,   147,   128,   138,     3,   101,    69,
+     101,     3,    35,    51,   233,     3,     3,   210,   261,     3,
+     221,   226,   228,   229,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   261,   117,   130,
+     186,   264,   261,   261,   261,   261,   261,   261,   261,   261,
+     261,   261,   261,   261,   261,   261,   261,   246,   261,     3,
+       4,   117,   124,   126,   130,   263,   264,   135,   124,   261,
+     101,   126,   141,   142,   143,   149,   151,   198,   200,   209,
+     234,   189,   186,   129,   124,   245,     3,    95,   230,   231,
+     232,   135,   117,   186,   144,   145,   135,   261,   135,   254,
+     259,   261,   106,   244,   102,   145,   134,   244,   255,   255,
+     104,     3,    54,   195,    54,   196,     3,   211,   212,   222,
+     104,   104,   112,   116,   217,   229,   126,   264,   106,   135,
+     127,   262,   261,   126,   264,    91,   156,   255,   135,   150,
+     134,   143,   128,   141,   246,   104,   106,   213,   232,   135,
+     102,   134,   156,   106,    36,   117,   241,   243,   104,   152,
+     155,   134,   101,   135,     3,     5,   124,   241,    15,   197,
+     241,   242,   128,   244,   102,   134,     5,   221,     5,   221,
+     218,   223,   261,   261,   261,   127,   261,   264,   135,   128,
+     261,   141,   134,   135,   261,   243,   244,    95,   232,    27,
+      33,   175,   177,   179,   180,    66,   158,   254,   261,   257,
+     156,   230,   242,   128,   102,   201,   152,   212,   112,     5,
+     111,   112,   128,   219,   224,   227,   127,   135,   127,    34,
+      62,   169,   170,   171,   172,   127,   134,   213,   128,   232,
+     128,   124,   175,   177,   156,   135,   135,   199,   241,    46,
+     101,   192,   205,   206,   207,   116,   261,   111,   227,   223,
+     261,   106,   134,   171,   172,   238,   178,     3,   156,   244,
+     101,   146,   151,   192,   202,   203,   204,   209,   234,     3,
+      26,   134,   207,   225,   220,   116,   223,   106,   144,   144,
+     144,   244,   128,   128,   134,   204,   233,   218,   134,   225,
+     144,   134,   134,   135,   235,   202,     3,   112,   218,   176,
+     144,   134,   124,   112,   128,   134,   230,   144,   135,   134,
+     244
 };
 
 #define yyerrok                (yyerrstatus = 0)
 };
 
 #define yyerrok                (yyerrstatus = 0)
@@ -3689,7 +4151,6 @@ yydestruct (yymsg, yytype, yyvaluep)
 
   switch (yytype)
     {
 
   switch (yytype)
     {
-
       default:
        break;
     }
       default:
        break;
     }
@@ -3697,13 +4158,15 @@ yydestruct (yymsg, yytype, yyvaluep)
 
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
 
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
 int yyparse (void *YYPARSE_PARAM);
 #else
 int yyparse ();
 #endif
 #else /* ! YYPARSE_PARAM */
 int yyparse (void *YYPARSE_PARAM);
 #else
 int yyparse ();
 #endif
 #else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
 int yyparse (void);
 #else
 int yyparse ();
 int yyparse (void);
 #else
 int yyparse ();
@@ -3990,111 +4453,103 @@ yyreduce:
   switch (yyn)
     {
         
   switch (yyn)
     {
         
-    case 26:
+    case 13:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1725 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+#line 1980 "parser.y"
+    {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 27:
+    case 24:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1726 "parser.y"
-    {(yyval.code)=code_new();}
+#line 1992 "parser.y"
+    {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 28:
+    case 25:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1728 "parser.y"
-    {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
+#line 1993 "parser.y"
+    {PASS_ALWAYS as3_pass=(yyvsp[(2) - (4)].number_int);PASS1 as3_warning("embed command ignored");}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 29:
+    case 27:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1729 "parser.y"
+#line 1996 "parser.y"
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
-    case 41:
+    case 28:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1745 "parser.y"
-    {(yyval.code)=0;}
+#line 1997 "parser.y"
+    {(yyval.code)=code_new();}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 48:
+    case 29:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1752 "parser.y"
-    {(yyval.code)=(yyvsp[(3) - (4)].code);}
+#line 1999 "parser.y"
+    {
+    (yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 49:
+    case 30:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1754 "parser.y"
-    {/*TODO*/(yyval.code)=0;}
+#line 2002 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 50:
+    case 44:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1756 "parser.y"
+#line 2018 "parser.y"
     {(yyval.code)=(yyvsp[(2) - (3)].code);}
     }
     break;
 
 
   
     {(yyval.code)=(yyvsp[(2) - (3)].code);}
     }
     break;
 
 
   
-    case 51:
+    case 45:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1757 "parser.y"
+#line 2019 "parser.y"
     {(yyval.code)=0;}
     }
     break;
 
 
   
     {(yyval.code)=0;}
     }
     break;
 
 
   
-    case 52:
+    case 46:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1758 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (2)].code);}
+#line 2022 "parser.y"
+    {(yyval.code)=0;}
     }
     break;
 
     }
     break;
 
@@ -4102,10 +4557,17 @@ yyreduce:
   
     case 53:
     if(as3_pass==2) {
   
     case 53:
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1759 "parser.y"
-    {(yyval.code)=(yyvsp[(1) - (1)].code);}
+#line 2029 "parser.y"
+    {
+    PASS_ALWAYS 
+    if(as3_pass) {
+        (yyval.code) = (yyvsp[(3) - (4)].code);
+    } else {
+        (yyval.code) = 0;
+    }
+    as3_pass=(yyvsp[(1) - (4)].number_int);
+}
     }
     break;
 
     }
     break;
 
@@ -4113,13 +4575,19 @@ yyreduce:
   
     case 54:
     if(as3_pass==2) {
   
     case 54:
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2041 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (2)].code);}
+    }
+    break;
+
 
 
+  
+    case 55:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1763 "parser.y"
-    {
-    code_t**cc = &global->init->method->body->code;
-    *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
-}
+#line 2042 "parser.y"
+    {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
     }
     break;
 
@@ -4127,10 +4595,16 @@ yyreduce:
   
     case 56:
     if(as3_pass==2) {
   
     case 56:
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1774 "parser.y"
-    {(yyval.value)=(yyvsp[(2) - (2)].value);}
+#line 2046 "parser.y"
+    {
+    if((yyvsp[(1) - (1)].code)) {
+        if(!global->init) 
+            global->init = abc_initscript(global->file);
+        code_t**cc = &global->init->method->body->code;
+        *cc = code_append(*cc, (yyvsp[(1) - (1)].code));
+    }
+}
     }
     break;
 
     }
     break;
 
@@ -4138,12 +4612,13 @@ yyreduce:
   
     case 57:
     if(as3_pass==2) {
   
     case 57:
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1775 "parser.y"
-    {(yyval.value).c=abc_pushundefined(0);
-                                  (yyval.value).t=TYPE_ANY;
-                                 }
+#line 2057 "parser.y"
+    {
+    PASS_ALWAYS
+    (yyval.number_int) = as3_pass;
+    as3_pass=0;
+}
     }
     break;
 
     }
     break;
 
@@ -4151,10 +4626,17 @@ yyreduce:
   
     case 58:
     if(as3_pass==2) {
   
     case 58:
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1779 "parser.y"
-    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+#line 2065 "parser.y"
+    {
+    PASS12
+    (yyval.number_int)=as3_pass;
+    char*key = concat3((yyvsp[(1) - (3)].id),"::",(yyvsp[(3) - (3)].id));
+    if(!definitions || !dict_contains(definitions, key)) {
+        as3_pass=0;
+    }
+    free(key);
+}
     }
     break;
 
     }
     break;
 
@@ -4162,177 +4644,226 @@ yyreduce:
   
     case 59:
     if(as3_pass==2) {
   
     case 59:
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2092 "parser.y"
+    {(yyval.node)=(yyvsp[(2) - (2)].node);}
+    }
+    break;
+
+
+  
+    case 60:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2093 "parser.y"
+    {(yyval.node)=mkdummynode();}
+    }
+    break;
+
 
 
+  
+    case 61:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1780 "parser.y"
+#line 2095 "parser.y"
     {(yyval.code)=(yyvsp[(2) - (2)].code);}
     }
     break;
 
 
   
     {(yyval.code)=(yyvsp[(2) - (2)].code);}
     }
     break;
 
 
   
-    case 60:
+    case 62:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2096 "parser.y"
+    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+    }
+    break;
+
 
 
+  
+    case 63:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1782 "parser.y"
+#line 2098 "parser.y"
     {(yyval.code) = (yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
     {(yyval.code) = (yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
-    case 61:
+    case 64:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1783 "parser.y"
+#line 2099 "parser.y"
     {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
     }
     break;
 
 
   
     {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
     }
     break;
 
 
   
-    case 62:
+    case 65:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1786 "parser.y"
+#line 2102 "parser.y"
     {
     {
-    if(variable_exists((yyvsp[(1) - (3)].id)))
+PASS12
+    if(variable_exists((yyvsp[(1) - (3)].id))) 
         syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
         syntaxerror("Variable %s already defined", (yyvsp[(1) - (3)].id));
+PASS1
+    new_variable(state->method, (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);
+    char slot = 0;
+    int index = 0;
+    variable_t*v = 0;
+    if(state->method->uses_slots) {
+        v = find_slot(state->method, (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;
+        }
+    }
+    if(!v) {
+        v = new_variable2(state->method, (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1, 0);
     }
 
     }
 
-    int index = new_variable((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].classinfo), 1);
+    (yyval.code) = slot?abc_getscopeobject(0, 1):0;
     
     
+    typedcode_t val = node_read((yyvsp[(3) - (3)].node));
+    if(!is_subtype_of(val.t, (yyvsp[(2) - (3)].classinfo))) {
+        syntaxerror("Can't convert %s to %s", val.t->name, (yyvsp[(2) - (3)].classinfo)->name);
+    }
     if((yyvsp[(2) - (3)].classinfo)) {
     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) = converttype((yyval.code), (yyvsp[(3) - (3)].value).t, (yyvsp[(2) - (3)].classinfo));
-            (yyval.code) = abc_setlocal((yyval.code), index);
+        if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
+            (yyval.code) = code_append((yyval.code), val.c);
+            (yyval.code) = converttype((yyval.code), val.t, (yyvsp[(2) - (3)].classinfo));
         } else {
         } else {
-            code_free((yyvsp[(3) - (3)].value).c);
-            (yyval.code) = defaultvalue(0, (yyvsp[(2) - (3)].classinfo));
-            (yyval.code) = abc_setlocal((yyval.code), index);
+            code_free(val.c);
+            (yyval.code) = defaultvalue((yyval.code), (yyvsp[(2) - (3)].classinfo));
         }
     } else {
         }
     } else {
-        if((yyvsp[(3) - (3)].value).c->prev || (yyvsp[(3) - (3)].value).c->opcode != OPCODE_PUSHUNDEFINED) {
-            (yyval.code) = (yyvsp[(3) - (3)].value).c;
+        if(val.c->prev || val.c->opcode != OPCODE_PUSHUNDEFINED) {
+            (yyval.code) = code_append((yyval.code), val.c);
             (yyval.code) = abc_coerce_a((yyval.code));
             (yyval.code) = abc_coerce_a((yyval.code));
-            (yyval.code) = abc_setlocal((yyval.code), index);
         } else {
         } else {
-            code_free((yyvsp[(3) - (3)].value).c);
-            (yyval.code) = code_new();
+            // don't do anything
+            code_free(val.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), v->index);
+    } else {
+        (yyval.code) = abc_setlocal((yyval.code), v->index);
+        v->init = do_init_variable((yyvsp[(1) - (3)].id));
+    }
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 63:
+    case 66:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1828 "parser.y"
-    {(yyval.code) = code_new();}
+#line 2162 "parser.y"
+    {PASS12 new_state();}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 64:
+    case 67:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1829 "parser.y"
-    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+#line 2162 "parser.y"
+    {
+    (yyval.code) = var_block((yyvsp[(2) - (2)].code), state->vars);
+    PASS12 old_state();
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 65:
+    case 68:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1832 "parser.y"
-    {new_state();}
+#line 2166 "parser.y"
+    {(yyval.code) = code_new();}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 66:
+    case 69:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2167 "parser.y"
+    {(yyval.code)=(yyvsp[(2) - (2)].code);}
+    }
+    break;
 
 
+
+  
+    case 70:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1832 "parser.y"
+#line 2170 "parser.y"
     {
     {
-     
     (yyval.code) = code_new();
     (yyval.code) = code_new();
-    (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (7)].value).c);
+    (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (6)].value).c);
     code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
    
     code_t*myjmp,*myif = (yyval.code) = abc_iffalse((yyval.code), 0);
    
-    (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].code));
-    if((yyvsp[(7) - (7)].code)) {
+    (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].code));
+    if((yyvsp[(6) - (6)].code)) {
         myjmp = (yyval.code) = abc_jump((yyval.code), 0);
     }
     myif->branch = (yyval.code) = abc_nop((yyval.code));
         myjmp = (yyval.code) = abc_jump((yyval.code), 0);
     }
     myif->branch = (yyval.code) = abc_nop((yyval.code));
-    if((yyvsp[(7) - (7)].code)) {
-        (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (7)].code));
+    if((yyvsp[(6) - (6)].code)) {
+        (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
         myjmp->branch = (yyval.code) = abc_nop((yyval.code));
     }
         myjmp->branch = (yyval.code) = abc_nop((yyval.code));
     }
-    (yyval.code) = var_block((yyval.code));
-    old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 67:
+    case 71:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1851 "parser.y"
+#line 2186 "parser.y"
     {(yyval.code)=code_new();}
     }
     break;
 
 
   
     {(yyval.code)=code_new();}
     }
     break;
 
 
   
-    case 70:
+    case 74:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1856 "parser.y"
+#line 2193 "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(state->method, (yyvsp[(2) - (3)].id),0,1,0);
+    PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable(state->method, (yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 71:
+    case 75:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1859 "parser.y"
+#line 2197 "parser.y"
     {
     {
+    PASS12
     (yyval.id)=(yyvsp[(1) - (1)].id);
 }
     }
     (yyval.id)=(yyvsp[(1) - (1)].id);
 }
     }
@@ -4340,33 +4871,30 @@ yyreduce:
 
 
   
 
 
   
-    case 72:
+    case 76:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1863 "parser.y"
-    {new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
+#line 2202 "parser.y"
+    {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 73:
+    case 77:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1864 "parser.y"
-    {new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
+#line 2203 "parser.y"
+    {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 74:
+    case 78:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1866 "parser.y"
+#line 2205 "parser.y"
     {
     if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
     (yyval.code) = code_new();
     {
     if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
     (yyval.code) = code_new();
@@ -4383,25 +4911,25 @@ yyreduce:
     continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
     myif->branch = out;
 
     continuejumpsto((yyval.code), (yyvsp[(1) - (8)].for_start).name, cont);
     myif->branch = out;
 
-    (yyval.code) = var_block((yyval.code));
-    old_state();
+    (yyval.code) = var_block((yyval.code), state->vars);
+    PASS12 old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 75:
+    case 79:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1886 "parser.y"
+#line 2225 "parser.y"
     {
     {
-    variable_t*var = find_variable((yyvsp[(2) - (6)].id));
-    char*tmp1name = concat2((yyvsp[(2) - (6)].id), "__tmp1__");
-    int it = new_variable(tmp1name, TYPE_INT, 0);
-    char*tmp2name = concat2((yyvsp[(2) - (6)].id), "__array__");
-    int array = new_variable(tmp1name, 0, 0);
+    variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
+    if(!var) {
+        syntaxerror("variable %s not known in this scope", (yyvsp[(2) - (6)].id));
+    }
+    int it = alloc_local();
+    int array = alloc_local();
 
     (yyval.code) = code_new();
     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
 
     (yyval.code) = code_new();
     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
@@ -4432,96 +4960,65 @@ yyreduce:
     
     myif->branch = out;
 
     
     myif->branch = out;
 
-    (yyval.code) = var_block((yyval.code));
-    old_state();
+    (yyval.code) = abc_kill((yyval.code), it);
+    (yyval.code) = abc_kill((yyval.code), array);
 
 
-    free(tmp1name);
-    free(tmp2name);
+    (yyval.code) = var_block((yyval.code), state->vars);
+    PASS12 old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 76:
-    if(as3_pass==2) {
-
-/* Line 1464 of skeleton.m4  */
-#line 1929 "parser.y"
-    {new_state();}
-    }
-    break;
-
-
-  
-    case 77:
+    case 80:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1929 "parser.y"
+#line 2269 "parser.y"
     {
 
     (yyval.code) = code_new();
 
     code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
     {
 
     (yyval.code) = code_new();
 
     code_t*myjmp = (yyval.code) = abc_jump((yyval.code), 0);
     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
-    (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (6)].code));
+    (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (5)].code));
     code_t*cont = (yyval.code) = abc_nop((yyval.code));
     myjmp->branch = cont;
     code_t*cont = (yyval.code) = abc_nop((yyval.code));
     myjmp->branch = cont;
-    (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (6)].value).c);
+    (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (5)].value).c);
     (yyval.code) = abc_iftrue((yyval.code), loopstart);
     code_t*out = (yyval.code) = abc_nop((yyval.code));
     (yyval.code) = abc_iftrue((yyval.code), loopstart);
     code_t*out = (yyval.code) = abc_nop((yyval.code));
-    breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
-    continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
-
-    (yyval.code) = var_block((yyval.code));
-    old_state();
+    breakjumpsto((yyval.code), (yyvsp[(1) - (5)].id), out);
+    continuejumpsto((yyval.code), (yyvsp[(1) - (5)].id), cont);
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 78:
-    if(as3_pass==2) {
-
-/* Line 1464 of skeleton.m4  */
-#line 1948 "parser.y"
-    {new_state();}
-    }
-    break;
-
-
-  
-    case 79:
+    case 81:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1948 "parser.y"
+#line 2285 "parser.y"
     {
     (yyval.code) = code_new();
     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
     {
     (yyval.code) = code_new();
     code_t*loopstart = (yyval.code) = abc_label((yyval.code));
-    (yyval.code) = code_append((yyval.code), (yyvsp[(3) - (7)].code));
+    (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (6)].code));
     code_t*cont = (yyval.code) = abc_nop((yyval.code));
     code_t*cont = (yyval.code) = abc_nop((yyval.code));
-    (yyval.code) = code_append((yyval.code), (yyvsp[(6) - (7)].value).c);
+    (yyval.code) = code_append((yyval.code), (yyvsp[(5) - (6)].value).c);
     (yyval.code) = abc_iftrue((yyval.code), loopstart);
     code_t*out = (yyval.code) = abc_nop((yyval.code));
     (yyval.code) = abc_iftrue((yyval.code), loopstart);
     code_t*out = (yyval.code) = abc_nop((yyval.code));
-    breakjumpsto((yyval.code), (yyvsp[(1) - (7)].id), out);
-    continuejumpsto((yyval.code), (yyvsp[(1) - (7)].id), cont);
-    
-    (yyval.code) = var_block((yyval.code));
-    old_state();
+    breakjumpsto((yyval.code), (yyvsp[(1) - (6)].id), out);
+    continuejumpsto((yyval.code), (yyvsp[(1) - (6)].id), cont);
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 80:
+    case 82:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1963 "parser.y"
+#line 2297 "parser.y"
     {
     (yyval.code) = abc___break__(0, "");
 }
     {
     (yyval.code) = abc___break__(0, "");
 }
@@ -4530,11 +5027,10 @@ yyreduce:
 
 
   
 
 
   
-    case 81:
+    case 83:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1966 "parser.y"
+#line 2300 "parser.y"
     {
     (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
 }
     {
     (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
 }
@@ -4543,11 +5039,10 @@ yyreduce:
 
 
   
 
 
   
-    case 82:
+    case 84:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1969 "parser.y"
+#line 2303 "parser.y"
     {
     (yyval.code) = abc___continue__(0, "");
 }
     {
     (yyval.code) = abc___continue__(0, "");
 }
@@ -4556,11 +5051,10 @@ yyreduce:
 
 
   
 
 
   
-    case 83:
+    case 85:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1972 "parser.y"
+#line 2306 "parser.y"
     {
     (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
 }
     {
     (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
 }
@@ -4569,80 +5063,73 @@ yyreduce:
 
 
   
 
 
   
-    case 84:
+    case 86:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1976 "parser.y"
+#line 2310 "parser.y"
     {(yyval.code)=0;}
     }
     break;
 
 
   
     {(yyval.code)=0;}
     }
     break;
 
 
   
-    case 85:
+    case 87:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1977 "parser.y"
+#line 2311 "parser.y"
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
-    case 86:
+    case 88:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1978 "parser.y"
+#line 2312 "parser.y"
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
-    case 87:
+    case 89:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1979 "parser.y"
+#line 2313 "parser.y"
     {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
     }
     break;
 
 
   
     {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
     }
     break;
 
 
   
-    case 88:
+    case 90:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1980 "parser.y"
+#line 2314 "parser.y"
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
     {(yyval.code)=(yyvsp[(1) - (1)].code);}
     }
     break;
 
 
   
-    case 89:
+    case 91:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1981 "parser.y"
+#line 2315 "parser.y"
     {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
     }
     break;
 
 
   
     {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
     }
     break;
 
 
   
-    case 90:
+    case 92:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1983 "parser.y"
+#line 2317 "parser.y"
     {
     {
-    (yyval.code) = abc_dup(0);
-    (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c);
+    (yyval.code) = abc_getlocal(0, state->switch_var);
+    (yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
     code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
     if((yyval.code)->opcode != OPCODE___BREAK__) {
     code_t*j = (yyval.code) = abc_ifne((yyval.code), 0);
     (yyval.code) = code_append((yyval.code), (yyvsp[(4) - (4)].code));
     if((yyval.code)->opcode != OPCODE___BREAK__) {
@@ -4656,11 +5143,10 @@ yyreduce:
 
 
   
 
 
   
-    case 91:
+    case 93:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1994 "parser.y"
+#line 2328 "parser.y"
     {
     (yyval.code) = (yyvsp[(3) - (3)].code);
 }
     {
     (yyval.code) = (yyvsp[(3) - (3)].code);
 }
@@ -4669,26 +5155,26 @@ yyreduce:
 
 
   
 
 
   
-    case 92:
+    case 94:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1997 "parser.y"
-    {new_state();}
+#line 2331 "parser.y"
+    {PASS12 new_state();state->switch_var=alloc_local();}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 93:
+    case 95:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 1997 "parser.y"
+#line 2331 "parser.y"
     {
     {
-    (yyval.code)=(yyvsp[(4) - (8)].value).c;
+    (yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
+    (yyval.code) = abc_setlocal((yyval.code), state->switch_var);
     (yyval.code) = code_append((yyval.code), (yyvsp[(7) - (8)].code));
     (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;
     breakjumpsto((yyval.code), (yyvsp[(1) - (8)].id), out);
     
     code_t*c = (yyval.code),*lastblock=0;
@@ -4708,30 +5194,32 @@ yyreduce:
         c=c->prev;
     }
    
         c=c->prev;
     }
    
-    (yyval.code) = var_block((yyval.code));
-    old_state();
+    (yyval.code) = var_block((yyval.code), state->vars);
+    PASS12 old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 94:
+    case 96:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2026 "parser.y"
-    {new_state();state->exception_name=(yyvsp[(3) - (5)].id);new_variable((yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0);}
+#line 2362 "parser.y"
+    {PASS12 new_state();
+                                                      state->exception_name=(yyvsp[(3) - (5)].id);
+                                               PASS1 new_variable(state->method, (yyvsp[(3) - (5)].id), 0, 0, 0);
+                                               PASS2 new_variable(state->method, (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].classinfo), 0, 0);
+                                              }
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 95:
+    case 97:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2027 "parser.y"
+#line 2367 "parser.y"
     {
     namespace_t name_ns = {ACCESS_PACKAGE, ""};
     multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
     {
     namespace_t name_ns = {ACCESS_PACKAGE, ""};
     multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
@@ -4742,41 +5230,39 @@ yyreduce:
     (yyval.exception) = e;
 
     code_t*c = 0;
     (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);
     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 = code_append(c, (yyvsp[(8) - (9)].code));
     c = abc_kill(c, i);
 
-    c = var_block(c);
-    old_state();
+    c = var_block(c, state->vars);
+    PASS12 old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 96:
+    case 98:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2046 "parser.y"
-    {new_state();state->exception_name=0;}
+#line 2387 "parser.y"
+    {PASS12 new_state();state->exception_name=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 97:
+    case 99:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2046 "parser.y"
+#line 2387 "parser.y"
     {
     {
-    (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
+    (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code), state->vars);
     if(!(yyvsp[(4) - (5)].code)) {
         (yyval.exception)=0;
     if(!(yyvsp[(4) - (5)].code)) {
         (yyval.exception)=0;
-        old_state();
     } else {
         NEW(abc_exception_t, e)
         e->exc_type = 0; //all exceptions
     } else {
         NEW(abc_exception_t, e)
         e->exc_type = 0; //all exceptions
@@ -4784,53 +5270,49 @@ yyreduce:
         e->target = 0;
         e->to = abc_nop(0);
         e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
         e->target = 0;
         e->to = abc_nop(0);
         e->to = code_append(e->to, (yyvsp[(4) - (5)].code));
-        old_state();
         (yyval.exception) = e;
     }
         (yyval.exception) = e;
     }
+    PASS12 old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 98:
+    case 100:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2063 "parser.y"
+#line 2403 "parser.y"
     {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
     }
     break;
 
 
   
     {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
     }
     break;
 
 
   
-    case 99:
+    case 101:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2064 "parser.y"
+#line 2404 "parser.y"
     {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
     }
     break;
 
 
   
     {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
     }
     break;
 
 
   
-    case 100:
+    case 102:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2065 "parser.y"
+#line 2405 "parser.y"
     {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
     }
     break;
 
 
   
     {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
     }
     break;
 
 
   
-    case 101:
+    case 103:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2066 "parser.y"
+#line 2406 "parser.y"
     {
     (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
     (yyval.catch_list).finally = 0;
     {
     (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
     (yyval.catch_list).finally = 0;
@@ -4844,11 +5326,10 @@ yyreduce:
 
 
   
 
 
   
-    case 102:
+    case 104:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2074 "parser.y"
+#line 2414 "parser.y"
     {
     (yyval.catch_list).l=list_new();
     (yyval.catch_list).finally = 0;
     {
     (yyval.catch_list).l=list_new();
     (yyval.catch_list).finally = 0;
@@ -4862,22 +5343,23 @@ yyreduce:
 
 
   
 
 
   
-    case 103:
+    case 105:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2083 "parser.y"
-    {new_state();}
+#line 2423 "parser.y"
+    {PASS12 new_state();
+                 state->method->has_exceptions=1;
+                 state->method->late_binding=1;//for invariant scope_code
+                }
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 104:
+    case 106:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2083 "parser.y"
+#line 2426 "parser.y"
     {
     code_t*out = abc_nop(0);
 
     {
     code_t*out = abc_nop(0);
 
@@ -4890,7 +5372,7 @@ yyreduce:
   
     int tmp;
     if((yyvsp[(6) - (6)].catch_list).finally)
   
     int tmp;
     if((yyvsp[(6) - (6)].catch_list).finally)
-        tmp = new_variable("__finally__", 0, 0);
+        tmp = alloc_local();
     
     abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
     int count=0;
     
     abc_exception_list_t*l = (yyvsp[(6) - (6)].catch_list).l;
     int count=0;
@@ -4903,6 +5385,7 @@ yyreduce:
             parserassert((ptroff_t)(yyvsp[(6) - (6)].catch_list).finally);
             // finally block
             e->target = (yyval.code) = abc_nop((yyval.code));
             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));
         }
         
             (yyval.code) = abc___rethrow__((yyval.code));
         }
         
@@ -4917,19 +5400,18 @@ yyreduce:
         
     list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
    
         
     list_concat(state->method->exceptions, (yyvsp[(6) - (6)].catch_list).l);
    
-    (yyval.code) = var_block((yyval.code));
-    old_state();
+    (yyval.code) = var_block((yyval.code), state->vars);
+    PASS12 old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 105:
+    case 107:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2128 "parser.y"
+#line 2472 "parser.y"
     {
     (yyval.code)=(yyvsp[(2) - (2)].value).c;
     (yyval.code)=abc_throw((yyval.code));
     {
     (yyval.code)=(yyvsp[(2) - (2)].value).c;
     (yyval.code)=abc_throw((yyval.code));
@@ -4939,15 +5421,14 @@ yyreduce:
 
 
   
 
 
   
-    case 106:
+    case 108:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2132 "parser.y"
+#line 2476 "parser.y"
     {
     if(!state->exception_name)
         syntaxerror("re-throw only possible within a catch block");
     {
     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));
     (yyval.code)=code_new();
     (yyval.code)=abc_getlocal((yyval.code), v->index);
     (yyval.code)=abc_throw((yyval.code));
@@ -4957,116 +5438,178 @@ yyreduce:
 
 
   
 
 
   
-    case 107:
+    case 109:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2487 "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 110:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2143 "parser.y"
+#line 2497 "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));
      (yyval.code) = abc_popscope((yyval.code));
+     old_state();
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 109:
+    case 112:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2153 "parser.y"
+#line 2515 "parser.y"
     {PASS12 (yyval.id)="package";}
     }
     break;
 
 
   
     {PASS12 (yyval.id)="package";}
     }
     break;
 
 
   
-    case 110:
+    case 113:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2516 "parser.y"
+    {PASS12 (yyval.id)="namespace";}
+    }
+    break;
 
 
+
+  
+    case 114:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2155 "parser.y"
-    {PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
+#line 2517 "parser.y"
+    {PASS12 (yyval.id)="NaN";}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 111:
+    case 115:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2518 "parser.y"
+    {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
+    }
+    break;
+
 
 
+  
+    case 116:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2156 "parser.y"
-    {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
+#line 2520 "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;
 
 
   
     }
     break;
 
 
   
-    case 112:
+    case 117:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2521 "parser.y"
+    {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
+    }
+    break;
 
 
+
+  
+    case 118:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2158 "parser.y"
+#line 2523 "parser.y"
     {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
     }
     break;
 
 
   
     {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
     }
     break;
 
 
   
-    case 113:
+    case 119:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2159 "parser.y"
+#line 2524 "parser.y"
     {PASS12 endpackage();(yyval.code)=0;}
     }
     break;
 
 
   
     {PASS12 endpackage();(yyval.code)=0;}
     }
     break;
 
 
   
-    case 114:
+    case 120:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2160 "parser.y"
+#line 2525 "parser.y"
     {PASS12 startpackage("");}
     }
     break;
 
 
   
     {PASS12 startpackage("");}
     }
     break;
 
 
   
-    case 115:
+    case 121:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2161 "parser.y"
+#line 2526 "parser.y"
     {PASS12 endpackage();(yyval.code)=0;}
     }
     break;
 
 
   
     {PASS12 endpackage();(yyval.code)=0;}
     }
     break;
 
 
   
-    case 116:
+    case 122:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2549 "parser.y"
+    {
+       PASS12
+       slotinfo_t*s = registry_find(state->package, (yyvsp[(2) - (2)].id));
+       if(!s && as3_pass==1) {as3_schedule_class(state->package, (yyvsp[(2) - (2)].id));}
+       state_has_imports();
+       dict_put(state->imports, state->package, (yyvsp[(2) - (2)].id));
+       (yyval.code)=0;
+}
+    }
+    break;
 
 
+
+  
+    case 123:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2163 "parser.y"
+#line 2557 "parser.y"
     {
     {
-       PASS1 
-       if(!registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name)) {
+       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);
        }
            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();
        state_has_imports();
-       dict_put(state->imports, c->name, c);
+       dict_put(state->imports, (yyvsp[(2) - (2)].classinfo)->name, (yyvsp[(2) - (2)].classinfo));
+       import_toplevel((yyvsp[(2) - (2)].classinfo)->package);
        (yyval.code)=0;
 }
     }
        (yyval.code)=0;
 }
     }
@@ -5074,22 +5617,21 @@ yyreduce:
 
 
   
 
 
   
-    case 117:
+    case 124:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2177 "parser.y"
+#line 2568 "parser.y"
     {
     {
-       PASS1 
-       if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6)) {
+       PASS12
+       if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
            as3_schedule_package((yyvsp[(2) - (4)].id));
        }
 
            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);
        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;
 }
     }
        (yyval.code)=0;
 }
     }
@@ -5097,290 +5639,283 @@ yyreduce:
 
 
   
 
 
   
-    case 118:
+    case 125:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2193 "parser.y"
-    {PASS12 (yyval.flags)=0;}
+#line 2584 "parser.y"
+    {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 119:
+    case 126:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2194 "parser.y"
+#line 2585 "parser.y"
     {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
     }
     break;
 
 
   
     {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
     }
     break;
 
 
   
-    case 120:
+    case 127:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2195 "parser.y"
-    {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].token);}
+#line 2586 "parser.y"
+    {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 121:
+    case 128:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2196 "parser.y"
-    {PASS12 (yyval.flags)=(yyvsp[(1) - (2)].flags)|(yyvsp[(2) - (2)].token);}
+#line 2587 "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;
 
 
   
     }
     break;
 
 
   
-    case 122:
+    case 129:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2198 "parser.y"
-    {PASS12 (yyval.token)=FLAG_PUBLIC;}
+#line 2594 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 123:
+    case 130:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2199 "parser.y"
-    {PASS12 (yyval.token)=FLAG_PRIVATE;}
+#line 2595 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 124:
+    case 131:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2200 "parser.y"
-    {PASS12 (yyval.token)=FLAG_PROTECTED;}
+#line 2596 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 125:
+    case 132:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2201 "parser.y"
-    {PASS12 (yyval.token)=FLAG_STATIC;}
+#line 2597 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 126:
+    case 133:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2202 "parser.y"
-    {PASS12 (yyval.token)=FLAG_DYNAMIC;}
+#line 2598 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 127:
+    case 134:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2203 "parser.y"
-    {PASS12 (yyval.token)=FLAG_FINAL;}
+#line 2599 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 128:
+    case 135:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2204 "parser.y"
-    {PASS12 (yyval.token)=FLAG_OVERRIDE;}
+#line 2600 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 129:
+    case 136:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2205 "parser.y"
-    {PASS12 (yyval.token)=FLAG_NATIVE;}
+#line 2601 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 130:
+    case 137:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2206 "parser.y"
-    {PASS12 (yyval.token)=FLAG_PACKAGEINTERNAL;}
+#line 2602 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 131:
+    case 138:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2207 "parser.y"
-    {PASS12 (yyval.token)=FLAG_NAMESPACE;}
+#line 2603 "parser.y"
+    {PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
+                               (yyval.flags).ns=(yyvsp[(1) - (1)].id);
+                       }
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 132:
+    case 139:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2209 "parser.y"
-    {(yyval.classinfo)=registry_getobjectclass();}
+#line 2607 "parser.y"
+    {PASS12 (yyval.classinfo)=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 133:
+    case 140:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2210 "parser.y"
-    {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+#line 2608 "parser.y"
+    {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 134:
+    case 141:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2212 "parser.y"
+#line 2610 "parser.y"
     {PASS12 (yyval.classinfo_list)=list_new();}
     }
     break;
 
 
   
     {PASS12 (yyval.classinfo_list)=list_new();}
     }
     break;
 
 
   
-    case 135:
+    case 142:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2213 "parser.y"
+#line 2611 "parser.y"
     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
     }
     break;
 
 
   
     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
     }
     break;
 
 
   
-    case 136:
+    case 143:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2215 "parser.y"
+#line 2613 "parser.y"
     {PASS12 (yyval.classinfo_list)=list_new();}
     }
     break;
 
 
   
     {PASS12 (yyval.classinfo_list)=list_new();}
     }
     break;
 
 
   
-    case 137:
+    case 144:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2216 "parser.y"
+#line 2614 "parser.y"
     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
     }
     break;
 
 
   
     {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
     }
     break;
 
 
   
-    case 138:
+    case 145:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2220 "parser.y"
-    {PASS12 startclass((yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
+#line 2618 "parser.y"
+    {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 139:
+    case 146:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2222 "parser.y"
+#line 2620 "parser.y"
     {PASS12 endclass();(yyval.code)=0;}
     }
     break;
 
 
   
     {PASS12 endclass();(yyval.code)=0;}
     }
     break;
 
 
   
-    case 140:
+    case 147:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2226 "parser.y"
-    {PASS12 startclass((yyvsp[(1) - (5)].flags)|FLAG_INTERFACE,(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
+#line 2624 "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;
 
 
   
     }
     break;
 
 
   
-    case 141:
+    case 148:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2228 "parser.y"
+#line 2627 "parser.y"
     {PASS12 endclass();(yyval.code)=0;}
     }
     break;
 
 
   
     {PASS12 endclass();(yyval.code)=0;}
     }
     break;
 
 
   
-    case 150:
+    case 154:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2636 "parser.y"
+    {PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
+    }
+    break;
+
 
 
+  
+    case 157:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2241 "parser.y"
+#line 2640 "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));  
     c = code_append(c, (yyvsp[(1) - (1)].code));  
-    state->cls->static_init = c;
+    state->cls->static_init->header = c;
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 156:
+    case 163:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2252 "parser.y"
+#line 2651 "parser.y"
     {
     syntaxerror("variable declarations not allowed in interfaces");
 }
     {
     syntaxerror("variable declarations not allowed in interfaces");
 }
@@ -5389,19 +5924,18 @@ yyreduce:
 
 
   
 
 
   
-    case 157:
+    case 164:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2255 "parser.y"
+#line 2654 "parser.y"
     {
     PASS12
     {
     PASS12
-    (yyvsp[(1) - (8)].flags) |= FLAG_PUBLIC;
-    if((yyvsp[(1) - (8)].flags)&(FLAG_PRIVATE|FLAG_PACKAGEINTERNAL|FLAG_PROTECTED)) {
+    (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");
     }
         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);
 }
     }
     list_deep_free((yyvsp[(6) - (8)].params).list);
 }
     }
@@ -5409,77 +5943,126 @@ yyreduce:
 
 
   
 
 
   
-    case 160:
+    case 167:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2270 "parser.y"
-    {
-    int flags = (yyvsp[(1) - (5)].flags);
-    U8 access = flags2access((yyvsp[(1) - (5)].flags));
-
-    varinfo_t* info = 0;
-    if(state->cls) {
-        memberinfo_t*i = registry_findmember(state->cls->info, (yyvsp[(3) - (5)].id), 1);
-        if(i) {
-            check_override(i, flags);
-        }
-
-        info = varinfo_register_onclass(state->cls->info, access, (yyvsp[(3) - (5)].id));
-    } else {
-        slotinfo_t*i = registry_find(state->package, (yyvsp[(3) - (5)].id));
-        if(i) {
-            syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(3) - (5)].id));
-        }
-        info = varinfo_register_global(access, state->package, (yyvsp[(3) - (5)].id));
+#line 2729 "parser.y"
+    {PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
     }
     }
+    break;
 
 
-    info->type = (yyvsp[(4) - (5)].classinfo);
-    info->flags = flags;
 
 
-    /* slot name */
-    namespace_t mname_ns = {access, ""};
-    multiname_t mname = {QNAME, &mname_ns, 0, (yyvsp[(3) - (5)].id)};
   
   
-    trait_list_t**traits;
-    code_t**code;
-    if(!state->cls) {
-        // global variable
-        mname_ns.name = state->package;
-        traits = &global->init->traits;
-        code = &global->init->method->body->code;
-    } else if(flags&FLAG_STATIC) {
-        // static variable
-        traits = &state->cls->abc->static_traits;
-        code = &state->cls->static_init;
-    } else {
-        // instance variable
-        traits = &state->cls->abc->traits;
-        code = &state->cls->init;
-    }
-    
-    trait_t*t=0;
-    if((yyvsp[(4) - (5)].classinfo)) {
-        MULTINAME(m, (yyvsp[(4) - (5)].classinfo));
-        t = trait_new_member(traits, multiname_clone(&m), multiname_clone(&mname), 0);
-    } else {
-        t = trait_new_member(traits, 0, multiname_clone(&mname), 0);
+    case 168:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2729 "parser.y"
+    {PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
     }
     }
-    info->slot = t->slot_id;
-    
-    /* initalization code (if needed) */
-    code_t*c = 0;
-    if((yyvsp[(5) - (5)].value).c && !is_pushundefined((yyvsp[(5) - (5)].value).c)) {
-        c = abc_getlocal_0(c);
-        c = code_append(c, (yyvsp[(5) - (5)].value).c);
-        c = converttype(c, (yyvsp[(5) - (5)].value).t, (yyvsp[(4) - (5)].classinfo));
-        c = abc_setslot(c, t->slot_id);
+    break;
+
+
+  
+    case 169:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2731 "parser.y"
+    {PASS12 (yyval.code)=0;}
+    }
+    break;
+
+
+  
+    case 170:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2732 "parser.y"
+    {PASS12 (yyval.code)=0;}
+    }
+    break;
+
+
+  
+    case 171:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2735 "parser.y"
+    {
+PASS12
+    int flags = slotstate_flags->flags;
+    namespace_t ns = modifiers2access(slotstate_flags);
+
+    if(as3_pass == 1) {
+
+        varinfo_t* info = 0;
+        if(state->cls) {
+            memberinfo_t*i = registry_findmember(state->cls->info, ns.name, (yyvsp[(1) - (3)].id), 1);
+            if(i) {
+                check_override(i, flags);
+            }
+            info = varinfo_register_onclass(state->cls->info, ns.access, ns.name, (yyvsp[(1) - (3)].id));
+        } else {
+            slotinfo_t*i = registry_find(state->package, (yyvsp[(1) - (3)].id));
+            if(i) {
+                syntaxerror("package %s already contains '%s'", state->package, (yyvsp[(1) - (3)].id));
+            }
+            if(ns.name && ns.name[0]) {
+                syntaxerror("namespaces not allowed on package-level variables");
+            }
+            info = varinfo_register_global(ns.access, state->package, (yyvsp[(1) - (3)].id));
+        }
+
+        info->type = (yyvsp[(2) - (3)].classinfo);
+        info->flags = flags;
+        
+        dict_put(global->token2info, (void*)(ptroff_t)as3_tokencount, info);
     }
 
     }
 
-    *code = code_append(*code, c);
+    if(as3_pass == 2) {
+        varinfo_t*info = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
 
 
-    if((yyvsp[(2) - (5)].token)==KW_CONST) {
-        t->kind= TRAIT_CONST;
+        multiname_t mname;
+        code_t**code;
+        trait_t*t = add_abc_slot(slotstate_flags, (yyvsp[(1) - (3)].id), &mname, &code);
+
+        if((yyvsp[(2) - (3)].classinfo)) {
+            MULTINAME(m, (yyvsp[(2) - (3)].classinfo));
+            t->type_name = multiname_clone(&m);
+        }
+        info->slot = t->slot_id;
+        
+        /* workaround for "VerifyError: Error #1053: Illegal override of ::test2 in C1" 
+           FIXME: is there a way to use slots and still don't have conflicting overrides?
+        */
+        info->slot = t->slot_id = 0;
+       
+        constant_t cval = (yyvsp[(3) - (3)].node)->type->eval((yyvsp[(3) - (3)].node));
+        if(cval.type!=CONSTANT_UNKNOWN) {
+            /* compile time constant */
+            t->value = malloc(sizeof(constant_t));
+            memcpy(t->value, &cval, sizeof(constant_t));
+            info->value = constant_clone(t->value);
+        } else {
+            typedcode_t v = node_read((yyvsp[(3) - (3)].node));
+            /* initalization code (if needed) */
+            code_t*c = 0;
+            if(v.c && !is_pushundefined(v.c)) {
+                c = abc_getlocal_0(c);
+                c = code_append(c, v.c);
+                c = converttype(c, v.t, (yyvsp[(2) - (3)].classinfo));
+                if(!t->slot_id) {
+                    c = abc_initproperty2(c, &mname);
+                } else {
+                    c = abc_setslot(c, t->slot_id);
+                }
+            }
+            *code = code_append(*code, c);
+        }
+
+        if(slotstate_varconst==KW_CONST) {
+            t->kind= TRAIT_CONST;
+            info->flags |= FLAG_CONST;
+        }
     }
 
     (yyval.code)=0;
     }
 
     (yyval.code)=0;
@@ -5489,315 +6072,620 @@ yyreduce:
 
 
   
 
 
   
-    case 161:
+    case 172:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2343 "parser.y"
+#line 2818 "parser.y"
     {(yyval.constant)=0;}
     }
     break;
 
 
   
     {(yyval.constant)=0;}
     }
     break;
 
 
   
-    case 162:
+    case 173:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2819 "parser.y"
+    {
+  (yyval.constant) = malloc(sizeof(constant_t));
+  *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
+  if((yyval.constant)->type == CONSTANT_UNKNOWN) {
+    syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
+  }
+}
+    }
+    break;
 
 
+
+  
+    case 174:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2344 "parser.y"
-    {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
+#line 2828 "parser.y"
+    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 163:
+    case 175:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2829 "parser.y"
+    {
+    (yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
+}
+    }
+    break;
+
 
 
+  
+    case 176:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2346 "parser.y"
-    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));}
+#line 2832 "parser.y"
+    {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 164:
+    case 177:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2833 "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 178:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2347 "parser.y"
-    {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
+#line 2834 "parser.y"
+    {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 165:
+    case 179:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2835 "parser.y"
+    {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
+    }
+    break;
+
 
 
+  
+    case 180:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2348 "parser.y"
-    {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));}
+#line 2836 "parser.y"
+    {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 166:
+    case 181:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2837 "parser.y"
+    {(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
+    }
+    break;
+
 
 
+  
+    case 182:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2349 "parser.y"
-    {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
+#line 2838 "parser.y"
+    {(yyval.constant) = constant_new_float(__builtin_nan(""));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 167:
+    case 183:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2851 "parser.y"
+    {
+   multiname_t m = {QNAME, &stdns, 0, "XML"};
+   typedcode_t v;
+   v.c = 0;
+   v.c = abc_getlex2(v.c, &m);
+   v.c = code_append(v.c, node_read((yyvsp[(1) - (1)].node)).c);
+   v.c = abc_construct(v.c, 1);
+   v.t = TYPE_XML;
+   (yyval.node) = mkcodenode(v);
+}
+    }
+    break;
+
 
 
+  
+    case 184:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2350 "parser.y"
-    {(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
+#line 2862 "parser.y"
+    {PASS_ALWAYS if(!xml_level++) tokenizer_begin_xml();}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 168:
+    case 185:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2863 "parser.y"
+    {PASS_ALWAYS tokenizer_begin_xmltext();}
+    }
+    break;
+
 
 
+  
+    case 186:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2352 "parser.y"
-    {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
+#line 2864 "parser.y"
+    {PASS_ALWAYS if(!--xml_level) tokenizer_end_xml(); else tokenizer_begin_xmltext();}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 169:
+    case 187:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2866 "parser.y"
+    {PASS_ALWAYS tokenizer_begin_xmltext();}
+    }
+    break;
+
 
 
+  
+    case 188:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2353 "parser.y"
-    {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
+#line 2866 "parser.y"
+    {
+    (yyval.node) = (yyvsp[(2) - (4)].node);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 170:
+    case 189:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2869 "parser.y"
+    {PASS_ALWAYS tokenizer_begin_xml();}
+    }
+    break;
 
 
+
+  
+    case 190:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2354 "parser.y"
-    {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
+#line 2869 "parser.y"
+    {
+    (yyval.node) = (yyvsp[(2) - (4)].node);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 171:
+    case 191:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2872 "parser.y"
+    {(yyval.node)=mkstringnode("");}
+    }
+    break;
 
 
+
+  
+    case 192:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2355 "parser.y"
+#line 2873 "parser.y"
     {
     {
-    // TODO
-    as3_warning("Couldn't resolve %s", (yyvsp[(1) - (1)].id));
-    (yyval.constant) = constant_new_null((yyvsp[(1) - (1)].id));
+    (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 172:
+    case 193:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2876 "parser.y"
+    {
+    char* str = string_cstr(&(yyvsp[(2) - (2)].str));
+    (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),mkstringnode(str));
+    free(str);
+}
+    }
+    break;
+
 
 
+  
+    case 194:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2364 "parser.y"
+#line 2881 "parser.y"
     {
     {
-    PASS12
-    memset(&(yyval.params),0,sizeof((yyval.params)));
+    (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkstringnode(">"));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 173:
+    case 195:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2884 "parser.y"
+    {
+    (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
+}
+    }
+    break;
+
 
 
+  
+    case 196:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2368 "parser.y"
+#line 2887 "parser.y"
     {
     {
-    PASS12
-    (yyval.params)=(yyvsp[(1) - (1)].params);
+    (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 174:
+    case 197:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2890 "parser.y"
+    {
+    (yyval.node) = mkstringnode((yyvsp[(1) - (1)].id));
+}
+    }
+    break;
 
 
+
+  
+    case 198:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2374 "parser.y"
+#line 2893 "parser.y"
     {
     {
-    PASS12
-    memset(&(yyval.params),0,sizeof((yyval.params)));
-    (yyval.params).varargs=1;
-    list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
+    (yyval.node) = (yyvsp[(1) - (1)].node);
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 175:
+    case 199:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2897 "parser.y"
+    {
+    (yyval.node) = mkstringnode("");
+}
+    }
+    break;
 
 
+
+  
+    case 200:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2380 "parser.y"
+#line 2900 "parser.y"
     {
     {
-    PASS12
-    (yyval.params) =(yyvsp[(1) - (4)].params);
-    (yyval.params).varargs=1;
-    list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
+    (yyval.node) = mkaddnode(mkstringnode(" "),(yyvsp[(1) - (1)].node));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 176:
+    case 201:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2904 "parser.y"
+    {
+    //$$ = allocprintf("<%s%s/>", $2, $3, $5, $8);
+    (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkstringnode("<"),(yyvsp[(2) - (6)].node)),(yyvsp[(3) - (6)].node)),mkstringnode("/>"));
+}
+    }
+    break;
+
+
+  
+    case 202:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2908 "parser.y"
+    {
+    //$$ = allocprintf("<%s%s>%s</%s>", $2, $3, $5, $8);
+    (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
+         mkstringnode("<"),(yyvsp[(2) - (10)].node)),(yyvsp[(3) - (10)].node)),mkstringnode(">")),(yyvsp[(5) - (10)].node)),mkstringnode("</")),(yyvsp[(8) - (10)].node)),mkstringnode(">"));
+}
+    }
+    break;
+
 
 
+  
+    case 203:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2388 "parser.y"
+#line 2913 "parser.y"
     {
     {
-    PASS12
-    (yyval.params) = (yyvsp[(1) - (3)].params);
-    list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
+    //$$ = allocprintf("<%s%s>%s%s</%s>", $2, $3, $5, $6, $9);
+    (yyval.node) = mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(mkaddnode(
+         mkstringnode("<"),(yyvsp[(2) - (11)].node)),(yyvsp[(3) - (11)].node)),mkstringnode(">")),(yyvsp[(5) - (11)].node)),(yyvsp[(6) - (11)].node)),mkstringnode("</")),(yyvsp[(9) - (11)].node)),mkstringnode(">"));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 177:
+    case 204:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2919 "parser.y"
+    {
+    (yyval.node) = (yyvsp[(1) - (1)].node);
+}
+    }
+    break;
+
 
 
+  
+    case 205:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2393 "parser.y"
+#line 2922 "parser.y"
     {
     {
-    PASS12
-    memset(&(yyval.params),0,sizeof((yyval.params)));
-    list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
+    (yyval.node) = mkaddnode((yyvsp[(1) - (2)].node), mkaddnode(mkstringnode(" "),(yyvsp[(2) - (2)].node)));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 178:
+    case 206:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2925 "parser.y"
+    {
+    (yyval.node) = (yyvsp[(1) - (1)].node);
+}
+    }
+    break;
 
 
+
+  
+    case 207:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2399 "parser.y"
+#line 2928 "parser.y"
     {
     {
-     PASS1 (yyval.param)=0;
-     PASS2
-     (yyval.param) = malloc(sizeof(param_t));
-     (yyval.param)->name=(yyvsp[(1) - (4)].id);
-     (yyval.param)->type = (yyvsp[(3) - (4)].classinfo);
-     (yyval.param)->value = (yyvsp[(4) - (4)].constant);
+    char* str = string_cstr(&(yyvsp[(3) - (3)].str));
+    (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkstringnode(concat2("=",str)));
+    free(str);
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 179:
+    case 208:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2933 "parser.y"
+    {
+    (yyval.node) = mkaddnode((yyvsp[(1) - (3)].node), mkaddnode(mkstringnode("=\""), mkaddnode((yyvsp[(3) - (3)].node), mkstringnode("\""))));
+}
+    }
+    break;
+
 
 
+  
+    case 209:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2407 "parser.y"
+#line 2936 "parser.y"
     {
     {
-     PASS1 (yyval.param)=0;
-     PASS2
-     (yyval.param) = malloc(sizeof(param_t));
-     (yyval.param)->name=(yyvsp[(1) - (2)].id);
-     (yyval.param)->type = TYPE_ANY;
-     (yyval.param)->value = (yyvsp[(2) - (2)].constant);
+    (yyval.node) = mkaddnode(mkaddnode(mkstringnode(concat2((yyvsp[(1) - (3)].id),"=\"")), (yyvsp[(3) - (3)].node)), mkstringnode("\""));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 180:
+    case 210:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2939 "parser.y"
+    {
+    char* str = string_cstr(&(yyvsp[(3) - (3)].str));
+    (yyval.node)=mkstringnode(allocprintf("%s=%s", (yyvsp[(1) - (3)].id),str));
+    free(str);
+    free((yyvsp[(1) - (3)].id));free((char*)(yyvsp[(3) - (3)].str).str);
+}
+    }
+    break;
 
 
+
+  
+    case 211:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2415 "parser.y"
-    {(yyval.token)=(yyvsp[(1) - (1)].token);}
+#line 2949 "parser.y"
+    {
+    PASS12
+    memset(&(yyval.params),0,sizeof((yyval.params)));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 181:
+    case 212:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2953 "parser.y"
+    {
+    PASS12
+    (yyval.params)=(yyvsp[(1) - (1)].params);
+}
+    }
+    break;
 
 
+
+  
+    case 213:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2416 "parser.y"
-    {(yyval.token)=(yyvsp[(1) - (1)].token);}
+#line 2959 "parser.y"
+    {
+    PASS12
+    memset(&(yyval.params),0,sizeof((yyval.params)));
+    (yyval.params).varargs=1;
+    list_append((yyval.params).list, (yyvsp[(2) - (2)].param));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 182:
+    case 214:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2965 "parser.y"
+    {
+    PASS12
+    (yyval.params) =(yyvsp[(1) - (4)].params);
+    (yyval.params).varargs=1;
+    list_append((yyval.params).list, (yyvsp[(4) - (4)].param));
+}
+    }
+    break;
+
 
 
+  
+    case 215:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2417 "parser.y"
-    {(yyval.token)=0;}
+#line 2973 "parser.y"
+    {
+    PASS12
+    (yyval.params) = (yyvsp[(1) - (3)].params);
+    list_append((yyval.params).list, (yyvsp[(3) - (3)].param));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 183:
+    case 216:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2978 "parser.y"
+    {
+    PASS12
+    memset(&(yyval.params),0,sizeof((yyval.params)));
+    list_append((yyval.params).list, (yyvsp[(1) - (1)].param));
+}
+    }
+    break;
+
+
+  
+    case 217:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2984 "parser.y"
+    {
+     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 218:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 2992 "parser.y"
+    {
+     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 221:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2420 "parser.y"
-    {PASS12 startfunction(0,(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
+#line 3002 "parser.y"
+    {PASS12 (yyval.token)=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 184:
+    case 222:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3005 "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 223:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2421 "parser.y"
+#line 3006 "parser.y"
     {
     {
-    PASS1 old_state();list_deep_free((yyvsp[(6) - (12)].params).list);
+    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");
     
     PASS2
     if(!state->method->info) syntaxerror("internal error");
     
-    code_t*c = method_header();
+    code_t*c = method_header(state->method);
     c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
 
     c = wrap_function(c, 0, (yyvsp[(11) - (12)].code));
 
-    endfunction(0,(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
+    endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),(yyvsp[(8) - (12)].classinfo),c);
+    PASS12
     list_deep_free((yyvsp[(6) - (12)].params).list);
     (yyval.code)=0;
 }
     list_deep_free((yyvsp[(6) - (12)].params).list);
     (yyval.code)=0;
 }
@@ -5806,65 +6694,73 @@ yyreduce:
 
 
   
 
 
   
-    case 186:
+    case 225:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2435 "parser.y"
+#line 3022 "parser.y"
     {PASS12 (yyval.id)=0;}
     }
     break;
 
 
   
     {PASS12 (yyval.id)=0;}
     }
     break;
 
 
   
-    case 187:
+    case 226:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2437 "parser.y"
+#line 3024 "parser.y"
     {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
     }
     break;
 
 
   
     {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
     }
     break;
 
 
   
-    case 188:
+    case 227:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2438 "parser.y"
+#line 3025 "parser.y"
     {
     {
-    PASS1 old_state();list_deep_free((yyvsp[(4) - (10)].params).list);
+    PASS1
+    endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
     PASS2
     methodinfo_t*f = state->method->info;
     PASS2
     methodinfo_t*f = state->method->info;
-    if(!f) syntaxerror("internal error");
+    if(!f || !f->kind) syntaxerror("internal error");
     
     
-    code_t*c = method_header();
+    code_t*c = method_header(state->method);
     c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
 
     int index = state->method->var_index;
     c = wrap_function(c, 0, (yyvsp[(9) - (10)].code));
 
     int index = state->method->var_index;
-    endfunction(0,0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),(yyvsp[(6) - (10)].classinfo),c);
-    list_deep_free((yyvsp[(4) - (10)].params).list);
+    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);
     
     (yyval.value).c = abc_getlocal(0, index);
     (yyval.value).t = TYPE_FUNCTION(f);
+
+    PASS12 list_deep_free((yyvsp[(4) - (10)].params).list);
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 189:
+    case 228:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2458 "parser.y"
+#line 3047 "parser.y"
     {
     {
-    PASS1 (yyval.classinfo)=0;
+    PASS1 NEW(unresolvedinfo_t,c);
+          memset(c, 0, sizeof(*c));
+          c->kind = INFOTYPE_UNRESOLVED;
+          c->name = (yyvsp[(1) - (1)].id);
+          c->package = get_package_from_name((yyvsp[(1) - (1)].id));
+          if(!c->package) {
+              c->nsset = get_current_imports();
+              /* make the compiler look for this class in the current directory,
+                 just in case: */
+              as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
+          }
+          (yyval.classinfo) = (classinfo_t*)c;
     PASS2
     PASS2
-    /* try current package */
     slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
     slotinfo_t*s = find_class((yyvsp[(1) - (1)].id));
-    if(!s) syntaxerror("Could not find class/method %s\n", (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;
 }
     }
     (yyval.classinfo) = (classinfo_t*)s;
 }
     }
@@ -5872,17 +6768,17 @@ yyreduce:
 
 
   
 
 
   
-    case 190:
+    case 229:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2467 "parser.y"
+#line 3066 "parser.y"
     {
     {
-    PASS1 static classinfo_t c;
-          memset(&c, 0, sizeof(c));
-          c.package = (yyvsp[(1) - (3)].id);
-          c.name = (yyvsp[(3) - (3)].id);
-          (yyval.classinfo)=&c;
+    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));
     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));
@@ -5894,122 +6790,111 @@ yyreduce:
 
 
   
 
 
   
-    case 193:
+    case 232:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2483 "parser.y"
+#line 3083 "parser.y"
     {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
     }
     break;
 
 
   
     {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
     }
     break;
 
 
   
-    case 194:
+    case 233:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2484 "parser.y"
+#line 3084 "parser.y"
     {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
     }
     break;
 
 
   
     {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
     }
     break;
 
 
   
-    case 195:
+    case 234:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2486 "parser.y"
-    {(yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
+#line 3086 "parser.y"
+    {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 196:
+    case 235:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2487 "parser.y"
-    {(yyval.classinfo)=registry_getanytype();}
+#line 3087 "parser.y"
+    {PASS12 (yyval.classinfo)=TYPE_ANY;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 197:
+    case 236:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2488 "parser.y"
-    {(yyval.classinfo)=registry_getanytype();}
+#line 3088 "parser.y"
+    {PASS12 (yyval.classinfo)=TYPE_VOID;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 198:
+    case 237:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2497 "parser.y"
-    {(yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
+#line 3097 "parser.y"
+    {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 199:
+    case 238:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2498 "parser.y"
-    {(yyval.classinfo)=0;}
+#line 3098 "parser.y"
+    {PASS12 (yyval.classinfo)=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 200:
+    case 239:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2502 "parser.y"
-    {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
+#line 3102 "parser.y"
+    {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 201:
+    case 240:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2503 "parser.y"
+#line 3103 "parser.y"
     {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
     }
     break;
 
 
   
     {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
     }
     break;
 
 
   
-    case 202:
+    case 241:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2505 "parser.y"
-    {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
+#line 3105 "parser.y"
+    {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 205:
+    case 244:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2509 "parser.y"
-    {(yyval.value_list).len=1;
+#line 3109 "parser.y"
+    {(yyval.value_list).number=1;
                                                   (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
                                                  }
     }
                                                   (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
                                                  }
     }
@@ -6017,24 +6902,22 @@ yyreduce:
 
 
   
 
 
   
-    case 206:
+    case 245:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2513 "parser.y"
+#line 3113 "parser.y"
     {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
     }
     break;
 
 
   
     {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
     }
     break;
 
 
   
-    case 207:
+    case 246:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2514 "parser.y"
+#line 3114 "parser.y"
     {
     {
-                                                  (yyval.value_list).len= (yyvsp[(1) - (2)].value_list).len+1;
+                                                  (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);
                                                   }
     }
                                                   (yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
                                                   }
     }
@@ -6042,13 +6925,13 @@ yyreduce:
 
 
   
 
 
   
-    case 209:
+    case 248:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2520 "parser.y"
+#line 3120 "parser.y"
     {
     {
-    (yyval.value).c = (yyvsp[(2) - (4)].value).c;
+    typedcode_t v = node_read((yyvsp[(2) - (4)].node));
+    (yyval.value).c = v.c;
     if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
     
     code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
     if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c);
     
     code_t*paramcode = (yyvsp[(4) - (4)].value_list).cc;
@@ -6056,23 +6939,33 @@ 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);
         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).len);
+        (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).number);
         multiname_destroy(name);
         multiname_destroy(name);
-    } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
-        int slot = (int)(ptroff_t)(yyval.value).c->data[0];
-        trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
-        multiname_t*name = t->name;
-        (yyval.value).c = code_cutlast((yyval.value).c);
+    } else if(is_getlocal((yyval.value).c)) {
+        (yyval.value).c = code_append((yyval.value).c, paramcode);
+        (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
+    } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
+        code_free((yyval.value).c);
+        classinfo_t*c = v.t->data;
+        MULTINAME(m, c);
+        (yyval.value).c = abc_findpropstrict2(0, &m);
         (yyval.value).c = code_append((yyval.value).c, paramcode);
         (yyval.value).c = code_append((yyval.value).c, paramcode);
-        (yyval.value).c = abc_constructprop2((yyval.value).c, name, (yyvsp[(4) - (4)].value_list).len);
+        (yyval.value).c = abc_constructprop2((yyval.value).c, &m, (yyvsp[(4) - (4)].value_list).number);
+    /*} else if($$.c->opcode == OPCODE_GETSLOT) {
+        int slot = (int)(ptroff_t)$$.c->data[0];
+        trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);//FIXME
+        multiname_t*name = t->name;
+        $$.c = code_cutlast($$.c);
+        $$.c = code_append($$.c, paramcode);
+        $$.c = abc_constructprop2($$.c, name, $4.number);*/
     } else {
         (yyval.value).c = code_append((yyval.value).c, paramcode);
     } else {
         (yyval.value).c = code_append((yyval.value).c, paramcode);
-        (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).len);
+        (yyval.value).c = abc_construct((yyval.value).c, (yyvsp[(4) - (4)].value_list).number);
     }
    
     (yyval.value).t = TYPE_ANY;
     }
    
     (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;
+    if(TYPE_IS_CLASS(v.t) && v.t->data) {
+        (yyval.value).t = v.t->data;
     } else {
         (yyval.value).c = abc_coerce_a((yyval.value).c);
         (yyval.value).t = TYPE_ANY;
     } else {
         (yyval.value).c = abc_coerce_a((yyval.value).c);
         (yyval.value).t = TYPE_ANY;
@@ -6083,14 +6976,14 @@ yyreduce:
 
 
   
 
 
   
-    case 210:
+    case 249:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2556 "parser.y"
+#line 3167 "parser.y"
     {
     {
-    
-    (yyval.value).c = (yyvsp[(1) - (4)].value).c;
+   
+    typedcode_t v = node_read((yyvsp[(1) - (4)].node));
+    (yyval.value).c = v.c;
     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
         (yyval.value).c = code_cutlast((yyval.value).c);
     }
     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
         (yyval.value).c = code_cutlast((yyval.value).c);
     }
@@ -6101,36 +6994,39 @@ 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);
         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);
         multiname_destroy(name);
-    } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
-        int slot = (int)(ptroff_t)(yyval.value).c->data[0];
-        trait_t*t = abc_class_find_slotid(state->cls->abc,slot);//FIXME
+/*    } else if($$.c->opcode == OPCODE_GETSLOT && $$.c->prev->opcode != OPCODE_GETSCOPEOBJECT) {
+        int slot = (int)(ptroff_t)$$.c->data[0];
+        trait_t*t = traits_find_slotid(state->cls->abc->traits,slot);
         if(t->kind!=TRAIT_METHOD) {
             //ok: flash allows to assign closures to members.
         }
         multiname_t*name = t->name;
         if(t->kind!=TRAIT_METHOD) {
             //ok: flash allows to assign closures to members.
         }
         multiname_t*name = t->name;
-        (yyval.value).c = code_cutlast((yyval.value).c);
-        (yyval.value).c = code_append((yyval.value).c, paramcode);
+        $$.c = code_cutlast($$.c);
+        $$.c = code_append($$.c, paramcode);
         //$$.c = abc_callmethod($$.c, t->method, len); //#1051 illegal early access binding
         //$$.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);
+        $$.c = abc_callproperty2($$.c, name, $3.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);
     } 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_getglobalscope((yyval.value).c);
         (yyval.value).c = code_append((yyval.value).c, paramcode);
         multiname_destroy(name);
     } else {
         (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);
     }
    
     }
    
-    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;
+    if(TYPE_IS_FUNCTION(v.t) && v.t->data) {
+        (yyval.value).t = ((methodinfo_t*)(v.t->data))->return_type;
+    } else if(TYPE_IS_CLASS(v.t) && v.t->data) {
+        // calling a class is like a typecast
+        (yyval.value).t = (classinfo_t*)v.t->data;
     } else {
     } else {
-        (yyval.value).c = abc_coerce_a((yyval.value).c);
         (yyval.value).t = TYPE_ANY;
         (yyval.value).t = TYPE_ANY;
+        (yyval.value).c = abc_coerce_a((yyval.value).c);
     }
 }
     }
     }
 }
     }
@@ -6138,11 +7034,10 @@ yyreduce:
 
 
   
 
 
   
-    case 211:
+    case 250:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2602 "parser.y"
+#line 3217 "parser.y"
     {
     if(!state->cls) syntaxerror("super() not allowed outside of a class");
     if(!state->method) syntaxerror("super() not allowed outside of a function");
     {
     if(!state->cls) syntaxerror("super() not allowed outside of a class");
     if(!state->method) syntaxerror("super() not allowed outside of a function");
@@ -6159,7 +7054,7 @@ yyreduce:
     */
     state->method->has_super = 1;
 
     */
     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;
 }
     (yyval.value).c = abc_pushundefined((yyval.value).c);
     (yyval.value).t = TYPE_ANY;
 }
@@ -6168,13 +7063,13 @@ yyreduce:
 
 
   
 
 
   
-    case 212:
+    case 251:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2623 "parser.y"
+#line 3238 "parser.y"
     {
     {
-    (yyval.value).c = (yyvsp[(2) - (2)].value).c;
+    typedcode_t v = node_read((yyvsp[(2) - (2)].node));
+    (yyval.value).c = v.c;
     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
         (yyval.value).c = code_cutlast((yyval.value).c);
     }
     if((yyval.value).c->opcode == OPCODE_COERCE_A) {
         (yyval.value).c = code_cutlast((yyval.value).c);
     }
@@ -6183,12 +7078,12 @@ 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];
         (yyval.value).c->opcode = OPCODE_DELETEPROPERTY;
     } else if((yyval.value).c->opcode == OPCODE_GETSLOT) {
         int slot = (int)(ptroff_t)(yyval.value).c->data[0];
-        multiname_t*name = abc_class_find_slotid(state->cls->abc,slot)->name;
+        multiname_t*name = traits_find_slotid(state->cls->abc->traits,slot)->name;
         (yyval.value).c = code_cutlast((yyval.value).c);
         (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
     } else {
         (yyval.value).c = abc_getlocal_0((yyval.value).c);
         (yyval.value).c = code_cutlast((yyval.value).c);
         (yyval.value).c = abc_deleteproperty2((yyval.value).c, name);
     } else {
         (yyval.value).c = abc_getlocal_0((yyval.value).c);
-        MULTINAME_LATE(m, (yyvsp[(2) - (2)].value).t?(yyvsp[(2) - (2)].value).t->access:ACCESS_PACKAGE, "");
+        MULTINAME_LATE(m, v.t?v.t->access:ACCESS_PACKAGE, "");
         (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
     }
     (yyval.value).t = TYPE_BOOLEAN;
         (yyval.value).c = abc_deleteproperty2((yyval.value).c, &m);
     }
     (yyval.value).t = TYPE_BOOLEAN;
@@ -6198,11 +7093,10 @@ yyreduce:
 
 
   
 
 
   
-    case 213:
+    case 252:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2644 "parser.y"
+#line 3260 "parser.y"
     {
     (yyval.code) = abc_returnvoid(0);
 }
     {
     (yyval.code) = abc_returnvoid(0);
 }
@@ -6211,11 +7105,10 @@ yyreduce:
 
 
   
 
 
   
-    case 214:
+    case 253:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2647 "parser.y"
+#line 3263 "parser.y"
     {
     (yyval.code) = (yyvsp[(2) - (2)].value).c;
     (yyval.code) = abc_returnvalue((yyval.code));
     {
     (yyval.code) = (yyvsp[(2) - (2)].value).c;
     (yyval.code) = abc_returnvalue((yyval.code));
@@ -6225,1447 +7118,1341 @@ yyreduce:
 
 
   
 
 
   
-    case 215:
+    case 254:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2654 "parser.y"
-    {(yyval.value)=(yyvsp[(1) - (1)].value);}
+#line 3270 "parser.y"
+    {
+    (yyval.value) = node_read((yyvsp[(1) - (1)].node));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 216:
+    case 255:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2655 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3273 "parser.y"
+    {
+    (yyval.value) = node_read((yyvsp[(1) - (1)].node));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 217:
+    case 256:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2656 "parser.y"
+#line 3276 "parser.y"
     {
     {
-    (yyval.value).c = (yyvsp[(1) - (3)].value).c;
-    (yyval.value).c = cut_last_push((yyval.value).c);
-    (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
-    (yyval.value).t = (yyvsp[(3) - (3)].value).t;
+    (yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 218:
+    case 257:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2662 "parser.y"
+#line 3279 "parser.y"
     {
     {
-    (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c);
+    (yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 219:
+    case 258:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3282 "parser.y"
+    { 
+    (yyval.code) = node_exec((yyvsp[(1) - (1)].node)); 
+}
+    }
+    break;
 
 
+
+  
+    case 259:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2668 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3285 "parser.y"
+    { 
+    (yyval.code) = (yyvsp[(1) - (3)].code);
+    (yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node))); 
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 221:
+    case 260:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3290 "parser.y"
+    {(yyval.value_list).cc=0;(yyval.value_list).number=0;}
+    }
+    break;
+
 
 
+  
+    case 261:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2672 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3291 "parser.y"
+    {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 222:
+    case 262:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3293 "parser.y"
+    {(yyval.code)=abc_pushstring(0,(yyvsp[(1) - (1)].id));}
+    }
+    break;
+
 
 
+  
+    case 263:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2674 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3294 "parser.y"
+    {(yyval.code)=abc_pushstring2(0,&(yyvsp[(1) - (1)].str));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 223:
+    case 264:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3295 "parser.y"
+    {syntaxerror("dictionary keys must be strings");}
+    }
+    break;
 
 
+
+  
+    case 265:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2676 "parser.y"
-    {(yyval.value) = (yyvsp[(1) - (1)].value);}
+#line 3296 "parser.y"
+    {syntaxerror("dictionary keys must be strings");}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 225:
+    case 266:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3297 "parser.y"
+    {syntaxerror("dictionary keys must be strings");}
+    }
+    break;
+
 
 
+  
+    case 267:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2680 "parser.y"
+#line 3299 "parser.y"
     {
     {
-    (yyval.value).c = 0;
-    namespace_t ns = {ACCESS_PACKAGE, ""};
-    multiname_t m = {QNAME, &ns, 0, "RegExp"};
-    if(!(yyvsp[(1) - (1)].regexp).options) {
-        (yyval.value).c = abc_getlex2((yyval.value).c, &m);
-        (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
-        (yyval.value).c = abc_construct((yyval.value).c, 1);
-    } else {
-        (yyval.value).c = abc_getlex2((yyval.value).c, &m);
-        (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).pattern);
-        (yyval.value).c = abc_pushstring((yyval.value).c, (yyvsp[(1) - (1)].regexp).options);
-        (yyval.value).c = abc_construct((yyval.value).c, 2);
-    }
-    (yyval.value).t = TYPE_REGEXP;
+    (yyval.value_list).cc = 0;
+    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].code));
+    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
+    (yyval.value_list).number = 2;
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 226:
+    case 268:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2697 "parser.y"
-    {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint));
-                   //MULTINAME(m, registry_getintclass());
-                   //$$.c = abc_coerce2($$.c, &m); // FIXME
-                   (yyval.value).t = TYPE_INT;
-                  }
+#line 3305 "parser.y"
+    {
+    (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
+    (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
+    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].code));
+    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 227:
+    case 269:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2702 "parser.y"
-    {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint));
-                    (yyval.value).t = TYPE_INT;
-                   }
+#line 3314 "parser.y"
+    {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 228:
+    case 270:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2705 "parser.y"
-    {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int));
-                  (yyval.value).t = TYPE_INT;
-                 }
+#line 3315 "parser.y"
+    {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 229:
+    case 271:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2708 "parser.y"
-    {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint));
-                   (yyval.value).t = TYPE_UINT;
-                  }
+#line 3316 "parser.y"
+    {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 230:
+    case 272:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2711 "parser.y"
-    {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float));
-                    (yyval.value).t = TYPE_FLOAT;
-                   }
+#line 3317 "parser.y"
+    {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 231:
+    case 273:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2714 "parser.y"
-    {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str);
-                     (yyval.value).t = TYPE_STRING;
-                    }
+#line 3318 "parser.y"
+    {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 232:
+    case 274:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2717 "parser.y"
-    {(yyval.value).c = abc_pushundefined(0);
-                    (yyval.value).t = TYPE_ANY;
-                   }
+#line 3319 "parser.y"
+    {(yyval.node) = (yyvsp[(1) - (1)].node);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 233:
+    case 275:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2720 "parser.y"
-    {(yyval.value).c = abc_pushtrue(0);
-                    (yyval.value).t = TYPE_BOOLEAN;
-                   }
+#line 3321 "parser.y"
+    { 
+    (yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 234:
+    case 276:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2723 "parser.y"
-    {(yyval.value).c = abc_pushfalse(0);
-                     (yyval.value).t = TYPE_BOOLEAN;
-                    }
+#line 3325 "parser.y"
+    {
+    (yyval.node) = (yyvsp[(1) - (1)].node);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 235:
+    case 277:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2726 "parser.y"
-    {(yyval.value).c = abc_pushnull(0);
-                    (yyval.value).t = TYPE_NULL;
-                   }
+#line 3330 "parser.y"
+    {
+    typedcode_t v;
+    v.c = 0;
+    multiname_t m = {QNAME, &stdns, 0, "RegExp"};
+    if(!(yyvsp[(1) - (1)].regexp).options) {
+        v.c = abc_getlex2(v.c, &m);
+        v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
+        v.c = abc_construct(v.c, 1);
+    } else {
+        v.c = abc_getlex2(v.c, &m);
+        v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).pattern);
+        v.c = abc_pushstring(v.c, (yyvsp[(1) - (1)].regexp).options);
+        v.c = abc_construct(v.c, 2);
+    }
+    v.t = TYPE_REGEXP;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 236:
+    case 278:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2730 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
-             (yyval.value).t = TYPE_BOOLEAN;
-            }
+#line 3348 "parser.y"
+    {
+    PASS1
+    state->method->need_arguments = 1;
+    PASS2
+    typedcode_t v;
+    v.c = abc_getlocal(0, state->method->need_arguments);
+    v.t = TYPE_ARRAY;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 237:
+    case 279:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2733 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);
-             (yyval.value).t = TYPE_BOOLEAN;
-            }
+#line 3359 "parser.y"
+    {
+    typedcode_t v;
+    v.c = code_new();
+    v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
+    v.c = abc_newarray(v.c, (yyvsp[(2) - (3)].value_list).number);
+    v.t = registry_getarrayclass();
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 238:
+    case 280:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2736 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3369 "parser.y"
+    {
+    typedcode_t v;
+    v.c = code_new();
+    v.c = code_append(v.c, (yyvsp[(2) - (3)].value_list).cc);
+    v.c = abc_newobject(v.c, (yyvsp[(2) - (3)].value_list).number/2);
+    v.t = registry_getobjectclass();
+    (yyval.node) =  mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 239:
+    case 281:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2739 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3378 "parser.y"
+    {(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 240:
+    case 282:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2742 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3379 "parser.y"
+    {(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 241:
+    case 283:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2745 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-              }
+#line 3380 "parser.y"
+    {(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 242:
+    case 284:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2748 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3381 "parser.y"
+    {(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 243:
+    case 285:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2751 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3382 "parser.y"
+    {(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 244:
+    case 286:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2755 "parser.y"
-    {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O');
-              (yyval.value).c = (yyvsp[(1) - (3)].value).c;
-              (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
-              (yyval.value).c = abc_dup((yyval.value).c);
-              code_t*jmp = (yyval.value).c = abc_iftrue((yyval.value).c, 0);
-              (yyval.value).c = cut_last_push((yyval.value).c);
-              (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
-              (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
-              code_t*label = (yyval.value).c = abc_label((yyval.value).c);
-              jmp->branch = label;
-             }
+#line 3383 "parser.y"
+    {(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 245:
+    case 287:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2766 "parser.y"
-    {
-              (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A');
-              /*printf("%08x:\n",$1.t);
-              code_dump($1.c, 0, 0, "", stdout);
-              printf("%08x:\n",$3.t);
-              code_dump($3.c, 0, 0, "", stdout);
-              printf("joining %08x and %08x to %08x\n", $1.t, $3.t, $$.t);*/
-              (yyval.value).c = (yyvsp[(1) - (3)].value).c;
-              (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t);
-              (yyval.value).c = abc_dup((yyval.value).c);
-              code_t*jmp = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
-              (yyval.value).c = cut_last_push((yyval.value).c);
-              (yyval.value).c = code_append((yyval.value).c,(yyvsp[(3) - (3)].value).c);
-              (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (3)].value).t, (yyval.value).t);
-              code_t*label = (yyval.value).c = abc_label((yyval.value).c);
-              jmp->branch = label;              
-             }
+#line 3384 "parser.y"
+    {(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 246:
+    case 288:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2784 "parser.y"
-    {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
-              (yyval.value).c = abc_not((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3385 "parser.y"
+    {(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 247:
+    case 289:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2789 "parser.y"
-    {(yyval.value).c=(yyvsp[(2) - (2)].value).c;
-              (yyval.value).c = abc_bitnot((yyval.value).c);
-              (yyval.value).t = TYPE_INT;
-             }
+#line 3386 "parser.y"
+    {(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 248:
+    case 290:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2794 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_bitand((yyval.value).c);
-             (yyval.value).t = TYPE_INT;
-            }
+#line 3387 "parser.y"
+    {(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 249:
+    case 291:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2799 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_bitxor((yyval.value).c);
-             (yyval.value).t = TYPE_INT;
-            }
+#line 3388 "parser.y"
+    {(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 250:
+    case 292:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3389 "parser.y"
+    {(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
+    }
+    break;
+
 
 
+  
+    case 293:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2804 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_bitor((yyval.value).c);
-             (yyval.value).t = TYPE_INT;
-            }
+#line 3390 "parser.y"
+    {(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 251:
+    case 294:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3391 "parser.y"
+    {(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
+    }
+    break;
+
 
 
+  
+    case 295:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2809 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_rshift((yyval.value).c);
-             (yyval.value).t = TYPE_INT;
-            }
+#line 3392 "parser.y"
+    {(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 252:
+    case 296:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3393 "parser.y"
+    {(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
+    }
+    break;
+
 
 
+  
+    case 297:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2813 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_urshift((yyval.value).c);
-             (yyval.value).t = TYPE_INT;
-            }
+#line 3394 "parser.y"
+    {(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 253:
+    case 298:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3395 "parser.y"
+    {(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
+    }
+    break;
+
 
 
+  
+    case 299:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2817 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_lshift((yyval.value).c);
-             (yyval.value).t = TYPE_INT;
-            }
+#line 3396 "parser.y"
+    {(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 254:
+    case 300:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3397 "parser.y"
+    {(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
+    }
+    break;
+
 
 
+  
+    case 301:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2822 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_divide((yyval.value).c);
-             (yyval.value).t = TYPE_NUMBER;
-            }
+#line 3398 "parser.y"
+    {(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 255:
+    case 302:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3399 "parser.y"
+    {(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
+    }
+    break;
 
 
+
+  
+    case 303:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2826 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             (yyval.value).c = abc_modulo((yyval.value).c);
-             (yyval.value).t = TYPE_NUMBER;
-            }
+#line 3400 "parser.y"
+    {(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 256:
+    case 304:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3401 "parser.y"
+    {(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
+    }
+    break;
 
 
+
+  
+    case 305:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2830 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) {
-                (yyval.value).c = abc_add_i((yyval.value).c);
-                (yyval.value).t = TYPE_INT;
-             } else {
-                (yyval.value).c = abc_add((yyval.value).c);
-                (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t,'+');
-             }
-            }
+#line 3402 "parser.y"
+    {(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 257:
+    case 306:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2839 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
-                (yyval.value).c = abc_subtract_i((yyval.value).c);
-                (yyval.value).t = TYPE_INT;
-             } else {
-                (yyval.value).c = abc_subtract((yyval.value).c);
-                (yyval.value).t = TYPE_NUMBER;
-             }
-            }
+#line 3403 "parser.y"
+    {(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 258:
+    case 307:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2848 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-             if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
-                (yyval.value).c = abc_multiply_i((yyval.value).c);
-                (yyval.value).t = TYPE_INT;
-             } else {
-                (yyval.value).c = abc_multiply((yyval.value).c);
-                (yyval.value).t = TYPE_NUMBER;
-             }
-            }
+#line 3404 "parser.y"
+    {(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 259:
+    case 308:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2858 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);
-              (yyval.value).c = abc_in((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3405 "parser.y"
+    {(yyval.node) = mknode1(&node_typeof, (yyvsp[(2) - (2)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 260:
+    case 309:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2863 "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) && (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->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;
-              }
-             }
+#line 3406 "parser.y"
+    {(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 261:
+    case 310:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2876 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
-              (yyval.value).c = abc_instanceof((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3407 "parser.y"
+    { (yyval.node) = mkconstnode(constant_new_undefined());}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 262:
+    case 311:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2881 "parser.y"
-    {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c);
-              (yyval.value).c = abc_istypelate((yyval.value).c);
-              (yyval.value).t = TYPE_BOOLEAN;
-             }
+#line 3408 "parser.y"
+    { (yyval.node)=(yyvsp[(2) - (3)].node);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 263:
+    case 312:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2886 "parser.y"
-    {
-              (yyval.value).c = (yyvsp[(3) - (4)].value).c;
-              (yyval.value).c = abc_typeof((yyval.value).c);
-              (yyval.value).t = TYPE_STRING;
-             }
+#line 3409 "parser.y"
+    {(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 264:
+    case 313:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2892 "parser.y"
-    {
-              (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c);
-              (yyval.value).c = abc_pushundefined((yyval.value).c);
-              (yyval.value).t = TYPE_ANY;
-             }
+#line 3410 "parser.y"
+    {(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 265:
+    case 314:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2898 "parser.y"
-    { (yyval.value).c = abc_pushundefined(0);
-             (yyval.value).t = TYPE_ANY;
-           }
+#line 3411 "parser.y"
+    {(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 266:
+    case 315:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2902 "parser.y"
-    {(yyval.value)=(yyvsp[(2) - (3)].value);}
+#line 3412 "parser.y"
+    {(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 267:
+    case 316:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2904 "parser.y"
-    {
-  (yyval.value)=(yyvsp[(2) - (2)].value);
-  if(IS_INT((yyvsp[(2) - (2)].value).t)) {
-   (yyval.value).c=abc_negate_i((yyval.value).c);
-   (yyval.value).t = TYPE_INT;
-  } else {
-   (yyval.value).c=abc_negate((yyval.value).c);
-   (yyval.value).t = TYPE_NUMBER;
-  }
-}
+#line 3413 "parser.y"
+    {(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 268:
+    case 317:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2915 "parser.y"
-    {
-  (yyval.value).c = (yyvsp[(1) - (4)].value).c;
-  (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c);
-
-  MULTINAME_LATE(m, (yyvsp[(1) - (4)].value).t?(yyvsp[(1) - (4)].value).t->access:ACCESS_PACKAGE, "");
-  (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
-  (yyval.value).t = 0; // array elements have unknown type
-}
+#line 3414 "parser.y"
+    {(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 269:
+    case 318:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2924 "parser.y"
-    {
-    (yyval.value).c = code_new();
-    (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
-    (yyval.value).c = abc_newarray((yyval.value).c, (yyvsp[(2) - (3)].value_list).len);
-    (yyval.value).t = registry_getarrayclass();
-}
+#line 3415 "parser.y"
+    {(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 270:
+    case 319:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2931 "parser.y"
-    {(yyval.value_list).cc=0;(yyval.value_list).len=0;}
+#line 3416 "parser.y"
+    { (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 271:
+    case 320:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2932 "parser.y"
-    {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
+#line 3417 "parser.y"
+    { (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 272:
+    case 321:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2934 "parser.y"
-    {
-    (yyval.value_list).cc = 0;
-    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
-    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (3)].value).c);
-    (yyval.value_list).len = 2;
-}
+#line 3418 "parser.y"
+    { (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 273:
+    case 322:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2940 "parser.y"
-    {
-    (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
-    (yyval.value_list).len = (yyvsp[(1) - (5)].value_list).len+2;
-    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(3) - (5)].value).c);
-    (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(5) - (5)].value).c);
-}
+#line 3419 "parser.y"
+    { (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 274:
+    case 323:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2949 "parser.y"
-    {
-    (yyval.value).c = code_new();
-    (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc);
-    (yyval.value).c = abc_newobject((yyval.value).c, (yyvsp[(2) - (3)].value_list).len/2);
-    (yyval.value).t = registry_getobjectclass();
-}
+#line 3420 "parser.y"
+    { (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 275:
+    case 324:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2956 "parser.y"
-    { 
-               code_t*c = (yyvsp[(3) - (3)].value).c;
-               if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) {
-                c=abc_multiply_i(c);
-               } else {
-                c=abc_multiply(c);
-               }
-               c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '*'), (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3421 "parser.y"
+    { (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 276:
+    case 325:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2968 "parser.y"
-    { 
-               code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c);
-               c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3422 "parser.y"
+    { (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 277:
+    case 326:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2974 "parser.y"
-    { 
-               code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c);
-               c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3423 "parser.y"
+    { (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 278:
+    case 327:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2980 "parser.y"
-    { 
-               code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c);
-               c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3425 "parser.y"
+    { (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 279:
+    case 328:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2986 "parser.y"
-    { 
-               code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c);
-               c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3426 "parser.y"
+    { (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 280:
+    case 329:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2992 "parser.y"
-    { 
-               code_t*c = abc_divide((yyvsp[(3) - (3)].value).c);
-               c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3427 "parser.y"
+    {(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 281:
+    case 330:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 2998 "parser.y"
-    { 
-               code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c);
-               c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t);
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3428 "parser.y"
+    {(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 282:
+    case 331:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3004 "parser.y"
-    { 
-               code_t*c = (yyvsp[(3) - (3)].value).c;
-
-               if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
-                c=abc_add_i(c);
-               } else {
-                c=abc_add(c);
-                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '+'), (yyvsp[(1) - (3)].value).t);
-               }
-               
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-              }
+#line 3431 "parser.y"
+    { if(!state->cls->info)
+                  syntaxerror("super keyword not allowed outside a class");
+              classinfo_t*t = state->cls->info->superclass;
+              if(!t) t = TYPE_OBJECT;
+              memberinfo_t*f = findmember_nsset(t, (yyvsp[(3) - (3)].id), 1);
+              MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
+              typedcode_t v;
+              v.c = 0;
+              v.c = abc_getlocal_0(v.c);
+              v.c = abc_getsuper2(v.c, &m);
+              v.t = slotinfo_gettype((slotinfo_t*)f);
+              (yyval.node) = mkcodenode(v);
+           }
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 283:
+    case 332:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3017 "parser.y"
-    { code_t*c = (yyvsp[(3) - (3)].value).c; 
-               if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) {
-                c=abc_subtract_i(c);
-               } else {
-                c=abc_subtract(c);
-                c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '-'), (yyvsp[(1) - (3)].value).t);
-               }
-               
-               (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 0, 0);
-               (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-             }
+#line 3445 "parser.y"
+    {
+    typedcode_t v;
+    multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(2) - (2)].id)};
+    v.c = abc_getlex2(0, &m);
+    v.t = TYPE_STRING;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 284:
+    case 333:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3028 "parser.y"
-    { code_t*c = 0;
-              c = code_append(c, (yyvsp[(3) - (3)].value).c);
-              c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t);
-              (yyval.value).c = toreadwrite((yyvsp[(1) - (3)].value).c, c, 1, 0);
-              (yyval.value).t = (yyvsp[(1) - (3)].value).t;
-            }
+#line 3453 "parser.y"
+    {PASS12 new_state();state->xmlfilter=1;}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 285:
+    case 334:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3035 "parser.y"
-    { 
-              (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?');
-              (yyval.value).c = (yyvsp[(1) - (5)].value).c;
-              code_t*j1 = (yyval.value).c = abc_iffalse((yyval.value).c, 0);
-              (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (5)].value).c);
-              (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
-              code_t*j2 = (yyval.value).c = abc_jump((yyval.value).c, 0);
-              (yyval.value).c = j1->branch = abc_label((yyval.value).c);
-              (yyval.value).c = code_append((yyval.value).c, (yyvsp[(5) - (5)].value).c);
-              (yyval.value).c = converttype((yyval.value).c, (yyvsp[(3) - (5)].value).t, (yyval.value).t);
-              (yyval.value).c = j2->branch = abc_label((yyval.value).c);
-            }
+#line 3453 "parser.y"
+    {
+    PASS1 old_state();
+    PASS2
+    typedcode_t v = node_read((yyvsp[(1) - (6)].node));
+    typedcode_t w = node_read((yyvsp[(5) - (6)].node));
+    code_t*c = 0;
+    int index = alloc_local();
+    int result = alloc_local();
+    int tmp = alloc_local();
+    int xml = alloc_local();
+    
+    c = code_append(c, v.c);
+    c = abc_checkfilter(c);
+    c = abc_coerce_a(c); //hasnext2 converts to *
+    c = abc_setlocal(c, xml);
+    multiname_t m = {QNAME, &stdns, 0, "XMLList"};
+    c = abc_getlex2(c, &m);
+    c = abc_construct(c, 0);
+    c = abc_setlocal(c, result);
+    c = abc_pushbyte(c, 0);
+    c = abc_setlocal(c, index);
+    code_t*jmp = c = abc_jump(c, 0);
+    code_t*loop = c = abc_label(c);
+    c = abc_getlocal(c, xml);
+    c = abc_getlocal(c, index);
+    c = abc_nextvalue(c);
+    c = abc_dup(c);
+    c = abc_setlocal(c, tmp);
+    c = abc_pushwith(c);
+    c = code_append(c, w.c);
+    c = abc_popscope(c);
+    code_t*b = c = abc_iffalse(c, 0);
+    c = abc_getlocal(c, result);
+    c = abc_getlocal(c, index);
+    c = abc_getlocal(c, tmp);
+    multiname_t m2 = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
+    c = abc_setproperty2(c, &m2);
+    c = b->branch = jmp->branch = abc_nop(c);
+    c = abc_kill(c, tmp);
+    c = abc_hasnext2(c, xml, index);
+    c = abc_iftrue(c, loop);
+    c = abc_getlocal(c, result);
+    c = abc_kill(c, xml);
+    c = abc_kill(c, result);
+    c = abc_kill(c, index);
+    
+    c = var_block(c, state->vars);
+    old_state();
+    typedcode_t r;
+    r.c = c;
+    r.t = TYPE_XMLLIST;
+    (yyval.node) = mkcodenode(r);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 286:
+    case 335:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3048 "parser.y"
-    { code_t*c = 0;
-             classinfo_t*type = (yyvsp[(1) - (2)].value).t;
-             if((is_getlocal((yyvsp[(1) - (2)].value).c) && TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
-                 int nr = getlocalnr((yyvsp[(1) - (2)].value).c);
-                 code_free((yyvsp[(1) - (2)].value).c);(yyvsp[(1) - (2)].value).c=0;
-                 if(TYPE_IS_INT((yyvsp[(1) - (2)].value).t)) {
-                    (yyval.value).c = abc_getlocal(0, nr);
-                    (yyval.value).c = abc_inclocal_i((yyval.value).c, nr);
-                 } else if(TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t)) {
-                    (yyval.value).c = abc_getlocal(0, nr);
-                    (yyval.value).c = abc_inclocal((yyval.value).c, nr);
-                 } else syntaxerror("internal error");
-             } else {
-                 if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
-                     c=abc_increment_i(c);
-                     type = TYPE_INT;
-                 } else {
-                     c=abc_increment(c);
-                     type = TYPE_NUMBER;
-                 }
-                 c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
-                 (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
-                 (yyval.value).t = (yyvsp[(1) - (2)].value).t;
-             }
-           }
+#line 3507 "parser.y"
+    {(yyval.id)=(yyvsp[(1) - (1)].id);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 287:
+    case 336:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3075 "parser.y"
-    { code_t*c = 0;
-             classinfo_t*type = (yyvsp[(1) - (2)].value).t;
-             if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
-                 c=abc_decrement_i(c);
-                 type = TYPE_INT;
-             } else {
-                 c=abc_decrement(c);
-                 type = TYPE_NUMBER;
-             }
-             c=converttype(c, type, (yyvsp[(1) - (2)].value).t);
-             (yyval.value).c = toreadwrite((yyvsp[(1) - (2)].value).c, c, 0, 1);
-             (yyval.value).t = (yyvsp[(1) - (2)].value).t;
-            }
+#line 3508 "parser.y"
+    {(yyval.id)="*";}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 288:
+    case 337:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3089 "parser.y"
-    { code_t*c = 0;
-             classinfo_t*type = (yyvsp[(2) - (2)].value).t;
-             if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
-                 c=abc_increment_i(c);
-                 type = TYPE_INT;
-             } else {
-                 c=abc_increment(c);
-                 type = TYPE_NUMBER;
-             }
-             c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
-             (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
-             (yyval.value).t = (yyvsp[(2) - (2)].value).t;
-           }
+#line 3509 "parser.y"
+    {(yyval.id)=(char*)(yyvsp[(1) - (1)].id);}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 289:
+    case 339:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3103 "parser.y"
-    { code_t*c = 0;
-             classinfo_t*type = (yyvsp[(2) - (2)].value).t;
-             if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) {
-                 c=abc_decrement_i(c);
-                 type = TYPE_INT;
-             } else {
-                 c=abc_decrement(c);
-                 type = TYPE_NUMBER;
-             }
-             c=converttype(c, type, (yyvsp[(2) - (2)].value).t);
-             (yyval.value).c = toreadwrite((yyvsp[(2) - (2)].value).c, c, 0, 0);
-             (yyval.value).t = (yyvsp[(2) - (2)].value).t;
-           }
+#line 3511 "parser.y"
+    {(yyval.id)="*";}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 290:
+    case 340:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3118 "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 = {f->access, ""};
-              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 = slotinfo_gettype((slotinfo_t*)f);
-           }
+#line 3519 "parser.y"
+    {
+    typedcode_t v = node_read((yyvsp[(1) - (5)].node));
+    typedcode_t w = node_read(resolve_identifier((yyvsp[(3) - (5)].id)));
+    v.c = code_append(v.c, w.c);
+    if(!TYPE_IS_NAMESPACE(w.t)) {
+        as3_softwarning("%s might not be a namespace", (yyvsp[(3) - (5)].id));
+    }
+    v.c = converttype(v.c, w.t, TYPE_NAMESPACE);
+    multiname_t m = {RTQNAME, 0, 0, (yyvsp[(5) - (5)].id)};
+    v.c = abc_getproperty2(v.c, &m);
+    if(TYPE_IS_XML(v.t)) {
+        v.t = TYPE_XMLLIST;
+    } else {
+        v.c = abc_coerce_a(v.c);
+        v.t = TYPE_ANY;
+    }
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 291:
+    case 341:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3132 "parser.y"
+#line 3537 "parser.y"
     {
     {
-              // attribute TODO
-              (yyval.value).c = abc_pushundefined(0);
-              (yyval.value).t = 0;
-              as3_warning("ignored @ operator");
-           }
+    typedcode_t v = node_read((yyvsp[(1) - (3)].node));
+    multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
+    v.c = abc_getdescendants2(v.c, &m);
+    v.t = TYPE_XMLLIST;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 292:
+    case 342:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3139 "parser.y"
+#line 3544 "parser.y"
     {
     {
-              // child attribute  TODO
-              (yyval.value).c = abc_pushundefined(0);
-              (yyval.value).t = 0;
-              as3_warning("ignored .@ operator");
-           }
+    typedcode_t v = node_read((yyvsp[(1) - (5)].node));
+    typedcode_t w = node_read((yyvsp[(4) - (5)].node));
+    multiname_t m = {MULTINAMEL, 0, &nopackage_namespace_set, 0};
+    v.c = code_append(v.c, w.c);
+    v.c = converttype(w.c, w.t, TYPE_STRING);
+    v.c = abc_getproperty2(v.c, &m);
+    v.t = TYPE_XMLLIST;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 293:
+    case 343:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3146 "parser.y"
+#line 3555 "parser.y"
     {
     {
-              // namespace declaration TODO
-              (yyval.value).c = abc_pushundefined(0);
-              (yyval.value).t = 0;
-              as3_warning("ignored :: operator");
-           }
+    typedcode_t v = node_read((yyvsp[(1) - (4)].node));
+    multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
+    v.c = abc_getproperty2(v.c, &m);
+    v.t = TYPE_STRING;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 294:
+    case 344:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3153 "parser.y"
+#line 3562 "parser.y"
     {
     {
-              // descendants TODO
-              (yyval.value).c = abc_pushundefined(0);
-              (yyval.value).t = 0;
-              as3_warning("ignored .. operator");
-           }
+    typedcode_t v = node_read((yyvsp[(1) - (4)].node));
+    multiname_t m = {MULTINAMEA, 0, &nopackage_namespace_set, (yyvsp[(4) - (4)].id)};
+    v.c = abc_getdescendants2(v.c, &m);
+    v.t = TYPE_STRING;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 295:
+    case 345:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3160 "parser.y"
+#line 3569 "parser.y"
     {
     {
-              // filter TODO
-              (yyval.value).c = abc_pushundefined(0);
-              (yyval.value).t = 0;
-              as3_warning("ignored .() operator");
-           }
+    typedcode_t v = node_read((yyvsp[(1) - (6)].node));
+    typedcode_t w = node_read((yyvsp[(5) - (6)].node));
+    multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
+    v.c = code_append(v.c, w.c);
+    v.c = converttype(w.c, w.t, TYPE_STRING);
+    v.c = abc_getproperty2(v.c, &m);
+    v.t = TYPE_STRING;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 296:
+    case 346:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3172 "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) {
-                 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 = slotinfo_gettype((slotinfo_t*)f);
-                 if(!(yyval.value).t)
-                    (yyval.value).c = abc_coerce_a((yyval.value).c);
-             } else {
-                 /* when resolving a property on an unknown type, we do know the
-                    name of the property (and don't seem to need the package), but
-                    we need to make avm2 try out all access modes */
-                 multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
-                 (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
-                 (yyval.value).c = abc_coerce_a((yyval.value).c);
-                 (yyval.value).t = registry_getanytype();
-             }
-            }
+#line 3579 "parser.y"
+    {
+    typedcode_t v = node_read((yyvsp[(1) - (6)].node));
+    typedcode_t w = node_read((yyvsp[(5) - (6)].node));
+    multiname_t m = {MULTINAMELA, 0, &nopackage_namespace_set, 0};
+    v.c = code_append(v.c, w.c);
+    v.c = converttype(w.c, w.t, TYPE_STRING);
+    v.c = abc_getdescendants2(v.c, &m);
+    v.t = TYPE_STRING;
+    (yyval.node) = mkcodenode(v);
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 297:
+    case 347:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3205 "parser.y"
+#line 3590 "parser.y"
     {
     {
-    (yyval.value).t = 0;
-    (yyval.value).c = 0;
-    slotinfo_t*a = 0;
-    memberinfo_t*f = 0;
-
-    variable_t*v;
-    /* look at variables */
-    if((v = find_variable((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;
-    }
-
-    int i_am_static = (state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC;
-
-    /* look at current class' members */
-    if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
-        (f->flags&FLAG_STATIC) >= i_am_static) {
-        // $1 is a function in this class
-        int var_is_static = (f->flags&FLAG_STATIC);
-
-        if(f->kind == INFOTYPE_METHOD) {
-            (yyval.value).t = TYPE_FUNCTION(f);
-        } else {
-            (yyval.value).t = f->type;
+    typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
+    (yyval.value).c = v1.c;
+    classinfo_t*t = v1.t;
+    char is_static = 0;
+    if(TYPE_IS_CLASS(t) && t->data) {
+        t = t->data;
+        is_static = 1;
+    }
+    if(TYPE_IS_XML(t)) {
+        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 = TYPE_XMLLIST;
+    } else if(t) {
+        if(t->subtype==INFOTYPE_UNRESOLVED) {
+            syntaxerror("syntaxerror: trying to resolve property '%s' on incomplete object '%s'", (yyvsp[(3) - (3)].id), t->name);
         }
         }
-        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 = {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);
+        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);
             (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
-            break;
         } else {
         } else {
-            namespace_t ns = {f->access, ""};
-            multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
-            (yyval.value).c = abc_getlocal_0((yyval.value).c);
+            if(!f) {
+                if(!TYPE_IS_XMLLIST(t)) {
+                    as3_softwarning("Access of undefined property '%s' in %s", (yyvsp[(3) - (3)].id), t->name);
+                }
+            }
+            MEMBER_MULTINAME(m, f, (yyvsp[(3) - (3)].id));
             (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
             (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
-            break;
         }
         }
-    } 
-    
-    /* look at actual classes, in the current package and imported */
-    if((a = find_class((yyvsp[(1) - (1)].id)))) {
-        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),(yyvsp[(1) - (1)].id), a->package, state->package);
-
-        if(a->kind != INFOTYPE_CLASS) {
-            MULTINAME(m, a);
-            (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
-            (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
-            if(a->kind == INFOTYPE_METHOD) {
-                methodinfo_t*f = (methodinfo_t*)a;
-                (yyval.value).t = TYPE_FUNCTION(f);
-            } else {
-                varinfo_t*v = (varinfo_t*)a;
-                (yyval.value).t = v->type;
-            }
+        /* determine type */
+        (yyval.value).t = slotinfo_gettype((slotinfo_t*)f);
+        if(!(yyval.value).t)
+           (yyval.value).c = abc_coerce_a((yyval.value).c);
+        
+    } else if(v1.c && v1.c->opcode == OPCODE___PUSHPACKAGE__) {
+        string_t*package = v1.c->data[0];
+        char*package2 = concat3(package->str, ".", (yyvsp[(3) - (3)].id));
+
+        slotinfo_t*a = registry_find(package->str, (yyvsp[(3) - (3)].id));
+        if(a) {
+            (yyval.value) = push_class(a);
+        } else if(dict_contains(state->import_toplevel_packages, package2) ||
+                  registry_ispackage(package2)) {
+            (yyval.value).c = v1.c;
+            (yyval.value).c->data[0] = string_new4(package2);
+            (yyval.value).t = 0;
         } else {
         } else {
-            classinfo_t*c = (classinfo_t*)a;
-            if(c->slot) {
-                (yyval.value).c = abc_getglobalscope((yyval.value).c);
-                (yyval.value).c = abc_getslot((yyval.value).c, c->slot);
-            } else {
-                MULTINAME(m, c);
-                (yyval.value).c = abc_getlex2((yyval.value).c, &m);
-            }
-            (yyval.value).t = TYPE_CLASS(c);
+            syntaxerror("couldn't resolve %s", package2);
         }
         }
-        break;
+    } else {
+        /* when resolving a property on an unknown type, we do know the
+           name of the property (and don't seem to need the package), but
+           we need to make avm2 try out all access modes */
+        as3_softwarning("Resolving %s on unknown type", (yyvsp[(3) - (3)].id));
+        multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(3) - (3)].id)};
+        (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
+        (yyval.value).c = abc_coerce_a((yyval.value).c);
+        (yyval.value).t = TYPE_ANY;
+    }
+}
     }
     }
+    break;
 
 
-    /* unknown object, let the avm2 resolve it */
-    if(1) {
-        as3_softwarning("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)};
 
 
-        (yyval.value).t = 0;
-        (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
-        (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
+  
+    case 348:
+    if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3770 "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(!find_variable(state, (yyvsp[(1) - (1)].id))) {
+        unknown_variable((yyvsp[(1) - (1)].id));
+        /* let the compiler know that it might want to check the current directory/package
+           for this identifier- maybe there's a file $1.as defining $1. */
+        as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
     }
     }
+   
+    (yyval.node) = 0;
+    PASS2
+
+    (yyval.node) = resolve_identifier((yyvsp[(1) - (1)].id));
 }
     }
     break;
 
 
   
 }
     }
     break;
 
 
   
-    case 298:
+    case 349:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3307 "parser.y"
-    {(yyval.code)=0;}
+#line 3804 "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;
 
 
   
     }
     break;
 
 
   
-    case 299:
+    case 350:
     if(as3_pass==2) {
     if(as3_pass==2) {
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3308 "parser.y"
-    {(yyval.code)=0;}
+#line 3811 "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;
 
 
   
     }
     break;
 
 
   
-    case 300:
+    case 351:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3818 "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 352:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3309 "parser.y"
-    {(yyval.code)=0;}
+#line 3825 "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);
+      
+    if(as3_pass==2) {
+        MULTINAME(m, TYPE_NAMESPACE);
+        trait_t*t = add_abc_slot(&(yyvsp[(1) - (2)].flags), (yyvsp[(2) - (2)].namespace_decl)->name, 0, 0);
+        t->value = var->value;
+        t->type_name = multiname_clone(&m);
+    }
+
+    (yyval.code)=0;
+}
     }
     break;
 
 
   
     }
     break;
 
 
   
-    case 301:
+    case 353:
     if(as3_pass==2) {
     if(as3_pass==2) {
+/* Line 1464 of skeleton.m4  */
+#line 3848 "parser.y"
+    {
+    as3_warning("default xml namespaces not supported yet");
+    (yyval.code) = 0;
+}
+    }
+    break;
 
 
+
+  
+    case 354:
+    if(as3_pass==2) {
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 3311 "parser.y"
+#line 3853 "parser.y"
     {
     PASS12
     {
     PASS12
-    tokenizer_register_namespace((yyvsp[(3) - (3)].id));
+    const char*url = (yyvsp[(3) - (3)].classinfo)->name;
+
+    varinfo_t*s = (varinfo_t*)(yyvsp[(3) - (3)].classinfo);
+    if(s->kind == INFOTYPE_UNRESOLVED) {
+        s = (varinfo_t*)registry_resolve((slotinfo_t*)s);
+        if(!s)
+            syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
+    }
+
+    if(!s || s->kind != INFOTYPE_VAR)
+        syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
+    if(!s->value || !NS_TYPE(s->value->type))
+        syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
+    url = s->value->ns->name;
+
+    trie_put(active_namespaces, (yyvsp[(3) - (3)].classinfo)->name, (void*)url);
+    add_active_url(url);
     (yyval.code)=0;
 }
     }
     (yyval.code)=0;
 }
     }
@@ -7673,9 +8460,8 @@ yyreduce:
 
 
 
 
 
 
-
 /* Line 1464 of skeleton.m4  */
 /* Line 1464 of skeleton.m4  */
-#line 7679 "parser.tab.c"
+#line 8465 "parser.tab.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);