[WIDL] Sync with Wine Staging 1.7.55. CORE-10536
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 16 Nov 2015 21:45:45 +0000 (21:45 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 16 Nov 2015 21:45:45 +0000 (21:45 +0000)
svn path=/trunk/; revision=69902

20 files changed:
reactos/media/doc/README.WINE
reactos/tools/widl/expr.c
reactos/tools/widl/header.c
reactos/tools/widl/header.h
reactos/tools/widl/parser.l
reactos/tools/widl/parser.tab.c
reactos/tools/widl/parser.tab.h
reactos/tools/widl/parser.y
reactos/tools/widl/parser.yy.c
reactos/tools/widl/proxy.c
reactos/tools/widl/register.c
reactos/tools/widl/typegen.c
reactos/tools/widl/typelib.c
reactos/tools/widl/typetree.c
reactos/tools/widl/typetree.h
reactos/tools/widl/widl.c
reactos/tools/widl/widl.h
reactos/tools/widl/widl_ros.diff
reactos/tools/widl/widltypes.h
reactos/tools/widl/write_msft.c

index b0a7d2f..5202e1e 100644 (file)
@@ -16,7 +16,7 @@ wine-patches@winehq.com and ros-dev@reactos.org
 The following build tools are shared with Wine.
 
 reactos/tools/unicode             # Synced to WineStaging-1.7.47
 The following build tools are shared with Wine.
 
 reactos/tools/unicode             # Synced to WineStaging-1.7.47
-reactos/tools/widl                # Synced to Wine-1.7.17
+reactos/tools/widl                # Synced to WineStaging-1.7.55
 reactos/tools/wpp                 # Synced to WineStaging-1.7.47
 
 The following libraries are shared with Wine.
 reactos/tools/wpp                 # Synced to WineStaging-1.7.47
 
 The following libraries are shared with Wine.
index 7012382..0ada012 100644 (file)
@@ -571,7 +571,7 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
             error_loc_info(&expr_loc->v->loc_info, "address-of operator applied to non-variable type in expression%s%s\n",
                            expr_loc->attr ? " for attribute " : "",
                            expr_loc->attr ? expr_loc->attr : "");
             error_loc_info(&expr_loc->v->loc_info, "address-of operator applied to non-variable type in expression%s%s\n",
                            expr_loc->attr ? " for attribute " : "",
                            expr_loc->attr ? expr_loc->attr : "");
-            result.is_variable = FALSE;
+        result.is_variable = FALSE;
         result.is_temporary = TRUE;
         result.type = type_new_pointer(RPC_FC_UP, result.type, NULL);
         break;
         result.is_temporary = TRUE;
         result.type = type_new_pointer(RPC_FC_UP, result.type, NULL);
         break;
index 916f294..953e46c 100644 (file)
@@ -52,6 +52,16 @@ static void indent(FILE *h, int delta)
   if (delta > 0) indentation += delta;
 }
 
   if (delta > 0) indentation += delta;
 }
 
+static void write_line(FILE *f, int delta, const char *fmt, ...)
+{
+    va_list ap;
+    indent(f, delta);
+    va_start(ap, fmt);
+    vfprintf(f, fmt, ap);
+    va_end(ap);
+    fprintf(f, "\n");
+}
+
 int is_ptrchain_attr(const var_t *var, enum attr_type t)
 {
     if (is_attr(var->attrs, t))
 int is_ptrchain_attr(const var_t *var, enum attr_type t)
 {
     if (is_attr(var->attrs, t))
@@ -119,8 +129,9 @@ static void write_guid(FILE *f, const char *guid_prefix, const char *name, const
         uuid->Data4[6], uuid->Data4[7]);
 }
 
         uuid->Data4[6], uuid->Data4[7]);
 }
 
-static void write_uuid_decl(FILE *f, const char *name, const UUID *uuid)
+static void write_uuid_decl(FILE *f, type_t *type, const UUID *uuid)
 {
 {
+  char *name = format_namespace(type->namespace, "", "::", type->name);
   fprintf(f, "#ifdef __CRT_UUID_DECL\n");
   fprintf(f, "__CRT_UUID_DECL(%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
         "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n",
   fprintf(f, "#ifdef __CRT_UUID_DECL\n");
   fprintf(f, "__CRT_UUID_DECL(%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
         "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n",
@@ -128,6 +139,7 @@ static void write_uuid_decl(FILE *f, const char *name, const UUID *uuid)
         uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6],
         uuid->Data4[7]);
   fprintf(f, "#endif\n");
         uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6],
         uuid->Data4[7]);
   fprintf(f, "#endif\n");
+  free(name);
 }
 
 static const char *uuid_string(const UUID *uuid)
 }
 
 static const char *uuid_string(const UUID *uuid)
@@ -141,6 +153,30 @@ static const char *uuid_string(const UUID *uuid)
   return buf;
 }
 
   return buf;
 }
 
+static void write_namespace_start(FILE *header, struct namespace *namespace)
+{
+    if(is_global_namespace(namespace)) {
+        if(use_abi_namespace)
+            write_line(header, 1, "namespace ABI {");
+        return;
+    }
+
+    write_namespace_start(header, namespace->parent);
+    write_line(header, 1, "namespace %s {", namespace->name);
+}
+
+static void write_namespace_end(FILE *header, struct namespace *namespace)
+{
+    if(is_global_namespace(namespace)) {
+        if(use_abi_namespace)
+            write_line(header, -1, "}", namespace->name);
+        return;
+    }
+
+    write_line(header, -1, "}", namespace->name);
+    write_namespace_end(header, namespace->parent);
+}
+
 const char *get_name(const var_t *v)
 {
     static char buffer[256];
 const char *get_name(const var_t *v)
 {
     static char buffer[256];
@@ -220,7 +256,7 @@ static void write_fields(FILE *h, var_list_t *fields)
     }
 }
 
     }
 }
 
-static void write_enums(FILE *h, var_list_t *enums)
+static void write_enums(FILE *h, var_list_t *enums, const char *enum_name)
 {
   var_t *v;
   if (!enums) return;
 {
   var_t *v;
   if (!enums) return;
@@ -228,7 +264,10 @@ static void write_enums(FILE *h, var_list_t *enums)
   {
     if (v->name) {
       indent(h, 0);
   {
     if (v->name) {
       indent(h, 0);
-      fprintf(h, "%s", get_name(v));
+      if(!enum_name)
+          fprintf(h, "%s", get_name(v));
+      else
+          fprintf(h, "%s_%s", enum_name, get_name(v));
       if (v->eval) {
         fprintf(h, " = ");
         write_expr(h, v->eval, 0, 1, NULL, NULL, "");
       if (v->eval) {
         fprintf(h, " = ");
         write_expr(h, v->eval, 0, 1, NULL, NULL, "");
@@ -245,10 +284,14 @@ int needs_space_after(type_t *t)
           (!is_ptr(t) && (!is_array(t) || !type_array_is_decl_as_ptr(t) || t->name)));
 }
 
           (!is_ptr(t) && (!is_array(t) || !type_array_is_decl_as_ptr(t) || t->name)));
 }
 
-void write_type_left(FILE *h, type_t *t, int declonly)
+void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
 {
 {
+  const char *name;
+
   if (!h) return;
 
   if (!h) return;
 
+  name = type_get_name(t, name_type);
+
   if (is_attr(t->attrs, ATTR_CONST) &&
       (type_is_alias(t) || !is_ptr(t)))
     fprintf(h, "const ");
   if (is_attr(t->attrs, ATTR_CONST) &&
       (type_is_alias(t) || !is_ptr(t)))
     fprintf(h, "const ");
@@ -258,20 +301,20 @@ void write_type_left(FILE *h, type_t *t, int declonly)
     switch (type_get_type_detect_alias(t)) {
       case TYPE_ENUM:
         if (!declonly && t->defined && !t->written) {
     switch (type_get_type_detect_alias(t)) {
       case TYPE_ENUM:
         if (!declonly && t->defined && !t->written) {
-          if (t->name) fprintf(h, "enum %s {\n", t->name);
+          if (name) fprintf(h, "enum %s {\n", name);
           else fprintf(h, "enum {\n");
           t->written = TRUE;
           indentation++;
           else fprintf(h, "enum {\n");
           t->written = TRUE;
           indentation++;
-          write_enums(h, type_enum_get_values(t));
+          write_enums(h, type_enum_get_values(t), is_global_namespace(t->namespace) ? NULL : t->name);
           indent(h, -1);
           fprintf(h, "}");
         }
           indent(h, -1);
           fprintf(h, "}");
         }
-        else fprintf(h, "enum %s", t->name ? t->name : "");
+        else fprintf(h, "enum %s", name ? name : "");
         break;
       case TYPE_STRUCT:
       case TYPE_ENCAPSULATED_UNION:
         if (!declonly && t->defined && !t->written) {
         break;
       case TYPE_STRUCT:
       case TYPE_ENCAPSULATED_UNION:
         if (!declonly && t->defined && !t->written) {
-          if (t->name) fprintf(h, "struct %s {\n", t->name);
+          if (name) fprintf(h, "struct %s {\n", name);
           else fprintf(h, "struct {\n");
           t->written = TRUE;
           indentation++;
           else fprintf(h, "struct {\n");
           t->written = TRUE;
           indentation++;
@@ -282,7 +325,7 @@ void write_type_left(FILE *h, type_t *t, int declonly)
           indent(h, -1);
           fprintf(h, "}");
         }
           indent(h, -1);
           fprintf(h, "}");
         }
-        else fprintf(h, "struct %s", t->name ? t->name : "");
+        else fprintf(h, "struct %s", name ? name : "");
         break;
       case TYPE_UNION:
         if (!declonly && t->defined && !t->written) {
         break;
       case TYPE_UNION:
         if (!declonly && t->defined && !t->written) {
@@ -297,7 +340,7 @@ void write_type_left(FILE *h, type_t *t, int declonly)
         else fprintf(h, "union %s", t->name ? t->name : "");
         break;
       case TYPE_POINTER:
         else fprintf(h, "union %s", t->name ? t->name : "");
         break;
       case TYPE_POINTER:
-        write_type_left(h, type_pointer_get_ref(t), declonly);
+        write_type_left(h, type_pointer_get_ref(t), name_type, declonly);
         fprintf(h, "%s*", needs_space_after(type_pointer_get_ref(t)) ? " " : "");
         if (is_attr(t->attrs, ATTR_CONST)) fprintf(h, "const ");
         break;
         fprintf(h, "%s*", needs_space_after(type_pointer_get_ref(t)) ? " " : "");
         if (is_attr(t->attrs, ATTR_CONST)) fprintf(h, "const ");
         break;
@@ -306,7 +349,7 @@ void write_type_left(FILE *h, type_t *t, int declonly)
           fprintf(h, "%s", t->name);
         else
         {
           fprintf(h, "%s", t->name);
         else
         {
-          write_type_left(h, type_array_get_element(t), declonly);
+          write_type_left(h, type_array_get_element(t), name_type, declonly);
           if (type_array_is_decl_as_ptr(t))
             fprintf(h, "%s*", needs_space_after(type_array_get_element(t)) ? " " : "");
         }
           if (type_array_is_decl_as_ptr(t))
             fprintf(h, "%s*", needs_space_after(type_array_get_element(t)) ? " " : "");
         }
@@ -361,7 +404,7 @@ void write_type_left(FILE *h, type_t *t, int declonly)
         fprintf(h, "void");
         break;
       case TYPE_BITFIELD:
         fprintf(h, "void");
         break;
       case TYPE_BITFIELD:
-        write_type_left(h, type_bitfield_get_field(t), declonly);
+        write_type_left(h, type_bitfield_get_field(t), name_type, declonly);
         break;
       case TYPE_ALIAS:
       case TYPE_FUNCTION:
         break;
       case TYPE_ALIAS:
       case TYPE_FUNCTION:
@@ -427,14 +470,14 @@ static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const c
       const char *callconv = get_attrp(pt->attrs, ATTR_CALLCONV);
       if (!callconv && is_object_interface) callconv = "STDMETHODCALLTYPE";
       if (is_attr(pt->attrs, ATTR_INLINE)) fprintf(h, "inline ");
       const char *callconv = get_attrp(pt->attrs, ATTR_CALLCONV);
       if (!callconv && is_object_interface) callconv = "STDMETHODCALLTYPE";
       if (is_attr(pt->attrs, ATTR_INLINE)) fprintf(h, "inline ");
-      write_type_left(h, type_function_get_rettype(pt), declonly);
+      write_type_left(h, type_function_get_rettype(pt), NAME_DEFAULT, declonly);
       fputc(' ', h);
       if (ptr_level) fputc('(', h);
       if (callconv) fprintf(h, "%s ", callconv);
       for (i = 0; i < ptr_level; i++)
         fputc('*', h);
     } else
       fputc(' ', h);
       if (ptr_level) fputc('(', h);
       if (callconv) fprintf(h, "%s ", callconv);
       for (i = 0; i < ptr_level; i++)
         fputc('*', h);
     } else
-      write_type_left(h, t, declonly);
+      write_type_left(h, t, NAME_DEFAULT, declonly);
   }
 
   if (name) fprintf(h, "%s%s", !t || needs_space_after(t) ? " " : "", name );
   }
 
   if (name) fprintf(h, "%s%s", !t || needs_space_after(t) ? " " : "", name );
@@ -460,6 +503,30 @@ static void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *na
   write_type_v(f, t, field, FALSE, name);
 }
 
   write_type_v(f, t, field, FALSE, name);
 }
 
+static void write_type_definition(FILE *f, type_t *t)
+{
+    int in_namespace = t->namespace && !is_global_namespace(t->namespace);
+    int save_written = t->written;
+
+    if(in_namespace) {
+        fprintf(f, "#ifdef __cplusplus\n");
+        fprintf(f, "} /* extern \"C\" */\n");
+        write_namespace_start(f, t->namespace);
+    }
+    indent(f, 0);
+    write_type_left(f, t, NAME_DEFAULT, FALSE);
+    fprintf(f, ";\n");
+    if(in_namespace) {
+        t->written = save_written;
+        write_namespace_end(f, t->namespace);
+        fprintf(f, "extern \"C\" {\n");
+        fprintf(f, "#else\n");
+        write_type_left(f, t, NAME_C, FALSE);
+        fprintf(f, ";\n");
+        fprintf(f, "#endif\n\n");
+    }
+}
+
 void write_type_decl(FILE *f, type_t *t, const char *name)
 {
   write_type_v(f, t, FALSE, TRUE, name);
 void write_type_decl(FILE *f, type_t *t, const char *name)
 {
   write_type_v(f, t, FALSE, TRUE, name);
@@ -467,7 +534,7 @@ void write_type_decl(FILE *f, type_t *t, const char *name)
 
 void write_type_decl_left(FILE *f, type_t *t)
 {
 
 void write_type_decl_left(FILE *f, type_t *t)
 {
-  write_type_left(f, t, TRUE);
+  write_type_left(f, t, NAME_DEFAULT, TRUE);
 }
 
 static int user_type_registered(const char *name)
 }
 
 static int user_type_registered(const char *name)
@@ -828,13 +895,56 @@ static int is_inherited_method(const type_t *iface, const var_t *func)
   return 0;
 }
 
   return 0;
 }
 
-static void write_method_macro(FILE *header, const type_t *iface, const char *name)
+static int is_override_method(const type_t *iface, const type_t *child, const var_t *func)
+{
+  if (iface == child)
+    return 0;
+
+  do
+  {
+    const statement_t *stmt;
+    STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(child))
+    {
+      const var_t *funccmp = stmt->u.var;
+
+      if (!is_callas(func->attrs))
+      {
+         char inherit_name[256];
+         /* compare full name including property prefix */
+         strcpy(inherit_name, get_name(funccmp));
+         if (!strcmp(inherit_name, get_name(func))) return 1;
+      }
+    }
+  }
+  while ((child = type_iface_get_inherit(child)) && child != iface);
+
+  return 0;
+}
+
+static int is_aggregate_return(const var_t *func)
+{
+  enum type_type type = type_get_type(type_function_get_rettype(func->type));
+  return type == TYPE_STRUCT || type == TYPE_UNION ||
+         type == TYPE_COCLASS || type == TYPE_INTERFACE;
+}
+
+static char *get_vtbl_entry_name(const type_t *iface, const var_t *func)
+{
+  static char buff[255];
+  if (is_inherited_method(iface, func))
+    sprintf(buff, "%s_%s", iface->name, get_name(func));
+  else
+    sprintf(buff, "%s", get_name(func));
+  return buff;
+}
+
+static void write_method_macro(FILE *header, const type_t *iface, const type_t *child, const char *name)
 {
   const statement_t *stmt;
   int first_iface = 1;
 
   if (type_iface_get_inherit(iface))
 {
   const statement_t *stmt;
   int first_iface = 1;
 
   if (type_iface_get_inherit(iface))
-    write_method_macro(header, type_iface_get_inherit(iface), name);
+    write_method_macro(header, type_iface_get_inherit(iface), child, name);
 
   STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface))
   {
 
   STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface))
   {
@@ -846,7 +956,10 @@ static void write_method_macro(FILE *header, const type_t *iface, const char *na
       first_iface = 0;
     }
 
       first_iface = 0;
     }
 
-    if (!is_callas(func->attrs) && !is_inherited_method(iface, func)) {
+    if (is_override_method(iface, child, func))
+      continue;
+
+    if (!is_callas(func->attrs) && !is_aggregate_return(func)) {
       const var_t *arg;
 
       fprintf(header, "#define %s_%s(This", name, get_name(func));
       const var_t *arg;
 
       fprintf(header, "#define %s_%s(This", name, get_name(func));
@@ -855,7 +968,7 @@ static void write_method_macro(FILE *header, const type_t *iface, const char *na
               fprintf(header, ",%s", arg->name);
       fprintf(header, ") ");
 
               fprintf(header, ",%s", arg->name);
       fprintf(header, ") ");
 
-      fprintf(header, "(This)->lpVtbl->%s(This", get_name(func));
+      fprintf(header, "(This)->lpVtbl->%s(This", get_vtbl_entry_name(iface, func));
       if (type_get_function_args(func->type))
           LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry )
               fprintf(header, ",%s", arg->name);
       if (type_get_function_args(func->type))
           LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry )
               fprintf(header, ",%s", arg->name);
@@ -891,8 +1004,18 @@ void write_args(FILE *h, const var_list_t *args, const char *name, int method, i
     if (method == 2) {
         const expr_t *expr = get_attrp(arg->attrs, ATTR_DEFAULTVALUE);
         if (expr) {
     if (method == 2) {
         const expr_t *expr = get_attrp(arg->attrs, ATTR_DEFAULTVALUE);
         if (expr) {
-            fprintf(h, " = ");
-            write_expr( h, expr, 0, 1, NULL, NULL, "" );
+            const var_t *tail_arg;
+
+            /* Output default value only if all following arguments also have default value. */
+            LIST_FOR_EACH_ENTRY_REV( tail_arg, args, const var_t, entry ) {
+                if(tail_arg == arg) {
+                    fprintf(h, " = ");
+                    write_expr( h, expr, 0, 1, NULL, NULL, "" );
+                    break;
+                }
+                if(!get_attrp(tail_arg->attrs, ATTR_DEFAULTVALUE))
+                    break;
+            }
         }
     }
     count++;
         }
     }
     count++;
@@ -921,13 +1044,13 @@ static void write_cpp_method_def(FILE *header, const type_t *iface)
   }
 }
 
   }
 }
 
-static void write_inline_wrappers(FILE *header, const type_t *iface, const char *name)
+static void write_inline_wrappers(FILE *header, const type_t *iface, const type_t *child, const char *name)
 {
   const statement_t *stmt;
   int first_iface = 1;
 
   if (type_iface_get_inherit(iface))
 {
   const statement_t *stmt;
   int first_iface = 1;
 
   if (type_iface_get_inherit(iface))
-    write_inline_wrappers(header, type_iface_get_inherit(iface), name);
+    write_inline_wrappers(header, type_iface_get_inherit(iface), child, name);
 
   STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface))
   {
 
   STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface))
   {
@@ -939,7 +1062,10 @@ static void write_inline_wrappers(FILE *header, const type_t *iface, const char
       first_iface = 0;
     }
 
       first_iface = 0;
     }
 
-    if (!is_callas(func->attrs) && !is_inherited_method(iface, func)) {
+    if (is_override_method(iface, child, func))
+      continue;
+
+    if (!is_callas(func->attrs)) {
       const var_t *arg;
 
       fprintf(header, "FORCEINLINE ");
       const var_t *arg;
 
       fprintf(header, "FORCEINLINE ");
@@ -947,12 +1073,24 @@ static void write_inline_wrappers(FILE *header, const type_t *iface, const char
       fprintf(header, " %s_%s(", name, get_name(func));
       write_args(header, type_get_function_args(func->type), name, 1, FALSE);
       fprintf(header, ") {\n");
       fprintf(header, " %s_%s(", name, get_name(func));
       write_args(header, type_get_function_args(func->type), name, 1, FALSE);
       fprintf(header, ") {\n");
-      fprintf(header, "    %s", is_void(type_function_get_rettype(func->type)) ? "" : "return ");
-      fprintf(header, "This->lpVtbl->%s(This", get_name(func));
+      ++indentation;
+      if (!is_aggregate_return(func)) {
+        indent(header, 0);
+        fprintf(header, "%sThis->lpVtbl->%s(This",
+                is_void(type_function_get_rettype(func->type)) ? "" : "return ",
+                get_vtbl_entry_name(iface, func));
+      } else {
+        indent(header, 0);
+        write_type_decl_left(header, type_function_get_rettype(func->type));
+        fprintf(header, " __ret;\n");
+        indent(header, 0);
+        fprintf(header, "return *This->lpVtbl->%s(This,&__ret", get_vtbl_entry_name(iface, func));
+      }
       if (type_get_function_args(func->type))
           LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry )
               fprintf(header, ",%s", arg->name);
       fprintf(header, ");\n");
       if (type_get_function_args(func->type))
           LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry )
               fprintf(header, ",%s", arg->name);
       fprintf(header, ");\n");
+      --indentation;
       fprintf(header, "}\n");
     }
   }
       fprintf(header, "}\n");
     }
   }
@@ -988,11 +1126,26 @@ static void do_write_c_method_def(FILE *header, const type_t *iface, const char
       if (!callconv) callconv = "STDMETHODCALLTYPE";
       indent(header, 0);
       write_type_decl_left(header, type_function_get_rettype(func->type));
       if (!callconv) callconv = "STDMETHODCALLTYPE";
       indent(header, 0);
       write_type_decl_left(header, type_function_get_rettype(func->type));
+      if (is_aggregate_return(func))
+        fprintf(header, " *");
       if (is_inherited_method(iface, func))
         fprintf(header, " (%s *%s_%s)(\n", callconv, iface->name, func->name);
       else
         fprintf(header, " (%s *%s)(\n", callconv, get_name(func));
       if (is_inherited_method(iface, func))
         fprintf(header, " (%s *%s_%s)(\n", callconv, iface->name, func->name);
       else
         fprintf(header, " (%s *%s)(\n", callconv, get_name(func));
-      write_args(header, type_get_function_args(func->type), name, 1, TRUE);
+      ++indentation;
+      indent(header, 0);
+      fprintf(header, "%s *This", name);
+      if (is_aggregate_return(func)) {
+        fprintf(header, ",\n");
+        indent(header, 0);
+        write_type_decl_left(header, type_function_get_rettype(func->type));
+        fprintf(header, " *__ret");
+      }
+      --indentation;
+      if (type_get_function_args(func->type)) {
+        fprintf(header, ",\n");
+        write_args(header, type_get_function_args(func->type), name, 0, TRUE);
+      }
       fprintf(header, ");\n");
       fprintf(header, "\n");
     }
       fprintf(header, ");\n");
       fprintf(header, "\n");
     }
@@ -1001,12 +1154,12 @@ static void do_write_c_method_def(FILE *header, const type_t *iface, const char
 
 static void write_c_method_def(FILE *header, const type_t *iface)
 {
 
 static void write_c_method_def(FILE *header, const type_t *iface)
 {
-  do_write_c_method_def(header, iface, iface->name);
+  do_write_c_method_def(header, iface, iface->c_name);
 }
 
 static void write_c_disp_method_def(FILE *header, const type_t *iface)
 {
 }
 
 static void write_c_disp_method_def(FILE *header, const type_t *iface)
 {
-  do_write_c_method_def(header, type_iface_get_inherit(iface), iface->name);
+  do_write_c_method_def(header, type_iface_get_inherit(iface), iface->c_name);
 }
 
 static void write_method_proto(FILE *header, const type_t *iface)
 }
 
 static void write_method_proto(FILE *header, const type_t *iface)
@@ -1142,9 +1295,14 @@ static void write_function_proto(FILE *header, const type_t *iface, const var_t
 
 static void write_forward(FILE *header, type_t *iface)
 {
 
 static void write_forward(FILE *header, type_t *iface)
 {
-  fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", iface->name);
-  fprintf(header, "#define __%s_FWD_DEFINED__\n", iface->name);
-  fprintf(header, "typedef interface %s %s;\n", iface->name, iface->name);
+  fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", iface->c_name);
+  fprintf(header, "#define __%s_FWD_DEFINED__\n", iface->c_name);
+  fprintf(header, "typedef interface %s %s;\n", iface->c_name, iface->c_name);
+  fprintf(header, "#ifdef __cplusplus\n");
+  write_namespace_start(header, iface->namespace);
+  write_line(header, 0, "interface %s;", iface->name);
+  write_namespace_end(header, iface->namespace);
+  fprintf(header, "#endif /* __cplusplus */\n");
   fprintf(header, "#endif\n\n" );
 }
 
   fprintf(header, "#endif\n\n" );
 }
 
@@ -1154,74 +1312,78 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
   fprintf(header, "/*****************************************************************************\n");
   fprintf(header, " * %s %sinterface\n", iface->name, dispinterface ? "disp" : "");
   fprintf(header, " */\n");
   fprintf(header, "/*****************************************************************************\n");
   fprintf(header, " * %s %sinterface\n", iface->name, dispinterface ? "disp" : "");
   fprintf(header, " */\n");
-  fprintf(header,"#ifndef __%s_%sINTERFACE_DEFINED__\n", iface->name, dispinterface ? "DISP" : "");
-  fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->name, dispinterface ? "DISP" : "");
+  fprintf(header,"#ifndef __%s_%sINTERFACE_DEFINED__\n", iface->c_name, dispinterface ? "DISP" : "");
+  fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->c_name, dispinterface ? "DISP" : "");
 }
 
 static void write_com_interface_end(FILE *header, type_t *iface)
 {
   int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
   const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
 }
 
 static void write_com_interface_end(FILE *header, type_t *iface)
 {
   int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
   const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
+  type_t *type;
 
   if (uuid)
 
   if (uuid)
-      write_guid(header, dispinterface ? "DIID" : "IID", iface->name, uuid);
+      write_guid(header, dispinterface ? "DIID" : "IID", iface->c_name, uuid);
 
   /* C++ interface */
   fprintf(header, "#if defined(__cplusplus) && !defined(CINTERFACE)\n");
 
   /* C++ interface */
   fprintf(header, "#if defined(__cplusplus) && !defined(CINTERFACE)\n");
-  if (uuid)
-      fprintf(header, "MIDL_INTERFACE(\"%s\")\n", uuid_string(uuid));
-  else
+  if (!is_global_namespace(iface->namespace)) {
+      write_line(header, 0, "} /* extern \"C\" */");
+      write_namespace_start(header, iface->namespace);
+  }
+  if (uuid) {
+      write_line(header, 0, "MIDL_INTERFACE(\"%s\")", uuid_string(uuid));
+      indent(header, 0);
+  }else {
+      indent(header, 0);
       fprintf(header, "interface ");
       fprintf(header, "interface ");
+  }
   if (type_iface_get_inherit(iface))
   {
     fprintf(header, "%s : public %s\n", iface->name,
             type_iface_get_inherit(iface)->name);
   if (type_iface_get_inherit(iface))
   {
     fprintf(header, "%s : public %s\n", iface->name,
             type_iface_get_inherit(iface)->name);
-    fprintf(header, "{\n");
+    write_line(header, 1, "{");
   }
   else
   {
     fprintf(header, "%s\n", iface->name);
   }
   else
   {
     fprintf(header, "%s\n", iface->name);
-    fprintf(header, "{\n");
-    fprintf(header, "    BEGIN_INTERFACE\n");
-    fprintf(header, "\n");
+    write_line(header, 1, "{\n");
+    write_line(header, 0, "BEGIN_INTERFACE\n");
   }
   /* dispinterfaces don't have real functions, so don't write C++ functions for
    * them */
   if (!dispinterface)
   }
   /* dispinterfaces don't have real functions, so don't write C++ functions for
    * them */
   if (!dispinterface)
-  {
-    indentation++;
     write_cpp_method_def(header, iface);
     write_cpp_method_def(header, iface);
-    indentation--;
-  }
   if (!type_iface_get_inherit(iface))
   if (!type_iface_get_inherit(iface))
-    fprintf(header, "    END_INTERFACE\n");
-  fprintf(header, "};\n");
+    write_line(header, 0, "END_INTERFACE\n");
+  write_line(header, -1, "};");
+  if (!is_global_namespace(iface->namespace)) {
+      write_namespace_end(header, iface->namespace);
+      write_line(header, 0, "extern \"C\" {");
+  }
   if (uuid)
   if (uuid)
-      write_uuid_decl(header, iface->name, uuid);
+      write_uuid_decl(header, iface, uuid);
   fprintf(header, "#else\n");
   /* C interface */
   fprintf(header, "#else\n");
   /* C interface */
-  fprintf(header, "typedef struct %sVtbl {\n", iface->name);
-  indentation++;
-  fprintf(header, "    BEGIN_INTERFACE\n");
-  fprintf(header, "\n");
+  write_line(header, 1, "typedef struct %sVtbl {", iface->c_name);
+  write_line(header, 0, "BEGIN_INTERFACE\n");
   if (dispinterface)
     write_c_disp_method_def(header, iface);
   else
     write_c_method_def(header, iface);
   if (dispinterface)
     write_c_disp_method_def(header, iface);
   else
     write_c_method_def(header, iface);
-  indentation--;
-  fprintf(header, "    END_INTERFACE\n");
-  fprintf(header, "} %sVtbl;\n", iface->name);
-  fprintf(header, "interface %s {\n", iface->name);
-  fprintf(header, "    CONST_VTBL %sVtbl* lpVtbl;\n", iface->name);
-  fprintf(header, "};\n");
-  fprintf(header, "\n");
+  write_line(header, 0, "END_INTERFACE");
+  write_line(header, -1, "} %sVtbl;\n", iface->c_name);
+  fprintf(header, "interface %s {\n", iface->c_name);
+  fprintf(header, "    CONST_VTBL %sVtbl* lpVtbl;\n", iface->c_name);
+  fprintf(header, "};\n\n");
   fprintf(header, "#ifdef COBJMACROS\n");
   /* dispinterfaces don't have real functions, so don't write macros for them,
    * only for the interface this interface inherits from, i.e. IDispatch */
   fprintf(header, "#ifndef WIDL_C_INLINE_WRAPPERS\n");
   fprintf(header, "#ifdef COBJMACROS\n");
   /* dispinterfaces don't have real functions, so don't write macros for them,
    * only for the interface this interface inherits from, i.e. IDispatch */
   fprintf(header, "#ifndef WIDL_C_INLINE_WRAPPERS\n");
-  write_method_macro(header, dispinterface ? type_iface_get_inherit(iface) : iface, iface->name);
+  type = dispinterface ? type_iface_get_inherit(iface) : iface;
+  write_method_macro(header, type, type, iface->c_name);
   fprintf(header, "#else\n");
   fprintf(header, "#else\n");
-  write_inline_wrappers(header, dispinterface ? type_iface_get_inherit(iface) : iface, iface->name);
+  write_inline_wrappers(header, type, type, iface->c_name);
   fprintf(header, "#endif\n");
   fprintf(header, "#endif\n");
   fprintf(header, "\n");
   fprintf(header, "#endif\n");
   fprintf(header, "#endif\n");
   fprintf(header, "\n");
@@ -1229,13 +1391,13 @@ static void write_com_interface_end(FILE *header, type_t *iface)
   fprintf(header, "\n");
   /* dispinterfaces don't have real functions, so don't write prototypes for
    * them */
   fprintf(header, "\n");
   /* dispinterfaces don't have real functions, so don't write prototypes for
    * them */
-  if (!dispinterface)
+  if (!dispinterface && !winrt_mode)
   {
     write_method_proto(header, iface);
     write_locals(header, iface, FALSE);
     fprintf(header, "\n");
   }
   {
     write_method_proto(header, iface);
     write_locals(header, iface, FALSE);
     fprintf(header, "\n");
   }
-  fprintf(header,"#endif  /* __%s_%sINTERFACE_DEFINED__ */\n\n", iface->name, dispinterface ? "DISP" : "");
+  fprintf(header,"#endif  /* __%s_%sINTERFACE_DEFINED__ */\n\n", iface->c_name, dispinterface ? "DISP" : "");
 }
 
 static void write_rpc_interface_start(FILE *header, const type_t *iface)
 }
 
 static void write_rpc_interface_start(FILE *header, const type_t *iface)
@@ -1286,7 +1448,7 @@ static void write_coclass(FILE *header, type_t *cocl)
   if (uuid)
   {
       fprintf(header, "class DECLSPEC_UUID(\"%s\") %s;\n", uuid_string(uuid), cocl->name);
   if (uuid)
   {
       fprintf(header, "class DECLSPEC_UUID(\"%s\") %s;\n", uuid_string(uuid), cocl->name);
-      write_uuid_decl(header, cocl->name, uuid);
+      write_uuid_decl(header, cocl, uuid);
   }
   else
   {
   }
   else
   {
@@ -1417,8 +1579,7 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
           write_coclass(header, stmt->u.type);
         else
         {
           write_coclass(header, stmt->u.type);
         else
         {
-          write_type_def_or_decl(header, stmt->u.type, FALSE, NULL);
-          fprintf(header, ";\n\n");
+          write_type_definition(header, stmt->u.type);
         }
         break;
       case STMT_TYPEREF:
         }
         break;
       case STMT_TYPEREF:
index 10601ff..3798af0 100644 (file)
@@ -29,7 +29,7 @@ extern int is_attr(const attr_list_t *list, enum attr_type t);
 extern void *get_attrp(const attr_list_t *list, enum attr_type t);
 extern unsigned int get_attrv(const attr_list_t *list, enum attr_type t);
 extern const char* get_name(const var_t *v);
 extern void *get_attrp(const attr_list_t *list, enum attr_type t);
 extern unsigned int get_attrv(const attr_list_t *list, enum attr_type t);
 extern const char* get_name(const var_t *v);
-extern void write_type_left(FILE *h, type_t *t, int declonly);
+extern void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly);
 extern void write_type_right(FILE *h, type_t *t, int is_field);
 extern void write_type_decl(FILE *f, type_t *t, const char *name);
 extern void write_type_decl_left(FILE *f, type_t *t);
 extern void write_type_right(FILE *h, type_t *t, int is_field);
 extern void write_type_decl(FILE *f, type_t *t, const char *name);
 extern void write_type_decl_left(FILE *f, type_t *t);
index b911186..5c2dcab 100644 (file)
@@ -147,6 +147,22 @@ UUID *parse_uuid(const char *u)
                             input_name = xstrdup(fname);
                         }
 <PP_PRAGMA>midl_echo[^\n]*  yyless(9); yy_pop_state(); return tCPPQUOTE;
                             input_name = xstrdup(fname);
                         }
 <PP_PRAGMA>midl_echo[^\n]*  yyless(9); yy_pop_state(); return tCPPQUOTE;
+<PP_PRAGMA>winrt[^\n]*  {
+                            if(import_stack_ptr) {
+                                if(!winrt_mode)
+                                    error_loc("winrt IDL file imported in non-winrt mode\n");
+                            }else {
+                                const char *ptr = yytext+5;
+
+                                winrt_mode = TRUE;
+
+                                while(isspace(*ptr))
+                                    ptr++;
+                                if(!strncmp(ptr, "ns_prefix", 9) && (!*(ptr += 9) || isspace(*ptr)))
+                                    use_abi_namespace = TRUE;
+                            }
+                            yy_pop_state();
+                        }
 <PP_PRAGMA>[^\n]*       parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
 <INITIAL,ATTR>\"       yy_push_state(QUOTE); cbufidx = 0;
 <QUOTE>\"              {
 <PP_PRAGMA>[^\n]*       parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
 <INITIAL,ATTR>\"       yy_push_state(QUOTE); cbufidx = 0;
 <QUOTE>\"              {
@@ -419,7 +435,7 @@ static int kw_token(const char *kw)
        struct keyword key, *kwp;
        key.kw = kw;
        kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func);
        struct keyword key, *kwp;
        key.kw = kw;
        kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func);
-       if (kwp && (do_rt_extension || kwp->token != tNAMESPACE)) {
+       if (kwp && (winrt_mode || kwp->token != tNAMESPACE)) {
                parser_lval.str = xstrdup(kwp->kw);
                return kwp->token;
        }
                parser_lval.str = xstrdup(kwp->kw);
                return kwp->token;
        }
index df66438..00eb20e 100644 (file)
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.5.  */
+/* A Bison parser, made by GNU Bison 3.0.2.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
 /* Bison implementation for Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-   
+
+   Copyright (C) 1984, 1989-1990, 2000-2013 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/>.  */
 
@@ -26,7 +26,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.  */
 
@@ -44,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.5"
+#define YYBISON_VERSION "3.0.2"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
 /* Pull parsers.  */
 #define YYPULL 1
 
 /* Pull parsers.  */
 #define YYPULL 1
 
-/* Using locations.  */
-#define YYLSP_NEEDED 0
 
 /* Substitute the variable and function names.  */
 #define yyparse         parser_parse
 #define yylex           parser_lex
 #define yyerror         parser_error
 
 /* Substitute the variable and function names.  */
 #define yyparse         parser_parse
 #define yylex           parser_lex
 #define yyerror         parser_error
-#define yylval          parser_lval
-#define yychar          parser_char
 #define yydebug         parser_debug
 #define yynerrs         parser_nerrs
 
 #define yydebug         parser_debug
 #define yynerrs         parser_nerrs
 
+#define yylval          parser_lval
+#define yychar          parser_char
 
 /* Copy the first part of user declarations.  */
 
 /* Copy the first part of user declarations.  */
-
-/* Line 268 of yacc.c  */
-#line 1 "parser.y"
+#line 1 "parser.y" /* yacc.c:339  */
 
 /*
  * IDL Compiler
 
 /*
  * IDL Compiler
@@ -167,6 +163,9 @@ static type_t *find_type_or_error2(char *name, int t);
 
 static var_t *reg_const(var_t *var);
 
 
 static var_t *reg_const(var_t *var);
 
+static void push_namespace(const char *name);
+static void pop_namespace(const char *name);
+
 static char *gen_name(void);
 static void check_arg_attrs(const var_t *arg);
 static void check_statements(const statement_list_t *stmts, int is_inside_library);
 static char *gen_name(void);
 static void check_arg_attrs(const var_t *arg);
 static void check_statements(const statement_list_t *stmts, int is_inside_library);
@@ -197,20 +196,26 @@ static statement_t *make_statement_importlib(const char *str);
 static statement_t *make_statement_module(type_t *type);
 static statement_t *make_statement_typedef(var_list_t *names);
 static statement_t *make_statement_import(const char *str);
 static statement_t *make_statement_module(type_t *type);
 static statement_t *make_statement_typedef(var_list_t *names);
 static statement_t *make_statement_import(const char *str);
-static statement_t *make_statement_typedef(var_list_t *names);
 static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt);
 static statement_list_t *append_statements(statement_list_t *, statement_list_t *);
 static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
 
 static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt);
 static statement_list_t *append_statements(statement_list_t *, statement_list_t *);
 static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
 
+static struct namespace global_namespace = {
+    NULL, NULL, LIST_INIT(global_namespace.entry), LIST_INIT(global_namespace.children)
+};
 
 
+static struct namespace *current_namespace = &global_namespace;
 
 
-/* Line 268 of yacc.c  */
-#line 209 "parser.tab.c"
 
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+#line 211 "parser.tab.c" /* yacc.c:339  */
+
+# ifndef YY_NULLPTR
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULLPTR nullptr
+#  else
+#   define YY_NULLPTR 0
+#  endif
+# endif
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
@@ -220,212 +225,212 @@ static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
 # define YYERROR_VERBOSE 1
 #endif
 
 # define YYERROR_VERBOSE 1
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
 
 
+/* Debug traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int parser_debug;
+#endif
 
 
-/* Tokens.  */
+/* Token type.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     aIDENTIFIER = 258,
-     aPRAGMA = 259,
-     aKNOWNTYPE = 260,
-     aNUM = 261,
-     aHEXNUM = 262,
-     aDOUBLE = 263,
-     aSTRING = 264,
-     aWSTRING = 265,
-     aSQSTRING = 266,
-     aUUID = 267,
-     aEOF = 268,
-     SHL = 269,
-     SHR = 270,
-     MEMBERPTR = 271,
-     EQUALITY = 272,
-     INEQUALITY = 273,
-     GREATEREQUAL = 274,
-     LESSEQUAL = 275,
-     LOGICALOR = 276,
-     LOGICALAND = 277,
-     ELLIPSIS = 278,
-     tAGGREGATABLE = 279,
-     tALLOCATE = 280,
-     tANNOTATION = 281,
-     tAPPOBJECT = 282,
-     tASYNC = 283,
-     tASYNCUUID = 284,
-     tAUTOHANDLE = 285,
-     tBINDABLE = 286,
-     tBOOLEAN = 287,
-     tBROADCAST = 288,
-     tBYTE = 289,
-     tBYTECOUNT = 290,
-     tCALLAS = 291,
-     tCALLBACK = 292,
-     tCASE = 293,
-     tCDECL = 294,
-     tCHAR = 295,
-     tCOCLASS = 296,
-     tCODE = 297,
-     tCOMMSTATUS = 298,
-     tCONST = 299,
-     tCONTEXTHANDLE = 300,
-     tCONTEXTHANDLENOSERIALIZE = 301,
-     tCONTEXTHANDLESERIALIZE = 302,
-     tCONTROL = 303,
-     tCPPQUOTE = 304,
-     tDECODE = 305,
-     tDEFAULT = 306,
-     tDEFAULTBIND = 307,
-     tDEFAULTCOLLELEM = 308,
-     tDEFAULTVALUE = 309,
-     tDEFAULTVTABLE = 310,
-     tDISABLECONSISTENCYCHECK = 311,
-     tDISPLAYBIND = 312,
-     tDISPINTERFACE = 313,
-     tDLLNAME = 314,
-     tDOUBLE = 315,
-     tDUAL = 316,
-     tENABLEALLOCATE = 317,
-     tENCODE = 318,
-     tENDPOINT = 319,
-     tENTRY = 320,
-     tENUM = 321,
-     tERRORSTATUST = 322,
-     tEXPLICITHANDLE = 323,
-     tEXTERN = 324,
-     tFALSE = 325,
-     tFASTCALL = 326,
-     tFAULTSTATUS = 327,
-     tFLOAT = 328,
-     tFORCEALLOCATE = 329,
-     tHANDLE = 330,
-     tHANDLET = 331,
-     tHELPCONTEXT = 332,
-     tHELPFILE = 333,
-     tHELPSTRING = 334,
-     tHELPSTRINGCONTEXT = 335,
-     tHELPSTRINGDLL = 336,
-     tHIDDEN = 337,
-     tHYPER = 338,
-     tID = 339,
-     tIDEMPOTENT = 340,
-     tIGNORE = 341,
-     tIIDIS = 342,
-     tIMMEDIATEBIND = 343,
-     tIMPLICITHANDLE = 344,
-     tIMPORT = 345,
-     tIMPORTLIB = 346,
-     tIN = 347,
-     tIN_LINE = 348,
-     tINLINE = 349,
-     tINPUTSYNC = 350,
-     tINT = 351,
-     tINT3264 = 352,
-     tINT64 = 353,
-     tINTERFACE = 354,
-     tLCID = 355,
-     tLENGTHIS = 356,
-     tLIBRARY = 357,
-     tLICENSED = 358,
-     tLOCAL = 359,
-     tLONG = 360,
-     tMAYBE = 361,
-     tMESSAGE = 362,
-     tMETHODS = 363,
-     tMODULE = 364,
-     tNAMESPACE = 365,
-     tNOCODE = 366,
-     tNONBROWSABLE = 367,
-     tNONCREATABLE = 368,
-     tNONEXTENSIBLE = 369,
-     tNOTIFY = 370,
-     tNOTIFYFLAG = 371,
-     tNULL = 372,
-     tOBJECT = 373,
-     tODL = 374,
-     tOLEAUTOMATION = 375,
-     tOPTIMIZE = 376,
-     tOPTIONAL = 377,
-     tOUT = 378,
-     tPARTIALIGNORE = 379,
-     tPASCAL = 380,
-     tPOINTERDEFAULT = 381,
-     tPROGID = 382,
-     tPROPERTIES = 383,
-     tPROPGET = 384,
-     tPROPPUT = 385,
-     tPROPPUTREF = 386,
-     tPROXY = 387,
-     tPTR = 388,
-     tPUBLIC = 389,
-     tRANGE = 390,
-     tREADONLY = 391,
-     tREF = 392,
-     tREGISTER = 393,
-     tREPRESENTAS = 394,
-     tREQUESTEDIT = 395,
-     tRESTRICTED = 396,
-     tRETVAL = 397,
-     tSAFEARRAY = 398,
-     tSHORT = 399,
-     tSIGNED = 400,
-     tSIZEIS = 401,
-     tSIZEOF = 402,
-     tSMALL = 403,
-     tSOURCE = 404,
-     tSTATIC = 405,
-     tSTDCALL = 406,
-     tSTRICTCONTEXTHANDLE = 407,
-     tSTRING = 408,
-     tSTRUCT = 409,
-     tSWITCH = 410,
-     tSWITCHIS = 411,
-     tSWITCHTYPE = 412,
-     tTHREADING = 413,
-     tTRANSMITAS = 414,
-     tTRUE = 415,
-     tTYPEDEF = 416,
-     tUIDEFAULT = 417,
-     tUNION = 418,
-     tUNIQUE = 419,
-     tUNSIGNED = 420,
-     tUSESGETLASTERROR = 421,
-     tUSERMARSHAL = 422,
-     tUUID = 423,
-     tV1ENUM = 424,
-     tVARARG = 425,
-     tVERSION = 426,
-     tVIPROGID = 427,
-     tVOID = 428,
-     tWCHAR = 429,
-     tWIREMARSHAL = 430,
-     tAPARTMENT = 431,
-     tNEUTRAL = 432,
-     tSINGLE = 433,
-     tFREE = 434,
-     tBOTH = 435,
-     ADDRESSOF = 436,
-     NEG = 437,
-     POS = 438,
-     PPTR = 439,
-     CAST = 440
-   };
+  enum yytokentype
+  {
+    aIDENTIFIER = 258,
+    aPRAGMA = 259,
+    aKNOWNTYPE = 260,
+    aNUM = 261,
+    aHEXNUM = 262,
+    aDOUBLE = 263,
+    aSTRING = 264,
+    aWSTRING = 265,
+    aSQSTRING = 266,
+    aUUID = 267,
+    aEOF = 268,
+    SHL = 269,
+    SHR = 270,
+    MEMBERPTR = 271,
+    EQUALITY = 272,
+    INEQUALITY = 273,
+    GREATEREQUAL = 274,
+    LESSEQUAL = 275,
+    LOGICALOR = 276,
+    LOGICALAND = 277,
+    ELLIPSIS = 278,
+    tAGGREGATABLE = 279,
+    tALLOCATE = 280,
+    tANNOTATION = 281,
+    tAPPOBJECT = 282,
+    tASYNC = 283,
+    tASYNCUUID = 284,
+    tAUTOHANDLE = 285,
+    tBINDABLE = 286,
+    tBOOLEAN = 287,
+    tBROADCAST = 288,
+    tBYTE = 289,
+    tBYTECOUNT = 290,
+    tCALLAS = 291,
+    tCALLBACK = 292,
+    tCASE = 293,
+    tCDECL = 294,
+    tCHAR = 295,
+    tCOCLASS = 296,
+    tCODE = 297,
+    tCOMMSTATUS = 298,
+    tCONST = 299,
+    tCONTEXTHANDLE = 300,
+    tCONTEXTHANDLENOSERIALIZE = 301,
+    tCONTEXTHANDLESERIALIZE = 302,
+    tCONTROL = 303,
+    tCPPQUOTE = 304,
+    tDECODE = 305,
+    tDEFAULT = 306,
+    tDEFAULTBIND = 307,
+    tDEFAULTCOLLELEM = 308,
+    tDEFAULTVALUE = 309,
+    tDEFAULTVTABLE = 310,
+    tDISABLECONSISTENCYCHECK = 311,
+    tDISPLAYBIND = 312,
+    tDISPINTERFACE = 313,
+    tDLLNAME = 314,
+    tDOUBLE = 315,
+    tDUAL = 316,
+    tENABLEALLOCATE = 317,
+    tENCODE = 318,
+    tENDPOINT = 319,
+    tENTRY = 320,
+    tENUM = 321,
+    tERRORSTATUST = 322,
+    tEXPLICITHANDLE = 323,
+    tEXTERN = 324,
+    tFALSE = 325,
+    tFASTCALL = 326,
+    tFAULTSTATUS = 327,
+    tFLOAT = 328,
+    tFORCEALLOCATE = 329,
+    tHANDLE = 330,
+    tHANDLET = 331,
+    tHELPCONTEXT = 332,
+    tHELPFILE = 333,
+    tHELPSTRING = 334,
+    tHELPSTRINGCONTEXT = 335,
+    tHELPSTRINGDLL = 336,
+    tHIDDEN = 337,
+    tHYPER = 338,
+    tID = 339,
+    tIDEMPOTENT = 340,
+    tIGNORE = 341,
+    tIIDIS = 342,
+    tIMMEDIATEBIND = 343,
+    tIMPLICITHANDLE = 344,
+    tIMPORT = 345,
+    tIMPORTLIB = 346,
+    tIN = 347,
+    tIN_LINE = 348,
+    tINLINE = 349,
+    tINPUTSYNC = 350,
+    tINT = 351,
+    tINT3264 = 352,
+    tINT64 = 353,
+    tINTERFACE = 354,
+    tLCID = 355,
+    tLENGTHIS = 356,
+    tLIBRARY = 357,
+    tLICENSED = 358,
+    tLOCAL = 359,
+    tLONG = 360,
+    tMAYBE = 361,
+    tMESSAGE = 362,
+    tMETHODS = 363,
+    tMODULE = 364,
+    tNAMESPACE = 365,
+    tNOCODE = 366,
+    tNONBROWSABLE = 367,
+    tNONCREATABLE = 368,
+    tNONEXTENSIBLE = 369,
+    tNOTIFY = 370,
+    tNOTIFYFLAG = 371,
+    tNULL = 372,
+    tOBJECT = 373,
+    tODL = 374,
+    tOLEAUTOMATION = 375,
+    tOPTIMIZE = 376,
+    tOPTIONAL = 377,
+    tOUT = 378,
+    tPARTIALIGNORE = 379,
+    tPASCAL = 380,
+    tPOINTERDEFAULT = 381,
+    tPROGID = 382,
+    tPROPERTIES = 383,
+    tPROPGET = 384,
+    tPROPPUT = 385,
+    tPROPPUTREF = 386,
+    tPROXY = 387,
+    tPTR = 388,
+    tPUBLIC = 389,
+    tRANGE = 390,
+    tREADONLY = 391,
+    tREF = 392,
+    tREGISTER = 393,
+    tREPRESENTAS = 394,
+    tREQUESTEDIT = 395,
+    tRESTRICTED = 396,
+    tRETVAL = 397,
+    tSAFEARRAY = 398,
+    tSHORT = 399,
+    tSIGNED = 400,
+    tSIZEIS = 401,
+    tSIZEOF = 402,
+    tSMALL = 403,
+    tSOURCE = 404,
+    tSTATIC = 405,
+    tSTDCALL = 406,
+    tSTRICTCONTEXTHANDLE = 407,
+    tSTRING = 408,
+    tSTRUCT = 409,
+    tSWITCH = 410,
+    tSWITCHIS = 411,
+    tSWITCHTYPE = 412,
+    tTHREADING = 413,
+    tTRANSMITAS = 414,
+    tTRUE = 415,
+    tTYPEDEF = 416,
+    tUIDEFAULT = 417,
+    tUNION = 418,
+    tUNIQUE = 419,
+    tUNSIGNED = 420,
+    tUSESGETLASTERROR = 421,
+    tUSERMARSHAL = 422,
+    tUUID = 423,
+    tV1ENUM = 424,
+    tVARARG = 425,
+    tVERSION = 426,
+    tVIPROGID = 427,
+    tVOID = 428,
+    tWCHAR = 429,
+    tWIREMARSHAL = 430,
+    tAPARTMENT = 431,
+    tNEUTRAL = 432,
+    tSINGLE = 433,
+    tFREE = 434,
+    tBOTH = 435,
+    CAST = 436,
+    PPTR = 437,
+    POS = 438,
+    NEG = 439,
+    ADDRESSOF = 440
+  };
 #endif
 
 #endif
 
-
-
+/* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
 {
 {
-
-/* Line 293 of yacc.c  */
-#line 129 "parser.y"
+#line 137 "parser.y" /* yacc.c:355  */
 
        attr_t *attr;
        attr_list_t *attr_list;
 
        attr_t *attr;
        attr_list_t *attr_list;
@@ -452,22 +457,22 @@ typedef union YYSTYPE
        struct _decl_spec_t *declspec;
        enum storage_class stgclass;
 
        struct _decl_spec_t *declspec;
        enum storage_class stgclass;
 
-
-
-/* Line 293 of yacc.c  */
-#line 459 "parser.tab.c"
-} YYSTYPE;
+#line 461 "parser.tab.c" /* yacc.c:355  */
+};
 # define YYSTYPE_IS_TRIVIAL 1
 # define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 #endif
 
 
 # define YYSTYPE_IS_DECLARED 1
 #endif
 
 
-/* Copy the second part of user declarations.  */
+extern YYSTYPE parser_lval;
+
+int parser_parse (void);
+
 
 
 
 
-/* Line 343 of yacc.c  */
-#line 471 "parser.tab.c"
+/* Copy the second part of user declarations.  */
+
+#line 476 "parser.tab.c" /* yacc.c:358  */
 
 #ifdef short
 # undef short
 
 #ifdef short
 # undef short
@@ -481,11 +486,8 @@ typedef unsigned char yytype_uint8;
 
 #ifdef YYTYPE_INT8
 typedef YYTYPE_INT8 yytype_int8;
 
 #ifdef YYTYPE_INT8
 typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
 #else
 #else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
 #endif
 
 #ifdef YYTYPE_UINT16
 #endif
 
 #ifdef YYTYPE_UINT16
@@ -505,8 +507,7 @@ typedef short int yytype_int16;
 #  define YYSIZE_T __SIZE_TYPE__
 # elif defined size_t
 #  define YYSIZE_T size_t
 #  define YYSIZE_T __SIZE_TYPE__
 # elif defined size_t
 #  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 #  define YYSIZE_T size_t
 # else
 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 #  define YYSIZE_T size_t
 # else
@@ -520,39 +521,68 @@ typedef short int yytype_int16;
 # if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 # if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
 #  endif
 # endif
 # ifndef YY_
 #  endif
 # endif
 # ifndef YY_
-#  define YY_(msgid) msgid
+#  define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__                                               \
+      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
+     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+#  define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
 # endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
 # endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
 #else
 #else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
 #endif
 
 #endif
 
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+    _Pragma ("GCC diagnostic pop")
 #else
 #else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
-    int yyi;
+# define YY_INITIAL_VALUE(Value) Value
 #endif
 #endif
-{
-  return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
 #endif
 
 #endif
 
+
 #if ! defined yyoverflow || YYERROR_VERBOSE
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 #if ! defined yyoverflow || YYERROR_VERBOSE
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
@@ -570,9 +600,9 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
 #     ifndef EXIT_SUCCESS
 #      define EXIT_SUCCESS 0
 #     endif
 #     ifndef EXIT_SUCCESS
 #      define EXIT_SUCCESS 0
 #     endif
@@ -582,8 +612,8 @@ YYID (yyi)
 # endif
 
 # ifdef YYSTACK_ALLOC
 # endif
 
 # ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+   /* Pacify GCC's 'empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
     /* The OS might guarantee only one guard page at the bottom of the stack,
        and a page size can be as small as 4096 bytes.  So we cannot safely
 #  ifndef YYSTACK_ALLOC_MAXIMUM
     /* The OS might guarantee only one guard page at the bottom of the stack,
        and a page size can be as small as 4096 bytes.  So we cannot safely
@@ -599,7 +629,7 @@ YYID (yyi)
 #  endif
 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 #  endif
 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
-            && (defined YYFREE || defined free)))
+             && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 #   ifndef EXIT_SUCCESS
 #    define EXIT_SUCCESS 0
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 #   ifndef EXIT_SUCCESS
 #    define EXIT_SUCCESS 0
@@ -607,15 +637,13 @@ YYID (yyi)
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+#   if ! defined malloc && ! defined EXIT_SUCCESS
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+#   if ! defined free && ! defined EXIT_SUCCESS
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
@@ -625,7 +653,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 
 #if (! defined yyoverflow \
      && (! defined __cplusplus \
 
 #if (! defined yyoverflow \
      && (! defined __cplusplus \
-        || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
@@ -650,35 +678,35 @@ union yyalloc
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)                          \
-    do                                                                 \
-      {                                                                        \
-       YYSIZE_T yynewbytes;                                            \
-       YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
-       Stack = &yyptr->Stack_alloc;                                    \
-       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-       yyptr += yynewbytes / sizeof (*yyptr);                          \
-      }                                                                        \
-    while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
+    do                                                                  \
+      {                                                                 \
+        YYSIZE_T yynewbytes;                                            \
+        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
+        Stack = &yyptr->Stack_alloc;                                    \
+        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+        yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                 \
+    while (0)
 
 #endif
 
 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
 
 #endif
 
 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from FROM to TO.  The source and destination do
+/* Copy COUNT objects from SRC to DST.  The source and destination do
    not overlap.  */
 # ifndef YYCOPY
 #  if defined __GNUC__ && 1 < __GNUC__
    not overlap.  */
 # ifndef YYCOPY
 #  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
 #  else
 #  else
-#   define YYCOPY(To, From, Count)             \
-      do                                       \
-       {                                       \
-         YYSIZE_T yyi;                         \
-         for (yyi = 0; yyi < (Count); yyi++)   \
-           (To)[yyi] = (From)[yyi];            \
-       }                                       \
-      while (YYID (0))
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (0)
 #  endif
 # endif
 #endif /* !YYCOPY_NEEDED */
 #  endif
 # endif
 #endif /* !YYCOPY_NEEDED */
@@ -686,25 +714,27 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  3
 /* YYLAST -- Last index in YYTABLE.  */
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  3
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   3077
+#define YYLAST   3094
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  210
 /* YYNNTS -- Number of nonterminals.  */
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  210
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  101
+#define YYNNTS  103
 /* YYNRULES -- Number of rules.  */
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  387
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  679
+#define YYNRULES  389
+/* YYNSTATES -- Number of states.  */
+#define YYNSTATES  681
 
 
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+   by yylex, with out-of-bounds checking.  */
 #define YYUNDEFTOK  2
 #define YYMAXUTOK   440
 
 #define YYUNDEFTOK  2
 #define YYMAXUTOK   440
 
-#define YYTRANSLATE(YYX)                                               \
+#define YYTRANSLATE(YYX)                                                \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+   as returned by yylex, without out-of-bounds checking.  */
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -755,219 +785,52 @@ static const yytype_uint8 yytranslate[] =
 };
 
 #if YYDEBUG
 };
 
 #if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint16 yyprhs[] =
-{
-       0,     0,     3,     5,     6,    12,    15,    18,    22,    25,
-      28,    31,    34,    35,    38,    44,    47,    51,    54,    57,
-      60,    63,    66,    67,    70,    71,    73,    75,    78,    81,
-      83,    86,    88,    90,    93,    95,    98,   100,   103,   106,
-     109,   112,   117,   121,   125,   131,   134,   138,   143,   144,
-     146,   148,   152,   154,   158,   162,   165,   169,   173,   176,
-     177,   179,   183,   185,   189,   194,   196,   200,   201,   203,
-     208,   210,   212,   214,   216,   218,   223,   228,   230,   232,
-     234,   236,   238,   240,   242,   244,   246,   248,   253,   255,
-     257,   259,   264,   266,   268,   270,   275,   280,   282,   284,
-     286,   288,   293,   298,   303,   308,   313,   315,   320,   322,
-     324,   329,   331,   336,   338,   340,   345,   350,   352,   354,
-     356,   358,   360,   362,   364,   366,   368,   370,   372,   374,
-     376,   378,   383,   385,   387,   389,   394,   399,   401,   403,
-     405,   407,   409,   416,   418,   423,   425,   427,   429,   434,
-     436,   438,   440,   445,   450,   455,   460,   462,   464,   469,
-     474,   479,   481,   483,   488,   493,   498,   500,   502,   504,
-     506,   508,   510,   512,   513,   516,   521,   525,   526,   529,
-     531,   533,   537,   541,   543,   549,   551,   555,   556,   558,
-     560,   562,   564,   566,   568,   570,   572,   574,   576,   578,
-     584,   588,   592,   596,   600,   604,   608,   612,   616,   620,
-     624,   628,   632,   636,   640,   644,   648,   652,   656,   659,
-     662,   665,   668,   671,   674,   678,   682,   688,   694,   699,
-     703,   705,   709,   711,   713,   714,   717,   722,   726,   729,
-     732,   733,   736,   739,   741,   745,   748,   750,   754,   757,
-     758,   760,   761,   763,   765,   767,   769,   771,   773,   775,
-     778,   781,   783,   785,   787,   789,   791,   793,   794,   796,
-     798,   801,   803,   806,   809,   811,   813,   815,   818,   821,
-     824,   830,   833,   834,   837,   840,   843,   846,   849,   852,
-     856,   859,   863,   869,   875,   876,   879,   882,   885,   888,
-     895,   904,   907,   910,   913,   916,   919,   922,   928,   930,
-     932,   934,   936,   938,   939,   942,   945,   949,   950,   952,
-     955,   958,   961,   965,   968,   970,   972,   976,   979,   984,
-     988,   991,   993,   997,  1000,  1001,  1003,  1007,  1010,  1012,
-    1016,  1021,  1025,  1028,  1030,  1034,  1037,  1038,  1040,  1042,
-    1046,  1049,  1051,  1055,  1060,  1062,  1066,  1067,  1070,  1073,
-    1075,  1079,  1081,  1085,  1087,  1089,  1091,  1093,  1095,  1097,
-    1099,  1101,  1107,  1109,  1111,  1113,  1115,  1118,  1120,  1123,
-    1125,  1128,  1133,  1139,  1145,  1156,  1158,  1162
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int16 yyrhs[] =
-{
-     211,     0,    -1,   212,    -1,    -1,   212,   266,   204,   212,
-     205,    -1,   212,   278,    -1,   212,   277,    -1,   212,   263,
-     206,    -1,   212,   265,    -1,   212,   281,    -1,   212,   224,
-      -1,   212,   216,    -1,    -1,   213,   278,    -1,   213,   266,
-     204,   213,   205,    -1,   213,   277,    -1,   213,   263,   206,
-      -1,   213,   265,    -1,   213,   281,    -1,   213,   216,    -1,
-     213,   221,    -1,   213,   224,    -1,    -1,   214,   216,    -1,
-      -1,   206,    -1,   218,    -1,   217,   206,    -1,   256,   206,
-      -1,   220,    -1,   308,   206,    -1,     4,    -1,   242,    -1,
-      66,     3,    -1,   306,    -1,   154,     3,    -1,   309,    -1,
-     163,     3,    -1,   231,   242,    -1,   231,   306,    -1,   231,
-     309,    -1,    49,   207,     9,   208,    -1,    90,     9,   206,
-      -1,   219,   213,    13,    -1,    91,   207,     9,   208,   215,
-      -1,   102,     3,    -1,   231,   222,   204,    -1,   223,   213,
-     205,   215,    -1,    -1,   227,    -1,   228,    -1,   226,   181,
-     228,    -1,   226,    -1,   226,   181,    23,    -1,   231,   286,
-     297,    -1,   286,   297,    -1,   202,   245,   203,    -1,   202,
-     191,   203,    -1,   202,   203,    -1,    -1,   231,    -1,   202,
-     232,   203,    -1,   234,    -1,   232,   181,   234,    -1,   232,
-     203,   202,   234,    -1,     9,    -1,   233,   181,     9,    -1,
-      -1,    24,    -1,    26,   207,     9,   208,    -1,    27,    -1,
-      28,    -1,    30,    -1,    31,    -1,    33,    -1,    36,   207,
-     259,   208,    -1,    38,   207,   246,   208,    -1,    42,    -1,
-      43,    -1,    45,    -1,    46,    -1,    47,    -1,    48,    -1,
-      50,    -1,    51,    -1,    52,    -1,    53,    -1,    54,   207,
-     248,   208,    -1,    55,    -1,    56,    -1,    57,    -1,    59,
-     207,     9,   208,    -1,    61,    -1,    62,    -1,    63,    -1,
-      64,   207,   233,   208,    -1,    65,   207,   248,   208,    -1,
-      68,    -1,    72,    -1,    74,    -1,    75,    -1,    77,   207,
-     247,   208,    -1,    78,   207,     9,   208,    -1,    79,   207,
-       9,   208,    -1,    80,   207,   247,   208,    -1,    81,   207,
-       9,   208,    -1,    82,    -1,    84,   207,   247,   208,    -1,
-      85,    -1,    86,    -1,    87,   207,   245,   208,    -1,    88,
-      -1,    89,   207,   228,   208,    -1,    92,    -1,    95,    -1,
-     101,   207,   243,   208,    -1,   100,   207,   247,   208,    -1,
-     100,    -1,   103,    -1,   104,    -1,   106,    -1,   107,    -1,
-     111,    -1,   112,    -1,   113,    -1,   114,    -1,   115,    -1,
-     116,    -1,   118,    -1,   119,    -1,   120,    -1,   121,   207,
-       9,   208,    -1,   122,    -1,   123,    -1,   124,    -1,   126,
-     207,   305,   208,    -1,   127,   207,     9,   208,    -1,   129,
-      -1,   130,    -1,   131,    -1,   132,    -1,   134,    -1,   135,
-     207,   247,   181,   247,   208,    -1,   136,    -1,   139,   207,
-     307,   208,    -1,   140,    -1,   141,    -1,   142,    -1,   146,
-     207,   243,   208,    -1,   149,    -1,   152,    -1,   153,    -1,
-     156,   207,   245,   208,    -1,   157,   207,   307,   208,    -1,
-     159,   207,   307,   208,    -1,   158,   207,   304,   208,    -1,
-     162,    -1,   166,    -1,   167,   207,   307,   208,    -1,   168,
-     207,   235,   208,    -1,    29,   207,   235,   208,    -1,   169,
-      -1,   170,    -1,   171,   207,   310,   208,    -1,   172,   207,
-       9,   208,    -1,   175,   207,   307,   208,    -1,   305,    -1,
-      12,    -1,     9,    -1,    39,    -1,    71,    -1,   125,    -1,
-     151,    -1,    -1,   237,   238,    -1,    38,   247,   183,   253,
-      -1,    51,   183,   253,    -1,    -1,   240,   181,    -1,   240,
-      -1,   241,    -1,   240,   181,   241,    -1,   259,   209,   247,
-      -1,   259,    -1,    66,   258,   204,   239,   205,    -1,   244,
-      -1,   243,   181,   244,    -1,    -1,   245,    -1,     6,    -1,
-       7,    -1,     8,    -1,    70,    -1,   117,    -1,   160,    -1,
-       9,    -1,    10,    -1,    11,    -1,     3,    -1,   245,   182,
-     245,   183,   245,    -1,   245,    21,   245,    -1,   245,    22,
-     245,    -1,   245,   184,   245,    -1,   245,   185,   245,    -1,
-     245,   186,   245,    -1,   245,    17,   245,    -1,   245,    18,
-     245,    -1,   245,   188,   245,    -1,   245,   187,   245,    -1,
-     245,    19,   245,    -1,   245,    20,   245,    -1,   245,    14,
-     245,    -1,   245,    15,   245,    -1,   245,   190,   245,    -1,
-     245,   189,   245,    -1,   245,   193,   245,    -1,   245,   191,
-     245,    -1,   245,   192,   245,    -1,   194,   245,    -1,   195,
-     245,    -1,   190,   245,    -1,   189,   245,    -1,   186,   245,
-      -1,   191,   245,    -1,   245,    16,     3,    -1,   245,   201,
-       3,    -1,   207,   286,   293,   208,   245,    -1,   147,   207,
-     286,   293,   208,    -1,   245,   202,   245,   203,    -1,   207,
-     245,   208,    -1,   247,    -1,   246,   181,   247,    -1,   245,
-      -1,   245,    -1,    -1,   249,   250,    -1,   230,   286,   302,
-     206,    -1,   230,   309,   206,    -1,   254,   206,    -1,   231,
-     206,    -1,    -1,   252,   251,    -1,   254,   206,    -1,   206,
-      -1,   230,   286,   289,    -1,   230,   306,    -1,   256,    -1,
-     231,   286,   303,    -1,   286,   303,    -1,    -1,   259,    -1,
-      -1,     3,    -1,     5,    -1,     3,    -1,     5,    -1,    34,
-      -1,   174,    -1,   262,    -1,   145,   262,    -1,   165,   262,
-      -1,   165,    -1,    73,    -1,    60,    -1,    32,    -1,    67,
-      -1,    76,    -1,    -1,    96,    -1,    96,    -1,   144,   261,
-      -1,   148,    -1,   105,   261,    -1,    83,   261,    -1,    98,
-      -1,    40,    -1,    97,    -1,    41,     3,    -1,    41,     5,
-      -1,   231,   263,    -1,   264,   204,   267,   205,   215,    -1,
-     110,     3,    -1,    -1,   267,   268,    -1,   230,   278,    -1,
-      58,     3,    -1,    58,     5,    -1,   231,   269,    -1,   128,
-     183,    -1,   271,   254,   206,    -1,   108,   183,    -1,   272,
-     255,   206,    -1,   270,   204,   271,   272,   205,    -1,   270,
-     204,   275,   206,   205,    -1,    -1,   183,     5,    -1,    99,
-       3,    -1,    99,     5,    -1,   231,   275,    -1,   276,   274,
-     204,   214,   205,   215,    -1,   276,   183,     3,   204,   220,
-     214,   205,   215,    -1,   273,   215,    -1,   275,   206,    -1,
-     269,   206,    -1,   109,     3,    -1,   109,     5,    -1,   231,
-     279,    -1,   280,   204,   214,   205,   215,    -1,    69,    -1,
-     150,    -1,   138,    -1,    94,    -1,    44,    -1,    -1,   285,
-     284,    -1,   307,   287,    -1,   288,   307,   287,    -1,    -1,
-     288,    -1,   284,   287,    -1,   283,   287,    -1,   282,   287,
-      -1,   191,   285,   289,    -1,   236,   289,    -1,   290,    -1,
-     259,    -1,   207,   289,   208,    -1,   290,   229,    -1,   290,
-     207,   225,   208,    -1,   191,   285,   293,    -1,   236,   293,
-      -1,   294,    -1,   191,   285,   297,    -1,   236,   297,    -1,
-      -1,   291,    -1,   207,   292,   208,    -1,   294,   229,    -1,
-     229,    -1,   207,   225,   208,    -1,   294,   207,   225,   208,
-      -1,   191,   285,   297,    -1,   236,   297,    -1,   298,    -1,
-     191,   285,   297,    -1,   236,   297,    -1,    -1,   295,    -1,
-     259,    -1,   207,   296,   208,    -1,   298,   229,    -1,   229,
-      -1,   207,   225,   208,    -1,   298,   207,   225,   208,    -1,
-     289,    -1,   299,   181,   289,    -1,    -1,   183,   248,    -1,
-     295,   300,    -1,   301,    -1,   302,   181,   301,    -1,   289,
-      -1,   289,   209,   248,    -1,   176,    -1,   177,    -1,   178,
-      -1,   179,    -1,   180,    -1,   137,    -1,   164,    -1,   133,
-      -1,   154,   258,   204,   249,   205,    -1,   173,    -1,     5,
-      -1,   260,    -1,   242,    -1,    66,     3,    -1,   306,    -1,
-     154,     3,    -1,   309,    -1,   163,     3,    -1,   143,   207,
-     307,   208,    -1,   230,   161,   230,   286,   299,    -1,   163,
-     258,   204,   252,   205,    -1,   163,   258,   155,   207,   254,
-     208,   257,   204,   237,   205,    -1,     6,    -1,     6,   201,
-       6,    -1,     7,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
 static const yytype_uint16 yyrline[] =
 {
-       0,   308,   308,   322,   323,   325,   326,   327,   330,   333,
-     334,   335,   338,   339,   340,   342,   343,   344,   347,   348,
-     349,   350,   353,   354,   357,   358,   362,   363,   364,   365,
-     366,   367,   371,   372,   373,   374,   375,   376,   377,   378,
-     379,   382,   384,   392,   398,   402,   404,   408,   415,   416,
-     419,   420,   423,   424,   428,   433,   440,   444,   445,   448,
-     449,   453,   456,   457,   458,   461,   462,   465,   466,   467,
-     468,   469,   470,   471,   472,   473,   474,   475,   476,   477,
-     478,   479,   480,   481,   482,   483,   484,   485,   486,   487,
-     488,   489,   490,   491,   492,   493,   494,   495,   496,   497,
-     498,   499,   500,   501,   502,   503,   504,   505,   506,   507,
-     508,   509,   510,   511,   512,   513,   514,   515,   516,   517,
-     518,   519,   520,   521,   522,   523,   524,   525,   526,   527,
-     528,   529,   530,   531,   532,   533,   534,   535,   536,   537,
-     538,   539,   540,   544,   545,   546,   547,   548,   549,   550,
-     551,   552,   553,   554,   555,   556,   557,   558,   559,   560,
-     561,   562,   563,   564,   565,   566,   567,   571,   572,   577,
-     578,   579,   580,   583,   584,   587,   591,   597,   598,   599,
-     602,   606,   618,   622,   627,   630,   631,   634,   635,   638,
-     639,   640,   641,   642,   643,   644,   645,   646,   647,   648,
-     649,   650,   651,   652,   653,   654,   655,   656,   657,   658,
-     659,   660,   661,   662,   663,   664,   665,   666,   667,   668,
-     669,   670,   671,   672,   673,   674,   675,   677,   679,   680,
-     683,   684,   687,   693,   699,   700,   703,   708,   715,   716,
-     719,   720,   724,   725,   728,   732,   738,   746,   750,   755,
-     756,   759,   760,   761,   764,   766,   769,   770,   771,   772,
-     773,   774,   775,   776,   777,   778,   779,   782,   783,   786,
-     787,   788,   789,   790,   791,   792,   793,   796,   797,   805,
-     811,   815,   818,   819,   823,   826,   827,   830,   839,   840,
-     843,   844,   847,   853,   859,   860,   863,   864,   867,   877,
-     886,   892,   896,   897,   900,   901,   904,   909,   916,   917,
-     918,   922,   926,   929,   930,   933,   934,   938,   939,   943,
-     944,   945,   949,   951,   953,   957,   958,   959,   960,   968,
-     970,   972,   977,   979,   984,   985,   990,   991,   992,   993,
-     998,  1007,  1009,  1010,  1015,  1017,  1021,  1022,  1029,  1030,
-    1031,  1032,  1033,  1038,  1046,  1047,  1050,  1051,  1054,  1061,
-    1062,  1067,  1068,  1072,  1073,  1074,  1075,  1076,  1080,  1081,
-    1082,  1085,  1088,  1089,  1090,  1091,  1092,  1093,  1094,  1095,
-    1096,  1097,  1100,  1107,  1109,  1115,  1116,  1117
+       0,   316,   316,   330,   331,   331,   333,   334,   335,   338,
+     341,   342,   343,   346,   347,   348,   348,   350,   351,   352,
+     355,   356,   357,   358,   361,   362,   365,   366,   370,   371,
+     372,   373,   374,   375,   379,   380,   381,   382,   383,   384,
+     385,   386,   387,   390,   392,   400,   406,   410,   412,   416,
+     423,   424,   427,   428,   431,   432,   436,   441,   448,   452,
+     453,   456,   457,   461,   464,   465,   466,   469,   470,   473,
+     474,   475,   476,   477,   478,   479,   480,   481,   482,   483,
+     484,   485,   486,   487,   488,   489,   490,   491,   492,   493,
+     494,   495,   496,   497,   498,   499,   500,   501,   502,   503,
+     504,   505,   506,   507,   508,   509,   510,   511,   512,   513,
+     514,   515,   516,   517,   518,   519,   520,   521,   522,   523,
+     524,   525,   526,   527,   528,   529,   530,   531,   532,   533,
+     534,   535,   536,   537,   538,   539,   540,   541,   542,   543,
+     544,   545,   546,   547,   548,   552,   553,   554,   555,   556,
+     557,   558,   559,   560,   561,   562,   563,   564,   565,   566,
+     567,   568,   569,   570,   571,   572,   573,   574,   575,   579,
+     580,   585,   586,   587,   588,   591,   592,   595,   599,   605,
+     606,   607,   610,   614,   626,   630,   635,   638,   639,   642,
+     643,   646,   647,   648,   649,   650,   651,   652,   653,   654,
+     655,   656,   657,   658,   659,   660,   661,   662,   663,   664,
+     665,   666,   667,   668,   669,   670,   671,   672,   673,   674,
+     675,   676,   677,   678,   679,   680,   681,   682,   683,   685,
+     687,   688,   691,   692,   695,   701,   707,   708,   711,   716,
+     723,   724,   727,   728,   732,   733,   736,   740,   746,   754,
+     758,   763,   764,   767,   768,   769,   772,   774,   777,   778,
+     779,   780,   781,   782,   783,   784,   785,   786,   787,   790,
+     791,   794,   795,   796,   797,   798,   799,   800,   801,   804,
+     805,   813,   819,   823,   826,   827,   831,   834,   835,   838,
+     847,   848,   851,   852,   855,   861,   867,   868,   871,   872,
+     875,   885,   894,   900,   904,   905,   908,   909,   912,   917,
+     924,   925,   926,   930,   934,   937,   938,   941,   942,   946,
+     947,   951,   952,   953,   957,   959,   961,   965,   966,   967,
+     968,   976,   978,   980,   985,   987,   992,   993,   998,   999,
+    1000,  1001,  1006,  1015,  1017,  1018,  1023,  1025,  1029,  1030,
+    1037,  1038,  1039,  1040,  1041,  1046,  1054,  1055,  1058,  1059,
+    1062,  1069,  1070,  1075,  1076,  1080,  1081,  1082,  1083,  1084,
+    1088,  1089,  1090,  1093,  1096,  1097,  1098,  1099,  1100,  1101,
+    1102,  1103,  1104,  1105,  1108,  1115,  1117,  1123,  1124,  1125
 };
 #endif
 
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 1
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
@@ -1007,37 +870,37 @@ static const char *const yytname[] =
   "tVERSION", "tVIPROGID", "tVOID", "tWCHAR", "tWIREMARSHAL", "tAPARTMENT",
   "tNEUTRAL", "tSINGLE", "tFREE", "tBOTH", "','", "'?'", "':'", "'|'",
   "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "'!'",
   "tVERSION", "tVIPROGID", "tVOID", "tWCHAR", "tWIREMARSHAL", "tAPARTMENT",
   "tNEUTRAL", "tSINGLE", "tFREE", "tBOTH", "','", "'?'", "':'", "'|'",
   "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "'!'",
-  "'~'", "ADDRESSOF", "NEG", "POS", "PPTR", "CAST", "'.'", "'['", "']'",
+  "'~'", "CAST", "PPTR", "POS", "NEG", "ADDRESSOF", "'.'", "'['", "']'",
   "'{'", "'}'", "';'", "'('", "')'", "'='", "$accept", "input",
   "'{'", "'}'", "';'", "'('", "')'", "'='", "$accept", "input",
-  "gbl_statements", "imp_statements", "int_statements", "semicolon_opt",
-  "statement", "typedecl", "cppquote", "import_start", "import",
-  "importlib", "libraryhdr", "library_start", "librarydef", "m_args",
-  "arg_list", "args", "arg", "array", "m_attributes", "attributes",
-  "attrib_list", "str_list", "attribute", "uuid_string", "callconv",
-  "cases", "case", "enums", "enum_list", "enum", "enumdef", "m_exprs",
-  "m_expr", "expr", "expr_list_int_const", "expr_int_const", "expr_const",
-  "fields", "field", "ne_union_field", "ne_union_fields", "union_field",
-  "s_field", "funcdef", "declaration", "m_ident", "t_ident", "ident",
-  "base_type", "m_int", "int_std", "coclass", "coclasshdr", "coclassdef",
-  "namespacedef", "coclass_ints", "coclass_int", "dispinterface",
-  "dispinterfacehdr", "dispint_props", "dispint_meths", "dispinterfacedef",
-  "inherit", "interface", "interfacehdr", "interfacedef", "interfacedec",
-  "module", "modulehdr", "moduledef", "storage_cls_spec",
-  "function_specifier", "type_qualifier", "m_type_qual_list", "decl_spec",
-  "m_decl_spec_no_type", "decl_spec_no_type", "declarator",
-  "direct_declarator", "abstract_declarator",
-  "abstract_declarator_no_direct", "m_abstract_declarator",
-  "abstract_direct_declarator", "any_declarator",
+  "gbl_statements", "$@1", "imp_statements", "$@2", "int_statements",
+  "semicolon_opt", "statement", "typedecl", "cppquote", "import_start",
+  "import", "importlib", "libraryhdr", "library_start", "librarydef",
+  "m_args", "arg_list", "args", "arg", "array", "m_attributes",
+  "attributes", "attrib_list", "str_list", "attribute", "uuid_string",
+  "callconv", "cases", "case", "enums", "enum_list", "enum", "enumdef",
+  "m_exprs", "m_expr", "expr", "expr_list_int_const", "expr_int_const",
+  "expr_const", "fields", "field", "ne_union_field", "ne_union_fields",
+  "union_field", "s_field", "funcdef", "declaration", "m_ident", "t_ident",
+  "ident", "base_type", "m_int", "int_std", "coclass", "coclasshdr",
+  "coclassdef", "namespacedef", "coclass_ints", "coclass_int",
+  "dispinterface", "dispinterfacehdr", "dispint_props", "dispint_meths",
+  "dispinterfacedef", "inherit", "interface", "interfacehdr",
+  "interfacedef", "interfacedec", "module", "modulehdr", "moduledef",
+  "storage_cls_spec", "function_specifier", "type_qualifier",
+  "m_type_qual_list", "decl_spec", "m_decl_spec_no_type",
+  "decl_spec_no_type", "declarator", "direct_declarator",
+  "abstract_declarator", "abstract_declarator_no_direct",
+  "m_abstract_declarator", "abstract_direct_declarator", "any_declarator",
   "any_declarator_no_direct", "m_any_declarator", "any_direct_declarator",
   "declarator_list", "m_bitfield", "struct_declarator",
   "struct_declarator_list", "init_declarator", "threading_type",
   "any_declarator_no_direct", "m_any_declarator", "any_direct_declarator",
   "declarator_list", "m_bitfield", "struct_declarator",
   "struct_declarator_list", "init_declarator", "threading_type",
-  "pointer_type", "structdef", "type", "typedef", "uniondef", "version", 0
+  "pointer_type", "structdef", "type", "typedef", "uniondef", "version", YY_NULLPTR
 };
 #endif
 
 # ifdef YYPRINT
 };
 #endif
 
 # ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+   (internal) symbol number NUM (which must be that of a token).  */
 static const yytype_uint16 yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
 static const yytype_uint16 yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
@@ -1064,415 +927,322 @@ static const yytype_uint16 yytoknum[] =
 };
 # endif
 
 };
 # endif
 
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint16 yyr1[] =
-{
-       0,   210,   211,   212,   212,   212,   212,   212,   212,   212,
-     212,   212,   213,   213,   213,   213,   213,   213,   213,   213,
-     213,   213,   214,   214,   215,   215,   216,   216,   216,   216,
-     216,   216,   217,   217,   217,   217,   217,   217,   217,   217,
-     217,   218,   219,   220,   221,   222,   223,   224,   225,   225,
-     226,   226,   227,   227,   228,   228,   229,   229,   229,   230,
-     230,   231,   232,   232,   232,   233,   233,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   234,   234,   234,
-     234,   234,   234,   234,   234,   234,   234,   235,   235,   236,
-     236,   236,   236,   237,   237,   238,   238,   239,   239,   239,
-     240,   240,   241,   241,   242,   243,   243,   244,   244,   245,
-     245,   245,   245,   245,   245,   245,   245,   245,   245,   245,
-     245,   245,   245,   245,   245,   245,   245,   245,   245,   245,
-     245,   245,   245,   245,   245,   245,   245,   245,   245,   245,
-     245,   245,   245,   245,   245,   245,   245,   245,   245,   245,
-     246,   246,   247,   248,   249,   249,   250,   250,   251,   251,
-     252,   252,   253,   253,   254,   254,   255,   256,   256,   257,
-     257,   258,   258,   258,   259,   259,   260,   260,   260,   260,
-     260,   260,   260,   260,   260,   260,   260,   261,   261,   262,
-     262,   262,   262,   262,   262,   262,   262,   263,   263,   264,
-     265,   266,   267,   267,   268,   269,   269,   270,   271,   271,
-     272,   272,   273,   273,   274,   274,   275,   275,   276,   277,
-     277,   277,   278,   278,   279,   279,   280,   281,   282,   282,
-     282,   283,   284,   285,   285,   286,   286,   287,   287,   288,
-     288,   288,   289,   289,   289,   290,   290,   290,   290,   291,
-     291,   291,   292,   292,   293,   293,   294,   294,   294,   294,
-     294,   295,   295,   295,   296,   296,   297,   297,   298,   298,
-     298,   298,   298,   298,   299,   299,   300,   300,   301,   302,
-     302,   303,   303,   304,   304,   304,   304,   304,   305,   305,
-     305,   306,   307,   307,   307,   307,   307,   307,   307,   307,
-     307,   307,   308,   309,   309,   310,   310,   310
-};
+#define YYPACT_NINF -530
 
 
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
+#define yypact_value_is_default(Yystate) \
+  (!!((Yystate) == (-530)))
+
+#define YYTABLE_NINF -255
+
+#define yytable_value_is_error(Yytable_value) \
+  0
+
+  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+     STATE-NUM.  */
+static const yytype_int16 yypact[] =
 {
 {
-       0,     2,     1,     0,     5,     2,     2,     3,     2,     2,
-       2,     2,     0,     2,     5,     2,     3,     2,     2,     2,
-       2,     2,     0,     2,     0,     1,     1,     2,     2,     1,
-       2,     1,     1,     2,     1,     2,     1,     2,     2,     2,
-       2,     4,     3,     3,     5,     2,     3,     4,     0,     1,
-       1,     3,     1,     3,     3,     2,     3,     3,     2,     0,
-       1,     3,     1,     3,     4,     1,     3,     0,     1,     4,
-       1,     1,     1,     1,     1,     4,     4,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     4,     1,     1,
-       1,     4,     1,     1,     1,     4,     4,     1,     1,     1,
-       1,     4,     4,     4,     4,     4,     1,     4,     1,     1,
-       4,     1,     4,     1,     1,     4,     4,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     4,     1,     1,     1,     4,     4,     1,     1,     1,
-       1,     1,     6,     1,     4,     1,     1,     1,     4,     1,
-       1,     1,     4,     4,     4,     4,     1,     1,     4,     4,
-       4,     1,     1,     4,     4,     4,     1,     1,     1,     1,
-       1,     1,     1,     0,     2,     4,     3,     0,     2,     1,
-       1,     3,     3,     1,     5,     1,     3,     0,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     5,
-       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
-       3,     3,     3,     3,     3,     3,     3,     3,     2,     2,
-       2,     2,     2,     2,     3,     3,     5,     5,     4,     3,
-       1,     3,     1,     1,     0,     2,     4,     3,     2,     2,
-       0,     2,     2,     1,     3,     2,     1,     3,     2,     0,
-       1,     0,     1,     1,     1,     1,     1,     1,     1,     2,
-       2,     1,     1,     1,     1,     1,     1,     0,     1,     1,
-       2,     1,     2,     2,     1,     1,     1,     2,     2,     2,
-       5,     2,     0,     2,     2,     2,     2,     2,     2,     3,
-       2,     3,     5,     5,     0,     2,     2,     2,     2,     6,
-       8,     2,     2,     2,     2,     2,     2,     5,     1,     1,
-       1,     1,     1,     0,     2,     2,     3,     0,     1,     2,
-       2,     2,     3,     2,     1,     1,     3,     2,     4,     3,
-       2,     1,     3,     2,     0,     1,     3,     2,     1,     3,
-       4,     3,     2,     1,     3,     2,     0,     1,     1,     3,
-       2,     1,     3,     4,     1,     3,     0,     2,     2,     1,
-       3,     1,     3,     1,     1,     1,     1,     1,     1,     1,
-       1,     5,     1,     1,     1,     1,     2,     1,     2,     1,
-       2,     4,     5,     5,    10,     1,     3,     1
+    -530,    65,  1689,  -530,  -530,  -530,  -530,  -530,  -530,   107,
+    -530,  -134,   139,  -530,   153,  -530,  -530,  -530,  -530,   -12,
+      82,  -530,  -530,  -530,  -530,   168,   -12,   108,  -530,   -88,
+     -12,   462,  -530,  -530,   171,   179,   462,  -530,  -530,  2919,
+    -530,   -54,  -530,  -530,  -530,  -530,  -530,    -1,  2596,    14,
+      24,  -530,  -530,    29,   -34,  -530,   -29,    36,     9,    37,
+      43,   -19,  -530,  -530,    22,  -530,   204,   204,   204,   254,
+    2768,    44,   204,    54,    57,  -530,  -530,   202,  -530,  -530,
+     -21,  -530,    27,  -530,  -530,    60,  -530,  -530,  -530,  -530,
+    2768,  -530,  -530,    49,    32,  -119,  -112,  -530,  -530,    64,
+    -530,  -530,    76,  -530,  -530,  -530,    89,    94,  -530,  -530,
+    -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,   115,  -530,
+    -530,  -530,   116,  -530,  -530,  -530,   129,   137,  -530,  -530,
+    -530,  -530,   138,   140,   142,   143,   144,  -530,   145,  -530,
+    -530,   152,  -530,   156,  -530,  -530,   157,   159,  -530,  -530,
+    -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,
+    -530,   160,  -530,  -530,  -530,   161,   162,  -530,  -530,  -530,
+    -530,  -530,  -530,   163,  -530,  -530,   164,  -530,  -530,  -530,
+     165,  -530,  -530,  -530,   166,   167,   169,   173,  -530,  -530,
+    -530,   175,   176,  -530,  -530,   177,   178,   182,  -110,  -530,
+    -530,  -530,  1572,   829,    70,   251,   264,   274,   277,   289,
+     184,   185,  -530,  -530,  -530,  -530,   254,   186,   187,  -530,
+    -530,  -530,  -530,  -530,   -31,  -530,  -530,  -530,   292,   190,
+    -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,
+    -530,  -530,   254,   254,  -530,   194,   -81,  -530,  -530,  -530,
+     204,  -530,  -530,  -530,   198,   326,  -530,   200,  -530,   183,
+    -530,   366,   134,   326,   665,   665,   386,   402,   665,   665,
+     404,   405,   665,   406,   665,   665,  2120,   665,   665,   407,
+     -35,   408,   665,  2768,   665,   665,  2768,   110,  2768,  2768,
+     134,   181,   409,  2768,  2919,   217,  -530,   214,  -530,  -530,
+    -530,   241,  -530,   244,  -530,  -530,  -530,    37,  2682,  -530,
+     245,  -530,  -530,  -530,   245,  -109,  -530,  -530,   -48,  -530,
+     267,   -85,   252,   253,  -530,  -530,  1165,    61,   258,  -530,
+     665,   580,  2120,  -530,  -530,  -530,   263,   278,  -530,   260,
+    -530,   -37,    70,   -36,   259,  -530,  -530,   265,   266,  -530,
+    -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,   268,  -530,
+     665,   665,   665,   665,   665,   665,   565,  2364,  -156,  -530,
+    2364,   275,   276,  -530,  -130,   279,   280,   281,   282,   283,
+     284,   285,  2126,   286,  2682,    74,   290,  -118,  -530,  2364,
+     295,   299,   300,   291,   302,  -100,  2212,   303,  -530,  -530,
+    -530,  -530,  -530,   304,   314,   315,   316,   269,  -530,   317,
+     318,   319,  -530,  2919,   467,  -530,  -530,  -530,   254,    37,
+     -13,  -530,  1063,  -530,   288,  2682,   294,  1455,   323,   392,
+    1267,    37,  -530,  2682,  -530,  -530,  -530,  -530,   646,  -530,
+    1377,   328,   305,  -530,  -530,  -530,   326,   665,  -530,  2682,
+    -530,   329,  -530,   332,  -530,   333,  -530,  -530,  -530,  2682,
+       4,     4,     4,     4,     4,     4,  2281,   555,   665,   665,
+     482,   665,   665,   665,   665,   665,   665,   665,   665,   665,
+     665,   665,   665,   665,   665,   665,   665,   665,   494,   665,
+     665,  -530,  -530,  -530,   531,  -530,  -530,  -530,  -530,  -530,
+    -530,  -530,  -530,  -530,  -530,    74,  -530,  1775,  -530,    74,
+    -530,  -530,  -530,   -77,  -530,   665,  -530,  -530,  -530,  -530,
+     665,  -530,  -530,  -530,  -530,  -530,  -530,  -530,  -530,   535,
+    -530,  -530,  -530,  -530,   334,  -530,  -530,   368,  -530,  -530,
+    -530,  -530,   254,   126,  -530,  -530,  2682,   341,  -530,  -530,
+    -530,    37,  -530,  -530,  -530,  -530,  2034,  -530,  -530,    74,
+     344,   326,  -530,  -530,   555,  -530,  -530,  1902,  -530,   555,
+    -530,   343,   -68,   262,   262,  -530,   342,   342,   208,   208,
+     499,  2237,  2343,  2392,  2417,  2433,   208,   208,    26,    26,
+       4,     4,     4,  -530,  2321,  -530,  -530,  -530,    30,  -530,
+     345,    74,   347,  -530,  2120,  -530,  -530,   348,  -530,    37,
+     946,   254,  -530,  -530,  1369,  -530,  -530,  -530,   369,  -530,
+     -92,  -530,   357,  -530,   355,   598,  -530,   356,    74,   358,
+    -530,   665,  2120,  -530,   665,  -530,  -530,    30,  -530,  -530,
+    -530,   361,  -530,  -530,  -530,  -530,    37,   665,  -530,    74,
+    -530,  -530,  -530,  -530,    30,  -530,  -530,  -530,     4,   370,
+    2364,  -530,  -530,  -530,  -530,  -530,     3,  -530,  -530,   665,
+     394,  -530,  -530,   396,   -84,   -84,  -530,  -530,   374,  -530,
+    -530
 };
 
 };
 
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
-   Performed when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
+  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+     Performed when YYTABLE does not specify something else to do.  Zero
+     means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
 static const yytype_uint16 yydefact[] =
 {
-       3,     0,     2,     1,    31,   373,   264,   256,   275,     0,
-     312,     0,     0,   263,   251,   265,   308,   262,   266,   267,
-       0,   311,   269,   276,   274,     0,   267,     0,   310,     0,
-     267,     0,   271,   309,   251,   251,   261,   372,   257,    67,
-      11,     0,    26,    12,    29,    12,    10,     0,    60,   375,
-       0,   374,   258,     0,     0,     8,     0,     0,     0,    24,
-       0,   294,     6,     5,     0,     9,   317,   317,   317,     0,
-       0,   377,   317,     0,   379,   277,   278,     0,   285,   286,
-     376,   253,     0,   268,   273,     0,   296,   297,   272,   281,
-       0,   270,   259,   378,     0,   380,     0,   260,    68,     0,
-      70,    71,     0,    72,    73,    74,     0,     0,    77,    78,
-      79,    80,    81,    82,    83,    84,    85,    86,     0,    88,
-      89,    90,     0,    92,    93,    94,     0,     0,    97,    98,
-      99,   100,     0,     0,     0,     0,     0,   106,     0,   108,
-     109,     0,   111,     0,   113,   114,   117,     0,   118,   119,
-     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-     130,     0,   132,   133,   134,     0,     0,   137,   138,   139,
-     140,   370,   141,     0,   143,   368,     0,   145,   146,   147,
-       0,   149,   150,   151,     0,     0,     0,     0,   156,   369,
-     157,     0,     0,   161,   162,     0,     0,     0,     0,    62,
-     166,    27,    59,    59,    59,   251,     0,     0,   251,   251,
-       0,   375,   279,   287,   298,   306,     0,   377,   379,    28,
-       7,   282,     3,   303,     0,    25,   301,   302,     0,     0,
-      22,   321,   318,   320,   319,   254,   255,   169,   170,   171,
-     172,   313,     0,     0,   325,   361,   324,   248,   375,   377,
-     317,   379,   315,    30,     0,   177,    42,     0,   234,     0,
-     240,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   187,     0,
-       0,     0,     0,     0,   187,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    67,    61,    43,     0,    19,    20,
-      21,     0,    17,     0,    15,    13,    18,    24,     0,    60,
-     376,    45,   304,   305,   378,   380,    46,   247,    59,    59,
-       0,    59,     0,     0,   295,    22,    59,     0,     0,   323,
-       0,     0,    48,   327,   316,    41,     0,   179,   180,   183,
-     381,    59,    59,    59,     0,   168,   167,     0,     0,   198,
-     189,   190,   191,   195,   196,   197,   192,   193,     0,   194,
-       0,     0,     0,     0,     0,     0,     0,   232,     0,   230,
-     233,     0,     0,    65,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   346,     0,     0,   185,   188,
-       0,     0,     0,     0,     0,     0,     0,     0,   363,   364,
-     365,   366,   367,     0,     0,     0,     0,   385,   387,     0,
-       0,     0,    63,    67,     0,    16,    12,    47,     0,    24,
-       0,   283,     4,   288,     0,     0,     0,     0,     0,     0,
-      59,    24,    23,    60,   314,   322,   326,   362,     0,    58,
-       0,     0,    52,    49,    50,   184,   178,     0,   371,     0,
-     235,     0,   383,    60,   241,     0,    69,   160,    75,     0,
-     222,   221,   220,   223,   218,   219,     0,   334,     0,     0,
+       3,     0,     2,     1,    33,   375,   266,   258,   277,     0,
+     314,     0,     0,   265,   253,   267,   310,   264,   268,   269,
+       0,   313,   271,   278,   276,     0,   269,     0,   312,     0,
+     269,     0,   273,   311,   253,   253,   263,   374,   259,    69,
+      12,     0,    28,    13,    31,    13,    11,     0,    62,   377,
+       0,   376,   260,     0,     0,     9,     0,     0,     0,    26,
+       0,   296,     7,     6,     0,    10,   319,   319,   319,     0,
+       0,   379,   319,     0,   381,   279,   280,     0,   287,   288,
+     378,   255,     0,   270,   275,     0,   298,   299,   274,   283,
+       0,   272,   261,   380,     0,   382,     0,   262,    70,     0,
+      72,    73,     0,    74,    75,    76,     0,     0,    79,    80,
+      81,    82,    83,    84,    85,    86,    87,    88,     0,    90,
+      91,    92,     0,    94,    95,    96,     0,     0,    99,   100,
+     101,   102,     0,     0,     0,     0,     0,   108,     0,   110,
+     111,     0,   113,     0,   115,   116,   119,     0,   120,   121,
+     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
+     132,     0,   134,   135,   136,     0,     0,   139,   140,   141,
+     142,   372,   143,     0,   145,   370,     0,   147,   148,   149,
+       0,   151,   152,   153,     0,     0,     0,     0,   158,   371,
+     159,     0,     0,   163,   164,     0,     0,     0,     0,    64,
+     168,    29,    61,    61,    61,   253,     0,     0,   253,   253,
+       0,   377,   281,   289,   300,   308,     0,   379,   381,    30,
+       8,   284,     4,   305,     0,    27,   303,   304,     0,     0,
+      24,   323,   320,   322,   321,   256,   257,   171,   172,   173,
+     174,   315,     0,     0,   327,   363,   326,   250,   377,   379,
+     319,   381,   317,    32,     0,   179,    44,     0,   236,     0,
+     242,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,     0,     0,     0,   189,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    69,    63,    45,     0,    21,    22,
+      23,     0,    19,     0,    17,    14,    20,    26,     0,    62,
+     378,    47,   306,   307,   380,   382,    48,   249,    61,     3,
+       0,    61,     0,     0,   297,    24,    61,     0,     0,   325,
+       0,     0,    50,   329,   318,    43,     0,   181,   182,   185,
+     383,    61,    61,    61,     0,   170,   169,     0,     0,   200,
+     191,   192,   193,   197,   198,   199,   194,   195,     0,   196,
+       0,     0,     0,     0,     0,     0,     0,   234,     0,   232,
+     235,     0,     0,    67,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   348,     0,     0,   187,   190,
+       0,     0,     0,     0,     0,     0,     0,     0,   365,   366,
+     367,   368,   369,     0,     0,     0,     0,   387,   389,     0,
+       0,     0,    65,    69,     0,    18,    15,    49,     0,    26,
+       0,   285,    61,   290,     0,     0,     0,     0,     0,     0,
+      61,    26,    25,    62,   316,   324,   328,   364,     0,    60,
+       0,     0,    54,    51,    52,   186,   180,     0,   373,     0,
+     237,     0,   385,    62,   243,     0,    71,   162,    77,     0,
+     224,   223,   222,   225,   220,   221,     0,   336,     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,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    76,    87,    91,     0,    95,    96,   101,   102,   103,
-     104,   105,   107,   110,   112,   346,   313,    48,   351,   346,
-     348,   347,    55,   343,   116,   187,   115,   131,   135,   136,
-       0,   144,   148,   152,   153,   155,   154,   158,   159,     0,
-     163,   164,   165,    64,     0,    59,   354,   382,   280,   284,
-     290,     0,   377,   289,   292,     0,     0,   246,   293,    22,
-      24,   307,    57,    56,   328,     0,   181,   182,     0,   379,
-     249,   239,   238,   334,   229,   313,    48,   338,   334,   335,
-       0,   331,   211,   212,   224,   205,   206,   209,   210,   200,
-     201,     0,   202,   203,   204,   208,   207,   214,   213,   216,
-     217,   215,   225,     0,   231,    66,    54,   346,   313,     0,
-     346,     0,   342,    48,   350,   186,     0,   386,    24,    14,
-       0,   244,   291,    59,   299,    53,    51,   356,   359,     0,
-     237,     0,   250,     0,   334,   313,     0,   346,     0,   330,
-       0,    48,   337,     0,   228,   341,   346,   352,   345,   349,
-       0,   142,    44,   355,    24,     0,   358,     0,   236,   173,
-     227,   329,   346,   339,   333,   336,   226,     0,   199,   344,
-     353,   300,   357,   360,     0,   332,   340,     0,     0,   384,
-     174,     0,    59,    59,   243,   176,     0,   175,   242
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,     1,     2,   202,   326,   226,   298,    41,    42,    43,
-      44,   299,   210,    45,   300,   441,   442,   443,   444,   508,
-      47,   309,   198,   374,   199,   347,   509,   664,   670,   336,
-     337,   338,   248,   387,   388,   367,   368,   369,   371,   341,
-     450,   454,   343,   675,   676,   546,    50,   621,    82,   510,
-      51,    84,    52,   301,    54,   302,   303,   318,   421,    57,
-      58,   321,   427,    59,   229,    60,    61,   304,   305,   215,
-      64,   306,    66,    67,    68,   327,    69,   231,    70,   245,
-     246,   569,   628,   570,   571,   511,   601,   512,   513,   537,
-     646,   618,   619,   247,   403,   200,   249,    72,    73,   251,
-     409
+       0,    78,    89,    93,     0,    97,    98,   103,   104,   105,
+     106,   107,   109,   112,   114,   348,   315,    50,   353,   348,
+     350,   349,    57,   345,   118,   189,   117,   133,   137,   138,
+       0,   146,   150,   154,   155,   157,   156,   160,   161,     0,
+     165,   166,   167,    66,     0,    13,   356,   384,   282,   286,
+       5,   292,     0,   379,   291,   294,     0,     0,   248,   295,
+      24,    26,   309,    59,    58,   330,     0,   183,   184,     0,
+     381,   251,   241,   240,   336,   231,   315,    50,   340,   336,
+     337,     0,   333,   213,   214,   226,   207,   208,   211,   212,
+     202,   203,     0,   204,   205,   206,   210,   209,   216,   215,
+     218,   219,   217,   227,     0,   233,    68,    56,   348,   315,
+       0,   348,     0,   344,    50,   352,   188,     0,   388,    26,
+      61,     0,   246,   293,    61,   301,    55,    53,   358,   361,
+       0,   239,     0,   252,     0,   336,   315,     0,   348,     0,
+     332,     0,    50,   339,     0,   230,   343,   348,   354,   347,
+     351,     0,   144,    46,    16,   357,    26,     0,   360,     0,
+     238,   175,   229,   331,   348,   341,   335,   338,   228,     0,
+     201,   346,   355,   302,   359,   362,     0,   334,   342,     0,
+       0,   386,   176,     0,    61,    61,   245,   178,     0,   177,
+     244
 };
 
 };
 
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -526
-static const yytype_int16 yypact[] =
+  /* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
 {
 {
-    -526,    59,  1737,  -526,  -526,  -526,  -526,  -526,  -526,   163,
-    -526,  -138,   169,  -526,   194,  -526,  -526,  -526,  -526,    12,
-      73,  -526,  -526,  -526,  -526,   219,    12,   120,  -526,   -64,
-      12,   300,  -526,  -526,   266,   270,   300,  -526,  -526,  2902,
-    -526,   -48,  -526,  -526,  -526,  -526,  -526,    46,  2579,   -44,
-     -23,  -526,  -526,    39,    19,  -526,    48,    47,    54,    62,
-      76,   -33,  -526,  -526,    82,  -526,    96,    96,    96,    57,
-    2751,    86,    96,    87,    90,  -526,  -526,   223,  -526,  -526,
-      72,  -526,    95,  -526,  -526,   103,  -526,  -526,  -526,  -526,
-    2751,  -526,  -526,    99,   112,  -112,  -109,  -526,  -526,    21,
-    -526,  -526,    56,  -526,  -526,  -526,    93,   156,  -526,  -526,
-    -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,   157,  -526,
-    -526,  -526,   162,  -526,  -526,  -526,   164,   168,  -526,  -526,
-    -526,  -526,   170,   171,   173,   174,   175,  -526,   177,  -526,
-    -526,   178,  -526,   179,  -526,  -526,   184,   186,  -526,  -526,
-    -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,
-    -526,   187,  -526,  -526,  -526,   193,   196,  -526,  -526,  -526,
-    -526,  -526,  -526,   197,  -526,  -526,   200,  -526,  -526,  -526,
-     201,  -526,  -526,  -526,   202,   203,   215,   216,  -526,  -526,
-    -526,   220,   225,  -526,  -526,   228,   231,   234,   -56,  -526,
-    -526,  -526,  1620,   877,   136,   301,   373,   329,   347,   356,
-     226,   195,  -526,  -526,  -526,  -526,    57,   237,   239,  -526,
-    -526,  -526,  -526,  -526,   -22,  -526,  -526,  -526,   357,   242,
-    -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,
-    -526,  -526,    57,    57,  -526,   238,  -141,  -526,  -526,  -526,
-      96,  -526,  -526,  -526,   241,   365,  -526,   243,  -526,   247,
-    -526,   453,   161,   365,   713,   713,   454,   455,   713,   713,
-     456,   457,   713,   458,   713,   713,  2168,   713,   713,   459,
-     -54,   461,   713,  2751,   713,   713,  2751,   135,  2751,  2751,
-     161,   130,   462,  2751,  2902,   271,  -526,   265,  -526,  -526,
-    -526,   273,  -526,   276,  -526,  -526,  -526,    62,  2665,  -526,
-     277,  -526,  -526,  -526,   277,  -105,  -526,  -526,   -18,  1111,
-     294,   -76,   280,   278,  -526,  -526,  1213,    42,   279,  -526,
-     713,    94,  2168,  -526,  -526,  -526,   284,   309,  -526,   282,
-    -526,   -13,   136,   -11,   288,  -526,  -526,   289,   291,  -526,
-    -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,   285,  -526,
-     713,   713,   713,   713,   713,   713,   703,  2390,   -91,  -526,
-    2390,   292,   296,  -526,   -70,   298,   302,   303,   304,   305,
-     306,   307,   398,   308,  2665,    88,   310,   -66,  -526,  2390,
-     311,   313,   314,   321,   315,   -63,  2174,   316,  -526,  -526,
-    -526,  -526,  -526,   317,   318,   319,   322,   328,  -526,   323,
-     324,   326,  -526,  2902,   499,  -526,  -526,  -526,    57,    62,
-     -21,  -526,  -526,  -526,   352,  2665,   331,  1503,   334,   419,
-    1315,    62,  -526,  2665,  -526,  -526,  -526,  -526,   450,  -526,
-    1425,   336,   366,  -526,  -526,  -526,   365,   713,  -526,  2665,
-    -526,   338,  -526,   342,  -526,   343,  -526,  -526,  -526,  2665,
-      18,    18,    18,    18,    18,    18,  2260,   248,   713,   713,
-     547,   713,   713,   713,   713,   713,   713,   713,   713,   713,
-     713,   713,   713,   713,   713,   713,   713,   713,   548,   713,
-     713,  -526,  -526,  -526,   543,  -526,  -526,  -526,  -526,  -526,
-    -526,  -526,  -526,  -526,  -526,    88,  -526,  1823,  -526,    88,
-    -526,  -526,  -526,  -137,  -526,   713,  -526,  -526,  -526,  -526,
-     713,  -526,  -526,  -526,  -526,  -526,  -526,  -526,  -526,   549,
-    -526,  -526,  -526,  -526,   346,   994,  -526,   375,  -526,  -526,
-    -526,    57,   166,  -526,  -526,  2665,   351,  -526,  -526,  -526,
-      62,  -526,  -526,  -526,  -526,  2082,  -526,  -526,    88,   354,
-     365,  -526,  -526,   248,  -526,  -526,  1950,  -526,   248,  -526,
-     350,  -135,    25,    25,  -526,   603,   603,   165,   165,   817,
-    2285,  2369,  2408,  2440,   740,   165,   165,    64,    64,    18,
-      18,    18,  -526,  2329,  -526,  -526,  -526,    70,  -526,   353,
-      88,   355,  -526,  2168,  -526,  -526,   358,  -526,    62,  -526,
-      57,  -526,  -526,  1417,  -526,  -526,  -526,   379,  -526,   -94,
-    -526,   364,  -526,   361,   100,  -526,   369,    88,   370,  -526,
-     713,  2168,  -526,   713,  -526,  -526,    70,  -526,  -526,  -526,
-     371,  -526,  -526,  -526,    62,   713,  -526,    88,  -526,  -526,
-    -526,  -526,    70,  -526,  -526,  -526,    18,   384,  2390,  -526,
-    -526,  -526,  -526,  -526,    -3,  -526,  -526,   713,   411,  -526,
-    -526,   412,   -86,   -86,  -526,  -526,   390,  -526,  -526
+    -530,  -530,   273,  -530,   -40,  -530,  -311,  -281,     0,  -530,
+    -530,  -530,   155,  -530,  -530,  -530,    10,  -473,  -530,  -530,
+    -265,  -229,  -194,    -2,  -530,  -530,  -278,   306,   -63,  -530,
+    -530,  -530,  -530,   135,    13,   298,    78,  -169,  -530,  -245,
+    -260,  -530,  -530,  -530,  -530,   -80,  -239,  -530,   174,  -530,
+      25,   -65,  -530,   111,    52,     5,  -530,    11,    17,  -530,
+    -530,   550,  -530,  -530,  -530,  -530,  -530,   -17,  -530,    19,
+      16,  -530,  -530,    20,  -530,  -530,  -277,  -459,   -47,     8,
+     -10,  -204,  -530,  -530,  -530,  -497,  -530,  -529,  -530,  -465,
+    -530,  -530,  -530,   -49,  -530,   387,  -530,   324,     1,   -42,
+    -530,     7,  -530
 };
 
 };
 
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
+  /* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
 {
 {
-    -526,  -526,   359,   -28,  -305,  -300,    -1,  -526,  -526,  -526,
-     176,  -526,  -526,  -526,    23,  -468,  -526,  -526,  -257,  -232,
-    -189,    -2,  -526,  -526,  -267,   312,   -65,  -526,  -526,  -526,
-    -526,   152,     7,   320,    92,   210,  -526,  -261,  -256,  -526,
-    -526,  -526,  -526,   -60,  -187,  -526,   181,  -526,    22,   -67,
-    -526,   131,    40,    16,  -526,    24,    26,  -526,  -526,   555,
-    -526,  -526,  -526,  -526,  -526,   -12,  -526,    28,     4,  -526,
-    -526,    29,  -526,  -526,  -287,  -477,   -38,    17,   -14,  -220,
-    -526,  -526,  -526,  -500,  -526,  -525,  -526,  -467,  -526,  -526,
-    -526,   -32,  -526,   393,  -526,   341,     1,   -46,  -526,     3,
-    -526
+      -1,     1,     2,   319,   202,   535,   326,   226,   298,    41,
+      42,    43,    44,   299,   210,    45,   300,   441,   442,   443,
+     444,   508,    47,   309,   198,   374,   199,   347,   509,   666,
+     672,   336,   337,   338,   248,   387,   388,   367,   368,   369,
+     371,   341,   450,   454,   343,   677,   678,   547,    50,   622,
+      82,   510,    51,    84,    52,   301,    54,   302,   303,   318,
+     421,    57,    58,   321,   427,    59,   229,    60,    61,   304,
+     305,   215,    64,   306,    66,    67,    68,   327,    69,   231,
+      70,   245,   246,   570,   629,   571,   572,   511,   602,   512,
+     513,   537,   648,   619,   620,   247,   403,   200,   249,    72,
+      73,   251,   409
 };
 
 };
 
-/* 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 YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -253
+  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
+     positive, shift that token.  If negative, reduce the rule whose
+     number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_int16 yytable[] =
 {
 static const yytype_int16 yytable[] =
 {
-      48,    40,   244,    71,   243,    74,    63,   417,   376,    49,
-     216,   379,   375,   381,   333,   308,   386,   203,    53,   383,
-     430,   393,   328,   329,   250,    46,    55,   412,    56,   597,
-      62,    65,   424,   617,   470,   667,   214,    12,   596,   599,
-     434,   470,   602,  -252,   257,   235,   259,   236,   668,   217,
-    -252,   218,   232,   232,   232,   211,    94,    96,   232,     3,
-     235,   331,   236,   623,   212,   331,   332,   331,   629,    77,
-     603,    92,   631,   235,   437,   236,    97,    25,    25,   171,
-     470,   237,    85,   175,   233,   234,    10,   647,   624,   252,
-     490,   235,  -252,   236,   -37,   260,   237,   349,   626,  -252,
-     350,   351,   352,   353,   354,   355,   320,   435,    83,   237,
-     189,   494,   648,   238,    10,   515,    39,   491,   515,   538,
-     674,   636,   617,    89,   651,   294,    39,   237,   238,   420,
-     635,   551,   425,   638,   426,   640,   407,   408,   495,   237,
-      10,   238,   516,    90,    10,   522,   533,   295,   652,   244,
-     228,   243,   449,   425,   425,   451,   455,    88,   201,   238,
-     654,    91,   -32,   657,   356,    16,    75,   239,    76,   659,
-     345,   238,    78,   346,    79,   244,   244,   243,   243,   468,
-     469,   470,   239,   219,    39,   665,   557,   419,   339,    39,
-      21,    39,   448,   240,   452,   239,   348,    80,   536,    81,
-      48,    48,   669,    71,    71,    74,    74,   204,   240,    49,
-      49,   357,   322,   239,   483,   484,   485,   486,   487,   488,
-     489,   240,    86,   221,    87,   239,   488,   489,   261,   594,
-      94,    96,   254,   241,    28,   567,   232,   394,   385,   240,
-     397,   358,   404,   405,   613,   220,    33,   411,   241,   242,
-     614,   240,   222,   223,   359,   485,   486,   487,   224,   606,
-     244,   506,   243,   262,   242,   488,   489,   334,   225,    93,
-     418,    81,   331,    95,   384,    81,  -252,   507,   -33,   506,
-     360,   604,   227,   361,   362,   438,   230,   237,   364,   365,
-     331,   565,   -34,   253,   385,   507,   -36,   439,   616,   255,
-     263,   366,   331,  -252,   310,   -35,    81,   566,   642,   256,
-     434,   398,   399,   400,   401,   402,   258,    48,    40,   238,
-      71,   611,    74,    63,   433,   432,    49,    71,   467,    74,
-     384,   567,   312,    49,   313,    53,   567,   434,    39,   632,
-       8,   453,    46,    55,   661,    56,   505,    62,    65,   434,
-     314,   244,    81,   243,   483,   484,   485,   486,   487,   315,
-     323,    81,   324,   264,   265,   434,   488,   489,   235,   266,
-     236,   267,  -245,   239,  -245,   268,   311,   269,   270,   339,
-     271,   272,   273,    19,   274,   275,   276,   541,   535,   662,
-     643,   277,   567,   278,   279,   216,    22,    23,    24,   240,
-     280,   -38,   568,   281,   282,    26,   671,   283,   284,   285,
-     286,   558,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   563,   287,   288,   539,   545,   542,   289,   433,   432,
-     316,    71,   290,    74,   217,   291,   218,    49,   292,   565,
-     211,   293,   600,   -39,    30,   -40,   325,   330,    32,   335,
-     331,   340,   559,   349,   342,   566,   350,   351,   352,   353,
-     354,   355,   344,   372,   373,   377,   378,   380,   390,   385,
-     392,   410,   414,   413,   244,   370,   243,   423,   370,   415,
-     416,  -252,   429,   425,   425,   382,   428,   436,   389,   445,
-     446,   447,   459,   622,   389,   396,   456,   457,   568,   458,
-     492,   627,   520,   568,   493,   384,   496,   216,   534,    20,
-     497,   498,   499,   500,   501,   502,   504,   385,   514,   517,
-     356,   518,   519,   521,   524,   525,   526,   527,   385,   529,
-     528,   530,   531,    48,   532,   540,    71,   543,    74,   548,
-     370,   440,    49,   244,   554,   243,   560,   555,   561,   562,
-     574,   592,   595,   384,   608,   607,   610,   612,   630,   568,
-     620,   637,   645,   639,   384,   385,   641,   357,   649,   650,
-     460,   461,   462,   463,   464,   465,   466,   653,   655,   660,
-     477,   319,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   666,   385,   672,   673,   678,   358,   556,   488,
-     489,   384,   406,   213,   395,   549,   503,   605,   547,   317,
-     359,   433,   432,   677,    71,   663,    74,   468,   469,   470,
-      49,   391,   473,   474,     0,     0,     0,     0,     0,   384,
-       0,     0,     0,     0,     0,     0,   360,     0,     0,   361,
-     362,   363,     0,     0,   364,   365,     0,     0,   463,     0,
-       0,     0,     0,   552,     0,     0,     0,   366,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   572,   573,
-       0,   575,   576,   577,   578,   579,   580,   581,   582,   583,
-     584,   585,   586,   587,   588,   589,   590,   591,     0,   593,
-       0,     0,     0,     0,     0,     0,   349,     0,     5,   350,
-     351,   352,   353,   354,   355,     0,   349,     0,     0,   350,
-     351,   352,   353,   354,   355,   389,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     6,     0,     7,     0,     0,
-       0,     0,     0,     8,     0,     0,     0,    10,     0,     0,
-       0,     0,     0,     0,   468,   469,   470,   471,   472,   473,
-     474,     0,     0,    13,     0,     0,     0,     0,     0,   205,
-      15,     0,    16,   356,     0,     0,    17,     0,     0,    18,
-       0,     0,     0,   356,     0,     0,    19,     0,     0,     0,
-     481,   482,   483,   484,   485,   486,   487,    21,     0,    22,
-      23,    24,     0,     0,   488,   489,     0,     0,    26,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     357,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     357,   468,   469,   470,   471,   472,   473,   474,     0,   476,
-     656,    28,     0,   658,     0,     0,    29,    30,    31,     0,
-     358,    32,     0,    33,     0,   370,     0,   208,     0,     0,
-     358,     0,     0,   359,     0,     0,   209,     0,    36,     0,
-       0,     0,     0,   359,     0,     0,    37,    38,     0,     0,
-       0,     4,     5,     0,     0,     0,     0,     0,     0,   360,
-       0,     0,   361,   362,   363,     0,     0,   364,   365,   360,
-       0,     0,   361,   362,   363,     0,     0,   364,   365,     6,
-     366,     7,     0,     0,     0,     0,     0,     8,     9,     0,
-     366,    10,     0,     0,     0,     0,    11,   481,   482,   483,
-     484,   485,   486,   487,     0,    12,     0,    13,     0,     0,
-       0,   488,   489,    14,    15,     0,    16,     0,     0,     0,
-      17,     0,     0,    18,     0,     0,     0,     0,     0,     0,
-      19,     0,     0,     0,     0,     0,     0,    20,   297,     0,
-       0,    21,     0,    22,    23,    24,    25,     0,     0,     0,
-       0,     0,    26,     0,     0,     0,     0,    27,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     4,     5,
-       0,   478,   479,   480,   481,   482,   483,   484,   485,   486,
-     487,     0,     0,     0,     0,    28,     0,     0,   488,   489,
-      29,    30,    31,     0,     0,    32,     6,    33,     7,     0,
-       0,    34,     0,     0,     8,     9,     0,     0,    10,     0,
-      35,     0,    36,    11,     0,     0,     0,     0,     0,     0,
-      37,    38,    12,     0,    13,     0,     0,     0,     0,     0,
-      14,    15,     0,    16,     0,     0,     0,    17,     0,     0,
-      18,     0,     0,     0,     0,     0,     0,    19,     0,    39,
-       0,     0,   307,     0,    20,   297,     0,     0,    21,     0,
-      22,    23,    24,    25,     0,     0,     0,     0,     0,    26,
-       0,     0,     0,     0,    27,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     4,     5,     0,     0,     0,
+      48,   216,    40,    71,   244,   203,   243,    53,   375,    74,
+     308,   383,    46,    55,   430,    49,   412,   333,    63,    56,
+     470,    62,    65,   424,   376,   490,   417,   379,   250,   381,
+     618,   214,   386,   235,   600,   236,  -254,   393,   328,   329,
+     597,   669,   470,   259,   603,    12,  -254,   598,   257,   217,
+     434,   494,   491,   212,   670,   218,   232,   232,   232,    94,
+      96,   211,   232,   515,   235,     3,   236,   624,    25,   237,
+     437,   294,   630,    77,    10,   233,   234,   235,   495,   236,
+     252,   515,   426,    92,    83,  -254,    25,   -39,    97,   649,
+     516,    85,   260,   295,   627,  -254,   370,   320,   171,   370,
+     237,   238,   175,   451,   455,    10,   382,   625,   522,   389,
+      75,    89,    76,   237,   650,   389,   396,    39,    39,    90,
+     618,   331,   676,   435,   420,   331,   332,   425,   653,   189,
+     604,   641,   238,   636,   331,   533,   639,    88,   538,   632,
+     637,    91,    78,   345,    79,   238,   346,   449,   425,   425,
+     552,   244,   201,   243,    39,   239,    80,   419,    81,   659,
+     204,   370,   440,   656,   228,    39,    39,   654,   448,   452,
+     221,    86,   661,    87,    93,   222,    81,   244,   244,   243,
+     243,   240,    95,  -254,    81,   -35,   239,   407,   408,   667,
+     339,   460,   461,   462,   463,   464,   465,   466,   348,   239,
+      48,    48,   558,    71,    71,   488,   489,   322,   671,    74,
+      74,   254,   240,   224,   536,    49,    49,   485,   486,   487,
+     -34,   506,   468,   469,   470,   240,   230,   488,   489,   385,
+     219,   255,   331,    94,    96,   220,   258,   507,   568,   614,
+     232,   394,   223,   225,   397,   595,   404,   405,    10,   227,
+     -36,   411,   241,  -254,   310,   -37,    81,   235,   334,   236,
+     253,   418,   244,   -38,   243,   506,   256,   311,   242,   463,
+     615,   261,    39,    16,   384,   607,   331,   312,   470,   313,
+     314,   507,    81,   262,   605,   385,   398,   399,   400,   401,
+     402,   617,   315,   237,    81,   323,   263,   324,    21,   573,
+     574,   264,   576,   577,   578,   579,   580,   581,   582,   583,
+     584,   585,   586,   587,   588,   589,   590,   591,   592,   467,
+     594,   434,   265,   266,   433,   238,   432,    71,   643,   235,
+     384,   236,  -247,    74,  -247,   568,   267,   505,   612,    49,
+     568,   453,    28,   633,   268,   269,   389,   270,   434,   271,
+     272,   273,   274,   244,    33,   243,   468,   469,   470,   275,
+     434,   473,   474,   276,   277,   663,   278,   279,   280,   281,
+     282,   283,   284,   285,   286,   344,   287,   434,   542,   239,
+     288,   339,   289,   290,   291,   292,   216,   664,   316,   293,
+     342,   -40,   -41,   -42,   325,   372,   568,   483,   484,   485,
+     486,   487,   559,   330,   569,   240,   335,   645,   340,   488,
+     489,   373,   564,   377,   378,   380,   390,   392,   410,   413,
+      48,   414,    40,    71,   673,   546,   543,    53,   433,    74,
+     432,    71,    46,    55,   217,    49,   539,    74,    63,    56,
+     218,    62,    65,    49,   601,   241,   211,   415,   416,  -254,
+     423,   483,   484,   485,   486,   487,   560,   429,   428,   446,
+     385,   242,   658,   488,   489,   660,   436,   456,   445,   447,
+     529,   541,   520,   457,   458,   459,   534,   244,   370,   243,
+     425,   425,    20,   492,   493,   575,   556,   496,   497,   498,
+     499,   500,   501,   502,   504,   610,   623,   593,   514,   216,
+     544,   569,     8,   517,   628,   384,   569,   518,   519,   385,
+     521,   524,   525,   468,   469,   470,   471,   472,   473,   474,
+     385,   476,   526,   527,   528,   530,   531,   532,   549,   481,
+     482,   483,   484,   485,   486,   487,   555,   561,   562,   563,
+     596,   608,   609,   488,   489,    19,   244,   613,   243,   611,
+     621,   631,   647,   638,   384,   640,   642,   385,    22,    23,
+      24,   651,   569,   652,   655,   384,   657,    26,   349,   662,
+       5,   350,   351,   352,   353,   354,   355,   674,   668,   675,
+     680,   557,   395,   349,   550,   385,   350,   351,   352,   353,
+     354,   355,   422,   606,   237,   679,   406,     6,   213,     7,
+     665,   548,   384,   317,   391,     8,    30,     0,    48,    10,
+      32,    71,   433,     0,   432,    71,     0,    74,     0,     0,
+       0,    74,     0,    49,     0,    13,   238,    49,     0,     0,
+     384,   205,    15,     0,    16,   356,     0,   237,    17,     0,
+       0,    18,    10,     0,     0,     0,     0,     0,    19,   349,
+     356,     0,   350,   351,   352,   353,   354,   355,     0,    21,
+       0,    22,    23,    24,     0,     0,     0,     0,   349,   238,
+      26,   350,   351,   352,   353,   354,   355,     0,     0,     0,
+     239,     0,   357,   478,   479,   480,   481,   482,   483,   484,
+     485,   486,   487,     0,     0,     0,     0,   357,     0,     0,
+     488,   489,     0,    28,     0,     0,   240,     0,    29,    30,
+      31,     0,   358,    32,     0,    33,   356,     0,     0,   208,
+       0,     0,     0,   239,     0,   359,     0,   358,   209,     0,
+      36,     0,     0,     0,     0,   356,     0,     0,    37,    38,
+     359,     0,     0,     0,     0,     0,   566,     0,     0,   240,
+       0,   360,     0,     0,   361,   362,   363,   331,     0,   364,
+     365,     0,   567,   357,     0,     0,   360,     0,     0,   361,
+     362,   438,   366,     0,   364,   365,     0,     0,     0,     0,
+       0,     0,   357,   439,     0,     0,     0,   366,     0,   566,
+       0,     0,     0,   358,     0,     0,     0,     0,     0,     0,
+     331,     0,     0,     0,     0,   567,   359,     0,     0,     0,
+       0,     0,   358,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   359,     0,     0,     0,     0,
+       0,     0,   360,     4,     5,   361,   362,   363,     0,     0,
+     364,   365,     0,     0,     0,     0,     0,     0,     0,   553,
+       0,   360,     0,   366,   361,   362,   363,     0,     0,   364,
+     365,     6,     0,     7,     0,     0,     0,     0,     0,     8,
+       9,     0,   366,    10,     0,     0,     0,     0,    11,     0,
+       0,     0,     0,     0,     0,     0,     0,    12,     0,    13,
+       0,     0,     0,     0,     0,    14,    15,     0,    16,     0,
+       0,     0,    17,     0,     0,    18,     0,     0,     0,     0,
+       0,     0,    19,     0,     0,     0,     0,     0,     0,    20,
+     297,     0,     0,    21,     0,    22,    23,    24,    25,     0,
+       0,     0,     0,     0,    26,     0,     0,     0,     0,    27,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    28,     0,     0,     0,     0,    29,    30,    31,
-       0,     0,    32,     6,    33,     7,     0,     0,    34,     0,
-       0,     8,     9,     0,     0,    10,     0,    35,     0,    36,
-      11,     0,     0,     0,     0,     0,     0,    37,    38,    12,
-       0,    13,     0,     0,     0,     0,     0,    14,    15,     0,
-      16,     0,     0,     0,    17,     0,     0,    18,     0,     0,
-       0,     0,     0,     0,    19,     0,    39,     0,     0,   609,
-       0,    20,     0,     0,     0,    21,     0,    22,    23,    24,
-      25,     0,     0,     0,     0,     0,    26,     4,     5,     0,
-       0,    27,     0,     0,     0,     0,     0,     0,     0,     0,
+       4,     5,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    28,     0,     0,
+       0,     0,    29,    30,    31,     0,     0,    32,     6,    33,
+       7,     0,     0,    34,     0,     0,     8,     9,     0,     0,
+      10,     0,    35,     0,    36,    11,     0,     0,     0,     0,
+       0,     0,    37,    38,    12,     0,    13,     0,     0,     0,
+       0,     0,    14,    15,     0,    16,     0,     0,     0,    17,
+       0,     0,    18,     0,     0,     0,     0,     0,     0,    19,
+       0,    39,     0,     0,   307,     0,    20,   297,     0,     0,
+      21,     0,    22,    23,    24,    25,     0,     0,     0,     0,
+       0,    26,     0,     0,     0,     0,    27,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     4,     5,     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,     6,     0,     7,     0,    28,
-       0,     0,     0,     8,    29,    30,    31,    10,     0,    32,
-       0,    33,    11,     0,     0,    34,     0,     0,     0,     0,
-       0,     0,     0,    13,    35,     0,    36,     0,     0,    14,
-      15,     0,    16,     0,    37,    38,    17,     0,     0,    18,
-       0,     0,     0,     0,     0,     0,    19,     0,     0,     0,
-       0,     0,     0,    20,     0,     0,     0,    21,     0,    22,
-      23,    24,     0,    39,     0,     0,   422,     0,    26,     4,
-       5,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    28,     0,     0,     0,     0,    29,
+      30,    31,     0,     0,    32,     6,    33,     7,     0,     0,
+      34,     0,     0,     8,     9,     0,     0,    10,     0,    35,
+       0,    36,    11,     0,     0,     0,     0,     0,     0,    37,
+      38,    12,     0,    13,     0,     0,     0,     0,     0,    14,
+      15,     0,    16,     0,     0,     0,    17,     0,     0,    18,
+       0,     0,     0,     0,     0,     0,    19,     0,    39,     0,
+       0,   644,     0,    20,     0,     0,     0,    21,     0,    22,
+      23,    24,    25,     0,     0,     0,     0,     0,    26,     4,
+       5,     0,     0,    27,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     6,     0,     7,
        0,    28,     0,     0,     0,     8,    29,    30,    31,    10,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     6,     0,     7,
        0,    28,     0,     0,     0,     8,    29,    30,    31,    10,
@@ -1481,316 +1251,312 @@ static const yytype_int16 yytable[] =
        0,    14,    15,     0,    16,     0,    37,    38,    17,     0,
        0,    18,     0,     0,     0,     0,     0,     0,    19,     0,
        0,     0,     0,     0,     0,    20,     0,     0,     0,    21,
        0,    14,    15,     0,    16,     0,    37,    38,    17,     0,
        0,    18,     0,     0,     0,     0,     0,     0,    19,     0,
        0,     0,     0,     0,     0,    20,     0,     0,     0,    21,
-       0,    22,    23,    24,     0,    39,     0,     0,   431,     0,
+       0,    22,    23,    24,     0,    39,     0,     0,   540,     0,
       26,     4,     5,     0,     0,     0,     0,     0,     0,     0,
       26,     4,     5,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   468,
-     469,   470,   471,   472,   473,   474,   475,   476,     0,     6,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     6,
        0,     7,     0,    28,     0,     0,     0,     8,    29,    30,
       31,    10,     0,    32,     0,    33,    11,     0,     0,    34,
        0,     0,     0,     0,     0,     0,     0,    13,    35,     0,
       36,     0,     0,    14,    15,     0,    16,     0,    37,    38,
       17,     0,     0,    18,     0,     0,     0,     0,     0,     0,
        0,     7,     0,    28,     0,     0,     0,     8,    29,    30,
       31,    10,     0,    32,     0,    33,    11,     0,     0,    34,
        0,     0,     0,     0,     0,     0,     0,    13,    35,     0,
       36,     0,     0,    14,    15,     0,    16,     0,    37,    38,
       17,     0,     0,    18,     0,     0,     0,     0,     0,     0,
-      19,     0,     0,     0,     0,     0,     0,    20,     5,     0,
+      19,     0,     0,     0,     0,     0,     0,    20,     0,     0,
        0,    21,     0,    22,    23,    24,     0,    39,     0,     0,
        0,    21,     0,    22,    23,    24,     0,    39,     0,     0,
-     550,     0,    26,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     6,     0,     7,     0,     0,
-       0,     0,     0,     8,     0,     0,     0,    10,     0,     0,
-       0,     0,     0,     0,     0,    28,     0,     0,     0,     0,
-      29,    30,    31,    13,     0,    32,     0,    33,     0,   205,
-      15,    34,    16,     0,     0,     0,    17,     0,     0,    18,
-      35,     0,    36,     0,     0,     0,    19,     0,     0,     0,
-      37,    38,     0,     0,     0,     0,     0,    21,     0,    22,
-      23,    24,     0,     0,     0,     0,     0,   477,    26,   478,
-     479,   480,   481,   482,   483,   484,   485,   486,   487,    39,
-       0,     0,   644,     0,     4,     5,   488,   489,   553,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,     0,
-       0,    28,     0,     0,     0,     0,    29,    30,    31,     0,
-       0,    32,     6,    33,     7,     0,     0,   208,     0,     0,
-       8,     9,     0,     0,    10,     0,   209,     0,    36,    11,
-       0,     0,     0,     0,     0,     0,    37,    38,    12,     0,
-      13,     0,     0,     0,     0,     0,    14,    15,     0,    16,
-       0,     0,     0,    17,     0,     0,    18,     0,     0,     0,
-       0,     0,     0,    19,     0,    39,     0,     0,   544,     0,
-      20,   297,     0,     0,    21,     0,    22,    23,    24,    25,
-       0,     0,     0,     0,     0,    26,     0,     0,     0,     0,
-      27,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     4,     5,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    28,     0,
-       0,     0,     0,    29,    30,    31,     0,     0,    32,     6,
-      33,     7,     0,     0,    34,     0,     0,     8,     9,     0,
-       0,    10,     0,    35,     0,    36,    11,     0,     0,     0,
-       0,     0,     0,    37,    38,    12,     0,    13,     0,     0,
-       0,     0,     0,    14,    15,     0,    16,     0,     0,     0,
-      17,     0,     0,    18,     0,     0,     0,     0,     0,     0,
-      19,     0,    39,     0,     0,     0,     0,    20,     5,     0,
-       0,    21,     0,    22,    23,    24,    25,     0,     0,     0,
-       0,     0,    26,     0,     0,     0,     0,    27,     0,     0,
-       0,     0,     0,     0,     0,     6,     0,     7,     0,     0,
-       0,     0,   237,     8,     0,     0,     0,    10,     0,     0,
-       0,     0,     0,     0,     0,    28,     0,     0,     0,     0,
-      29,    30,    31,    13,     0,    32,     0,    33,     0,   205,
-      15,    34,    16,     0,   238,     0,    17,     0,   -59,    18,
-      35,     0,    36,     0,     0,     0,    19,     0,     0,     0,
-      37,    38,     0,     0,     0,     0,     0,    21,     0,    22,
-      23,    24,     0,     0,     0,     0,     0,     0,    26,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    39,
-       0,     0,     0,     0,     0,     0,     0,     0,   239,     0,
-       0,     0,     0,     0,     0,     5,     0,     0,     0,     0,
-       0,    28,     0,     0,     0,     0,    29,    30,    31,     0,
-       0,    32,     0,    33,   240,     0,     0,   208,     0,     0,
-       0,     0,     6,     0,     7,     0,   209,     0,    36,   237,
-       8,     0,     0,     0,    10,     0,    37,    38,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      13,     0,     0,     0,   598,     0,   205,    15,     0,    16,
-       0,   238,     0,    17,     0,    39,    18,     0,     0,     0,
-       0,     0,     0,    19,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    21,     0,    22,    23,    24,     0,
-       0,     0,     0,     0,     0,    26,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   239,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     5,    28,     0,
-       0,     0,     0,    29,    30,    31,     0,     0,    32,     0,
-      33,   240,     0,     0,   208,   615,     0,     0,     0,     0,
-       0,     0,     0,   209,     6,    36,     7,     0,     0,     0,
-       0,     0,     8,    37,    38,     0,    10,     0,     0,     0,
+     431,     0,    26,     4,     5,     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,   625,    13,     0,     0,     0,     0,     0,   205,    15,
-       0,    16,    39,     0,     0,    17,     0,     0,    18,     0,
-       0,     0,     0,     0,     0,    19,     0,     0,     0,     0,
-       0,     0,     0,     5,     0,     0,    21,     0,    22,    23,
-      24,     0,     0,     0,     0,     0,     0,    26,   468,   469,
-     470,   471,   472,   473,   474,   475,   476,     0,     0,     0,
-       6,     0,     7,     0,     0,     0,     0,     0,     8,     0,
-       0,     0,    10,     0,     0,     0,     0,     0,     0,     0,
-      28,     0,     0,     0,     0,    29,    30,    31,    13,     0,
-      32,     0,    33,     0,   205,    15,   208,    16,     0,     0,
-       0,    17,     0,     0,    18,   209,     0,    36,     0,     0,
-       0,    19,     0,     0,     0,    37,    38,     0,     0,     0,
-       0,     0,    21,     0,    22,    23,    24,     0,     0,     0,
-       0,     0,     0,    26,   468,   469,   470,   471,   472,   473,
-     474,   475,   476,     0,    39,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   468,
-     469,   470,   471,   472,   473,   474,    28,     0,     0,     0,
-       0,    29,    30,    31,     0,     0,    32,     0,    33,     0,
-       0,     0,   208,     0,     0,     0,     0,     0,     0,     0,
-       0,   209,     0,    36,     0,     0,     0,     0,     0,     0,
-       0,    37,    38,   468,   469,   470,   471,   472,   473,   474,
-     475,   476,     0,     0,     0,     0,   477,     0,   478,   479,
-     480,   481,   482,   483,   484,   485,   486,   487,     0,     0,
-      39,     0,     0,     0,     0,   488,   489,     0,     0,     0,
-       0,     0,   523,   468,   469,   470,   471,   472,   473,   474,
-     475,   476,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   468,   469,   470,   471,   472,   473,
-     474,   475,   476,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   468,   469,   470,   471,   472,   473,   474,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,     0,   478,   479,   480,   481,   482,   483,
-     484,   485,   486,   487,   468,   469,   470,   471,   472,   473,
-     474,   488,   489,     0,     0,     0,     0,     0,   564,   478,
-     479,   480,   481,   482,   483,   484,   485,   486,   487,     0,
-       0,     0,     0,     0,     0,     0,   488,   489,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   477,     0,   478,   479,   480,   481,   482,   483,   484,
-     485,   486,   487,     0,     0,     0,     0,     0,     0,     0,
-     488,   489,   634,     0,     0,     0,     0,     0,     0,     0,
+       0,   468,   469,   470,   471,   472,   473,   474,   475,   476,
+       0,     6,     0,     7,     0,    28,     0,     0,     0,     8,
+      29,    30,    31,    10,     0,    32,     0,    33,    11,     0,
+       0,    34,     0,     0,     0,     0,     0,     0,     0,    13,
+      35,     0,    36,     0,     0,    14,    15,     0,    16,     0,
+      37,    38,    17,     0,     0,    18,     0,     0,     0,     0,
+       0,     0,    19,     0,     0,     0,     0,     0,     0,    20,
+       5,     0,     0,    21,     0,    22,    23,    24,     0,    39,
+       0,     0,   551,     0,    26,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     6,     0,     7,
+       0,     0,     0,     0,     0,     8,     0,     0,     0,    10,
+       0,     0,     0,     0,     0,     0,     0,    28,     0,     0,
+       0,     0,    29,    30,    31,    13,     0,    32,     0,    33,
+       0,   205,    15,    34,    16,     0,     0,     0,    17,     0,
+       0,    18,    35,     0,    36,     0,     0,     0,    19,     0,
+       0,     0,    37,    38,     0,     0,     0,     0,     0,    21,
+       0,    22,    23,    24,     0,     0,     0,     0,     0,   477,
+      26,   478,   479,   480,   481,   482,   483,   484,   485,   486,
+     487,    39,     0,     0,   646,     0,     4,     5,   488,   489,
+     554,     0,     0,     0,     0,   296,     0,     0,     0,     0,
+       0,     0,     0,    28,     0,     0,     0,     0,    29,    30,
+      31,     0,     0,    32,     6,    33,     7,     0,     0,   208,
+       0,     0,     8,     9,     0,     0,    10,     0,   209,     0,
+      36,    11,     0,     0,     0,     0,     0,     0,    37,    38,
+      12,     0,    13,     0,     0,     0,     0,     0,    14,    15,
+       0,    16,     0,     0,     0,    17,     0,     0,    18,     0,
+       0,     0,     0,     0,     0,    19,     0,    39,     0,     0,
+     545,     0,    20,   297,     0,     0,    21,     0,    22,    23,
+      24,    25,     0,     0,     0,     0,     0,    26,     0,     0,
+       0,     0,    27,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     4,     5,     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,   477,   633,   478,   479,   480,   481,   482,   483,   484,
-     485,   486,   487,     0,     0,     0,     0,     0,     0,     0,
-     488,   489,   477,     0,   478,   479,   480,   481,   482,   483,
-     484,   485,   486,   487,     5,     0,     0,     0,     0,     0,
-       0,   488,   489,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,     0,     0,     0,     0,     0,     0,     0,   488,
-     489,     6,     0,     7,     0,     0,     0,     0,     0,     8,
-       9,     0,     0,    10,     0,     0,   480,   481,   482,   483,
-     484,   485,   486,   487,     0,     0,     0,    12,     0,    13,
-       0,   488,   489,     0,     0,   205,    15,     0,    16,     0,
+      28,     0,     0,     0,     0,    29,    30,    31,     0,     0,
+      32,     6,    33,     7,     0,     0,    34,     0,     0,     8,
+       9,     0,     0,    10,     0,    35,     0,    36,    11,     0,
+       0,     0,     0,     0,     0,    37,    38,    12,     0,    13,
+       0,     0,     0,     0,     0,    14,    15,     0,    16,     0,
        0,     0,    17,     0,     0,    18,     0,     0,     0,     0,
        0,     0,    17,     0,     0,    18,     0,     0,     0,     0,
-       0,     0,    19,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    19,     0,    39,     0,     0,     0,     0,    20,
        5,     0,     0,    21,     0,    22,    23,    24,    25,     0,
        5,     0,     0,    21,     0,    22,    23,    24,    25,     0,
-       0,   206,     0,     0,    26,     0,     0,     0,   207,     0,
+       0,     0,     0,     0,    26,     0,     0,     0,     0,    27,
        0,     0,     0,     0,     0,     0,     0,     6,     0,     7,
        0,     0,     0,     0,     0,     0,     0,     6,     0,     7,
-       0,     0,     0,     0,     0,     8,     0,     0,     0,    10,
+       0,     0,     0,     0,   237,     8,     0,     0,     0,    10,
        0,     0,     0,     0,     0,     0,     0,    28,     0,     0,
        0,     0,    29,    30,    31,    13,     0,    32,     0,    33,
        0,     0,     0,     0,     0,     0,     0,    28,     0,     0,
        0,     0,    29,    30,    31,    13,     0,    32,     0,    33,
-       0,   205,    15,   208,    16,     0,     0,     0,    17,     0,
-       0,    18,   209,     0,    36,     0,     0,     0,    19,     0,
-       0,     0,    37,    38,     0,     0,     5,     0,     0,    21,
+       0,   205,    15,    34,    16,     0,   238,     0,    17,     0,
+     -61,    18,    35,     0,    36,     0,     0,     0,    19,     0,
+       0,     0,    37,    38,     0,     0,     0,     0,     0,    21,
        0,    22,    23,    24,     0,     0,     0,     0,     0,     0,
       26,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    22,    23,    24,     0,     0,     0,     0,     0,     0,
       26,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     6,     0,     7,     0,     0,     0,     0,
-       0,     8,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    39,     0,     0,     0,     0,     0,     0,     0,     0,
+     239,     0,     0,     0,     0,     0,     0,     5,     0,     0,
        0,     0,     0,    28,     0,     0,     0,     0,    29,    30,
        0,     0,     0,    28,     0,     0,     0,     0,    29,    30,
-      31,    13,     0,    32,     0,    33,     0,   205,    15,   208,
-       0,     0,     0,     0,    17,     0,     0,    18,   209,     0,
-      36,     0,     0,     0,    19,     0,     0,     0,    37,    38,
-       0,     0,     0,     0,     0,     0,     0,    22,    23,    24,
-       0,     0,     0,     0,     0,     0,    26,     0,     0,     0,
+      31,     0,     0,    32,     0,    33,   240,     0,     0,   208,
+       0,     0,     0,     0,     6,     0,     7,     0,   209,     0,
+      36,   237,     8,     0,     0,     0,    10,     0,    37,    38,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    13,     0,     0,     0,   599,     0,   205,    15,
+       0,    16,     0,   238,     0,    17,     0,    39,    18,     0,
+       0,     0,     0,     0,     0,    19,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    21,     0,    22,    23,
+      24,     0,     0,     0,     0,     0,     0,    26,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   239,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     5,
+      28,     0,     0,     0,     0,    29,    30,    31,     0,     0,
+      32,     0,    33,   240,     0,     0,   208,   616,     0,     0,
+       0,     0,     0,     0,     0,   209,     6,    36,     7,     0,
+       0,     0,     0,     0,     8,    37,    38,     0,    10,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   626,    13,     0,     0,     0,     0,     0,
+     205,    15,     0,    16,    39,     0,     0,    17,     0,     0,
+      18,     0,     0,     0,     0,     0,     0,    19,     0,     0,
+       0,     0,     0,     0,     0,     5,     0,     0,    21,     0,
+      22,    23,    24,     0,     0,     0,     0,     0,     0,    26,
+     468,   469,   470,   471,   472,   473,   474,   475,   476,     0,
+       0,     0,     6,     0,     7,     0,     0,     0,     0,     0,
+       8,     0,     0,     0,    10,     0,     0,     0,     0,     0,
+       0,     0,    28,     0,     0,     0,     0,    29,    30,    31,
+      13,     0,    32,     0,    33,     0,   205,    15,   208,    16,
+       0,     0,     0,    17,     0,     0,    18,   209,     0,    36,
+       0,     0,     0,    19,     0,     0,     0,    37,    38,     0,
+       0,     0,     0,     0,    21,     0,    22,    23,    24,     0,
+       0,     0,     0,     0,     0,    26,   468,   469,   470,   471,
+     472,   473,   474,   475,   476,     0,    39,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   468,   469,   470,   471,   472,   473,   474,    28,     0,
+       0,     0,     0,    29,    30,    31,     0,     0,    32,     0,
+      33,     0,     0,     0,   208,     0,     0,     0,     0,     0,
+       0,     0,     0,   209,     0,    36,     0,     0,     0,     0,
+       0,     0,     0,    37,    38,   468,   469,   470,   471,   472,
+     473,   474,   475,   476,     0,     0,     0,     0,   477,     0,
+     478,   479,   480,   481,   482,   483,   484,   485,   486,   487,
+       0,     0,    39,     0,     0,     0,     0,   488,   489,     0,
+       0,     0,     0,     0,   503,   468,   469,   470,   471,   472,
+     473,   474,   475,   476,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   468,   469,   470,
+     471,   472,   473,   474,   475,   476,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   468,   469,
+     470,   471,   472,   473,   474,   475,   476,     0,     0,     0,
+       0,     0,     0,     0,   477,     0,   478,   479,   480,   481,
+     482,   483,   484,   485,   486,   487,   468,   469,   470,   471,
+     472,   473,   474,   488,   489,     0,     0,     0,     0,     0,
+     523,   478,   479,   480,   481,   482,   483,   484,   485,   486,
+     487,   468,   469,   470,   471,   472,   473,   474,   488,   489,
+       0,     0,     0,     0,     0,     0,     0,   468,   469,   470,
+     471,   472,   473,   474,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   477,     0,   478,   479,   480,   481,   482,
+     483,   484,   485,   486,   487,     0,     0,     0,     0,     0,
+       0,     0,   488,   489,     0,     0,     0,     0,     0,   565,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   477,     0,   478,   479,   480,   481,   482,
+     483,   484,   485,   486,   487,     0,     0,     0,     0,     0,
+       0,     0,   488,   489,   635,   477,   634,   478,   479,   480,
+     481,   482,   483,   484,   485,   486,   487,     0,     0,     0,
+       0,     0,     0,     0,   488,   489,   477,     0,   478,   479,
+     480,   481,   482,   483,   484,   485,   486,   487,     0,     0,
+       0,     0,     0,     0,     0,   488,   489,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   479,   480,   481,
+     482,   483,   484,   485,   486,   487,     0,     0,     0,     0,
+       0,     0,     0,   488,   489,     0,     0,     0,     0,     0,
+       0,     5,     0,   480,   481,   482,   483,   484,   485,   486,
+     487,     0,     0,     0,     0,     0,     0,     0,   488,   489,
+     481,   482,   483,   484,   485,   486,   487,     0,     6,     0,
+       7,     0,     0,     0,   488,   489,     8,     9,     0,     0,
+      10,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    12,     0,    13,     0,     0,     0,
+       0,     0,   205,    15,     0,    16,     0,     0,     0,    17,
+       0,     0,    18,     0,     0,     0,     0,     0,     0,    19,
+       0,     0,     0,     0,     0,     0,     0,     5,     0,     0,
+      21,     0,    22,    23,    24,    25,     0,     0,   206,     0,
+       0,    26,     0,     0,     0,   207,     0,     0,     0,     0,
+       0,     0,     0,     0,     6,     0,     7,     0,     0,     0,
+       0,     0,     8,     0,     0,     0,    10,     0,     0,     0,
+       0,     0,     0,     0,    28,     0,     0,     0,     0,    29,
+      30,    31,    13,     0,    32,     0,    33,     0,   205,    15,
+     208,    16,     0,     0,     0,    17,     0,     0,    18,   209,
+       0,    36,     0,     0,     0,    19,     0,     0,     0,    37,
+      38,     0,     0,     5,     0,     0,    21,     0,    22,    23,
+      24,     0,     0,     0,     0,     0,     0,    26,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       6,     0,     7,     0,     0,     0,     0,     0,     8,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      28,     0,     0,     0,     0,    29,    30,    31,    13,     0,
+      32,     0,    33,     0,   205,    15,   208,     0,     0,     0,
+       0,    17,     0,     0,    18,   209,     0,    36,     0,     0,
+       0,    19,     0,     0,     0,    37,    38,     0,     0,     0,
+       0,     0,     0,     0,    22,    23,    24,     0,     0,     0,
+       0,     0,     0,    26,     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,     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,
-       0,     0,     0,     0,    29,    30,    31,     0,     0,    32,
-       0,     0,     0,     0,     0,   208,     0,     0,     0,     0,
-       0,     0,     0,     0,   209,     0,    36,     0,     0,     0,
-       0,     0,     0,     0,    37,    38,    98,     0,    99,   100,
-     101,   102,   103,   104,     0,   105,     0,     0,   106,     0,
-     107,     0,     0,     0,   108,   109,     0,   110,   111,   112,
-     113,     0,   114,   115,   116,   117,   118,   119,   120,   121,
-       0,   122,     0,   123,   124,   125,   126,   127,     0,     0,
-     128,     0,     0,     0,   129,     0,   130,   131,     0,   132,
-     133,   134,   135,   136,   137,     0,   138,   139,   140,   141,
-     142,   143,     0,     0,   144,     0,     0,   145,     0,     0,
-       0,     0,   146,   147,     0,   148,   149,     0,   150,   151,
-       0,     0,     0,   152,   153,   154,   155,   156,   157,     0,
-     158,   159,   160,   161,   162,   163,   164,     0,   165,   166,
-       0,   167,   168,   169,   170,   171,   172,   173,   174,   175,
-       0,   176,   177,   178,   179,     0,     0,     0,   180,     0,
-       0,   181,     0,     0,   182,   183,     0,     0,   184,   185,
-     186,   187,     0,     0,   188,     0,   189,     0,   190,   191,
-     192,   193,   194,   195,   196,     0,     0,   197
+       0,    29,    30,    31,     0,     0,    32,     0,     0,     0,
+       0,     0,   208,     0,     0,     0,     0,     0,     0,     0,
+       0,   209,     0,    36,     0,     0,     0,     0,     0,     0,
+       0,    37,    38,    98,     0,    99,   100,   101,   102,   103,
+     104,     0,   105,     0,     0,   106,     0,   107,     0,     0,
+       0,   108,   109,     0,   110,   111,   112,   113,     0,   114,
+     115,   116,   117,   118,   119,   120,   121,     0,   122,     0,
+     123,   124,   125,   126,   127,     0,     0,   128,     0,     0,
+       0,   129,     0,   130,   131,     0,   132,   133,   134,   135,
+     136,   137,     0,   138,   139,   140,   141,   142,   143,     0,
+       0,   144,     0,     0,   145,     0,     0,     0,     0,   146,
+     147,     0,   148,   149,     0,   150,   151,     0,     0,     0,
+     152,   153,   154,   155,   156,   157,     0,   158,   159,   160,
+     161,   162,   163,   164,     0,   165,   166,     0,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,     0,   176,   177,
+     178,   179,     0,     0,     0,   180,     0,     0,   181,     0,
+       0,   182,   183,     0,     0,   184,   185,   186,   187,     0,
+       0,   188,     0,   189,     0,   190,   191,   192,   193,   194,
+     195,   196,     0,     0,   197
 };
 
 };
 
-#define yypact_value_is_default(yystate) \
-  ((yystate) == (-526))
-
-#define yytable_value_is_error(yytable_value) \
-  YYID (0)
-
 static const yytype_int16 yycheck[] =
 {
 static const yytype_int16 yycheck[] =
 {
-       2,     2,    69,     2,    69,     2,     2,   307,   269,     2,
-      48,   272,   268,   274,   246,   204,   277,    45,     2,   276,
-     325,   282,   242,   243,    70,     2,     2,   294,     2,   506,
-       2,     2,   108,   558,    16,    38,    48,    58,   505,   507,
-     327,    16,   509,   155,    90,     3,   155,     5,    51,    48,
-     155,    48,    66,    67,    68,    48,    34,    35,    72,     0,
-       3,   202,     5,   563,    48,   202,   207,   202,   568,   207,
-     207,    31,   207,     3,   330,     5,    36,    99,    99,   133,
-      16,    39,     9,   137,    67,    68,    44,   181,   565,    72,
-     181,     3,   204,     5,   206,   204,    39,     3,   566,   204,
-       6,     7,     8,     9,    10,    11,   128,   327,    96,    39,
-     164,   181,   206,    71,    44,   181,   202,   208,   181,   419,
-     206,   598,   647,     3,   624,   181,   202,    39,    71,   318,
-     597,   431,   321,   600,   321,   603,     6,     7,   208,    39,
-      44,    71,   208,   207,    44,   208,   413,   203,   625,   216,
-     183,   216,   341,   342,   343,   342,   343,    26,   206,    71,
-     627,    30,   206,   631,    70,    69,     3,   125,     5,   636,
-       9,    71,     3,    12,     5,   242,   243,   242,   243,    14,
-      15,    16,   125,   206,   202,   652,   447,   205,   255,   202,
-      94,   202,   205,   151,   205,   125,   263,     3,   418,     5,
-     202,   203,   205,   202,   203,   202,   203,   161,   151,   202,
-     203,   117,   224,   125,   189,   190,   191,   192,   193,   201,
-     202,   151,     3,   204,     5,   125,   201,   202,   207,   490,
-     208,   209,     9,   191,   138,   467,   250,   283,   276,   151,
-     286,   147,   288,   289,   549,   206,   150,   293,   191,   207,
-     550,   151,   204,   206,   160,   191,   192,   193,   204,   520,
-     327,   191,   327,   207,   207,   201,   202,   250,   206,     3,
-     308,     5,   202,     3,   276,     5,   204,   207,   206,   191,
-     186,   513,   206,   189,   190,   191,   204,    39,   194,   195,
-     202,   191,   206,   206,   332,   207,   206,   203,   555,   204,
-     207,   207,   202,   204,     3,   206,     5,   207,   608,   206,
-     597,   176,   177,   178,   179,   180,   204,   319,   319,    71,
-     319,   541,   319,   319,   326,   326,   319,   326,   366,   326,
-     332,   563,     3,   326,     5,   319,   568,   624,   202,   571,
-      40,   343,   319,   319,   644,   319,   384,   319,   319,   636,
-       3,   418,     5,   418,   189,   190,   191,   192,   193,     3,
-       3,     5,     5,   207,   207,   652,   201,   202,     3,   207,
-       5,   207,   206,   125,   208,   207,     3,   207,   207,   446,
-     207,   207,   207,    83,   207,   207,   207,   425,   416,   645,
-     610,   207,   624,   207,   207,   433,    96,    97,    98,   151,
-     207,   206,   467,   207,   207,   105,   667,   207,   207,   207,
-     207,   449,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,   459,   207,   207,   420,   427,   425,   207,   430,   430,
-     204,   430,   207,   430,   433,   207,   433,   430,   207,   191,
-     433,   207,   507,   206,   144,   206,   204,   209,   148,   208,
-     202,   208,   449,     3,   207,   207,     6,     7,     8,     9,
-      10,    11,     9,     9,     9,     9,     9,     9,     9,   507,
-       9,     9,   207,   202,   541,   265,   541,   183,   268,   206,
-     204,   204,   204,   672,   673,   275,   206,   208,   278,   205,
-     181,   209,   207,   560,   284,   285,   208,   208,   563,   208,
-     208,   566,   181,   568,   208,   507,   208,   545,     9,    90,
-     208,   208,   208,   208,   208,   208,   208,   555,   208,   208,
-      70,   208,   208,   208,   208,   208,   208,   208,   566,   201,
-     208,   208,   208,   535,   208,   183,   535,   206,   535,   205,
-     330,   331,   535,   610,   208,   610,   208,   181,   206,   206,
-       3,     3,     9,   555,   208,     6,   181,   206,   208,   624,
-     206,   208,   183,   208,   566,   603,   208,   117,   204,   208,
-     360,   361,   362,   363,   364,   365,   366,   208,   208,   208,
-     182,   222,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   208,   631,   183,   183,   206,   147,   446,   201,
-     202,   603,   290,    48,   284,   429,   208,   515,   427,   216,
-     160,   613,   613,   673,   613,   647,   613,    14,    15,    16,
-     613,   280,    19,    20,    -1,    -1,    -1,    -1,    -1,   631,
-      -1,    -1,    -1,    -1,    -1,    -1,   186,    -1,    -1,   189,
-     190,   191,    -1,    -1,   194,   195,    -1,    -1,   438,    -1,
-      -1,    -1,    -1,   203,    -1,    -1,    -1,   207,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   468,   469,
-      -1,   471,   472,   473,   474,   475,   476,   477,   478,   479,
-     480,   481,   482,   483,   484,   485,   486,   487,    -1,   489,
-      -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,     5,     6,
-       7,     8,     9,    10,    11,    -1,     3,    -1,    -1,     6,
-       7,     8,     9,    10,    11,   515,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    32,    -1,    34,    -1,    -1,
-      -1,    -1,    -1,    40,    -1,    -1,    -1,    44,    -1,    -1,
-      -1,    -1,    -1,    -1,    14,    15,    16,    17,    18,    19,
-      20,    -1,    -1,    60,    -1,    -1,    -1,    -1,    -1,    66,
-      67,    -1,    69,    70,    -1,    -1,    73,    -1,    -1,    76,
-      -1,    -1,    -1,    70,    -1,    -1,    83,    -1,    -1,    -1,
-     187,   188,   189,   190,   191,   192,   193,    94,    -1,    96,
-      97,    98,    -1,    -1,   201,   202,    -1,    -1,   105,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     117,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     117,    14,    15,    16,    17,    18,    19,    20,    -1,    22,
-     630,   138,    -1,   633,    -1,    -1,   143,   144,   145,    -1,
-     147,   148,    -1,   150,    -1,   645,    -1,   154,    -1,    -1,
-     147,    -1,    -1,   160,    -1,    -1,   163,    -1,   165,    -1,
-      -1,    -1,    -1,   160,    -1,    -1,   173,   174,    -1,    -1,
-      -1,     4,     5,    -1,    -1,    -1,    -1,    -1,    -1,   186,
-      -1,    -1,   189,   190,   191,    -1,    -1,   194,   195,   186,
-      -1,    -1,   189,   190,   191,    -1,    -1,   194,   195,    32,
-     207,    34,    -1,    -1,    -1,    -1,    -1,    40,    41,    -1,
-     207,    44,    -1,    -1,    -1,    -1,    49,   187,   188,   189,
-     190,   191,   192,   193,    -1,    58,    -1,    60,    -1,    -1,
-      -1,   201,   202,    66,    67,    -1,    69,    -1,    -1,    -1,
-      73,    -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,
-      83,    -1,    -1,    -1,    -1,    -1,    -1,    90,    91,    -1,
-      -1,    94,    -1,    96,    97,    98,    99,    -1,    -1,    -1,
-      -1,    -1,   105,    -1,    -1,    -1,    -1,   110,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     4,     5,
-      -1,   184,   185,   186,   187,   188,   189,   190,   191,   192,
-     193,    -1,    -1,    -1,    -1,   138,    -1,    -1,   201,   202,
-     143,   144,   145,    -1,    -1,   148,    32,   150,    34,    -1,
-      -1,   154,    -1,    -1,    40,    41,    -1,    -1,    44,    -1,
-     163,    -1,   165,    49,    -1,    -1,    -1,    -1,    -1,    -1,
-     173,   174,    58,    -1,    60,    -1,    -1,    -1,    -1,    -1,
-      66,    67,    -1,    69,    -1,    -1,    -1,    73,    -1,    -1,
-      76,    -1,    -1,    -1,    -1,    -1,    -1,    83,    -1,   202,
-      -1,    -1,   205,    -1,    90,    91,    -1,    -1,    94,    -1,
-      96,    97,    98,    99,    -1,    -1,    -1,    -1,    -1,   105,
-      -1,    -1,    -1,    -1,   110,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     4,     5,    -1,    -1,    -1,
+       2,    48,     2,     2,    69,    45,    69,     2,   268,     2,
+     204,   276,     2,     2,   325,     2,   294,   246,     2,     2,
+      16,     2,     2,   108,   269,   181,   307,   272,    70,   274,
+     559,    48,   277,     3,   507,     5,   155,   282,   242,   243,
+     505,    38,    16,   155,   509,    58,   155,   506,    90,    48,
+     327,   181,   208,    48,    51,    48,    66,    67,    68,    34,
+      35,    48,    72,   181,     3,     0,     5,   564,    99,    39,
+     330,   181,   569,   207,    44,    67,    68,     3,   208,     5,
+      72,   181,   321,    31,    96,   204,    99,   206,    36,   181,
+     208,     9,   204,   203,   567,   204,   265,   128,   133,   268,
+      39,    71,   137,   342,   343,    44,   275,   566,   208,   278,
+       3,     3,     5,    39,   206,   284,   285,   202,   202,   207,
+     649,   202,   206,   327,   318,   202,   207,   321,   625,   164,
+     207,   604,    71,   598,   202,   413,   601,    26,   419,   207,
+     599,    30,     3,     9,     5,    71,    12,   341,   342,   343,
+     431,   216,   206,   216,   202,   125,     3,   205,     5,   632,
+     161,   330,   331,   628,   183,   202,   202,   626,   205,   205,
+     204,     3,   637,     5,     3,   204,     5,   242,   243,   242,
+     243,   151,     3,   204,     5,   206,   125,     6,     7,   654,
+     255,   360,   361,   362,   363,   364,   365,   366,   263,   125,
+     202,   203,   447,   202,   203,   201,   202,   224,   205,   202,
+     203,     9,   151,   204,   418,   202,   203,   191,   192,   193,
+     206,   191,    14,    15,    16,   151,   204,   201,   202,   276,
+     206,   204,   202,   208,   209,   206,   204,   207,   467,   550,
+     250,   283,   206,   206,   286,   490,   288,   289,    44,   206,
+     206,   293,   191,   204,     3,   206,     5,     3,   250,     5,
+     206,   308,   327,   206,   327,   191,   206,     3,   207,   438,
+     551,   207,   202,    69,   276,   520,   202,     3,    16,     5,
+       3,   207,     5,   207,   513,   332,   176,   177,   178,   179,
+     180,   556,     3,    39,     5,     3,   207,     5,    94,   468,
+     469,   207,   471,   472,   473,   474,   475,   476,   477,   478,
+     479,   480,   481,   482,   483,   484,   485,   486,   487,   366,
+     489,   598,   207,   207,   326,    71,   326,   326,   609,     3,
+     332,     5,   206,   326,   208,   564,   207,   384,   542,   326,
+     569,   343,   138,   572,   207,   207,   515,   207,   625,   207,
+     207,   207,   207,   418,   150,   418,    14,    15,    16,   207,
+     637,    19,    20,   207,   207,   646,   207,   207,   207,   207,
+     207,   207,   207,   207,   207,     9,   207,   654,   425,   125,
+     207,   446,   207,   207,   207,   207,   433,   647,   204,   207,
+     207,   206,   206,   206,   204,     9,   625,   189,   190,   191,
+     192,   193,   449,   209,   467,   151,   208,   611,   208,   201,
+     202,     9,   459,     9,     9,     9,     9,     9,     9,   202,
+     422,   207,   422,   422,   669,   427,   425,   422,   430,   422,
+     430,   430,   422,   422,   433,   422,   420,   430,   422,   422,
+     433,   422,   422,   430,   507,   191,   433,   206,   204,   204,
+     183,   189,   190,   191,   192,   193,   449,   204,   206,   181,
+     507,   207,   631,   201,   202,   634,   208,   208,   205,   209,
+     201,   183,   181,   208,   208,   207,     9,   542,   647,   542,
+     674,   675,    90,   208,   208,     3,   181,   208,   208,   208,
+     208,   208,   208,   208,   208,   535,   561,     3,   208,   546,
+     206,   564,    40,   208,   567,   507,   569,   208,   208,   556,
+     208,   208,   208,    14,    15,    16,    17,    18,    19,    20,
+     567,    22,   208,   208,   208,   208,   208,   208,   205,   187,
+     188,   189,   190,   191,   192,   193,   208,   208,   206,   206,
+       9,     6,   208,   201,   202,    83,   611,   206,   611,   181,
+     206,   208,   183,   208,   556,   208,   208,   604,    96,    97,
+      98,   204,   625,   208,   208,   567,   208,   105,     3,   208,
+       5,     6,     7,     8,     9,    10,    11,   183,   208,   183,
+     206,   446,   284,     3,   429,   632,     6,     7,     8,     9,
+      10,    11,   319,   515,    39,   675,   290,    32,    48,    34,
+     649,   427,   604,   216,   280,    40,   144,    -1,   610,    44,
+     148,   610,   614,    -1,   614,   614,    -1,   610,    -1,    -1,
+      -1,   614,    -1,   610,    -1,    60,    71,   614,    -1,    -1,
+     632,    66,    67,    -1,    69,    70,    -1,    39,    73,    -1,
+      -1,    76,    44,    -1,    -1,    -1,    -1,    -1,    83,     3,
+      70,    -1,     6,     7,     8,     9,    10,    11,    -1,    94,
+      -1,    96,    97,    98,    -1,    -1,    -1,    -1,     3,    71,
+     105,     6,     7,     8,     9,    10,    11,    -1,    -1,    -1,
+     125,    -1,   117,   184,   185,   186,   187,   188,   189,   190,
+     191,   192,   193,    -1,    -1,    -1,    -1,   117,    -1,    -1,
+     201,   202,    -1,   138,    -1,    -1,   151,    -1,   143,   144,
+     145,    -1,   147,   148,    -1,   150,    70,    -1,    -1,   154,
+      -1,    -1,    -1,   125,    -1,   160,    -1,   147,   163,    -1,
+     165,    -1,    -1,    -1,    -1,    70,    -1,    -1,   173,   174,
+     160,    -1,    -1,    -1,    -1,    -1,   191,    -1,    -1,   151,
+      -1,   186,    -1,    -1,   189,   190,   191,   202,    -1,   194,
+     195,    -1,   207,   117,    -1,    -1,   186,    -1,    -1,   189,
+     190,   191,   207,    -1,   194,   195,    -1,    -1,    -1,    -1,
+      -1,    -1,   117,   203,    -1,    -1,    -1,   207,    -1,   191,
+      -1,    -1,    -1,   147,    -1,    -1,    -1,    -1,    -1,    -1,
+     202,    -1,    -1,    -1,    -1,   207,   160,    -1,    -1,    -1,
+      -1,    -1,   147,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   160,    -1,    -1,    -1,    -1,
+      -1,    -1,   186,     4,     5,   189,   190,   191,    -1,    -1,
+     194,   195,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   203,
+      -1,   186,    -1,   207,   189,   190,   191,    -1,    -1,   194,
+     195,    32,    -1,    34,    -1,    -1,    -1,    -1,    -1,    40,
+      41,    -1,   207,    44,    -1,    -1,    -1,    -1,    49,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    -1,    60,
+      -1,    -1,    -1,    -1,    -1,    66,    67,    -1,    69,    -1,
+      -1,    -1,    73,    -1,    -1,    76,    -1,    -1,    -1,    -1,
+      -1,    -1,    83,    -1,    -1,    -1,    -1,    -1,    -1,    90,
+      91,    -1,    -1,    94,    -1,    96,    97,    98,    99,    -1,
+      -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,    -1,   110,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   138,    -1,    -1,    -1,    -1,   143,   144,   145,
-      -1,    -1,   148,    32,   150,    34,    -1,    -1,   154,    -1,
-      -1,    40,    41,    -1,    -1,    44,    -1,   163,    -1,   165,
-      49,    -1,    -1,    -1,    -1,    -1,    -1,   173,   174,    58,
-      -1,    60,    -1,    -1,    -1,    -1,    -1,    66,    67,    -1,
-      69,    -1,    -1,    -1,    73,    -1,    -1,    76,    -1,    -1,
-      -1,    -1,    -1,    -1,    83,    -1,   202,    -1,    -1,   205,
-      -1,    90,    -1,    -1,    -1,    94,    -1,    96,    97,    98,
-      99,    -1,    -1,    -1,    -1,    -1,   105,     4,     5,    -1,
-      -1,   110,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+       4,     5,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,
+      -1,    -1,   143,   144,   145,    -1,    -1,   148,    32,   150,
+      34,    -1,    -1,   154,    -1,    -1,    40,    41,    -1,    -1,
+      44,    -1,   163,    -1,   165,    49,    -1,    -1,    -1,    -1,
+      -1,    -1,   173,   174,    58,    -1,    60,    -1,    -1,    -1,
+      -1,    -1,    66,    67,    -1,    69,    -1,    -1,    -1,    73,
+      -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,    83,
+      -1,   202,    -1,    -1,   205,    -1,    90,    91,    -1,    -1,
+      94,    -1,    96,    97,    98,    99,    -1,    -1,    -1,    -1,
+      -1,   105,    -1,    -1,    -1,    -1,   110,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,     4,     5,    -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,    32,    -1,    34,    -1,   138,
-      -1,    -1,    -1,    40,   143,   144,   145,    44,    -1,   148,
-      -1,   150,    49,    -1,    -1,   154,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    60,   163,    -1,   165,    -1,    -1,    66,
-      67,    -1,    69,    -1,   173,   174,    73,    -1,    -1,    76,
-      -1,    -1,    -1,    -1,    -1,    -1,    83,    -1,    -1,    -1,
-      -1,    -1,    -1,    90,    -1,    -1,    -1,    94,    -1,    96,
-      97,    98,    -1,   202,    -1,    -1,   205,    -1,   105,     4,
-       5,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,   143,
+     144,   145,    -1,    -1,   148,    32,   150,    34,    -1,    -1,
+     154,    -1,    -1,    40,    41,    -1,    -1,    44,    -1,   163,
+      -1,   165,    49,    -1,    -1,    -1,    -1,    -1,    -1,   173,
+     174,    58,    -1,    60,    -1,    -1,    -1,    -1,    -1,    66,
+      67,    -1,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,
+      -1,    -1,    -1,    -1,    -1,    -1,    83,    -1,   202,    -1,
+      -1,   205,    -1,    90,    -1,    -1,    -1,    94,    -1,    96,
+      97,    98,    99,    -1,    -1,    -1,    -1,    -1,   105,     4,
+       5,    -1,    -1,   110,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,    -1,    34,
       -1,   138,    -1,    -1,    -1,    40,   143,   144,   145,    44,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,    -1,    34,
       -1,   138,    -1,    -1,    -1,    40,   143,   144,   145,    44,
@@ -1801,187 +1567,204 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    90,    -1,    -1,    -1,    94,
       -1,    96,    97,    98,    -1,   202,    -1,    -1,   205,    -1,
      105,     4,     5,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    90,    -1,    -1,    -1,    94,
       -1,    96,    97,    98,    -1,   202,    -1,    -1,   205,    -1,
      105,     4,     5,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    -1,    32,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,
       -1,    34,    -1,   138,    -1,    -1,    -1,    40,   143,   144,
      145,    44,    -1,   148,    -1,   150,    49,    -1,    -1,   154,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,   163,    -1,
      165,    -1,    -1,    66,    67,    -1,    69,    -1,   173,   174,
       73,    -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    34,    -1,   138,    -1,    -1,    -1,    40,   143,   144,
      145,    44,    -1,   148,    -1,   150,    49,    -1,    -1,   154,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,   163,    -1,
      165,    -1,    -1,    66,    67,    -1,    69,    -1,   173,   174,
       73,    -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,
-      83,    -1,    -1,    -1,    -1,    -1,    -1,    90,     5,    -1,
+      83,    -1,    -1,    -1,    -1,    -1,    -1,    90,    -1,    -1,
       -1,    94,    -1,    96,    97,    98,    -1,   202,    -1,    -1,
       -1,    94,    -1,    96,    97,    98,    -1,   202,    -1,    -1,
-     205,    -1,   105,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    32,    -1,    34,    -1,    -1,
-      -1,    -1,    -1,    40,    -1,    -1,    -1,    44,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-     143,   144,   145,    60,    -1,   148,    -1,   150,    -1,    66,
-      67,   154,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,
-     163,    -1,   165,    -1,    -1,    -1,    83,    -1,    -1,    -1,
-     173,   174,    -1,    -1,    -1,    -1,    -1,    94,    -1,    96,
-      97,    98,    -1,    -1,    -1,    -1,    -1,   182,   105,   184,
-     185,   186,   187,   188,   189,   190,   191,   192,   193,   202,
-      -1,    -1,   205,    -1,     4,     5,   201,   202,   203,    -1,
-      -1,    -1,    -1,    13,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   138,    -1,    -1,    -1,    -1,   143,   144,   145,    -1,
-      -1,   148,    32,   150,    34,    -1,    -1,   154,    -1,    -1,
-      40,    41,    -1,    -1,    44,    -1,   163,    -1,   165,    49,
-      -1,    -1,    -1,    -1,    -1,    -1,   173,   174,    58,    -1,
-      60,    -1,    -1,    -1,    -1,    -1,    66,    67,    -1,    69,
-      -1,    -1,    -1,    73,    -1,    -1,    76,    -1,    -1,    -1,
-      -1,    -1,    -1,    83,    -1,   202,    -1,    -1,   205,    -1,
-      90,    91,    -1,    -1,    94,    -1,    96,    97,    98,    99,
-      -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,    -1,
-     110,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,     4,     5,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,
-      -1,    -1,    -1,   143,   144,   145,    -1,    -1,   148,    32,
-     150,    34,    -1,    -1,   154,    -1,    -1,    40,    41,    -1,
-      -1,    44,    -1,   163,    -1,   165,    49,    -1,    -1,    -1,
-      -1,    -1,    -1,   173,   174,    58,    -1,    60,    -1,    -1,
-      -1,    -1,    -1,    66,    67,    -1,    69,    -1,    -1,    -1,
-      73,    -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,
-      83,    -1,   202,    -1,    -1,    -1,    -1,    90,     5,    -1,
-      -1,    94,    -1,    96,    97,    98,    99,    -1,    -1,    -1,
-      -1,    -1,   105,    -1,    -1,    -1,    -1,   110,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    32,    -1,    34,    -1,    -1,
-      -1,    -1,    39,    40,    -1,    -1,    -1,    44,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
-     143,   144,   145,    60,    -1,   148,    -1,   150,    -1,    66,
-      67,   154,    69,    -1,    71,    -1,    73,    -1,   161,    76,
-     163,    -1,   165,    -1,    -1,    -1,    83,    -1,    -1,    -1,
-     173,   174,    -1,    -1,    -1,    -1,    -1,    94,    -1,    96,
-      97,    98,    -1,    -1,    -1,    -1,    -1,    -1,   105,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   202,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   125,    -1,
-      -1,    -1,    -1,    -1,    -1,     5,    -1,    -1,    -1,    -1,
-      -1,   138,    -1,    -1,    -1,    -1,   143,   144,   145,    -1,
-      -1,   148,    -1,   150,   151,    -1,    -1,   154,    -1,    -1,
-      -1,    -1,    32,    -1,    34,    -1,   163,    -1,   165,    39,
-      40,    -1,    -1,    -1,    44,    -1,   173,   174,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      60,    -1,    -1,    -1,   191,    -1,    66,    67,    -1,    69,
-      -1,    71,    -1,    73,    -1,   202,    76,    -1,    -1,    -1,
-      -1,    -1,    -1,    83,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    94,    -1,    96,    97,    98,    -1,
-      -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,   138,    -1,
-      -1,    -1,    -1,   143,   144,   145,    -1,    -1,   148,    -1,
-     150,   151,    -1,    -1,   154,    23,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   163,    32,   165,    34,    -1,    -1,    -1,
-      -1,    -1,    40,   173,   174,    -1,    44,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   191,    60,    -1,    -1,    -1,    -1,    -1,    66,    67,
-      -1,    69,   202,    -1,    -1,    73,    -1,    -1,    76,    -1,
-      -1,    -1,    -1,    -1,    -1,    83,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,     5,    -1,    -1,    94,    -1,    96,    97,
-      98,    -1,    -1,    -1,    -1,    -1,    -1,   105,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    -1,    -1,    -1,
-      32,    -1,    34,    -1,    -1,    -1,    -1,    -1,    40,    -1,
-      -1,    -1,    44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     138,    -1,    -1,    -1,    -1,   143,   144,   145,    60,    -1,
-     148,    -1,   150,    -1,    66,    67,   154,    69,    -1,    -1,
-      -1,    73,    -1,    -1,    76,   163,    -1,   165,    -1,    -1,
-      -1,    83,    -1,    -1,    -1,   173,   174,    -1,    -1,    -1,
-      -1,    -1,    94,    -1,    96,    97,    98,    -1,    -1,    -1,
-      -1,    -1,    -1,   105,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,    -1,   202,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    14,
-      15,    16,    17,    18,    19,    20,   138,    -1,    -1,    -1,
-      -1,   143,   144,   145,    -1,    -1,   148,    -1,   150,    -1,
-      -1,    -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   163,    -1,   165,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   173,   174,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    -1,    -1,    -1,    -1,   182,    -1,   184,   185,
-     186,   187,   188,   189,   190,   191,   192,   193,    -1,    -1,
-     202,    -1,    -1,    -1,    -1,   201,   202,    -1,    -1,    -1,
-      -1,    -1,   208,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    14,    15,    16,    17,    18,    19,    20,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   182,    -1,   184,   185,   186,   187,   188,   189,
-     190,   191,   192,   193,    14,    15,    16,    17,    18,    19,
-      20,   201,   202,    -1,    -1,    -1,    -1,    -1,   208,   184,
-     185,   186,   187,   188,   189,   190,   191,   192,   193,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   201,   202,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     205,    -1,   105,     4,     5,    -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,   182,    -1,   184,   185,   186,   187,   188,   189,   190,
-     191,   192,   193,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     201,   202,   203,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   182,   183,   184,   185,   186,   187,   188,   189,   190,
-     191,   192,   193,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     201,   202,   182,    -1,   184,   185,   186,   187,   188,   189,
-     190,   191,   192,   193,     5,    -1,    -1,    -1,    -1,    -1,
-      -1,   201,   202,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   201,
-     202,    32,    -1,    34,    -1,    -1,    -1,    -1,    -1,    40,
-      41,    -1,    -1,    44,    -1,    -1,   186,   187,   188,   189,
-     190,   191,   192,   193,    -1,    -1,    -1,    58,    -1,    60,
-      -1,   201,   202,    -1,    -1,    66,    67,    -1,    69,    -1,
-      -1,    -1,    73,    -1,    -1,    76,    -1,    -1,    -1,    -1,
-      -1,    -1,    83,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-       5,    -1,    -1,    94,    -1,    96,    97,    98,    99,    -1,
-      -1,   102,    -1,    -1,   105,    -1,    -1,    -1,   109,    -1,
+      -1,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      -1,    32,    -1,    34,    -1,   138,    -1,    -1,    -1,    40,
+     143,   144,   145,    44,    -1,   148,    -1,   150,    49,    -1,
+      -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,
+     163,    -1,   165,    -1,    -1,    66,    67,    -1,    69,    -1,
+     173,   174,    73,    -1,    -1,    76,    -1,    -1,    -1,    -1,
+      -1,    -1,    83,    -1,    -1,    -1,    -1,    -1,    -1,    90,
+       5,    -1,    -1,    94,    -1,    96,    97,    98,    -1,   202,
+      -1,    -1,   205,    -1,   105,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,    -1,    34,
       -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,    44,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,
       -1,    -1,   143,   144,   145,    60,    -1,   148,    -1,   150,
       -1,    66,    67,   154,    69,    -1,    -1,    -1,    73,    -1,
       -1,    76,   163,    -1,   165,    -1,    -1,    -1,    83,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,    -1,    34,
       -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,    44,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,
       -1,    -1,   143,   144,   145,    60,    -1,   148,    -1,   150,
       -1,    66,    67,   154,    69,    -1,    -1,    -1,    73,    -1,
       -1,    76,   163,    -1,   165,    -1,    -1,    -1,    83,    -1,
-      -1,    -1,   173,   174,    -1,    -1,     5,    -1,    -1,    94,
+      -1,    -1,   173,   174,    -1,    -1,    -1,    -1,    -1,    94,
+      -1,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,   182,
+     105,   184,   185,   186,   187,   188,   189,   190,   191,   192,
+     193,   202,    -1,    -1,   205,    -1,     4,     5,   201,   202,
+     203,    -1,    -1,    -1,    -1,    13,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,   143,   144,
+     145,    -1,    -1,   148,    32,   150,    34,    -1,    -1,   154,
+      -1,    -1,    40,    41,    -1,    -1,    44,    -1,   163,    -1,
+     165,    49,    -1,    -1,    -1,    -1,    -1,    -1,   173,   174,
+      58,    -1,    60,    -1,    -1,    -1,    -1,    -1,    66,    67,
+      -1,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,    -1,
+      -1,    -1,    -1,    -1,    -1,    83,    -1,   202,    -1,    -1,
+     205,    -1,    90,    91,    -1,    -1,    94,    -1,    96,    97,
+      98,    99,    -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,
+      -1,    -1,   110,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,     4,     5,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     138,    -1,    -1,    -1,    -1,   143,   144,   145,    -1,    -1,
+     148,    32,   150,    34,    -1,    -1,   154,    -1,    -1,    40,
+      41,    -1,    -1,    44,    -1,   163,    -1,   165,    49,    -1,
+      -1,    -1,    -1,    -1,    -1,   173,   174,    58,    -1,    60,
+      -1,    -1,    -1,    -1,    -1,    66,    67,    -1,    69,    -1,
+      -1,    -1,    73,    -1,    -1,    76,    -1,    -1,    -1,    -1,
+      -1,    -1,    83,    -1,   202,    -1,    -1,    -1,    -1,    90,
+       5,    -1,    -1,    94,    -1,    96,    97,    98,    99,    -1,
+      -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,    -1,   110,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,    -1,    34,
+      -1,    -1,    -1,    -1,    39,    40,    -1,    -1,    -1,    44,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,
+      -1,    -1,   143,   144,   145,    60,    -1,   148,    -1,   150,
+      -1,    66,    67,   154,    69,    -1,    71,    -1,    73,    -1,
+     161,    76,   163,    -1,   165,    -1,    -1,    -1,    83,    -1,
+      -1,    -1,   173,   174,    -1,    -1,    -1,    -1,    -1,    94,
       -1,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,
      105,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,
      105,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    -1,    34,    -1,    -1,    -1,    -1,
-      -1,    40,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   202,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     125,    -1,    -1,    -1,    -1,    -1,    -1,     5,    -1,    -1,
       -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,   143,   144,
       -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,   143,   144,
-     145,    60,    -1,   148,    -1,   150,    -1,    66,    67,   154,
-      -1,    -1,    -1,    -1,    73,    -1,    -1,    76,   163,    -1,
-     165,    -1,    -1,    -1,    83,    -1,    -1,    -1,   173,   174,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    97,    98,
-      -1,    -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,
+     145,    -1,    -1,   148,    -1,   150,   151,    -1,    -1,   154,
+      -1,    -1,    -1,    -1,    32,    -1,    34,    -1,   163,    -1,
+     165,    39,    40,    -1,    -1,    -1,    44,    -1,   173,   174,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    60,    -1,    -1,    -1,   191,    -1,    66,    67,
+      -1,    69,    -1,    71,    -1,    73,    -1,   202,    76,    -1,
+      -1,    -1,    -1,    -1,    -1,    83,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    94,    -1,    96,    97,
+      98,    -1,    -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   125,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,
+     138,    -1,    -1,    -1,    -1,   143,   144,   145,    -1,    -1,
+     148,    -1,   150,   151,    -1,    -1,   154,    23,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   163,    32,   165,    34,    -1,
+      -1,    -1,    -1,    -1,    40,   173,   174,    -1,    44,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   191,    60,    -1,    -1,    -1,    -1,    -1,
+      66,    67,    -1,    69,   202,    -1,    -1,    73,    -1,    -1,
+      76,    -1,    -1,    -1,    -1,    -1,    -1,    83,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,     5,    -1,    -1,    94,    -1,
+      96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,   105,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    -1,
+      -1,    -1,    32,    -1,    34,    -1,    -1,    -1,    -1,    -1,
+      40,    -1,    -1,    -1,    44,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   138,    -1,    -1,    -1,    -1,   143,   144,   145,
+      60,    -1,   148,    -1,   150,    -1,    66,    67,   154,    69,
+      -1,    -1,    -1,    73,    -1,    -1,    76,   163,    -1,   165,
+      -1,    -1,    -1,    83,    -1,    -1,    -1,   173,   174,    -1,
+      -1,    -1,    -1,    -1,    94,    -1,    96,    97,    98,    -1,
+      -1,    -1,    -1,    -1,    -1,   105,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    -1,   202,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    14,    15,    16,    17,    18,    19,    20,   138,    -1,
+      -1,    -1,    -1,   143,   144,   145,    -1,    -1,   148,    -1,
+     150,    -1,    -1,    -1,   154,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   163,    -1,   165,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   173,   174,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    -1,    -1,    -1,    -1,   182,    -1,
+     184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
+      -1,    -1,   202,    -1,    -1,    -1,    -1,   201,   202,    -1,
+      -1,    -1,    -1,    -1,   208,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   182,    -1,   184,   185,   186,   187,
+     188,   189,   190,   191,   192,   193,    14,    15,    16,    17,
+      18,    19,    20,   201,   202,    -1,    -1,    -1,    -1,    -1,
+     208,   184,   185,   186,   187,   188,   189,   190,   191,   192,
+     193,    14,    15,    16,    17,    18,    19,    20,   201,   202,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    14,    15,    16,
+      17,    18,    19,    20,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   182,    -1,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,   193,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   201,   202,    -1,    -1,    -1,    -1,    -1,   208,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   182,    -1,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,   193,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   201,   202,   203,   182,   183,   184,   185,   186,
+     187,   188,   189,   190,   191,   192,   193,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   201,   202,   182,    -1,   184,   185,
+     186,   187,   188,   189,   190,   191,   192,   193,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   201,   202,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   186,   187,
+     188,   189,   190,   191,   192,   193,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   201,   202,    -1,    -1,    -1,    -1,    -1,
+      -1,     5,    -1,   186,   187,   188,   189,   190,   191,   192,
+     193,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   201,   202,
+     187,   188,   189,   190,   191,   192,   193,    -1,    32,    -1,
+      34,    -1,    -1,    -1,   201,   202,    40,    41,    -1,    -1,
+      44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    58,    -1,    60,    -1,    -1,    -1,
+      -1,    -1,    66,    67,    -1,    69,    -1,    -1,    -1,    73,
+      -1,    -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,    83,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,    -1,    -1,
+      94,    -1,    96,    97,    98,    99,    -1,    -1,   102,    -1,
+      -1,   105,    -1,    -1,    -1,   109,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    32,    -1,    34,    -1,    -1,    -1,
+      -1,    -1,    40,    -1,    -1,    -1,    44,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,   143,
+     144,   145,    60,    -1,   148,    -1,   150,    -1,    66,    67,
+     154,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,   163,
+      -1,   165,    -1,    -1,    -1,    83,    -1,    -1,    -1,   173,
+     174,    -1,    -1,     5,    -1,    -1,    94,    -1,    96,    97,
+      98,    -1,    -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      32,    -1,    34,    -1,    -1,    -1,    -1,    -1,    40,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     138,    -1,    -1,    -1,    -1,   143,   144,   145,    60,    -1,
+     148,    -1,   150,    -1,    66,    67,   154,    -1,    -1,    -1,
+      -1,    73,    -1,    -1,    76,   163,    -1,   165,    -1,    -1,
+      -1,    83,    -1,    -1,    -1,   173,   174,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    96,    97,    98,    -1,    -1,    -1,
+      -1,    -1,    -1,   105,    -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,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   143,   144,   145,    -1,    -1,   148,
-      -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   163,    -1,   165,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   173,   174,    24,    -1,    26,    27,
-      28,    29,    30,    31,    -1,    33,    -1,    -1,    36,    -1,
-      38,    -1,    -1,    -1,    42,    43,    -1,    45,    46,    47,
-      48,    -1,    50,    51,    52,    53,    54,    55,    56,    57,
-      -1,    59,    -1,    61,    62,    63,    64,    65,    -1,    -1,
-      68,    -1,    -1,    -1,    72,    -1,    74,    75,    -1,    77,
-      78,    79,    80,    81,    82,    -1,    84,    85,    86,    87,
-      88,    89,    -1,    -1,    92,    -1,    -1,    95,    -1,    -1,
-      -1,    -1,   100,   101,    -1,   103,   104,    -1,   106,   107,
-      -1,    -1,    -1,   111,   112,   113,   114,   115,   116,    -1,
-     118,   119,   120,   121,   122,   123,   124,    -1,   126,   127,
-      -1,   129,   130,   131,   132,   133,   134,   135,   136,   137,
-      -1,   139,   140,   141,   142,    -1,    -1,    -1,   146,    -1,
-      -1,   149,    -1,    -1,   152,   153,    -1,    -1,   156,   157,
-     158,   159,    -1,    -1,   162,    -1,   164,    -1,   166,   167,
-     168,   169,   170,   171,   172,    -1,    -1,   175
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   143,   144,   145,    -1,    -1,   148,    -1,    -1,    -1,
+      -1,    -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   163,    -1,   165,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   173,   174,    24,    -1,    26,    27,    28,    29,    30,
+      31,    -1,    33,    -1,    -1,    36,    -1,    38,    -1,    -1,
+      -1,    42,    43,    -1,    45,    46,    47,    48,    -1,    50,
+      51,    52,    53,    54,    55,    56,    57,    -1,    59,    -1,
+      61,    62,    63,    64,    65,    -1,    -1,    68,    -1,    -1,
+      -1,    72,    -1,    74,    75,    -1,    77,    78,    79,    80,
+      81,    82,    -1,    84,    85,    86,    87,    88,    89,    -1,
+      -1,    92,    -1,    -1,    95,    -1,    -1,    -1,    -1,   100,
+     101,    -1,   103,   104,    -1,   106,   107,    -1,    -1,    -1,
+     111,   112,   113,   114,   115,   116,    -1,   118,   119,   120,
+     121,   122,   123,   124,    -1,   126,   127,    -1,   129,   130,
+     131,   132,   133,   134,   135,   136,   137,    -1,   139,   140,
+     141,   142,    -1,    -1,    -1,   146,    -1,    -1,   149,    -1,
+      -1,   152,   153,    -1,    -1,   156,   157,   158,   159,    -1,
+      -1,   162,    -1,   164,    -1,   166,   167,   168,   169,   170,
+     171,   172,    -1,    -1,   175
 };
 
 };
 
-/* 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_uint16 yystos[] =
 {
        0,   211,   212,     0,     4,     5,    32,    34,    40,    41,
       44,    49,    58,    60,    66,    67,    69,    73,    76,    83,
       90,    94,    96,    97,    98,    99,   105,   110,   138,   143,
      144,   145,   148,   150,   154,   163,   165,   173,   174,   202,
 static const yytype_uint16 yystos[] =
 {
        0,   211,   212,     0,     4,     5,    32,    34,    40,    41,
       44,    49,    58,    60,    66,    67,    69,    73,    76,    83,
       90,    94,    96,    97,    98,    99,   105,   110,   138,   143,
      144,   145,   148,   150,   154,   163,   165,   173,   174,   202,
-     216,   217,   218,   219,   220,   223,   224,   230,   231,   242,
-     256,   260,   262,   263,   264,   265,   266,   269,   270,   273,
-     275,   276,   277,   278,   280,   281,   282,   283,   284,   286,
-     288,   306,   307,   308,   309,     3,     5,   207,     3,     5,
-       3,     5,   258,    96,   261,     9,     3,     5,   261,     3,
-     207,   261,   262,     3,   258,     3,   258,   262,    24,    26,
+     218,   219,   220,   221,   222,   225,   226,   232,   233,   244,
+     258,   262,   264,   265,   266,   267,   268,   271,   272,   275,
+     277,   278,   279,   280,   282,   283,   284,   285,   286,   288,
+     290,   308,   309,   310,   311,     3,     5,   207,     3,     5,
+       3,     5,   260,    96,   263,     9,     3,     5,   263,     3,
+     207,   263,   264,     3,   260,     3,   260,   264,    24,    26,
       27,    28,    29,    30,    31,    33,    36,    38,    42,    43,
       45,    46,    47,    48,    50,    51,    52,    53,    54,    55,
       56,    57,    59,    61,    62,    63,    64,    65,    68,    72,
       27,    28,    29,    30,    31,    33,    36,    38,    42,    43,
       45,    46,    47,    48,    50,    51,    52,    53,    54,    55,
       56,    57,    59,    61,    62,    63,    64,    65,    68,    72,
@@ -1991,145 +1774,181 @@ static const yytype_uint16 yystos[] =
      120,   121,   122,   123,   124,   126,   127,   129,   130,   131,
      132,   133,   134,   135,   136,   137,   139,   140,   141,   142,
      146,   149,   152,   153,   156,   157,   158,   159,   162,   164,
      120,   121,   122,   123,   124,   126,   127,   129,   130,   131,
      132,   133,   134,   135,   136,   137,   139,   140,   141,   142,
      146,   149,   152,   153,   156,   157,   158,   159,   162,   164,
-     166,   167,   168,   169,   170,   171,   172,   175,   232,   234,
-     305,   206,   213,   213,   161,    66,   102,   109,   154,   163,
-     222,   242,   263,   269,   275,   279,   286,   306,   309,   206,
-     206,   204,   204,   206,   204,   206,   215,   206,   183,   274,
-     204,   287,   288,   287,   287,     3,     5,    39,    71,   125,
-     151,   191,   207,   236,   259,   289,   290,   303,   242,   306,
-     307,   309,   287,   206,     9,   204,   206,   307,   204,   155,
+     166,   167,   168,   169,   170,   171,   172,   175,   234,   236,
+     307,   206,   214,   214,   161,    66,   102,   109,   154,   163,
+     224,   244,   265,   271,   277,   281,   288,   308,   311,   206,
+     206,   204,   204,   206,   204,   206,   217,   206,   183,   276,
+     204,   289,   290,   289,   289,     3,     5,    39,    71,   125,
+     151,   191,   207,   238,   261,   291,   292,   305,   244,   308,
+     309,   311,   289,   206,     9,   204,   206,   309,   204,   155,
      204,   207,   207,   207,   207,   207,   207,   207,   207,   207,
      207,   207,   207,   207,   207,   207,   207,   207,   207,   207,
      207,   207,   207,   207,   207,   207,   207,   207,   207,   207,
      204,   207,   207,   207,   207,   207,   207,   207,   207,   207,
      207,   207,   207,   207,   207,   207,   207,   207,   207,   207,
      207,   207,   207,   207,   207,   207,   207,   207,   207,   207,
-     207,   207,   207,   207,   181,   203,    13,    91,   216,   221,
-     224,   263,   265,   266,   277,   278,   281,   205,   230,   231,
-       3,     3,     3,     5,     3,     3,   204,   303,   267,   212,
-     128,   271,   275,     3,     5,   204,   214,   285,   289,   289,
-     209,   202,   207,   229,   287,   208,   239,   240,   241,   259,
-     208,   249,   207,   252,     9,     9,    12,   235,   259,     3,
+     207,   207,   207,   207,   181,   203,    13,    91,   218,   223,
+     226,   265,   267,   268,   279,   280,   283,   205,   232,   233,
+       3,     3,     3,     5,     3,     3,   204,   305,   269,   213,
+     128,   273,   277,     3,     5,   204,   216,   287,   291,   291,
+     209,   202,   207,   231,   289,   208,   241,   242,   243,   261,
+     208,   251,   207,   254,     9,     9,    12,   237,   261,     3,
        6,     7,     8,     9,    10,    11,    70,   117,   147,   160,
        6,     7,     8,     9,    10,    11,    70,   117,   147,   160,
-     186,   189,   190,   191,   194,   195,   207,   245,   246,   247,
-     245,   248,     9,     9,   233,   248,   247,     9,     9,   247,
-       9,   247,   245,   228,   231,   286,   247,   243,   244,   245,
-       9,   305,     9,   247,   307,   243,   245,   307,   176,   177,
-     178,   179,   180,   304,   307,   307,   235,     6,     7,   310,
-       9,   307,   234,   202,   207,   206,   204,   215,   286,   205,
-     230,   268,   205,   183,   108,   230,   254,   272,   206,   204,
-     214,   205,   216,   231,   284,   289,   208,   248,   191,   203,
-     245,   225,   226,   227,   228,   205,   181,   209,   205,   230,
-     250,   254,   205,   231,   251,   254,   208,   208,   208,   207,
-     245,   245,   245,   245,   245,   245,   245,   286,    14,    15,
+     186,   189,   190,   191,   194,   195,   207,   247,   248,   249,
+     247,   250,     9,     9,   235,   250,   249,     9,     9,   249,
+       9,   249,   247,   230,   233,   288,   249,   245,   246,   247,
+       9,   307,     9,   249,   309,   245,   247,   309,   176,   177,
+     178,   179,   180,   306,   309,   309,   237,     6,     7,   312,
+       9,   309,   236,   202,   207,   206,   204,   217,   288,   205,
+     232,   270,   212,   183,   108,   232,   256,   274,   206,   204,
+     216,   205,   218,   233,   286,   291,   208,   250,   191,   203,
+     247,   227,   228,   229,   230,   205,   181,   209,   205,   232,
+     252,   256,   205,   233,   253,   256,   208,   208,   208,   207,
+     247,   247,   247,   247,   247,   247,   247,   288,    14,    15,
       16,    17,    18,    19,    20,    21,    22,   182,   184,   185,
      186,   187,   188,   189,   190,   191,   192,   193,   201,   202,
      181,   208,   208,   208,   181,   208,   208,   208,   208,   208,
       16,    17,    18,    19,    20,    21,    22,   182,   184,   185,
      186,   187,   188,   189,   190,   191,   192,   193,   201,   202,
      181,   208,   208,   208,   181,   208,   208,   208,   208,   208,
-     208,   208,   208,   208,   208,   286,   191,   207,   229,   236,
-     259,   295,   297,   298,   208,   181,   208,   208,   208,   208,
+     208,   208,   208,   208,   208,   288,   191,   207,   231,   238,
+     261,   297,   299,   300,   208,   181,   208,   208,   208,   208,
      181,   208,   208,   208,   208,   208,   208,   208,   208,   201,
      181,   208,   208,   208,   208,   208,   208,   208,   208,   201,
-     208,   208,   208,   234,     9,   213,   289,   299,   215,   278,
-     183,   286,   306,   206,   205,   231,   255,   256,   205,   220,
-     205,   215,   203,   203,   208,   181,   241,   247,   286,   309,
-     208,   206,   206,   286,   208,   191,   207,   229,   236,   291,
-     293,   294,   245,   245,     3,   245,   245,   245,   245,   245,
-     245,   245,   245,   245,   245,   245,   245,   245,   245,   245,
-     245,   245,     3,   245,   247,     9,   297,   285,   191,   225,
-     236,   296,   297,   207,   229,   244,   247,     6,   208,   205,
-     181,   289,   206,   214,   215,    23,   228,   295,   301,   302,
-     206,   257,   259,   293,   285,   191,   225,   236,   292,   293,
-     208,   207,   229,   183,   203,   297,   285,   208,   297,   208,
-     225,   208,   215,   289,   205,   183,   300,   181,   206,   204,
-     208,   293,   285,   208,   297,   208,   245,   225,   245,   297,
-     208,   215,   248,   301,   237,   297,   208,    38,    51,   205,
-     238,   247,   183,   183,   206,   253,   254,   253,   206
+     208,   208,   208,   236,     9,   215,   291,   301,   217,   280,
+     205,   183,   288,   308,   206,   205,   233,   257,   258,   205,
+     222,   205,   217,   203,   203,   208,   181,   243,   249,   288,
+     311,   208,   206,   206,   288,   208,   191,   207,   231,   238,
+     293,   295,   296,   247,   247,     3,   247,   247,   247,   247,
+     247,   247,   247,   247,   247,   247,   247,   247,   247,   247,
+     247,   247,   247,     3,   247,   249,     9,   299,   287,   191,
+     227,   238,   298,   299,   207,   231,   246,   249,     6,   208,
+     214,   181,   291,   206,   216,   217,    23,   230,   297,   303,
+     304,   206,   259,   261,   295,   287,   191,   227,   238,   294,
+     295,   208,   207,   231,   183,   203,   299,   287,   208,   299,
+     208,   227,   208,   217,   205,   291,   205,   183,   302,   181,
+     206,   204,   208,   295,   287,   208,   299,   208,   247,   227,
+     247,   299,   208,   217,   250,   303,   239,   299,   208,    38,
+      51,   205,   240,   249,   183,   183,   206,   255,   256,   255,
+     206
 };
 
 };
 
-#define yyerrok                (yyerrstatus = 0)
-#define yyclearin      (yychar = YYEMPTY)
-#define YYEMPTY                (-2)
-#define YYEOF          0
-
-#define YYACCEPT       goto yyacceptlab
-#define YYABORT                goto yyabortlab
-#define YYERROR                goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  However,
-   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
-   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
-   discussed.  */
-
-#define YYFAIL         goto yyerrlab
-#if defined YYFAIL
-  /* This is here to suppress warnings from the GCC cpp's
-     -Wunused-macros.  Normally we don't worry about that warning, but
-     some users do, and we want to make it easy for users to remove
-     YYFAIL uses, which will produce warnings from Bison 2.5.  */
-#endif
+  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint16 yyr1[] =
+{
+       0,   210,   211,   212,   213,   212,   212,   212,   212,   212,
+     212,   212,   212,   214,   214,   215,   214,   214,   214,   214,
+     214,   214,   214,   214,   216,   216,   217,   217,   218,   218,
+     218,   218,   218,   218,   219,   219,   219,   219,   219,   219,
+     219,   219,   219,   220,   221,   222,   223,   224,   225,   226,
+     227,   227,   228,   228,   229,   229,   230,   230,   231,   231,
+     231,   232,   232,   233,   234,   234,   234,   235,   235,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   236,
+     236,   236,   236,   236,   236,   236,   236,   236,   236,   237,
+     237,   238,   238,   238,   238,   239,   239,   240,   240,   241,
+     241,   241,   242,   242,   243,   243,   244,   245,   245,   246,
+     246,   247,   247,   247,   247,   247,   247,   247,   247,   247,
+     247,   247,   247,   247,   247,   247,   247,   247,   247,   247,
+     247,   247,   247,   247,   247,   247,   247,   247,   247,   247,
+     247,   247,   247,   247,   247,   247,   247,   247,   247,   247,
+     247,   247,   248,   248,   249,   250,   251,   251,   252,   252,
+     253,   253,   254,   254,   255,   255,   256,   256,   257,   258,
+     258,   259,   259,   260,   260,   260,   261,   261,   262,   262,
+     262,   262,   262,   262,   262,   262,   262,   262,   262,   263,
+     263,   264,   264,   264,   264,   264,   264,   264,   264,   265,
+     265,   266,   267,   268,   269,   269,   270,   271,   271,   272,
+     273,   273,   274,   274,   275,   275,   276,   276,   277,   277,
+     278,   279,   279,   279,   280,   280,   281,   281,   282,   283,
+     284,   284,   284,   285,   286,   287,   287,   288,   288,   289,
+     289,   290,   290,   290,   291,   291,   291,   292,   292,   292,
+     292,   293,   293,   293,   294,   294,   295,   295,   296,   296,
+     296,   296,   296,   297,   297,   297,   298,   298,   299,   299,
+     300,   300,   300,   300,   300,   300,   301,   301,   302,   302,
+     303,   304,   304,   305,   305,   306,   306,   306,   306,   306,
+     307,   307,   307,   308,   309,   309,   309,   309,   309,   309,
+     309,   309,   309,   309,   310,   311,   311,   312,   312,   312
+};
 
 
-#define YYRECOVERING()  (!!yyerrstatus)
+  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     0,     0,     6,     2,     2,     3,     2,
+       2,     2,     2,     0,     2,     0,     6,     2,     3,     2,
+       2,     2,     2,     2,     0,     2,     0,     1,     1,     2,
+       2,     1,     2,     1,     1,     2,     1,     2,     1,     2,
+       2,     2,     2,     4,     3,     3,     5,     2,     3,     4,
+       0,     1,     1,     3,     1,     3,     3,     2,     3,     3,
+       2,     0,     1,     3,     1,     3,     4,     1,     3,     0,
+       1,     4,     1,     1,     1,     1,     1,     4,     4,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     4,
+       1,     1,     1,     4,     1,     1,     1,     4,     4,     1,
+       1,     1,     1,     4,     4,     4,     4,     4,     1,     4,
+       1,     1,     4,     1,     4,     1,     1,     4,     4,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     4,     1,     1,     1,     4,     4,     1,
+       1,     1,     1,     1,     6,     1,     4,     1,     1,     1,
+       4,     1,     1,     1,     4,     4,     4,     4,     1,     1,
+       4,     4,     4,     1,     1,     4,     4,     4,     1,     1,
+       1,     1,     1,     1,     1,     0,     2,     4,     3,     0,
+       2,     1,     1,     3,     3,     1,     5,     1,     3,     0,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     5,     3,     3,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       2,     2,     2,     2,     2,     2,     3,     3,     5,     5,
+       4,     3,     1,     3,     1,     1,     0,     2,     4,     3,
+       2,     2,     0,     2,     2,     1,     3,     2,     1,     3,
+       2,     0,     1,     0,     1,     1,     1,     1,     1,     1,
+       1,     2,     2,     1,     1,     1,     1,     1,     1,     0,
+       1,     1,     2,     1,     2,     2,     1,     1,     1,     2,
+       2,     2,     5,     2,     0,     2,     2,     2,     2,     2,
+       2,     3,     2,     3,     5,     5,     0,     2,     2,     2,
+       2,     6,     8,     2,     2,     2,     2,     2,     2,     5,
+       1,     1,     1,     1,     1,     0,     2,     2,     3,     0,
+       1,     2,     2,     2,     3,     2,     1,     1,     3,     2,
+       4,     3,     2,     1,     3,     2,     0,     1,     3,     2,
+       1,     3,     4,     3,     2,     1,     3,     2,     0,     1,
+       1,     3,     2,     1,     3,     4,     1,     3,     0,     2,
+       2,     1,     3,     1,     3,     1,     1,     1,     1,     1,
+       1,     1,     1,     5,     1,     1,     1,     1,     2,     1,
+       2,     1,     2,     4,     5,     5,    10,     1,     3,     1
+};
 
 
-#define YYBACKUP(Token, Value)                                 \
-do                                                             \
-  if (yychar == YYEMPTY && yylen == 1)                         \
-    {                                                          \
-      yychar = (Token);                                                \
-      yylval = (Value);                                                \
-      YYPOPSTACK (1);                                          \
-      goto yybackup;                                           \
-    }                                                          \
-  else                                                         \
-    {                                                          \
-      yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;                                                 \
-    }                                                          \
-while (YYID (0))
-
-
-#define YYTERROR       1
-#define YYERRCODE      256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
-    do                                                                 \
-      if (YYID (N))                                                    \
-       {                                                               \
-         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
-         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
-         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
-         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
-       }                                                               \
-      else                                                             \
-       {                                                               \
-         (Current).first_line   = (Current).last_line   =              \
-           YYRHSLOC (Rhs, 0).last_line;                                \
-         (Current).first_column = (Current).last_column =              \
-           YYRHSLOC (Rhs, 0).last_column;                              \
-       }                                                               \
-    while (YYID (0))
-#endif
 
 
+#define yyerrok         (yyerrstatus = 0)
+#define yyclearin       (yychar = YYEMPTY)
+#define YYEMPTY         (-2)
+#define YYEOF           0
 
 
-/* This macro is provided for backward compatibility. */
+#define YYACCEPT        goto yyacceptlab
+#define YYABORT         goto yyabortlab
+#define YYERROR         goto yyerrorlab
 
 
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
 
 
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;                                                  \
+    }                                                           \
+while (0)
+
+/* Error token number */
+#define YYTERROR        1
+#define YYERRCODE       256
 
 
-/* YYLEX -- calling `yylex' with the right arguments.  */
 
 
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
 
 /* Enable debugging if requested.  */
 #if YYDEBUG
 
 /* Enable debugging if requested.  */
 #if YYDEBUG
@@ -2139,54 +1958,46 @@ while (YYID (0))
 #  define YYFPRINTF fprintf
 # endif
 
 #  define YYFPRINTF fprintf
 # endif
 
-# define YYDPRINTF(Args)                       \
-do {                                           \
-  if (yydebug)                                 \
-    YYFPRINTF Args;                            \
-} while (YYID (0))
+# define YYDPRINTF(Args)                        \
+do {                                            \
+  if (yydebug)                                  \
+    YYFPRINTF Args;                             \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
 
 
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                   \
-do {                                                                     \
-  if (yydebug)                                                           \
-    {                                                                    \
-      YYFPRINTF (stderr, "%s ", Title);                                          \
-      yy_symbol_print (stderr,                                           \
-                 Type, Value); \
-      YYFPRINTF (stderr, "\n");                                                  \
-    }                                                                    \
-} while (YYID (0))
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
+do {                                                                      \
+  if (yydebug)                                                            \
+    {                                                                     \
+      YYFPRINTF (stderr, "%s ", Title);                                   \
+      yy_symbol_print (stderr,                                            \
+                  Type, Value); \
+      YYFPRINTF (stderr, "\n");                                           \
+    }                                                                     \
+} while (0)
 
 
 
 
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT.  |
+`----------------------------------------*/
 
 
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 static void
 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
 {
 {
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
 # endif
 # endif
-  switch (yytype)
-    {
-      default:
-       break;
-    }
+  YYUSE (yytype);
 }
 
 
 }
 
 
@@ -2194,22 +2005,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 static void
 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
 {
 {
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+  YYFPRINTF (yyoutput, "%s %s (",
+             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
 
   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
   YYFPRINTF (yyoutput, ")");
 
   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
   YYFPRINTF (yyoutput, ")");
@@ -2220,16 +2020,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 | TOP (included).                                                   |
 `------------------------------------------------------------------*/
 
 | TOP (included).                                                   |
 `------------------------------------------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 static void
 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
 {
   YYFPRINTF (stderr, "Stack now");
   for (; yybottom <= yytop; yybottom++)
 {
   YYFPRINTF (stderr, "Stack now");
   for (; yybottom <= yytop; yybottom++)
@@ -2240,49 +2032,42 @@ yy_stack_print (yybottom, yytop)
   YYFPRINTF (stderr, "\n");
 }
 
   YYFPRINTF (stderr, "\n");
 }
 
-# define YY_STACK_PRINT(Bottom, Top)                           \
-do {                                                           \
-  if (yydebug)                                                 \
-    yy_stack_print ((Bottom), (Top));                          \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top)                            \
+do {                                                            \
+  if (yydebug)                                                  \
+    yy_stack_print ((Bottom), (Top));                           \
+} while (0)
 
 
 /*------------------------------------------------.
 | Report that the YYRULE is going to be reduced.  |
 `------------------------------------------------*/
 
 
 
 /*------------------------------------------------.
 | Report that the YYRULE is going to be reduced.  |
 `------------------------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
 static void
 static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
 {
 {
+  unsigned long int yylno = yyrline[yyrule];
   int yynrhs = yyr2[yyrule];
   int yyi;
   int yynrhs = yyr2[yyrule];
   int yyi;
-  unsigned long int yylno = yyrline[yyrule];
   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-            yyrule - 1, yylno);
+             yyrule - 1, yylno);
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-                      &(yyvsp[(yyi + 1) - (yynrhs)])
-                                      );
+      yy_symbol_print (stderr,
+                       yystos[yyssp[yyi + 1 - yynrhs]],
+                       &(yyvsp[(yyi + 1) - (yynrhs)])
+                                              );
       YYFPRINTF (stderr, "\n");
     }
 }
 
       YYFPRINTF (stderr, "\n");
     }
 }
 
-# define YY_REDUCE_PRINT(Rule)         \
-do {                                   \
-  if (yydebug)                         \
-    yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule)          \
+do {                                    \
+  if (yydebug)                          \
+    yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
    multiple parsers can coexist.  */
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
    multiple parsers can coexist.  */
@@ -2296,7 +2081,7 @@ int yydebug;
 
 
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
 
 
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef        YYINITDEPTH
+#ifndef YYINITDEPTH
 # define YYINITDEPTH 200
 #endif
 
 # define YYINITDEPTH 200
 #endif
 
@@ -2319,15 +2104,8 @@ int yydebug;
 #   define yystrlen strlen
 #  else
 /* Return the length of YYSTR.  */
 #   define yystrlen strlen
 #  else
 /* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static YYSIZE_T
 yystrlen (const char *yystr)
 static YYSIZE_T
 yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
 {
   YYSIZE_T yylen;
   for (yylen = 0; yystr[yylen]; yylen++)
 {
   YYSIZE_T yylen;
   for (yylen = 0; yystr[yylen]; yylen++)
@@ -2343,16 +2121,8 @@ yystrlen (yystr)
 #  else
 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    YYDEST.  */
 #  else
 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static char *
 yystpcpy (char *yydest, const char *yysrc)
 static char *
 yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
 {
   char *yyd = yydest;
   const char *yys = yysrc;
 {
   char *yyd = yydest;
   const char *yys = yysrc;
@@ -2382,27 +2152,27 @@ yytnamerr (char *yyres, const char *yystr)
       char const *yyp = yystr;
 
       for (;;)
       char const *yyp = yystr;
 
       for (;;)
-       switch (*++yyp)
-         {
-         case '\'':
-         case ',':
-           goto do_not_strip_quotes;
-
-         case '\\':
-           if (*++yyp != '\\')
-             goto do_not_strip_quotes;
-           /* Fall through.  */
-         default:
-           if (yyres)
-             yyres[yyn] = *yyp;
-           yyn++;
-           break;
-
-         case '"':
-           if (yyres)
-             yyres[yyn] = '\0';
-           return yyn;
-         }
+        switch (*++yyp)
+          {
+          case '\'':
+          case ',':
+            goto do_not_strip_quotes;
+
+          case '\\':
+            if (*++yyp != '\\')
+              goto do_not_strip_quotes;
+            /* Fall through.  */
+          default:
+            if (yyres)
+              yyres[yyn] = *yyp;
+            yyn++;
+            break;
+
+          case '"':
+            if (yyres)
+              yyres[yyn] = '\0';
+            return yyn;
+          }
     do_not_strip_quotes: ;
     }
 
     do_not_strip_quotes: ;
     }
 
@@ -2425,12 +2195,11 @@ static int
 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                 yytype_int16 *yyssp, int yytoken)
 {
 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                 yytype_int16 *yyssp, int yytoken)
 {
-  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
   YYSIZE_T yysize = yysize0;
   YYSIZE_T yysize = yysize0;
-  YYSIZE_T yysize1;
   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
   /* Internationalized format string. */
   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
   /* Internationalized format string. */
-  const char *yyformat = 0;
+  const char *yyformat = YY_NULLPTR;
   /* Arguments of yyformat. */
   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
   /* Number of reported tokens (one for the "unexpected", one per
   /* Arguments of yyformat. */
   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
   /* Number of reported tokens (one for the "unexpected", one per
@@ -2438,10 +2207,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
   int yycount = 0;
 
   /* There are many possibilities here to consider:
   int yycount = 0;
 
   /* There are many possibilities here to consider:
-     - Assume YYFAIL is not used.  It's too flawed to consider.  See
-       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
-       for details.  YYERROR is fine as it does not invoke this
-       function.
      - If this state is a consistent state with a default action, then
        the only way this function was invoked is if the default action
        is an error action.  In that case, don't check for expected
      - If this state is a consistent state with a default action, then
        the only way this function was invoked is if the default action
        is an error action.  In that case, don't check for expected
@@ -2490,11 +2255,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                     break;
                   }
                 yyarg[yycount++] = yytname[yyx];
                     break;
                   }
                 yyarg[yycount++] = yytname[yyx];
-                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-                if (! (yysize <= yysize1
-                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-                  return 2;
-                yysize = yysize1;
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
               }
         }
     }
               }
         }
     }
@@ -2514,10 +2281,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
 # undef YYCASE_
     }
 
 # undef YYCASE_
     }
 
-  yysize1 = yysize + yystrlen (yyformat);
-  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-    return 2;
-  yysize = yysize1;
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
 
   if (*yymsg_alloc < yysize)
     {
 
   if (*yymsg_alloc < yysize)
     {
@@ -2554,48 +2323,20 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
 | Release the memory associated to this symbol.  |
 `-----------------------------------------------*/
 
 | Release the memory associated to this symbol.  |
 `-----------------------------------------------*/
 
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 static void
 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
 {
   YYUSE (yyvaluep);
 {
   YYUSE (yyvaluep);
-
   if (!yymsg)
     yymsg = "Deleting";
   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
   if (!yymsg)
     yymsg = "Deleting";
   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
-  switch (yytype)
-    {
-
-      default:
-       break;
-    }
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  YYUSE (yytype);
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
 
 
 }
 
 
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
 
 
 /* The lookahead symbol.  */
 
 
 /* The lookahead symbol.  */
@@ -2603,7 +2344,6 @@ int yychar;
 
 /* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
 /* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
-
 /* Number of syntax errors so far.  */
 int yynerrs;
 
 /* Number of syntax errors so far.  */
 int yynerrs;
 
@@ -2612,37 +2352,18 @@ int yynerrs;
 | yyparse.  |
 `----------*/
 
 | yyparse.  |
 `----------*/
 
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 int
 yyparse (void)
 int
 yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
 {
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
 
     /* The stacks and their tools:
 {
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
 
     /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
+       'yyss': related to states.
+       'yyvs': related to semantic values.
 
 
-       Refer to the stacks thru separate pointers, to allow yyoverflow
+       Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */
 
     /* The state stack.  */
        to reallocate them elsewhere.  */
 
     /* The state stack.  */
@@ -2660,7 +2381,7 @@ yyparse ()
   int yyn;
   int yyresult;
   /* Lookahead token as an internal (translated) token number.  */
   int yyn;
   int yyresult;
   /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
+  int yytoken = 0;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
@@ -2678,9 +2399,8 @@ yyparse ()
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
   yystacksize = YYINITDEPTH;
 
   YYDPRINTF ((stderr, "Starting parse\n"));
   yystacksize = YYINITDEPTH;
 
   YYDPRINTF ((stderr, "Starting parse\n"));
@@ -2689,14 +2409,6 @@ yyparse ()
   yyerrstatus = 0;
   yynerrs = 0;
   yychar = YYEMPTY; /* Cause a token to be read.  */
   yyerrstatus = 0;
   yynerrs = 0;
   yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-
   goto yysetstate;
 
 /*------------------------------------------------------------.
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -2717,23 +2429,23 @@ yyparse ()
 
 #ifdef yyoverflow
       {
 
 #ifdef yyoverflow
       {
-       /* Give user a chance to reallocate the stack.  Use copies of
-          these so that the &'s don't force the real ones into
-          memory.  */
-       YYSTYPE *yyvs1 = yyvs;
-       yytype_int16 *yyss1 = yyss;
-
-       /* Each stack pointer address is followed by the size of the
-          data in use in that stack, in bytes.  This used to be a
-          conditional around just the two extra args, but that might
-          be undefined if yyoverflow is a macro.  */
-       yyoverflow (YY_("memory exhausted"),
-                   &yyss1, yysize * sizeof (*yyssp),
-                   &yyvs1, yysize * sizeof (*yyvsp),
-                   &yystacksize);
-
-       yyss = yyss1;
-       yyvs = yyvs1;
+        /* Give user a chance to reallocate the stack.  Use copies of
+           these so that the &'s don't force the real ones into
+           memory.  */
+        YYSTYPE *yyvs1 = yyvs;
+        yytype_int16 *yyss1 = yyss;
+
+        /* Each stack pointer address is followed by the size of the
+           data in use in that stack, in bytes.  This used to be a
+           conditional around just the two extra args, but that might
+           be undefined if yyoverflow is a macro.  */
+        yyoverflow (YY_("memory exhausted"),
+                    &yyss1, yysize * sizeof (*yyssp),
+                    &yyvs1, yysize * sizeof (*yyvsp),
+                    &yystacksize);
+
+        yyss = yyss1;
+        yyvs = yyvs1;
       }
 #else /* no yyoverflow */
 # ifndef YYSTACK_RELOCATE
       }
 #else /* no yyoverflow */
 # ifndef YYSTACK_RELOCATE
@@ -2741,22 +2453,22 @@ yyparse ()
 # else
       /* Extend the stack our own way.  */
       if (YYMAXDEPTH <= yystacksize)
 # else
       /* Extend the stack our own way.  */
       if (YYMAXDEPTH <= yystacksize)
-       goto yyexhaustedlab;
+        goto yyexhaustedlab;
       yystacksize *= 2;
       if (YYMAXDEPTH < yystacksize)
       yystacksize *= 2;
       if (YYMAXDEPTH < yystacksize)
-       yystacksize = YYMAXDEPTH;
+        yystacksize = YYMAXDEPTH;
 
       {
 
       {
-       yytype_int16 *yyss1 = yyss;
-       union yyalloc *yyptr =
-         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-       if (! yyptr)
-         goto yyexhaustedlab;
-       YYSTACK_RELOCATE (yyss_alloc, yyss);
-       YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+        yytype_int16 *yyss1 = yyss;
+        union yyalloc *yyptr =
+          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+        if (! yyptr)
+          goto yyexhaustedlab;
+        YYSTACK_RELOCATE (yyss_alloc, yyss);
+        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 #  undef YYSTACK_RELOCATE
-       if (yyss1 != yyssa)
-         YYSTACK_FREE (yyss1);
+        if (yyss1 != yyssa)
+          YYSTACK_FREE (yyss1);
       }
 # endif
 #endif /* no yyoverflow */
       }
 # endif
 #endif /* no yyoverflow */
@@ -2765,10 +2477,10 @@ yyparse ()
       yyvsp = yyvs + yysize - 1;
 
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
       yyvsp = yyvs + yysize - 1;
 
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                 (unsigned long int) yystacksize));
+                  (unsigned long int) yystacksize));
 
       if (yyss + yystacksize - 1 <= yyssp)
 
       if (yyss + yystacksize - 1 <= yyssp)
-       YYABORT;
+        YYABORT;
     }
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
     }
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -2797,7 +2509,7 @@ yybackup:
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
+      yychar = yylex ();
     }
 
   if (yychar <= YYEOF)
     }
 
   if (yychar <= YYEOF)
@@ -2837,7 +2549,9 @@ yybackup:
   yychar = YYEMPTY;
 
   yystate = yyn;
   yychar = YYEMPTY;
 
   yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
   goto yynewstate;
 
 
   goto yynewstate;
 
@@ -2860,7 +2574,7 @@ yyreduce:
   yylen = yyr2[yyn];
 
   /* If YYLEN is nonzero, implement the default value of the action:
   yylen = yyr2[yyn];
 
   /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
+     '$$ = $1'.
 
      Otherwise, the following line sets YYVAL to garbage.
      This behavior is undocumented and Bison
 
      Otherwise, the following line sets YYVAL to garbage.
      This behavior is undocumented and Bison
@@ -2874,2719 +2588,2364 @@ yyreduce:
   switch (yyn)
     {
         case 2:
   switch (yyn)
     {
         case 2:
-
-/* Line 1806 of yacc.c  */
-#line 308 "parser.y"
+#line 316 "parser.y" /* yacc.c:1646  */
     { fix_incomplete();
     { fix_incomplete();
-                                                 check_statements((yyvsp[(1) - (1)].stmt_list), FALSE);
-                                                 check_all_user_types((yyvsp[(1) - (1)].stmt_list));
-                                                 write_header((yyvsp[(1) - (1)].stmt_list));
-                                                 write_id_data((yyvsp[(1) - (1)].stmt_list));
-                                                 write_proxies((yyvsp[(1) - (1)].stmt_list));
-                                                 write_client((yyvsp[(1) - (1)].stmt_list));
-                                                 write_server((yyvsp[(1) - (1)].stmt_list));
-                                                 write_regscript((yyvsp[(1) - (1)].stmt_list));
-                                                 write_dlldata((yyvsp[(1) - (1)].stmt_list));
-                                                 write_local_stubs((yyvsp[(1) - (1)].stmt_list));
+                                                 check_statements((yyvsp[0].stmt_list), FALSE);
+                                                 check_all_user_types((yyvsp[0].stmt_list));
+                                                 write_header((yyvsp[0].stmt_list));
+                                                 write_id_data((yyvsp[0].stmt_list));
+                                                 write_proxies((yyvsp[0].stmt_list));
+                                                 write_client((yyvsp[0].stmt_list));
+                                                 write_server((yyvsp[0].stmt_list));
+                                                 write_regscript((yyvsp[0].stmt_list));
+                                                 write_dlldata((yyvsp[0].stmt_list));
+                                                 write_local_stubs((yyvsp[0].stmt_list));
                                                }
                                                }
+#line 2605 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 3:
     break;
 
   case 3:
-
-/* Line 1806 of yacc.c  */
-#line 322 "parser.y"
+#line 330 "parser.y" /* yacc.c:1646  */
     { (yyval.stmt_list) = NULL; }
     { (yyval.stmt_list) = NULL; }
+#line 2611 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 4:
     break;
 
   case 4:
-
-/* Line 1806 of yacc.c  */
-#line 324 "parser.y"
-    { (yyval.stmt_list) = append_statements((yyvsp[(1) - (5)].stmt_list), (yyvsp[(4) - (5)].stmt_list)); }
+#line 331 "parser.y" /* yacc.c:1646  */
+    { push_namespace((yyvsp[-1].str)); }
+#line 2617 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 5:
     break;
 
   case 5:
-
-/* Line 1806 of yacc.c  */
-#line 325 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); }
+#line 332 "parser.y" /* yacc.c:1646  */
+    { pop_namespace((yyvsp[-4].str)); (yyval.stmt_list) = append_statements((yyvsp[-5].stmt_list), (yyvsp[-1].stmt_list)); }
+#line 2623 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 6:
     break;
 
   case 6:
-
-/* Line 1806 of yacc.c  */
-#line 326 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); }
+#line 333 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_reference((yyvsp[0].type))); }
+#line 2629 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 7:
     break;
 
   case 7:
-
-/* Line 1806 of yacc.c  */
-#line 327 "parser.y"
-    { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list);
-                                                 reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0);
-                                               }
+#line 334 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); }
+#line 2635 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 8:
     break;
 
   case 8:
-
-/* Line 1806 of yacc.c  */
-#line 330 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type)));
-                                                 reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0);
+#line 335 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = (yyvsp[-2].stmt_list);
+                                                 reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, current_namespace, 0);
                                                }
                                                }
+#line 2643 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 9:
     break;
 
   case 9:
-
-/* Line 1806 of yacc.c  */
-#line 333 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); }
+#line 338 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type)));
+                                                 reg_type((yyvsp[0].type), (yyvsp[0].type)->name, current_namespace, 0);
+                                               }
+#line 2651 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 10:
     break;
 
   case 10:
-
-/* Line 1806 of yacc.c  */
-#line 334 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); }
+#line 341 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); }
+#line 2657 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 11:
     break;
 
   case 11:
-
-/* Line 1806 of yacc.c  */
-#line 335 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); }
+#line 342 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_library((yyvsp[0].typelib))); }
+#line 2663 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 12:
     break;
 
   case 12:
-
-/* Line 1806 of yacc.c  */
-#line 338 "parser.y"
-    { (yyval.stmt_list) = NULL; }
+#line 343 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); }
+#line 2669 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 13:
     break;
 
   case 13:
-
-/* Line 1806 of yacc.c  */
-#line 339 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); }
+#line 346 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = NULL; }
+#line 2675 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 14:
     break;
 
   case 14:
-
-/* Line 1806 of yacc.c  */
-#line 341 "parser.y"
-    { (yyval.stmt_list) = append_statements((yyvsp[(1) - (5)].stmt_list), (yyvsp[(4) - (5)].stmt_list)); }
+#line 347 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_reference((yyvsp[0].type))); }
+#line 2681 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 15:
     break;
 
   case 15:
-
-/* Line 1806 of yacc.c  */
-#line 342 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); }
+#line 348 "parser.y" /* yacc.c:1646  */
+    { push_namespace((yyvsp[-1].str)); }
+#line 2687 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 16:
     break;
 
   case 16:
-
-/* Line 1806 of yacc.c  */
-#line 343 "parser.y"
-    { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); }
+#line 349 "parser.y" /* yacc.c:1646  */
+    { pop_namespace((yyvsp[-4].str)); (yyval.stmt_list) = append_statements((yyvsp[-5].stmt_list), (yyvsp[-1].stmt_list)); }
+#line 2693 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 17:
     break;
 
   case 17:
-
-/* Line 1806 of yacc.c  */
-#line 344 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type)));
-                                                 reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0);
-                                               }
+#line 350 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type))); }
+#line 2699 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 18:
     break;
 
   case 18:
-
-/* Line 1806 of yacc.c  */
-#line 347 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); }
+#line 351 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = (yyvsp[-2].stmt_list); reg_type((yyvsp[-1].type), (yyvsp[-1].type)->name, current_namespace, 0); }
+#line 2705 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 19:
     break;
 
   case 19:
-
-/* Line 1806 of yacc.c  */
-#line 348 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); }
+#line 352 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_type_decl((yyvsp[0].type)));
+                                                 reg_type((yyvsp[0].type), (yyvsp[0].type)->name, current_namespace, 0);
+                                               }
+#line 2713 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 20:
     break;
 
   case 20:
-
-/* Line 1806 of yacc.c  */
-#line 349 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_importlib((yyvsp[(2) - (2)].str))); }
+#line 355 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_module((yyvsp[0].type))); }
+#line 2719 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 21:
     break;
 
   case 21:
-
-/* Line 1806 of yacc.c  */
-#line 350 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); }
+#line 356 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); }
+#line 2725 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 22:
     break;
 
   case 22:
-
-/* Line 1806 of yacc.c  */
-#line 353 "parser.y"
-    { (yyval.stmt_list) = NULL; }
+#line 357 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_importlib((yyvsp[0].str))); }
+#line 2731 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 23:
     break;
 
   case 23:
-
-/* Line 1806 of yacc.c  */
-#line 354 "parser.y"
-    { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); }
+#line 358 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), make_statement_library((yyvsp[0].typelib))); }
+#line 2737 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 26:
-
-/* Line 1806 of yacc.c  */
-#line 362 "parser.y"
-    { (yyval.statement) = make_statement_cppquote((yyvsp[(1) - (1)].str)); }
+  case 24:
+#line 361 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = NULL; }
+#line 2743 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 27:
-
-/* Line 1806 of yacc.c  */
-#line 363 "parser.y"
-    { (yyval.statement) = make_statement_type_decl((yyvsp[(1) - (2)].type)); }
+  case 25:
+#line 362 "parser.y" /* yacc.c:1646  */
+    { (yyval.stmt_list) = append_statement((yyvsp[-1].stmt_list), (yyvsp[0].statement)); }
+#line 2749 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 28:
     break;
 
   case 28:
-
-/* Line 1806 of yacc.c  */
-#line 364 "parser.y"
-    { (yyval.statement) = make_statement_declaration((yyvsp[(1) - (2)].var)); }
+#line 370 "parser.y" /* yacc.c:1646  */
+    { (yyval.statement) = make_statement_cppquote((yyvsp[0].str)); }
+#line 2755 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 29:
     break;
 
   case 29:
-
-/* Line 1806 of yacc.c  */
-#line 365 "parser.y"
-    { (yyval.statement) = make_statement_import((yyvsp[(1) - (1)].str)); }
+#line 371 "parser.y" /* yacc.c:1646  */
+    { (yyval.statement) = make_statement_type_decl((yyvsp[-1].type)); }
+#line 2761 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 30:
     break;
 
   case 30:
-
-/* Line 1806 of yacc.c  */
-#line 366 "parser.y"
-    { (yyval.statement) = (yyvsp[(1) - (2)].statement); }
+#line 372 "parser.y" /* yacc.c:1646  */
+    { (yyval.statement) = make_statement_declaration((yyvsp[-1].var)); }
+#line 2767 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 31:
     break;
 
   case 31:
+#line 373 "parser.y" /* yacc.c:1646  */
+    { (yyval.statement) = make_statement_import((yyvsp[0].str)); }
+#line 2773 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 367 "parser.y"
-    { (yyval.statement) = make_statement_pragma((yyvsp[(1) - (1)].str)); }
+  case 32:
+#line 374 "parser.y" /* yacc.c:1646  */
+    { (yyval.statement) = (yyvsp[-1].statement); }
+#line 2779 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 33:
     break;
 
   case 33:
-
-/* Line 1806 of yacc.c  */
-#line 372 "parser.y"
-    { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); }
+#line 375 "parser.y" /* yacc.c:1646  */
+    { (yyval.statement) = make_statement_pragma((yyvsp[0].str)); }
+#line 2785 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 35:
     break;
 
   case 35:
-
-/* Line 1806 of yacc.c  */
-#line 374 "parser.y"
-    { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); }
+#line 380 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_enum((yyvsp[0].str), current_namespace, FALSE, NULL); }
+#line 2791 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 37:
     break;
 
   case 37:
-
-/* Line 1806 of yacc.c  */
-#line 376 "parser.y"
-    { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); }
-    break;
-
-  case 38:
-
-/* Line 1806 of yacc.c  */
-#line 377 "parser.y"
-    { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_enum_attrs((yyvsp[(1) - (2)].attr_list)); }
+#line 382 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_struct((yyvsp[0].str), current_namespace, FALSE, NULL); }
+#line 2797 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 39:
     break;
 
   case 39:
-
-/* Line 1806 of yacc.c  */
-#line 378 "parser.y"
-    { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_struct_attrs((yyvsp[(1) - (2)].attr_list)); }
+#line 384 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_nonencapsulated_union((yyvsp[0].str), FALSE, NULL); }
+#line 2803 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 40:
     break;
 
   case 40:
-
-/* Line 1806 of yacc.c  */
-#line 379 "parser.y"
-    { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_union_attrs((yyvsp[(1) - (2)].attr_list)); }
+#line 385 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); (yyval.type)->attrs = check_enum_attrs((yyvsp[-1].attr_list)); }
+#line 2809 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 41:
     break;
 
   case 41:
-
-/* Line 1806 of yacc.c  */
-#line 382 "parser.y"
-    { (yyval.str) = (yyvsp[(3) - (4)].str); }
+#line 386 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); (yyval.type)->attrs = check_struct_attrs((yyvsp[-1].attr_list)); }
+#line 2815 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 42:
     break;
 
   case 42:
+#line 387 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); (yyval.type)->attrs = check_union_attrs((yyvsp[-1].attr_list)); }
+#line 2821 "parser.tab.c" /* yacc.c:1646  */
+    break;
+
+  case 43:
+#line 390 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[-1].str); }
+#line 2827 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 384 "parser.y"
+  case 44:
+#line 392 "parser.y" /* yacc.c:1646  */
     { assert(yychar == YYEMPTY);
                                                  (yyval.import) = xmalloc(sizeof(struct _import_t));
     { assert(yychar == YYEMPTY);
                                                  (yyval.import) = xmalloc(sizeof(struct _import_t));
-                                                 (yyval.import)->name = (yyvsp[(2) - (3)].str);
-                                                 (yyval.import)->import_performed = do_import((yyvsp[(2) - (3)].str));
+                                                 (yyval.import)->name = (yyvsp[-1].str);
+                                                 (yyval.import)->import_performed = do_import((yyvsp[-1].str));
                                                  if (!(yyval.import)->import_performed) yychar = aEOF;
                                                }
                                                  if (!(yyval.import)->import_performed) yychar = aEOF;
                                                }
+#line 2838 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 43:
-
-/* Line 1806 of yacc.c  */
-#line 392 "parser.y"
-    { (yyval.str) = (yyvsp[(1) - (3)].import)->name;
-                                                 if ((yyvsp[(1) - (3)].import)->import_performed) pop_import();
-                                                 free((yyvsp[(1) - (3)].import));
+  case 45:
+#line 400 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[-2].import)->name;
+                                                 if ((yyvsp[-2].import)->import_performed) pop_import();
+                                                 free((yyvsp[-2].import));
                                                }
                                                }
+#line 2847 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 44:
-
-/* Line 1806 of yacc.c  */
-#line 399 "parser.y"
-    { (yyval.str) = (yyvsp[(3) - (5)].str); if(!parse_only) add_importlib((yyvsp[(3) - (5)].str)); }
+  case 46:
+#line 407 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[-2].str); if(!parse_only) add_importlib((yyvsp[-2].str)); }
+#line 2853 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 45:
-
-/* Line 1806 of yacc.c  */
-#line 402 "parser.y"
-    { (yyval.str) = (yyvsp[(2) - (2)].str); }
+  case 47:
+#line 410 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[0].str); }
+#line 2859 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 46:
-
-/* Line 1806 of yacc.c  */
-#line 404 "parser.y"
-    { (yyval.typelib) = make_library((yyvsp[(2) - (3)].str), check_library_attrs((yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].attr_list)));
+  case 48:
+#line 412 "parser.y" /* yacc.c:1646  */
+    { (yyval.typelib) = make_library((yyvsp[-1].str), check_library_attrs((yyvsp[-1].str), (yyvsp[-2].attr_list)));
                                                  if (!parse_only) start_typelib((yyval.typelib));
                                                }
                                                  if (!parse_only) start_typelib((yyval.typelib));
                                                }
+#line 2867 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 47:
-
-/* Line 1806 of yacc.c  */
-#line 409 "parser.y"
-    { (yyval.typelib) = (yyvsp[(1) - (4)].typelib);
-                                                 (yyval.typelib)->stmts = (yyvsp[(2) - (4)].stmt_list);
+  case 49:
+#line 417 "parser.y" /* yacc.c:1646  */
+    { (yyval.typelib) = (yyvsp[-3].typelib);
+                                                 (yyval.typelib)->stmts = (yyvsp[-2].stmt_list);
                                                  if (!parse_only) end_typelib();
                                                }
                                                  if (!parse_only) end_typelib();
                                                }
-    break;
-
-  case 48:
-
-/* Line 1806 of yacc.c  */
-#line 415 "parser.y"
-    { (yyval.var_list) = NULL; }
+#line 2876 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 50:
     break;
 
   case 50:
-
-/* Line 1806 of yacc.c  */
-#line 419 "parser.y"
-    { check_arg_attrs((yyvsp[(1) - (1)].var)); (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); }
+#line 423 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = NULL; }
+#line 2882 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 51:
-
-/* Line 1806 of yacc.c  */
-#line 420 "parser.y"
-    { check_arg_attrs((yyvsp[(3) - (3)].var)); (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) ); }
+  case 52:
+#line 427 "parser.y" /* yacc.c:1646  */
+    { check_arg_attrs((yyvsp[0].var)); (yyval.var_list) = append_var( NULL, (yyvsp[0].var) ); }
+#line 2888 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 53:
     break;
 
   case 53:
-
-/* Line 1806 of yacc.c  */
-#line 424 "parser.y"
-    { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), make_var(strdup("...")) ); }
+#line 428 "parser.y" /* yacc.c:1646  */
+    { check_arg_attrs((yyvsp[0].var)); (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[0].var) ); }
+#line 2894 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 54:
+  case 55:
+#line 432 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = append_var( (yyvsp[-2].var_list), make_var(strdup("...")) ); }
+#line 2900 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 428 "parser.y"
-    { if ((yyvsp[(2) - (3)].declspec)->stgclass != STG_NONE && (yyvsp[(2) - (3)].declspec)->stgclass != STG_REGISTER)
+  case 56:
+#line 436 "parser.y" /* yacc.c:1646  */
+    { if ((yyvsp[-1].declspec)->stgclass != STG_NONE && (yyvsp[-1].declspec)->stgclass != STG_REGISTER)
                                                    error_loc("invalid storage class for function parameter\n");
                                                    error_loc("invalid storage class for function parameter\n");
-                                                 (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), TRUE);
-                                                 free((yyvsp[(2) - (3)].declspec)); free((yyvsp[(3) - (3)].declarator));
+                                                 (yyval.var) = declare_var((yyvsp[-2].attr_list), (yyvsp[-1].declspec), (yyvsp[0].declarator), TRUE);
+                                                 free((yyvsp[-1].declspec)); free((yyvsp[0].declarator));
                                                }
                                                }
+#line 2910 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 55:
-
-/* Line 1806 of yacc.c  */
-#line 433 "parser.y"
-    { if ((yyvsp[(1) - (2)].declspec)->stgclass != STG_NONE && (yyvsp[(1) - (2)].declspec)->stgclass != STG_REGISTER)
+  case 57:
+#line 441 "parser.y" /* yacc.c:1646  */
+    { if ((yyvsp[-1].declspec)->stgclass != STG_NONE && (yyvsp[-1].declspec)->stgclass != STG_REGISTER)
                                                    error_loc("invalid storage class for function parameter\n");
                                                    error_loc("invalid storage class for function parameter\n");
-                                                 (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), TRUE);
-                                                 free((yyvsp[(1) - (2)].declspec)); free((yyvsp[(2) - (2)].declarator));
+                                                 (yyval.var) = declare_var(NULL, (yyvsp[-1].declspec), (yyvsp[0].declarator), TRUE);
+                                                 free((yyvsp[-1].declspec)); free((yyvsp[0].declarator));
                                                }
                                                }
+#line 2920 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 56:
-
-/* Line 1806 of yacc.c  */
-#line 440 "parser.y"
-    { (yyval.expr) = (yyvsp[(2) - (3)].expr);
+  case 58:
+#line 448 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = (yyvsp[-1].expr);
                                                  if (!(yyval.expr)->is_const)
                                                      error_loc("array dimension is not an integer constant\n");
                                                }
                                                  if (!(yyval.expr)->is_const)
                                                      error_loc("array dimension is not an integer constant\n");
                                                }
+#line 2929 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 57:
-
-/* Line 1806 of yacc.c  */
-#line 444 "parser.y"
+  case 59:
+#line 452 "parser.y" /* yacc.c:1646  */
     { (yyval.expr) = make_expr(EXPR_VOID); }
     { (yyval.expr) = make_expr(EXPR_VOID); }
+#line 2935 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 58:
-
-/* Line 1806 of yacc.c  */
-#line 445 "parser.y"
+  case 60:
+#line 453 "parser.y" /* yacc.c:1646  */
     { (yyval.expr) = make_expr(EXPR_VOID); }
     { (yyval.expr) = make_expr(EXPR_VOID); }
-    break;
-
-  case 59:
-
-/* Line 1806 of yacc.c  */
-#line 448 "parser.y"
-    { (yyval.attr_list) = NULL; }
+#line 2941 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 61:
     break;
 
   case 61:
-
-/* Line 1806 of yacc.c  */
-#line 453 "parser.y"
-    { (yyval.attr_list) = (yyvsp[(2) - (3)].attr_list); }
-    break;
-
-  case 62:
-
-/* Line 1806 of yacc.c  */
-#line 456 "parser.y"
-    { (yyval.attr_list) = append_attr( NULL, (yyvsp[(1) - (1)].attr) ); }
+#line 456 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = NULL; }
+#line 2947 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 63:
     break;
 
   case 63:
-
-/* Line 1806 of yacc.c  */
-#line 457 "parser.y"
-    { (yyval.attr_list) = append_attr( (yyvsp[(1) - (3)].attr_list), (yyvsp[(3) - (3)].attr) ); }
+#line 461 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = (yyvsp[-1].attr_list); }
+#line 2953 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 64:
     break;
 
   case 64:
-
-/* Line 1806 of yacc.c  */
-#line 458 "parser.y"
-    { (yyval.attr_list) = append_attr( (yyvsp[(1) - (4)].attr_list), (yyvsp[(4) - (4)].attr) ); }
+#line 464 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = append_attr( NULL, (yyvsp[0].attr) ); }
+#line 2959 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 65:
     break;
 
   case 65:
-
-/* Line 1806 of yacc.c  */
-#line 461 "parser.y"
-    { (yyval.str_list) = append_str( NULL, (yyvsp[(1) - (1)].str) ); }
+#line 465 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = append_attr( (yyvsp[-2].attr_list), (yyvsp[0].attr) ); }
+#line 2965 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 66:
     break;
 
   case 66:
-
-/* Line 1806 of yacc.c  */
-#line 462 "parser.y"
-    { (yyval.str_list) = append_str( (yyvsp[(1) - (3)].str_list), (yyvsp[(3) - (3)].str) ); }
+#line 466 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = append_attr( (yyvsp[-3].attr_list), (yyvsp[0].attr) ); }
+#line 2971 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 67:
     break;
 
   case 67:
-
-/* Line 1806 of yacc.c  */
-#line 465 "parser.y"
-    { (yyval.attr) = NULL; }
+#line 469 "parser.y" /* yacc.c:1646  */
+    { (yyval.str_list) = append_str( NULL, (yyvsp[0].str) ); }
+#line 2977 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 68:
     break;
 
   case 68:
-
-/* Line 1806 of yacc.c  */
-#line 466 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); }
+#line 470 "parser.y" /* yacc.c:1646  */
+    { (yyval.str_list) = append_str( (yyvsp[-2].str_list), (yyvsp[0].str) ); }
+#line 2983 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 69:
     break;
 
   case 69:
-
-/* Line 1806 of yacc.c  */
-#line 467 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_ANNOTATION, (yyvsp[(3) - (4)].str)); }
+#line 473 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = NULL; }
+#line 2989 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 70:
     break;
 
   case 70:
-
-/* Line 1806 of yacc.c  */
-#line 468 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_APPOBJECT); }
+#line 474 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); }
+#line 2995 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 71:
     break;
 
   case 71:
-
-/* Line 1806 of yacc.c  */
-#line 469 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_ASYNC); }
+#line 475 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_ANNOTATION, (yyvsp[-1].str)); }
+#line 3001 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 72:
     break;
 
   case 72:
-
-/* Line 1806 of yacc.c  */
-#line 470 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); }
+#line 476 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_APPOBJECT); }
+#line 3007 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 73:
     break;
 
   case 73:
-
-/* Line 1806 of yacc.c  */
-#line 471 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_BINDABLE); }
+#line 477 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_ASYNC); }
+#line 3013 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 74:
     break;
 
   case 74:
-
-/* Line 1806 of yacc.c  */
-#line 472 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_BROADCAST); }
+#line 478 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); }
+#line 3019 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 75:
     break;
 
   case 75:
-
-/* Line 1806 of yacc.c  */
-#line 473 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[(3) - (4)].var)); }
+#line 479 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_BINDABLE); }
+#line 3025 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 76:
     break;
 
   case 76:
-
-/* Line 1806 of yacc.c  */
-#line 474 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[(3) - (4)].expr_list)); }
+#line 480 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_BROADCAST); }
+#line 3031 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 77:
     break;
 
   case 77:
-
-/* Line 1806 of yacc.c  */
-#line 475 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_CODE); }
+#line 481 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[-1].var)); }
+#line 3037 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 78:
     break;
 
   case 78:
-
-/* Line 1806 of yacc.c  */
-#line 476 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_COMMSTATUS); }
+#line 482 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[-1].expr_list)); }
+#line 3043 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 79:
     break;
 
   case 79:
-
-/* Line 1806 of yacc.c  */
-#line 477 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); }
+#line 483 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_CODE); }
+#line 3049 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 80:
     break;
 
   case 80:
-
-/* Line 1806 of yacc.c  */
-#line 478 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
+#line 484 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_COMMSTATUS); }
+#line 3055 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 81:
     break;
 
   case 81:
-
-/* Line 1806 of yacc.c  */
-#line 479 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
+#line 485 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); }
+#line 3061 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 82:
     break;
 
   case 82:
-
-/* Line 1806 of yacc.c  */
-#line 480 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_CONTROL); }
+#line 486 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
+#line 3067 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 83:
     break;
 
   case 83:
-
-/* Line 1806 of yacc.c  */
-#line 481 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DECODE); }
+#line 487 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ }
+#line 3073 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 84:
     break;
 
   case 84:
-
-/* Line 1806 of yacc.c  */
-#line 482 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DEFAULT); }
+#line 488 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_CONTROL); }
+#line 3079 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 85:
     break;
 
   case 85:
-
-/* Line 1806 of yacc.c  */
-#line 483 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DEFAULTBIND); }
+#line 489 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DECODE); }
+#line 3085 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 86:
     break;
 
   case 86:
-
-/* Line 1806 of yacc.c  */
-#line 484 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); }
+#line 490 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DEFAULT); }
+#line 3091 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 87:
     break;
 
   case 87:
-
-/* Line 1806 of yacc.c  */
-#line 485 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[(3) - (4)].expr)); }
+#line 491 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DEFAULTBIND); }
+#line 3097 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 88:
     break;
 
   case 88:
-
-/* Line 1806 of yacc.c  */
-#line 486 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); }
+#line 492 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); }
+#line 3103 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 89:
     break;
 
   case 89:
-
-/* Line 1806 of yacc.c  */
-#line 487 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DISABLECONSISTENCYCHECK); }
+#line 493 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[-1].expr)); }
+#line 3109 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 90:
     break;
 
   case 90:
-
-/* Line 1806 of yacc.c  */
-#line 488 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); }
+#line 494 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); }
+#line 3115 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 91:
     break;
 
   case 91:
-
-/* Line 1806 of yacc.c  */
-#line 489 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[(3) - (4)].str)); }
+#line 495 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DISABLECONSISTENCYCHECK); }
+#line 3121 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 92:
     break;
 
   case 92:
-
-/* Line 1806 of yacc.c  */
-#line 490 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_DUAL); }
+#line 496 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); }
+#line 3127 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 93:
     break;
 
   case 93:
-
-/* Line 1806 of yacc.c  */
-#line 491 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_ENABLEALLOCATE); }
+#line 497 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[-1].str)); }
+#line 3133 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 94:
     break;
 
   case 94:
-
-/* Line 1806 of yacc.c  */
-#line 492 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_ENCODE); }
+#line 498 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_DUAL); }
+#line 3139 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 95:
     break;
 
   case 95:
-
-/* Line 1806 of yacc.c  */
-#line 493 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[(3) - (4)].str_list)); }
+#line 499 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_ENABLEALLOCATE); }
+#line 3145 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 96:
     break;
 
   case 96:
-
-/* Line 1806 of yacc.c  */
-#line 494 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[(3) - (4)].expr)); }
+#line 500 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_ENCODE); }
+#line 3151 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 97:
     break;
 
   case 97:
-
-/* Line 1806 of yacc.c  */
-#line 495 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); }
+#line 501 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[-1].str_list)); }
+#line 3157 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 98:
     break;
 
   case 98:
-
-/* Line 1806 of yacc.c  */
-#line 496 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_FAULTSTATUS); }
+#line 502 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[-1].expr)); }
+#line 3163 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 99:
     break;
 
   case 99:
-
-/* Line 1806 of yacc.c  */
-#line 497 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_FORCEALLOCATE); }
+#line 503 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); }
+#line 3169 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 100:
     break;
 
   case 100:
-
-/* Line 1806 of yacc.c  */
-#line 498 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_HANDLE); }
+#line 504 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_FAULTSTATUS); }
+#line 3175 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 101:
     break;
 
   case 101:
-
-/* Line 1806 of yacc.c  */
-#line 499 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[(3) - (4)].expr)); }
+#line 505 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_FORCEALLOCATE); }
+#line 3181 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 102:
     break;
 
   case 102:
-
-/* Line 1806 of yacc.c  */
-#line 500 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[(3) - (4)].str)); }
+#line 506 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_HANDLE); }
+#line 3187 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 103:
     break;
 
   case 103:
-
-/* Line 1806 of yacc.c  */
-#line 501 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[(3) - (4)].str)); }
+#line 507 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[-1].expr)); }
+#line 3193 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 104:
     break;
 
   case 104:
-
-/* Line 1806 of yacc.c  */
-#line 502 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[(3) - (4)].expr)); }
+#line 508 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[-1].str)); }
+#line 3199 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 105:
     break;
 
   case 105:
-
-/* Line 1806 of yacc.c  */
-#line 503 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[(3) - (4)].str)); }
+#line 509 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[-1].str)); }
+#line 3205 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 106:
     break;
 
   case 106:
-
-/* Line 1806 of yacc.c  */
-#line 504 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_HIDDEN); }
+#line 510 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[-1].expr)); }
+#line 3211 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 107:
     break;
 
   case 107:
-
-/* Line 1806 of yacc.c  */
-#line 505 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[(3) - (4)].expr)); }
+#line 511 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[-1].str)); }
+#line 3217 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 108:
     break;
 
   case 108:
-
-/* Line 1806 of yacc.c  */
-#line 506 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); }
+#line 512 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_HIDDEN); }
+#line 3223 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 109:
     break;
 
   case 109:
-
-/* Line 1806 of yacc.c  */
-#line 507 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_IGNORE); }
+#line 513 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[-1].expr)); }
+#line 3229 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 110:
     break;
 
   case 110:
-
-/* Line 1806 of yacc.c  */
-#line 508 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[(3) - (4)].expr)); }
+#line 514 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); }
+#line 3235 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 111:
     break;
 
   case 111:
-
-/* Line 1806 of yacc.c  */
-#line 509 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); }
+#line 515 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_IGNORE); }
+#line 3241 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 112:
     break;
 
   case 112:
-
-/* Line 1806 of yacc.c  */
-#line 510 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[(3) - (4)].var)); }
+#line 516 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[-1].expr)); }
+#line 3247 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 113:
     break;
 
   case 113:
-
-/* Line 1806 of yacc.c  */
-#line 511 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_IN); }
+#line 517 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); }
+#line 3253 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 114:
     break;
 
   case 114:
-
-/* Line 1806 of yacc.c  */
-#line 512 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_INPUTSYNC); }
+#line 518 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[-1].var)); }
+#line 3259 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 115:
     break;
 
   case 115:
-
-/* Line 1806 of yacc.c  */
-#line 513 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[(3) - (4)].expr_list)); }
+#line 519 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_IN); }
+#line 3265 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 116:
     break;
 
   case 116:
-
-/* Line 1806 of yacc.c  */
-#line 514 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[(3) - (4)].expr)); }
+#line 520 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_INPUTSYNC); }
+#line 3271 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 117:
     break;
 
   case 117:
-
-/* Line 1806 of yacc.c  */
-#line 515 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PARAMLCID); }
+#line 521 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[-1].expr_list)); }
+#line 3277 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 118:
     break;
 
   case 118:
-
-/* Line 1806 of yacc.c  */
-#line 516 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_LICENSED); }
+#line 522 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[-1].expr)); }
+#line 3283 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 119:
     break;
 
   case 119:
-
-/* Line 1806 of yacc.c  */
-#line 517 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_LOCAL); }
+#line 523 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PARAMLCID); }
+#line 3289 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 120:
     break;
 
   case 120:
-
-/* Line 1806 of yacc.c  */
-#line 518 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_MAYBE); }
+#line 524 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_LICENSED); }
+#line 3295 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 121:
     break;
 
   case 121:
-
-/* Line 1806 of yacc.c  */
-#line 519 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_MESSAGE); }
+#line 525 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_LOCAL); }
+#line 3301 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 122:
     break;
 
   case 122:
-
-/* Line 1806 of yacc.c  */
-#line 520 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_NOCODE); }
+#line 526 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_MAYBE); }
+#line 3307 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 123:
     break;
 
   case 123:
-
-/* Line 1806 of yacc.c  */
-#line 521 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); }
+#line 527 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_MESSAGE); }
+#line 3313 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 124:
     break;
 
   case 124:
-
-/* Line 1806 of yacc.c  */
-#line 522 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_NONCREATABLE); }
+#line 528 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_NOCODE); }
+#line 3319 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 125:
     break;
 
   case 125:
-
-/* Line 1806 of yacc.c  */
-#line 523 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); }
+#line 529 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); }
+#line 3325 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 126:
     break;
 
   case 126:
-
-/* Line 1806 of yacc.c  */
-#line 524 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_NOTIFY); }
+#line 530 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_NONCREATABLE); }
+#line 3331 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 127:
     break;
 
   case 127:
-
-/* Line 1806 of yacc.c  */
-#line 525 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_NOTIFYFLAG); }
+#line 531 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); }
+#line 3337 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 128:
     break;
 
   case 128:
-
-/* Line 1806 of yacc.c  */
-#line 526 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_OBJECT); }
+#line 532 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_NOTIFY); }
+#line 3343 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 129:
     break;
 
   case 129:
-
-/* Line 1806 of yacc.c  */
-#line 527 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_ODL); }
+#line 533 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_NOTIFYFLAG); }
+#line 3349 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 130:
     break;
 
   case 130:
-
-/* Line 1806 of yacc.c  */
-#line 528 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); }
+#line 534 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_OBJECT); }
+#line 3355 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 131:
     break;
 
   case 131:
-
-/* Line 1806 of yacc.c  */
-#line 529 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_OPTIMIZE, (yyvsp[(3) - (4)].str)); }
+#line 535 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_ODL); }
+#line 3361 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 132:
     break;
 
   case 132:
-
-/* Line 1806 of yacc.c  */
-#line 530 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_OPTIONAL); }
+#line 536 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); }
+#line 3367 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 133:
     break;
 
   case 133:
-
-/* Line 1806 of yacc.c  */
-#line 531 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_OUT); }
+#line 537 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_OPTIMIZE, (yyvsp[-1].str)); }
+#line 3373 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 134:
     break;
 
   case 134:
-
-/* Line 1806 of yacc.c  */
-#line 532 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PARTIALIGNORE); }
+#line 538 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_OPTIONAL); }
+#line 3379 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 135:
     break;
 
   case 135:
-
-/* Line 1806 of yacc.c  */
-#line 533 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[(3) - (4)].num)); }
+#line 539 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_OUT); }
+#line 3385 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 136:
     break;
 
   case 136:
-
-/* Line 1806 of yacc.c  */
-#line 534 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_PROGID, (yyvsp[(3) - (4)].str)); }
+#line 540 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PARTIALIGNORE); }
+#line 3391 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 137:
     break;
 
   case 137:
-
-/* Line 1806 of yacc.c  */
-#line 535 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PROPGET); }
+#line 541 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[-1].num)); }
+#line 3397 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 138:
     break;
 
   case 138:
-
-/* Line 1806 of yacc.c  */
-#line 536 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PROPPUT); }
+#line 542 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_PROGID, (yyvsp[-1].str)); }
+#line 3403 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 139:
     break;
 
   case 139:
-
-/* Line 1806 of yacc.c  */
-#line 537 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PROPPUTREF); }
+#line 543 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PROPGET); }
+#line 3409 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 140:
     break;
 
   case 140:
-
-/* Line 1806 of yacc.c  */
-#line 538 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PROXY); }
+#line 544 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PROPPUT); }
+#line 3415 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 141:
     break;
 
   case 141:
-
-/* Line 1806 of yacc.c  */
-#line 539 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_PUBLIC); }
+#line 545 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PROPPUTREF); }
+#line 3421 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 142:
     break;
 
   case 142:
-
-/* Line 1806 of yacc.c  */
-#line 541 "parser.y"
-    { expr_list_t *list = append_expr( NULL, (yyvsp[(3) - (6)].expr) );
-                                                 list = append_expr( list, (yyvsp[(5) - (6)].expr) );
-                                                 (yyval.attr) = make_attrp(ATTR_RANGE, list); }
+#line 546 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PROXY); }
+#line 3427 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 143:
     break;
 
   case 143:
-
-/* Line 1806 of yacc.c  */
-#line 544 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_READONLY); }
+#line 547 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_PUBLIC); }
+#line 3433 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 144:
     break;
 
   case 144:
-
-/* Line 1806 of yacc.c  */
-#line 545 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_REPRESENTAS, (yyvsp[(3) - (4)].type)); }
+#line 549 "parser.y" /* yacc.c:1646  */
+    { expr_list_t *list = append_expr( NULL, (yyvsp[-3].expr) );
+                                                 list = append_expr( list, (yyvsp[-1].expr) );
+                                                 (yyval.attr) = make_attrp(ATTR_RANGE, list); }
+#line 3441 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 145:
     break;
 
   case 145:
-
-/* Line 1806 of yacc.c  */
-#line 546 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); }
+#line 552 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_READONLY); }
+#line 3447 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 146:
     break;
 
   case 146:
-
-/* Line 1806 of yacc.c  */
-#line 547 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_RESTRICTED); }
+#line 553 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_REPRESENTAS, (yyvsp[-1].type)); }
+#line 3453 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 147:
     break;
 
   case 147:
-
-/* Line 1806 of yacc.c  */
-#line 548 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_RETVAL); }
+#line 554 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); }
+#line 3459 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 148:
     break;
 
   case 148:
-
-/* Line 1806 of yacc.c  */
-#line 549 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[(3) - (4)].expr_list)); }
+#line 555 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_RESTRICTED); }
+#line 3465 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 149:
     break;
 
   case 149:
-
-/* Line 1806 of yacc.c  */
-#line 550 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_SOURCE); }
+#line 556 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_RETVAL); }
+#line 3471 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 150:
     break;
 
   case 150:
-
-/* Line 1806 of yacc.c  */
-#line 551 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); }
+#line 557 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[-1].expr_list)); }
+#line 3477 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 151:
     break;
 
   case 151:
-
-/* Line 1806 of yacc.c  */
-#line 552 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_STRING); }
+#line 558 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_SOURCE); }
+#line 3483 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 152:
     break;
 
   case 152:
-
-/* Line 1806 of yacc.c  */
-#line 553 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[(3) - (4)].expr)); }
+#line 559 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); }
+#line 3489 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 153:
     break;
 
   case 153:
-
-/* Line 1806 of yacc.c  */
-#line 554 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[(3) - (4)].type)); }
+#line 560 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_STRING); }
+#line 3495 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 154:
     break;
 
   case 154:
-
-/* Line 1806 of yacc.c  */
-#line 555 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[(3) - (4)].type)); }
+#line 561 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[-1].expr)); }
+#line 3501 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 155:
     break;
 
   case 155:
-
-/* Line 1806 of yacc.c  */
-#line 556 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_THREADING, (yyvsp[(3) - (4)].num)); }
+#line 562 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[-1].type)); }
+#line 3507 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 156:
     break;
 
   case 156:
-
-/* Line 1806 of yacc.c  */
-#line 557 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_UIDEFAULT); }
+#line 563 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[-1].type)); }
+#line 3513 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 157:
     break;
 
   case 157:
-
-/* Line 1806 of yacc.c  */
-#line 558 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_USESGETLASTERROR); }
+#line 564 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_THREADING, (yyvsp[-1].num)); }
+#line 3519 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 158:
     break;
 
   case 158:
-
-/* Line 1806 of yacc.c  */
-#line 559 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_USERMARSHAL, (yyvsp[(3) - (4)].type)); }
+#line 565 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_UIDEFAULT); }
+#line 3525 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 159:
     break;
 
   case 159:
-
-/* Line 1806 of yacc.c  */
-#line 560 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[(3) - (4)].uuid)); }
+#line 566 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_USESGETLASTERROR); }
+#line 3531 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 160:
     break;
 
   case 160:
-
-/* Line 1806 of yacc.c  */
-#line 561 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_ASYNCUUID, (yyvsp[(3) - (4)].uuid)); }
+#line 567 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_USERMARSHAL, (yyvsp[-1].type)); }
+#line 3537 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 161:
     break;
 
   case 161:
-
-/* Line 1806 of yacc.c  */
-#line 562 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_V1ENUM); }
+#line 568 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[-1].uuid)); }
+#line 3543 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 162:
     break;
 
   case 162:
-
-/* Line 1806 of yacc.c  */
-#line 563 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_VARARG); }
+#line 569 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_ASYNCUUID, (yyvsp[-1].uuid)); }
+#line 3549 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 163:
     break;
 
   case 163:
-
-/* Line 1806 of yacc.c  */
-#line 564 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[(3) - (4)].num)); }
+#line 570 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_V1ENUM); }
+#line 3555 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 164:
     break;
 
   case 164:
-
-/* Line 1806 of yacc.c  */
-#line 565 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_VIPROGID, (yyvsp[(3) - (4)].str)); }
+#line 571 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_VARARG); }
+#line 3561 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 165:
     break;
 
   case 165:
-
-/* Line 1806 of yacc.c  */
-#line 566 "parser.y"
-    { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[(3) - (4)].type)); }
+#line 572 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[-1].num)); }
+#line 3567 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 166:
     break;
 
   case 166:
+#line 573 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_VIPROGID, (yyvsp[-1].str)); }
+#line 3573 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 567 "parser.y"
-    { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[(1) - (1)].num)); }
+  case 167:
+#line 574 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[-1].type)); }
+#line 3579 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 168:
     break;
 
   case 168:
-
-/* Line 1806 of yacc.c  */
-#line 572 "parser.y"
-    { if (!is_valid_uuid((yyvsp[(1) - (1)].str)))
-                                                   error_loc("invalid UUID: %s\n", (yyvsp[(1) - (1)].str));
-                                                 (yyval.uuid) = parse_uuid((yyvsp[(1) - (1)].str)); }
+#line 575 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[0].num)); }
+#line 3585 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 169:
+  case 170:
+#line 580 "parser.y" /* yacc.c:1646  */
+    { if (!is_valid_uuid((yyvsp[0].str)))
+                                                   error_loc("invalid UUID: %s\n", (yyvsp[0].str));
+                                                 (yyval.uuid) = parse_uuid((yyvsp[0].str)); }
+#line 3593 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 577 "parser.y"
+  case 171:
+#line 585 "parser.y" /* yacc.c:1646  */
     { (yyval.str) = xstrdup("__cdecl"); }
     { (yyval.str) = xstrdup("__cdecl"); }
+#line 3599 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 170:
-
-/* Line 1806 of yacc.c  */
-#line 578 "parser.y"
+  case 172:
+#line 586 "parser.y" /* yacc.c:1646  */
     { (yyval.str) = xstrdup("__fastcall"); }
     { (yyval.str) = xstrdup("__fastcall"); }
+#line 3605 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 171:
-
-/* Line 1806 of yacc.c  */
-#line 579 "parser.y"
+  case 173:
+#line 587 "parser.y" /* yacc.c:1646  */
     { (yyval.str) = xstrdup("__pascal"); }
     { (yyval.str) = xstrdup("__pascal"); }
+#line 3611 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 172:
-
-/* Line 1806 of yacc.c  */
-#line 580 "parser.y"
+  case 174:
+#line 588 "parser.y" /* yacc.c:1646  */
     { (yyval.str) = xstrdup("__stdcall"); }
     { (yyval.str) = xstrdup("__stdcall"); }
+#line 3617 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 173:
-
-/* Line 1806 of yacc.c  */
-#line 583 "parser.y"
+  case 175:
+#line 591 "parser.y" /* yacc.c:1646  */
     { (yyval.var_list) = NULL; }
     { (yyval.var_list) = NULL; }
+#line 3623 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 174:
-
-/* Line 1806 of yacc.c  */
-#line 584 "parser.y"
-    { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); }
+  case 176:
+#line 592 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = append_var( (yyvsp[-1].var_list), (yyvsp[0].var) ); }
+#line 3629 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 175:
-
-/* Line 1806 of yacc.c  */
-#line 587 "parser.y"
-    { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[(2) - (4)].expr) ));
-                                                 (yyval.var) = (yyvsp[(4) - (4)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL);
+  case 177:
+#line 595 "parser.y" /* yacc.c:1646  */
+    { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[-2].expr) ));
+                                                 (yyval.var) = (yyvsp[0].var); if (!(yyval.var)) (yyval.var) = make_var(NULL);
                                                  (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a );
                                                }
                                                  (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a );
                                                }
+#line 3638 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 176:
-
-/* Line 1806 of yacc.c  */
-#line 591 "parser.y"
+  case 178:
+#line 599 "parser.y" /* yacc.c:1646  */
     { attr_t *a = make_attr(ATTR_DEFAULT);
     { attr_t *a = make_attr(ATTR_DEFAULT);
-                                                 (yyval.var) = (yyvsp[(3) - (3)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL);
+                                                 (yyval.var) = (yyvsp[0].var); if (!(yyval.var)) (yyval.var) = make_var(NULL);
                                                  (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a );
                                                }
                                                  (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a );
                                                }
+#line 3647 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 177:
-
-/* Line 1806 of yacc.c  */
-#line 597 "parser.y"
+  case 179:
+#line 605 "parser.y" /* yacc.c:1646  */
     { (yyval.var_list) = NULL; }
     { (yyval.var_list) = NULL; }
-    break;
-
-  case 178:
-
-/* Line 1806 of yacc.c  */
-#line 598 "parser.y"
-    { (yyval.var_list) = (yyvsp[(1) - (2)].var_list); }
+#line 3653 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 180:
     break;
 
   case 180:
+#line 606 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = (yyvsp[-1].var_list); }
+#line 3659 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 602 "parser.y"
-    { if (!(yyvsp[(1) - (1)].var)->eval)
-                                                   (yyvsp[(1) - (1)].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */);
-                                                  (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) );
+  case 182:
+#line 610 "parser.y" /* yacc.c:1646  */
+    { if (!(yyvsp[0].var)->eval)
+                                                   (yyvsp[0].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */);
+                                                  (yyval.var_list) = append_var( NULL, (yyvsp[0].var) );
                                                }
                                                }
+#line 3668 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 181:
-
-/* Line 1806 of yacc.c  */
-#line 606 "parser.y"
-    { if (!(yyvsp[(3) - (3)].var)->eval)
+  case 183:
+#line 614 "parser.y" /* yacc.c:1646  */
+    { if (!(yyvsp[0].var)->eval)
                                                   {
                                                     var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry );
                                                     enum expr_type type = EXPR_NUM;
                                                     if (last->eval->type == EXPR_HEXNUM) type = EXPR_HEXNUM;
                                                     if (last->eval->cval + 1 < 0) type = EXPR_HEXNUM;
                                                   {
                                                     var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry );
                                                     enum expr_type type = EXPR_NUM;
                                                     if (last->eval->type == EXPR_HEXNUM) type = EXPR_HEXNUM;
                                                     if (last->eval->cval + 1 < 0) type = EXPR_HEXNUM;
-                                                    (yyvsp[(3) - (3)].var)->eval = make_exprl(type, last->eval->cval + 1);
+                                                    (yyvsp[0].var)->eval = make_exprl(type, last->eval->cval + 1);
                                                   }
                                                   }
-                                                  (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) );
+                                                  (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[0].var) );
                                                }
                                                }
+#line 3683 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 182:
-
-/* Line 1806 of yacc.c  */
-#line 618 "parser.y"
-    { (yyval.var) = reg_const((yyvsp[(1) - (3)].var));
-                                                 (yyval.var)->eval = (yyvsp[(3) - (3)].expr);
+  case 184:
+#line 626 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = reg_const((yyvsp[-2].var));
+                                                 (yyval.var)->eval = (yyvsp[0].expr);
                                                   (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0);
                                                }
                                                   (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0);
                                                }
+#line 3692 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 183:
-
-/* Line 1806 of yacc.c  */
-#line 622 "parser.y"
-    { (yyval.var) = reg_const((yyvsp[(1) - (1)].var));
+  case 185:
+#line 630 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = reg_const((yyvsp[0].var));
                                                   (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0);
                                                }
                                                   (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0);
                                                }
-    break;
-
-  case 184:
-
-/* Line 1806 of yacc.c  */
-#line 627 "parser.y"
-    { (yyval.type) = type_new_enum((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); }
-    break;
-
-  case 185:
-
-/* Line 1806 of yacc.c  */
-#line 630 "parser.y"
-    { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); }
+#line 3700 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 186:
     break;
 
   case 186:
-
-/* Line 1806 of yacc.c  */
-#line 631 "parser.y"
-    { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); }
+#line 635 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_enum((yyvsp[-3].str), current_namespace, TRUE, (yyvsp[-1].var_list)); }
+#line 3706 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 187:
     break;
 
   case 187:
-
-/* Line 1806 of yacc.c  */
-#line 634 "parser.y"
-    { (yyval.expr) = make_expr(EXPR_VOID); }
+#line 638 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = append_expr( NULL, (yyvsp[0].expr) ); }
+#line 3712 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 189:
-
-/* Line 1806 of yacc.c  */
-#line 638 "parser.y"
-    { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[(1) - (1)].num)); }
+  case 188:
+#line 639 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = append_expr( (yyvsp[-2].expr_list), (yyvsp[0].expr) ); }
+#line 3718 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 190:
-
-/* Line 1806 of yacc.c  */
-#line 639 "parser.y"
-    { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[(1) - (1)].num)); }
+  case 189:
+#line 642 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr(EXPR_VOID); }
+#line 3724 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 191:
     break;
 
   case 191:
-
-/* Line 1806 of yacc.c  */
-#line 640 "parser.y"
-    { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[(1) - (1)].dbl)); }
+#line 646 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[0].num)); }
+#line 3730 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 192:
     break;
 
   case 192:
-
-/* Line 1806 of yacc.c  */
-#line 641 "parser.y"
-    { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); }
+#line 647 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[0].num)); }
+#line 3736 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 193:
     break;
 
   case 193:
-
-/* Line 1806 of yacc.c  */
-#line 642 "parser.y"
-    { (yyval.expr) = make_exprl(EXPR_NUM, 0); }
+#line 648 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[0].dbl)); }
+#line 3742 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 194:
     break;
 
   case 194:
-
-/* Line 1806 of yacc.c  */
-#line 643 "parser.y"
-    { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); }
+#line 649 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); }
+#line 3748 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 195:
     break;
 
   case 195:
-
-/* Line 1806 of yacc.c  */
-#line 644 "parser.y"
-    { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[(1) - (1)].str)); }
+#line 650 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprl(EXPR_NUM, 0); }
+#line 3754 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 196:
     break;
 
   case 196:
-
-/* Line 1806 of yacc.c  */
-#line 645 "parser.y"
-    { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[(1) - (1)].str)); }
+#line 651 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); }
+#line 3760 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 197:
     break;
 
   case 197:
-
-/* Line 1806 of yacc.c  */
-#line 646 "parser.y"
-    { (yyval.expr) = make_exprs(EXPR_CHARCONST, (yyvsp[(1) - (1)].str)); }
+#line 652 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[0].str)); }
+#line 3766 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 198:
     break;
 
   case 198:
-
-/* Line 1806 of yacc.c  */
-#line 647 "parser.y"
-    { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[(1) - (1)].str)); }
+#line 653 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[0].str)); }
+#line 3772 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 199:
     break;
 
   case 199:
-
-/* Line 1806 of yacc.c  */
-#line 648 "parser.y"
-    { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); }
+#line 654 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprs(EXPR_CHARCONST, (yyvsp[0].str)); }
+#line 3778 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 200:
     break;
 
   case 200:
-
-/* Line 1806 of yacc.c  */
-#line 649 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 655 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str)); }
+#line 3784 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 201:
     break;
 
   case 201:
-
-/* Line 1806 of yacc.c  */
-#line 650 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 656 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3790 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 202:
     break;
 
   case 202:
-
-/* Line 1806 of yacc.c  */
-#line 651 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 657 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3796 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 203:
     break;
 
   case 203:
-
-/* Line 1806 of yacc.c  */
-#line 652 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 658 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3802 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 204:
     break;
 
   case 204:
-
-/* Line 1806 of yacc.c  */
-#line 653 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 659 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3808 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 205:
     break;
 
   case 205:
-
-/* Line 1806 of yacc.c  */
-#line 654 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 660 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3814 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 206:
     break;
 
   case 206:
-
-/* Line 1806 of yacc.c  */
-#line 655 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 661 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3820 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 207:
     break;
 
   case 207:
-
-/* Line 1806 of yacc.c  */
-#line 656 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 662 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3826 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 208:
     break;
 
   case 208:
-
-/* Line 1806 of yacc.c  */
-#line 657 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 663 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3832 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 209:
     break;
 
   case 209:
-
-/* Line 1806 of yacc.c  */
-#line 658 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 664 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3838 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 210:
     break;
 
   case 210:
-
-/* Line 1806 of yacc.c  */
-#line 659 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 665 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3844 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 211:
     break;
 
   case 211:
-
-/* Line 1806 of yacc.c  */
-#line 660 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 666 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3850 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 212:
     break;
 
   case 212:
-
-/* Line 1806 of yacc.c  */
-#line 661 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 667 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3856 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 213:
     break;
 
   case 213:
-
-/* Line 1806 of yacc.c  */
-#line 662 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 668 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3862 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 214:
     break;
 
   case 214:
-
-/* Line 1806 of yacc.c  */
-#line 663 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 669 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3868 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 215:
     break;
 
   case 215:
-
-/* Line 1806 of yacc.c  */
-#line 664 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 670 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3874 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 216:
     break;
 
   case 216:
-
-/* Line 1806 of yacc.c  */
-#line 665 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 671 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3880 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 217:
     break;
 
   case 217:
-
-/* Line 1806 of yacc.c  */
-#line 666 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
+#line 672 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3886 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 218:
     break;
 
   case 218:
-
-/* Line 1806 of yacc.c  */
-#line 667 "parser.y"
-    { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[(2) - (2)].expr)); }
+#line 673 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3892 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 219:
     break;
 
   case 219:
-
-/* Line 1806 of yacc.c  */
-#line 668 "parser.y"
-    { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[(2) - (2)].expr)); }
+#line 674 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 3898 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 220:
     break;
 
   case 220:
-
-/* Line 1806 of yacc.c  */
-#line 669 "parser.y"
-    { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[(2) - (2)].expr)); }
+#line 675 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[0].expr)); }
+#line 3904 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 221:
     break;
 
   case 221:
-
-/* Line 1806 of yacc.c  */
-#line 670 "parser.y"
-    { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[(2) - (2)].expr)); }
+#line 676 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[0].expr)); }
+#line 3910 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 222:
     break;
 
   case 222:
-
-/* Line 1806 of yacc.c  */
-#line 671 "parser.y"
-    { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[(2) - (2)].expr)); }
+#line 677 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[0].expr)); }
+#line 3916 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 223:
     break;
 
   case 223:
-
-/* Line 1806 of yacc.c  */
-#line 672 "parser.y"
-    { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[(2) - (2)].expr)); }
+#line 678 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[0].expr)); }
+#line 3922 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 224:
     break;
 
   case 224:
-
-/* Line 1806 of yacc.c  */
-#line 673 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[(1) - (3)].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); }
+#line 679 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[0].expr)); }
+#line 3928 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 225:
     break;
 
   case 225:
-
-/* Line 1806 of yacc.c  */
-#line 674 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[(1) - (3)].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); }
+#line 680 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[0].expr)); }
+#line 3934 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 226:
     break;
 
   case 226:
-
-/* Line 1806 of yacc.c  */
-#line 676 "parser.y"
-    { (yyval.expr) = make_exprt(EXPR_CAST, declare_var(NULL, (yyvsp[(2) - (5)].declspec), (yyvsp[(3) - (5)].declarator), 0), (yyvsp[(5) - (5)].expr)); free((yyvsp[(2) - (5)].declspec)); free((yyvsp[(3) - (5)].declarator)); }
+#line 681 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[-2].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); }
+#line 3940 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 227:
     break;
 
   case 227:
-
-/* Line 1806 of yacc.c  */
-#line 678 "parser.y"
-    { (yyval.expr) = make_exprt(EXPR_SIZEOF, declare_var(NULL, (yyvsp[(3) - (5)].declspec), (yyvsp[(4) - (5)].declarator), 0), NULL); free((yyvsp[(3) - (5)].declspec)); free((yyvsp[(4) - (5)].declarator)); }
+#line 682 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[-2].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[0].str))); }
+#line 3946 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 228:
     break;
 
   case 228:
-
-/* Line 1806 of yacc.c  */
-#line 679 "parser.y"
-    { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr)); }
+#line 684 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprt(EXPR_CAST, declare_var(NULL, (yyvsp[-3].declspec), (yyvsp[-2].declarator), 0), (yyvsp[0].expr)); free((yyvsp[-3].declspec)); free((yyvsp[-2].declarator)); }
+#line 3952 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 229:
     break;
 
   case 229:
-
-/* Line 1806 of yacc.c  */
-#line 680 "parser.y"
-    { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
+#line 686 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_exprt(EXPR_SIZEOF, declare_var(NULL, (yyvsp[-2].declspec), (yyvsp[-1].declarator), 0), NULL); free((yyvsp[-2].declspec)); free((yyvsp[-1].declarator)); }
+#line 3958 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 230:
     break;
 
   case 230:
-
-/* Line 1806 of yacc.c  */
-#line 683 "parser.y"
-    { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); }
+#line 687 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[-3].expr), (yyvsp[-1].expr)); }
+#line 3964 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 231:
     break;
 
   case 231:
-
-/* Line 1806 of yacc.c  */
-#line 684 "parser.y"
-    { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); }
+#line 688 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = (yyvsp[-1].expr); }
+#line 3970 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 232:
     break;
 
   case 232:
+#line 691 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = append_expr( NULL, (yyvsp[0].expr) ); }
+#line 3976 "parser.tab.c" /* yacc.c:1646  */
+    break;
+
+  case 233:
+#line 692 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = append_expr( (yyvsp[-2].expr_list), (yyvsp[0].expr) ); }
+#line 3982 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 687 "parser.y"
-    { (yyval.expr) = (yyvsp[(1) - (1)].expr);
+  case 234:
+#line 695 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = (yyvsp[0].expr);
                                                  if (!(yyval.expr)->is_const)
                                                      error_loc("expression is not an integer constant\n");
                                                }
                                                  if (!(yyval.expr)->is_const)
                                                      error_loc("expression is not an integer constant\n");
                                                }
+#line 3991 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 233:
-
-/* Line 1806 of yacc.c  */
-#line 693 "parser.y"
-    { (yyval.expr) = (yyvsp[(1) - (1)].expr);
+  case 235:
+#line 701 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = (yyvsp[0].expr);
                                                  if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT)
                                                      error_loc("expression is not constant\n");
                                                }
                                                  if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT)
                                                      error_loc("expression is not constant\n");
                                                }
+#line 4000 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 234:
-
-/* Line 1806 of yacc.c  */
-#line 699 "parser.y"
+  case 236:
+#line 707 "parser.y" /* yacc.c:1646  */
     { (yyval.var_list) = NULL; }
     { (yyval.var_list) = NULL; }
+#line 4006 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 235:
-
-/* Line 1806 of yacc.c  */
-#line 700 "parser.y"
-    { (yyval.var_list) = append_var_list((yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var_list)); }
+  case 237:
+#line 708 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = append_var_list((yyvsp[-1].var_list), (yyvsp[0].var_list)); }
+#line 4012 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 236:
-
-/* Line 1806 of yacc.c  */
-#line 704 "parser.y"
-    { const char *first = LIST_ENTRY(list_head((yyvsp[(3) - (4)].declarator_list)), declarator_t, entry)->var->name;
-                                                 check_field_attrs(first, (yyvsp[(1) - (4)].attr_list));
-                                                 (yyval.var_list) = set_var_types((yyvsp[(1) - (4)].attr_list), (yyvsp[(2) - (4)].declspec), (yyvsp[(3) - (4)].declarator_list));
+  case 238:
+#line 712 "parser.y" /* yacc.c:1646  */
+    { const char *first = LIST_ENTRY(list_head((yyvsp[-1].declarator_list)), declarator_t, entry)->var->name;
+                                                 check_field_attrs(first, (yyvsp[-3].attr_list));
+                                                 (yyval.var_list) = set_var_types((yyvsp[-3].attr_list), (yyvsp[-2].declspec), (yyvsp[-1].declarator_list));
                                                }
                                                }
+#line 4021 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 237:
-
-/* Line 1806 of yacc.c  */
-#line 708 "parser.y"
+  case 239:
+#line 716 "parser.y" /* yacc.c:1646  */
     { var_t *v = make_var(NULL);
     { var_t *v = make_var(NULL);
-                                                 v->type = (yyvsp[(2) - (3)].type); v->attrs = (yyvsp[(1) - (3)].attr_list);
+                                                 v->type = (yyvsp[-1].type); v->attrs = (yyvsp[-2].attr_list);
                                                  (yyval.var_list) = append_var(NULL, v);
                                                }
                                                  (yyval.var_list) = append_var(NULL, v);
                                                }
-    break;
-
-  case 238:
-
-/* Line 1806 of yacc.c  */
-#line 715 "parser.y"
-    { (yyval.var) = (yyvsp[(1) - (2)].var); }
-    break;
-
-  case 239:
-
-/* Line 1806 of yacc.c  */
-#line 716 "parser.y"
-    { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[(1) - (2)].attr_list); }
+#line 4030 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 240:
     break;
 
   case 240:
-
-/* Line 1806 of yacc.c  */
-#line 719 "parser.y"
-    { (yyval.var_list) = NULL; }
+#line 723 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = (yyvsp[-1].var); }
+#line 4036 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 241:
     break;
 
   case 241:
-
-/* Line 1806 of yacc.c  */
-#line 720 "parser.y"
-    { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); }
+#line 724 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[-1].attr_list); }
+#line 4042 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 242:
     break;
 
   case 242:
-
-/* Line 1806 of yacc.c  */
-#line 724 "parser.y"
-    { (yyval.var) = (yyvsp[(1) - (2)].var); }
+#line 727 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = NULL; }
+#line 4048 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 243:
     break;
 
   case 243:
-
-/* Line 1806 of yacc.c  */
-#line 725 "parser.y"
-    { (yyval.var) = NULL; }
+#line 728 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = append_var( (yyvsp[-1].var_list), (yyvsp[0].var) ); }
+#line 4054 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 244:
     break;
 
   case 244:
-
-/* Line 1806 of yacc.c  */
-#line 728 "parser.y"
-    { (yyval.var) = declare_var(check_field_attrs((yyvsp[(3) - (3)].declarator)->var->name, (yyvsp[(1) - (3)].attr_list)),
-                                                               (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE);
-                                                 free((yyvsp[(3) - (3)].declarator));
-                                               }
+#line 732 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = (yyvsp[-1].var); }
+#line 4060 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 245:
     break;
 
   case 245:
-
-/* Line 1806 of yacc.c  */
-#line 732 "parser.y"
-    { var_t *v = make_var(NULL);
-                                                 v->type = (yyvsp[(2) - (2)].type); v->attrs = (yyvsp[(1) - (2)].attr_list);
-                                                 (yyval.var) = v;
-                                               }
+#line 733 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = NULL; }
+#line 4066 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 246:
     break;
 
   case 246:
-
-/* Line 1806 of yacc.c  */
-#line 738 "parser.y"
-    { (yyval.var) = (yyvsp[(1) - (1)].var);
-                                                 if (type_get_type((yyval.var)->type) != TYPE_FUNCTION)
-                                                   error_loc("only methods may be declared inside the methods section of a dispinterface\n");
-                                                 check_function_attrs((yyval.var)->name, (yyval.var)->attrs);
+#line 736 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = declare_var(check_field_attrs((yyvsp[0].declarator)->var->name, (yyvsp[-2].attr_list)),
+                                                               (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE);
+                                                 free((yyvsp[0].declarator));
                                                }
                                                }
+#line 4075 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 247:
     break;
 
   case 247:
-
-/* Line 1806 of yacc.c  */
-#line 747 "parser.y"
-    { (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE);
-                                                 free((yyvsp[(3) - (3)].declarator));
+#line 740 "parser.y" /* yacc.c:1646  */
+    { var_t *v = make_var(NULL);
+                                                 v->type = (yyvsp[0].type); v->attrs = (yyvsp[-1].attr_list);
+                                                 (yyval.var) = v;
                                                }
                                                }
+#line 4084 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 248:
     break;
 
   case 248:
-
-/* Line 1806 of yacc.c  */
-#line 750 "parser.y"
-    { (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), FALSE);
-                                                 free((yyvsp[(2) - (2)].declarator));
+#line 746 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = (yyvsp[0].var);
+                                                 if (type_get_type((yyval.var)->type) != TYPE_FUNCTION)
+                                                   error_loc("only methods may be declared inside the methods section of a dispinterface\n");
+                                                 check_function_attrs((yyval.var)->name, (yyval.var)->attrs);
                                                }
                                                }
+#line 4094 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 249:
     break;
 
   case 249:
-
-/* Line 1806 of yacc.c  */
-#line 755 "parser.y"
-    { (yyval.var) = NULL; }
+#line 755 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = declare_var((yyvsp[-2].attr_list), (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE);
+                                                 free((yyvsp[0].declarator));
+                                               }
+#line 4102 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 251:
-
-/* Line 1806 of yacc.c  */
-#line 759 "parser.y"
-    { (yyval.str) = NULL; }
+  case 250:
+#line 758 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = declare_var(NULL, (yyvsp[-1].declspec), (yyvsp[0].declarator), FALSE);
+                                                 free((yyvsp[0].declarator));
+                                               }
+#line 4110 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 252:
-
-/* Line 1806 of yacc.c  */
-#line 760 "parser.y"
-    { (yyval.str) = (yyvsp[(1) - (1)].str); }
+  case 251:
+#line 763 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = NULL; }
+#line 4116 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 253:
     break;
 
   case 253:
-
-/* Line 1806 of yacc.c  */
-#line 761 "parser.y"
-    { (yyval.str) = (yyvsp[(1) - (1)].str); }
+#line 767 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = NULL; }
+#line 4122 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 254:
     break;
 
   case 254:
-
-/* Line 1806 of yacc.c  */
-#line 764 "parser.y"
-    { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); }
+#line 768 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[0].str); }
+#line 4128 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 255:
     break;
 
   case 255:
-
-/* Line 1806 of yacc.c  */
-#line 766 "parser.y"
-    { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); }
+#line 769 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[0].str); }
+#line 4134 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 256:
     break;
 
   case 256:
-
-/* Line 1806 of yacc.c  */
-#line 769 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 772 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = make_var((yyvsp[0].str)); }
+#line 4140 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 257:
     break;
 
   case 257:
-
-/* Line 1806 of yacc.c  */
-#line 770 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 774 "parser.y" /* yacc.c:1646  */
+    { (yyval.var) = make_var((yyvsp[0].str)); }
+#line 4146 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 259:
-
-/* Line 1806 of yacc.c  */
-#line 772 "parser.y"
-    { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), -1); }
+  case 258:
+#line 777 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4152 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 260:
-
-/* Line 1806 of yacc.c  */
-#line 773 "parser.y"
-    { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), 1); }
+  case 259:
+#line 778 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4158 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 261:
     break;
 
   case 261:
-
-/* Line 1806 of yacc.c  */
-#line 774 "parser.y"
-    { (yyval.type) = type_new_int(TYPE_BASIC_INT, 1); }
+#line 780 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[0].type)), -1); }
+#line 4164 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 262:
     break;
 
   case 262:
-
-/* Line 1806 of yacc.c  */
-#line 775 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 781 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[0].type)), 1); }
+#line 4170 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 263:
     break;
 
   case 263:
-
-/* Line 1806 of yacc.c  */
-#line 776 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 782 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_int(TYPE_BASIC_INT, 1); }
+#line 4176 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 264:
     break;
 
   case 264:
-
-/* Line 1806 of yacc.c  */
-#line 777 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 783 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4182 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 265:
     break;
 
   case 265:
-
-/* Line 1806 of yacc.c  */
-#line 778 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 784 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4188 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 266:
     break;
 
   case 266:
+#line 785 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4194 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 779 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+  case 267:
+#line 786 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4200 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 269:
+  case 268:
+#line 787 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4206 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 786 "parser.y"
+  case 271:
+#line 794 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_INT, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_INT, 0); }
+#line 4212 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 270:
-
-/* Line 1806 of yacc.c  */
-#line 787 "parser.y"
+  case 272:
+#line 795 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_INT16, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_INT16, 0); }
+#line 4218 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 271:
-
-/* Line 1806 of yacc.c  */
-#line 788 "parser.y"
+  case 273:
+#line 796 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_INT8, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_INT8, 0); }
+#line 4224 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 272:
-
-/* Line 1806 of yacc.c  */
-#line 789 "parser.y"
+  case 274:
+#line 797 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_INT32, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_INT32, 0); }
+#line 4230 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 273:
-
-/* Line 1806 of yacc.c  */
-#line 790 "parser.y"
+  case 275:
+#line 798 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_HYPER, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_HYPER, 0); }
+#line 4236 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 274:
-
-/* Line 1806 of yacc.c  */
-#line 791 "parser.y"
+  case 276:
+#line 799 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_INT64, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_INT64, 0); }
+#line 4242 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 275:
-
-/* Line 1806 of yacc.c  */
-#line 792 "parser.y"
+  case 277:
+#line 800 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_CHAR, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_CHAR, 0); }
+#line 4248 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 276:
-
-/* Line 1806 of yacc.c  */
-#line 793 "parser.y"
+  case 278:
+#line 801 "parser.y" /* yacc.c:1646  */
     { (yyval.type) = type_new_int(TYPE_BASIC_INT3264, 0); }
     { (yyval.type) = type_new_int(TYPE_BASIC_INT3264, 0); }
+#line 4254 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 277:
-
-/* Line 1806 of yacc.c  */
-#line 796 "parser.y"
-    { (yyval.type) = type_new_coclass((yyvsp[(2) - (2)].str)); }
+  case 279:
+#line 804 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_coclass((yyvsp[0].str)); }
+#line 4260 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 278:
-
-/* Line 1806 of yacc.c  */
-#line 797 "parser.y"
-    { (yyval.type) = find_type((yyvsp[(2) - (2)].str), 0);
+  case 280:
+#line 805 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type((yyvsp[0].str), NULL, 0);
                                                  if (type_get_type_detect_alias((yyval.type)) != TYPE_COCLASS)
                                                    error_loc("%s was not declared a coclass at %s:%d\n",
                                                  if (type_get_type_detect_alias((yyval.type)) != TYPE_COCLASS)
                                                    error_loc("%s was not declared a coclass at %s:%d\n",
-                                                             (yyvsp[(2) - (2)].str), (yyval.type)->loc_info.input_name,
+                                                             (yyvsp[0].str), (yyval.type)->loc_info.input_name,
                                                              (yyval.type)->loc_info.line_number);
                                                }
                                                              (yyval.type)->loc_info.line_number);
                                                }
+#line 4271 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 279:
-
-/* Line 1806 of yacc.c  */
-#line 805 "parser.y"
-    { (yyval.type) = (yyvsp[(2) - (2)].type);
+  case 281:
+#line 813 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type);
                                                  check_def((yyval.type));
                                                  check_def((yyval.type));
-                                                 (yyval.type)->attrs = check_coclass_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list));
+                                                 (yyval.type)->attrs = check_coclass_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list));
                                                }
                                                }
-    break;
-
-  case 280:
-
-/* Line 1806 of yacc.c  */
-#line 812 "parser.y"
-    { (yyval.type) = type_coclass_define((yyvsp[(1) - (5)].type), (yyvsp[(3) - (5)].ifref_list)); }
-    break;
-
-  case 281:
-
-/* Line 1806 of yacc.c  */
-#line 815 "parser.y"
-    { (yyval.type) = NULL; }
+#line 4280 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 282:
     break;
 
   case 282:
-
-/* Line 1806 of yacc.c  */
-#line 818 "parser.y"
-    { (yyval.ifref_list) = NULL; }
+#line 820 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_coclass_define((yyvsp[-4].type), (yyvsp[-2].ifref_list)); }
+#line 4286 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 283:
     break;
 
   case 283:
-
-/* Line 1806 of yacc.c  */
-#line 819 "parser.y"
-    { (yyval.ifref_list) = append_ifref( (yyvsp[(1) - (2)].ifref_list), (yyvsp[(2) - (2)].ifref) ); }
+#line 823 "parser.y" /* yacc.c:1646  */
+    { (yyval.str) = (yyvsp[0].str); }
+#line 4292 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 284:
     break;
 
   case 284:
-
-/* Line 1806 of yacc.c  */
-#line 823 "parser.y"
-    { (yyval.ifref) = make_ifref((yyvsp[(2) - (2)].type)); (yyval.ifref)->attrs = (yyvsp[(1) - (2)].attr_list); }
+#line 826 "parser.y" /* yacc.c:1646  */
+    { (yyval.ifref_list) = NULL; }
+#line 4298 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 285:
     break;
 
   case 285:
-
-/* Line 1806 of yacc.c  */
-#line 826 "parser.y"
-    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); }
+#line 827 "parser.y" /* yacc.c:1646  */
+    { (yyval.ifref_list) = append_ifref( (yyvsp[-1].ifref_list), (yyvsp[0].ifref) ); }
+#line 4304 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 286:
     break;
 
   case 286:
-
-/* Line 1806 of yacc.c  */
-#line 827 "parser.y"
-    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); }
+#line 831 "parser.y" /* yacc.c:1646  */
+    { (yyval.ifref) = make_ifref((yyvsp[0].type)); (yyval.ifref)->attrs = (yyvsp[-1].attr_list); }
+#line 4310 "parser.tab.c" /* yacc.c:1646  */
     break;
     break;
-
-  case 287:
-
-/* Line 1806 of yacc.c  */
-#line 830 "parser.y"
-    { attr_t *attrs;
-                                                 (yyval.type) = (yyvsp[(2) - (2)].type);
-                                                 check_def((yyval.type));
-                                                 attrs = make_attr(ATTR_DISPINTERFACE);
-                                                 (yyval.type)->attrs = append_attr( check_dispiface_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)), attrs );
-                                                 (yyval.type)->defined = TRUE;
-                                               }
+
+  case 287:
+#line 834 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[0].str), current_namespace, 0); }
+#line 4316 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 288:
     break;
 
   case 288:
-
-/* Line 1806 of yacc.c  */
-#line 839 "parser.y"
-    { (yyval.var_list) = NULL; }
+#line 835 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[0].str), current_namespace, 0); }
+#line 4322 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 289:
     break;
 
   case 289:
-
-/* Line 1806 of yacc.c  */
-#line 840 "parser.y"
-    { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); }
+#line 838 "parser.y" /* yacc.c:1646  */
+    { attr_t *attrs;
+                                                 (yyval.type) = (yyvsp[0].type);
+                                                 check_def((yyval.type));
+                                                 attrs = make_attr(ATTR_DISPINTERFACE);
+                                                 (yyval.type)->attrs = append_attr( check_dispiface_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list)), attrs );
+                                                 (yyval.type)->defined = TRUE;
+                                               }
+#line 4334 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 290:
     break;
 
   case 290:
-
-/* Line 1806 of yacc.c  */
-#line 843 "parser.y"
+#line 847 "parser.y" /* yacc.c:1646  */
     { (yyval.var_list) = NULL; }
     { (yyval.var_list) = NULL; }
+#line 4340 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 291:
     break;
 
   case 291:
-
-/* Line 1806 of yacc.c  */
-#line 844 "parser.y"
-    { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); }
+#line 848 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[-1].var) ); }
+#line 4346 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 292:
     break;
 
   case 292:
-
-/* Line 1806 of yacc.c  */
-#line 850 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (5)].type);
-                                                 type_dispinterface_define((yyval.type), (yyvsp[(3) - (5)].var_list), (yyvsp[(4) - (5)].var_list));
-                                               }
+#line 851 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = NULL; }
+#line 4352 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 293:
     break;
 
   case 293:
-
-/* Line 1806 of yacc.c  */
-#line 854 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (5)].type);
-                                                 type_dispinterface_define_from_iface((yyval.type), (yyvsp[(3) - (5)].type));
-                                               }
+#line 852 "parser.y" /* yacc.c:1646  */
+    { (yyval.var_list) = append_var( (yyvsp[-2].var_list), (yyvsp[-1].var) ); }
+#line 4358 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 294:
     break;
 
   case 294:
-
-/* Line 1806 of yacc.c  */
-#line 859 "parser.y"
-    { (yyval.type) = NULL; }
+#line 858 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-4].type);
+                                                 type_dispinterface_define((yyval.type), (yyvsp[-2].var_list), (yyvsp[-1].var_list));
+                                               }
+#line 4366 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 295:
     break;
 
   case 295:
-
-/* Line 1806 of yacc.c  */
-#line 860 "parser.y"
-    { (yyval.type) = find_type_or_error2((yyvsp[(2) - (2)].str), 0); }
+#line 862 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-4].type);
+                                                 type_dispinterface_define_from_iface((yyval.type), (yyvsp[-2].type));
+                                               }
+#line 4374 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 296:
     break;
 
   case 296:
-
-/* Line 1806 of yacc.c  */
-#line 863 "parser.y"
-    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); }
+#line 867 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = NULL; }
+#line 4380 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 297:
     break;
 
   case 297:
-
-/* Line 1806 of yacc.c  */
-#line 864 "parser.y"
-    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); }
+#line 868 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error2((yyvsp[0].str), 0); }
+#line 4386 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 298:
     break;
 
   case 298:
-
-/* Line 1806 of yacc.c  */
-#line 867 "parser.y"
-    { (yyval.ifinfo).interface = (yyvsp[(2) - (2)].type);
-                                                 (yyval.ifinfo).old_pointer_default = pointer_default;
-                                                 if (is_attr((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT))
-                                                   pointer_default = get_attrv((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT);
-                                                 check_def((yyvsp[(2) - (2)].type));
-                                                 (yyvsp[(2) - (2)].type)->attrs = check_iface_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list));
-                                                 (yyvsp[(2) - (2)].type)->defined = TRUE;
-                                               }
+#line 871 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[0].str), current_namespace, 0); }
+#line 4392 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 299:
     break;
 
   case 299:
-
-/* Line 1806 of yacc.c  */
-#line 878 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (6)].ifinfo).interface;
-                                                 if((yyval.type) == (yyvsp[(2) - (6)].type))
-                                                   error_loc("Interface can't inherit from itself\n");
-                                                 type_interface_define((yyval.type), (yyvsp[(2) - (6)].type), (yyvsp[(4) - (6)].stmt_list));
-                                                 pointer_default = (yyvsp[(1) - (6)].ifinfo).old_pointer_default;
-                                               }
+#line 872 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[0].str), current_namespace, 0); }
+#line 4398 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 300:
     break;
 
   case 300:
-
-/* Line 1806 of yacc.c  */
-#line 888 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (8)].ifinfo).interface;
-                                                 type_interface_define((yyval.type), find_type_or_error2((yyvsp[(3) - (8)].str), 0), (yyvsp[(6) - (8)].stmt_list));
-                                                 pointer_default = (yyvsp[(1) - (8)].ifinfo).old_pointer_default;
+#line 875 "parser.y" /* yacc.c:1646  */
+    { (yyval.ifinfo).interface = (yyvsp[0].type);
+                                                 (yyval.ifinfo).old_pointer_default = pointer_default;
+                                                 if (is_attr((yyvsp[-1].attr_list), ATTR_POINTERDEFAULT))
+                                                   pointer_default = get_attrv((yyvsp[-1].attr_list), ATTR_POINTERDEFAULT);
+                                                 check_def((yyvsp[0].type));
+                                                 (yyvsp[0].type)->attrs = check_iface_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list));
+                                                 (yyvsp[0].type)->defined = TRUE;
                                                }
                                                }
+#line 4411 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 301:
     break;
 
   case 301:
-
-/* Line 1806 of yacc.c  */
-#line 892 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (2)].type); }
+#line 886 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-5].ifinfo).interface;
+                                                 if((yyval.type) == (yyvsp[-4].type))
+                                                   error_loc("Interface can't inherit from itself\n");
+                                                 type_interface_define((yyval.type), (yyvsp[-4].type), (yyvsp[-2].stmt_list));
+                                                 pointer_default = (yyvsp[-5].ifinfo).old_pointer_default;
+                                               }
+#line 4422 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 302:
     break;
 
   case 302:
-
-/* Line 1806 of yacc.c  */
-#line 896 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (2)].type); }
+#line 896 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-7].ifinfo).interface;
+                                                 type_interface_define((yyval.type), find_type_or_error2((yyvsp[-5].str), 0), (yyvsp[-2].stmt_list));
+                                                 pointer_default = (yyvsp[-7].ifinfo).old_pointer_default;
+                                               }
+#line 4431 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 303:
     break;
 
   case 303:
-
-/* Line 1806 of yacc.c  */
-#line 897 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (2)].type); }
+#line 900 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-1].type); }
+#line 4437 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 304:
     break;
 
   case 304:
-
-/* Line 1806 of yacc.c  */
-#line 900 "parser.y"
-    { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); }
+#line 904 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-1].type); }
+#line 4443 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 305:
     break;
 
   case 305:
-
-/* Line 1806 of yacc.c  */
-#line 901 "parser.y"
-    { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); }
+#line 905 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-1].type); }
+#line 4449 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 306:
     break;
 
   case 306:
-
-/* Line 1806 of yacc.c  */
-#line 904 "parser.y"
-    { (yyval.type) = (yyvsp[(2) - (2)].type);
-                                                 (yyval.type)->attrs = check_module_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list));
-                                               }
+#line 908 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_module((yyvsp[0].str)); }
+#line 4455 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 307:
     break;
 
   case 307:
-
-/* Line 1806 of yacc.c  */
-#line 910 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (5)].type);
-                                                  type_module_define((yyval.type), (yyvsp[(3) - (5)].stmt_list));
-                                               }
+#line 909 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_module((yyvsp[0].str)); }
+#line 4461 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 308:
     break;
 
   case 308:
-
-/* Line 1806 of yacc.c  */
-#line 916 "parser.y"
-    { (yyval.stgclass) = STG_EXTERN; }
+#line 912 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type);
+                                                 (yyval.type)->attrs = check_module_attrs((yyvsp[0].type)->name, (yyvsp[-1].attr_list));
+                                               }
+#line 4469 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 309:
     break;
 
   case 309:
-
-/* Line 1806 of yacc.c  */
-#line 917 "parser.y"
-    { (yyval.stgclass) = STG_STATIC; }
+#line 918 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[-4].type);
+                                                  type_module_define((yyval.type), (yyvsp[-2].stmt_list));
+                                               }
+#line 4477 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 310:
     break;
 
   case 310:
-
-/* Line 1806 of yacc.c  */
-#line 918 "parser.y"
-    { (yyval.stgclass) = STG_REGISTER; }
+#line 924 "parser.y" /* yacc.c:1646  */
+    { (yyval.stgclass) = STG_EXTERN; }
+#line 4483 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 311:
     break;
 
   case 311:
-
-/* Line 1806 of yacc.c  */
-#line 922 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_INLINE); }
+#line 925 "parser.y" /* yacc.c:1646  */
+    { (yyval.stgclass) = STG_STATIC; }
+#line 4489 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 312:
     break;
 
   case 312:
-
-/* Line 1806 of yacc.c  */
-#line 926 "parser.y"
-    { (yyval.attr) = make_attr(ATTR_CONST); }
+#line 926 "parser.y" /* yacc.c:1646  */
+    { (yyval.stgclass) = STG_REGISTER; }
+#line 4495 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 313:
     break;
 
   case 313:
-
-/* Line 1806 of yacc.c  */
-#line 929 "parser.y"
-    { (yyval.attr_list) = NULL; }
+#line 930 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_INLINE); }
+#line 4501 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 314:
     break;
 
   case 314:
-
-/* Line 1806 of yacc.c  */
-#line 930 "parser.y"
-    { (yyval.attr_list) = append_attr((yyvsp[(1) - (2)].attr_list), (yyvsp[(2) - (2)].attr)); }
+#line 934 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr) = make_attr(ATTR_CONST); }
+#line 4507 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 315:
     break;
 
   case 315:
-
-/* Line 1806 of yacc.c  */
-#line 933 "parser.y"
-    { (yyval.declspec) = make_decl_spec((yyvsp[(1) - (2)].type), (yyvsp[(2) - (2)].declspec), NULL, NULL, STG_NONE); }
+#line 937 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = NULL; }
+#line 4513 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 316:
     break;
 
   case 316:
-
-/* Line 1806 of yacc.c  */
-#line 935 "parser.y"
-    { (yyval.declspec) = make_decl_spec((yyvsp[(2) - (3)].type), (yyvsp[(1) - (3)].declspec), (yyvsp[(3) - (3)].declspec), NULL, STG_NONE); }
+#line 938 "parser.y" /* yacc.c:1646  */
+    { (yyval.attr_list) = append_attr((yyvsp[-1].attr_list), (yyvsp[0].attr)); }
+#line 4519 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 317:
     break;
 
   case 317:
-
-/* Line 1806 of yacc.c  */
-#line 938 "parser.y"
-    { (yyval.declspec) = NULL; }
+#line 941 "parser.y" /* yacc.c:1646  */
+    { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[0].declspec), NULL, NULL, STG_NONE); }
+#line 4525 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 319:
-
-/* Line 1806 of yacc.c  */
-#line 943 "parser.y"
-    { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); }
+  case 318:
+#line 943 "parser.y" /* yacc.c:1646  */
+    { (yyval.declspec) = make_decl_spec((yyvsp[-1].type), (yyvsp[-2].declspec), (yyvsp[0].declspec), NULL, STG_NONE); }
+#line 4531 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 320:
-
-/* Line 1806 of yacc.c  */
-#line 944 "parser.y"
-    { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); }
+  case 319:
+#line 946 "parser.y" /* yacc.c:1646  */
+    { (yyval.declspec) = NULL; }
+#line 4537 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 321:
     break;
 
   case 321:
-
-/* Line 1806 of yacc.c  */
-#line 945 "parser.y"
-    { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, NULL, (yyvsp[(1) - (2)].stgclass)); }
+#line 951 "parser.y" /* yacc.c:1646  */
+    { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, (yyvsp[-1].attr), STG_NONE); }
+#line 4543 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 322:
     break;
 
   case 322:
-
-/* Line 1806 of yacc.c  */
-#line 950 "parser.y"
-    { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); }
+#line 952 "parser.y" /* yacc.c:1646  */
+    { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, (yyvsp[-1].attr), STG_NONE); }
+#line 4549 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 323:
     break;
 
   case 323:
-
-/* Line 1806 of yacc.c  */
-#line 951 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str)));
-                                                          else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); }
+#line 953 "parser.y" /* yacc.c:1646  */
+    { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[0].declspec), NULL, NULL, (yyvsp[-1].stgclass)); }
+#line 4555 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 325:
-
-/* Line 1806 of yacc.c  */
-#line 957 "parser.y"
-    { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); }
+  case 324:
+#line 958 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[-1].attr_list))); }
+#line 4561 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 326:
-
-/* Line 1806 of yacc.c  */
-#line 958 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); }
+  case 325:
+#line 959 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str)));
+                                                          else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); }
+#line 4568 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 327:
     break;
 
   case 327:
-
-/* Line 1806 of yacc.c  */
-#line 959 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); }
+#line 965 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator((yyvsp[0].var)); }
+#line 4574 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 328:
     break;
 
   case 328:
-
-/* Line 1806 of yacc.c  */
-#line 960 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (4)].declarator);
-                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list)));
-                                                 (yyval.declarator)->type = NULL;
-                                               }
+#line 966 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); }
+#line 4580 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 329:
     break;
 
   case 329:
-
-/* Line 1806 of yacc.c  */
-#line 969 "parser.y"
-    { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); }
+#line 967 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); }
+#line 4586 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 330:
     break;
 
   case 330:
-
-/* Line 1806 of yacc.c  */
-#line 970 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str)));
-                                                          else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); }
+#line 968 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-3].declarator);
+                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[-1].var_list)));
+                                                 (yyval.declarator)->type = NULL;
+                                               }
+#line 4595 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 332:
-
-/* Line 1806 of yacc.c  */
-#line 978 "parser.y"
-    { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); }
+  case 331:
+#line 977 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[-1].attr_list))); }
+#line 4601 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 333:
-
-/* Line 1806 of yacc.c  */
-#line 979 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str)));
-                                                          else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); }
+  case 332:
+#line 978 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str)));
+                                                          else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); }
+#line 4608 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 334:
     break;
 
   case 334:
-
-/* Line 1806 of yacc.c  */
-#line 984 "parser.y"
-    { (yyval.declarator) = make_declarator(NULL); }
+#line 986 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[-1].attr_list))); }
+#line 4614 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 336:
-
-/* Line 1806 of yacc.c  */
-#line 990 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); }
+  case 335:
+#line 987 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str)));
+                                                          else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); }
+#line 4621 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 337:
-
-/* Line 1806 of yacc.c  */
-#line 991 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); }
+  case 336:
+#line 992 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator(NULL); }
+#line 4627 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 338:
     break;
 
   case 338:
-
-/* Line 1806 of yacc.c  */
-#line 992 "parser.y"
-    { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); }
+#line 998 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); }
+#line 4633 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 339:
     break;
 
   case 339:
-
-/* Line 1806 of yacc.c  */
-#line 994 "parser.y"
-    { (yyval.declarator) = make_declarator(NULL);
-                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list)));
-                                                 (yyval.declarator)->type = NULL;
-                                               }
+#line 999 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); }
+#line 4639 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 340:
     break;
 
   case 340:
-
-/* Line 1806 of yacc.c  */
-#line 999 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (4)].declarator);
-                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list)));
-                                                 (yyval.declarator)->type = NULL;
-                                               }
+#line 1000 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); }
+#line 4645 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 341:
     break;
 
   case 341:
-
-/* Line 1806 of yacc.c  */
-#line 1008 "parser.y"
-    { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); }
+#line 1002 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator(NULL);
+                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[-1].var_list)));
+                                                 (yyval.declarator)->type = NULL;
+                                               }
+#line 4654 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 342:
     break;
 
   case 342:
-
-/* Line 1806 of yacc.c  */
-#line 1009 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); }
+#line 1007 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-3].declarator);
+                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[-1].var_list)));
+                                                 (yyval.declarator)->type = NULL;
+                                               }
+#line 4663 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 344:
-
-/* Line 1806 of yacc.c  */
-#line 1016 "parser.y"
-    { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); }
+  case 343:
+#line 1016 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[-1].attr_list))); }
+#line 4669 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 345:
-
-/* Line 1806 of yacc.c  */
-#line 1017 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); }
+  case 344:
+#line 1017 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); }
+#line 4675 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 346:
     break;
 
   case 346:
-
-/* Line 1806 of yacc.c  */
-#line 1021 "parser.y"
-    { (yyval.declarator) = make_declarator(NULL); }
+#line 1024 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[-1].attr_list))); }
+#line 4681 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 348:
-
-/* Line 1806 of yacc.c  */
-#line 1029 "parser.y"
-    { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); }
+  case 347:
+#line 1025 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[-1].str))); }
+#line 4687 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
-  case 349:
-
-/* Line 1806 of yacc.c  */
-#line 1030 "parser.y"
-    { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); }
+  case 348:
+#line 1029 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator(NULL); }
+#line 4693 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 350:
     break;
 
   case 350:
-
-/* Line 1806 of yacc.c  */
-#line 1031 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); }
+#line 1037 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator((yyvsp[0].var)); }
+#line 4699 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 351:
     break;
 
   case 351:
-
-/* Line 1806 of yacc.c  */
-#line 1032 "parser.y"
-    { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); }
+#line 1038 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); }
+#line 4705 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 352:
     break;
 
   case 352:
-
-/* Line 1806 of yacc.c  */
-#line 1034 "parser.y"
-    { (yyval.declarator) = make_declarator(NULL);
-                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list)));
-                                                 (yyval.declarator)->type = NULL;
-                                               }
+#line 1039 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); }
+#line 4711 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 353:
     break;
 
   case 353:
-
-/* Line 1806 of yacc.c  */
-#line 1039 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (4)].declarator);
-                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list)));
-                                                 (yyval.declarator)->type = NULL;
-                                               }
+#line 1040 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[0].expr)); }
+#line 4717 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 354:
     break;
 
   case 354:
-
-/* Line 1806 of yacc.c  */
-#line 1046 "parser.y"
-    { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); }
+#line 1042 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = make_declarator(NULL);
+                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[-1].var_list)));
+                                                 (yyval.declarator)->type = NULL;
+                                               }
+#line 4726 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 355:
     break;
 
   case 355:
-
-/* Line 1806 of yacc.c  */
-#line 1047 "parser.y"
-    { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); }
+#line 1047 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-3].declarator);
+                                                 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[-1].var_list)));
+                                                 (yyval.declarator)->type = NULL;
+                                               }
+#line 4735 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 356:
     break;
 
   case 356:
-
-/* Line 1806 of yacc.c  */
-#line 1050 "parser.y"
-    { (yyval.expr) = NULL; }
+#line 1054 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[0].declarator) ); }
+#line 4741 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 357:
     break;
 
   case 357:
-
-/* Line 1806 of yacc.c  */
-#line 1051 "parser.y"
-    { (yyval.expr) = (yyvsp[(2) - (2)].expr); }
+#line 1055 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator_list) = append_declarator( (yyvsp[-2].declarator_list), (yyvsp[0].declarator) ); }
+#line 4747 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 358:
     break;
 
   case 358:
-
-/* Line 1806 of yacc.c  */
-#line 1054 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->bits = (yyvsp[(2) - (2)].expr);
-                                                 if (!(yyval.declarator)->bits && !(yyval.declarator)->var->name)
-                                                   error_loc("unnamed fields are not allowed\n");
-                                               }
+#line 1058 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = NULL; }
+#line 4753 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 359:
     break;
 
   case 359:
-
-/* Line 1806 of yacc.c  */
-#line 1061 "parser.y"
-    { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); }
+#line 1059 "parser.y" /* yacc.c:1646  */
+    { (yyval.expr) = (yyvsp[0].expr); }
+#line 4759 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 360:
     break;
 
   case 360:
-
-/* Line 1806 of yacc.c  */
-#line 1063 "parser.y"
-    { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); }
+#line 1062 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-1].declarator); (yyval.declarator)->bits = (yyvsp[0].expr);
+                                                 if (!(yyval.declarator)->bits && !(yyval.declarator)->var->name)
+                                                   error_loc("unnamed fields are not allowed\n");
+                                               }
+#line 4768 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 361:
     break;
 
   case 361:
-
-/* Line 1806 of yacc.c  */
-#line 1067 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (1)].declarator); }
+#line 1069 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[0].declarator) ); }
+#line 4774 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 362:
     break;
 
   case 362:
-
-/* Line 1806 of yacc.c  */
-#line 1068 "parser.y"
-    { (yyval.declarator) = (yyvsp[(1) - (3)].declarator); (yyvsp[(1) - (3)].declarator)->var->eval = (yyvsp[(3) - (3)].expr); }
+#line 1071 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator_list) = append_declarator( (yyvsp[-2].declarator_list), (yyvsp[0].declarator) ); }
+#line 4780 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 363:
     break;
 
   case 363:
-
-/* Line 1806 of yacc.c  */
-#line 1072 "parser.y"
-    { (yyval.num) = THREADING_APARTMENT; }
+#line 1075 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[0].declarator); }
+#line 4786 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 364:
     break;
 
   case 364:
-
-/* Line 1806 of yacc.c  */
-#line 1073 "parser.y"
-    { (yyval.num) = THREADING_NEUTRAL; }
+#line 1076 "parser.y" /* yacc.c:1646  */
+    { (yyval.declarator) = (yyvsp[-2].declarator); (yyvsp[-2].declarator)->var->eval = (yyvsp[0].expr); }
+#line 4792 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 365:
     break;
 
   case 365:
-
-/* Line 1806 of yacc.c  */
-#line 1074 "parser.y"
-    { (yyval.num) = THREADING_SINGLE; }
+#line 1080 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = THREADING_APARTMENT; }
+#line 4798 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 366:
     break;
 
   case 366:
-
-/* Line 1806 of yacc.c  */
-#line 1075 "parser.y"
-    { (yyval.num) = THREADING_FREE; }
+#line 1081 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = THREADING_NEUTRAL; }
+#line 4804 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 367:
     break;
 
   case 367:
-
-/* Line 1806 of yacc.c  */
-#line 1076 "parser.y"
-    { (yyval.num) = THREADING_BOTH; }
+#line 1082 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = THREADING_SINGLE; }
+#line 4810 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 368:
     break;
 
   case 368:
-
-/* Line 1806 of yacc.c  */
-#line 1080 "parser.y"
-    { (yyval.num) = RPC_FC_RP; }
+#line 1083 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = THREADING_FREE; }
+#line 4816 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 369:
     break;
 
   case 369:
-
-/* Line 1806 of yacc.c  */
-#line 1081 "parser.y"
-    { (yyval.num) = RPC_FC_UP; }
+#line 1084 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = THREADING_BOTH; }
+#line 4822 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 370:
     break;
 
   case 370:
-
-/* Line 1806 of yacc.c  */
-#line 1082 "parser.y"
-    { (yyval.num) = RPC_FC_FP; }
+#line 1088 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = RPC_FC_RP; }
+#line 4828 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 371:
     break;
 
   case 371:
-
-/* Line 1806 of yacc.c  */
-#line 1085 "parser.y"
-    { (yyval.type) = type_new_struct((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); }
+#line 1089 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = RPC_FC_UP; }
+#line 4834 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 372:
     break;
 
   case 372:
-
-/* Line 1806 of yacc.c  */
-#line 1088 "parser.y"
-    { (yyval.type) = type_new_void(); }
+#line 1090 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = RPC_FC_FP; }
+#line 4840 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 373:
     break;
 
   case 373:
-
-/* Line 1806 of yacc.c  */
-#line 1089 "parser.y"
-    { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); }
+#line 1093 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_struct((yyvsp[-3].str), current_namespace, TRUE, (yyvsp[-1].var_list)); }
+#line 4846 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 374:
     break;
 
   case 374:
-
-/* Line 1806 of yacc.c  */
-#line 1090 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (1)].type); }
+#line 1096 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_void(); }
+#line 4852 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 375:
     break;
 
   case 375:
-
-/* Line 1806 of yacc.c  */
-#line 1091 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (1)].type); }
+#line 1097 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = find_type_or_error((yyvsp[0].str), 0); }
+#line 4858 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 376:
     break;
 
   case 376:
-
-/* Line 1806 of yacc.c  */
-#line 1092 "parser.y"
-    { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); }
+#line 1098 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); }
+#line 4864 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 377:
     break;
 
   case 377:
-
-/* Line 1806 of yacc.c  */
-#line 1093 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (1)].type); }
+#line 1099 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); }
+#line 4870 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 378:
     break;
 
   case 378:
-
-/* Line 1806 of yacc.c  */
-#line 1094 "parser.y"
-    { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); }
+#line 1100 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_enum((yyvsp[0].str), current_namespace, FALSE, NULL); }
+#line 4876 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 379:
     break;
 
   case 379:
-
-/* Line 1806 of yacc.c  */
-#line 1095 "parser.y"
-    { (yyval.type) = (yyvsp[(1) - (1)].type); }
+#line 1101 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); }
+#line 4882 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 380:
     break;
 
   case 380:
-
-/* Line 1806 of yacc.c  */
-#line 1096 "parser.y"
-    { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); }
+#line 1102 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_struct((yyvsp[0].str), current_namespace, FALSE, NULL); }
+#line 4888 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 381:
     break;
 
   case 381:
-
-/* Line 1806 of yacc.c  */
-#line 1097 "parser.y"
-    { (yyval.type) = make_safearray((yyvsp[(3) - (4)].type)); }
+#line 1103 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = (yyvsp[0].type); }
+#line 4894 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 382:
     break;
 
   case 382:
-
-/* Line 1806 of yacc.c  */
-#line 1101 "parser.y"
-    { (yyvsp[(1) - (5)].attr_list) = append_attribs((yyvsp[(1) - (5)].attr_list), (yyvsp[(3) - (5)].attr_list));
-                                                 reg_typedefs((yyvsp[(4) - (5)].declspec), (yyvsp[(5) - (5)].declarator_list), check_typedef_attrs((yyvsp[(1) - (5)].attr_list)));
-                                                 (yyval.statement) = make_statement_typedef((yyvsp[(5) - (5)].declarator_list));
-                                               }
+#line 1104 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_nonencapsulated_union((yyvsp[0].str), FALSE, NULL); }
+#line 4900 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 383:
     break;
 
   case 383:
-
-/* Line 1806 of yacc.c  */
-#line 1108 "parser.y"
-    { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); }
+#line 1105 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = make_safearray((yyvsp[-1].type)); }
+#line 4906 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 384:
     break;
 
   case 384:
-
-/* Line 1806 of yacc.c  */
-#line 1111 "parser.y"
-    { (yyval.type) = type_new_encapsulated_union((yyvsp[(2) - (10)].str), (yyvsp[(5) - (10)].var), (yyvsp[(7) - (10)].var), (yyvsp[(9) - (10)].var_list)); }
+#line 1109 "parser.y" /* yacc.c:1646  */
+    { (yyvsp[-4].attr_list) = append_attribs((yyvsp[-4].attr_list), (yyvsp[-2].attr_list));
+                                                 reg_typedefs((yyvsp[-1].declspec), (yyvsp[0].declarator_list), check_typedef_attrs((yyvsp[-4].attr_list)));
+                                                 (yyval.statement) = make_statement_typedef((yyvsp[0].declarator_list));
+                                               }
+#line 4915 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 385:
     break;
 
   case 385:
-
-/* Line 1806 of yacc.c  */
-#line 1115 "parser.y"
-    { (yyval.num) = MAKEVERSION((yyvsp[(1) - (1)].num), 0); }
+#line 1116 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_nonencapsulated_union((yyvsp[-3].str), TRUE, (yyvsp[-1].var_list)); }
+#line 4921 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 386:
     break;
 
   case 386:
-
-/* Line 1806 of yacc.c  */
-#line 1116 "parser.y"
-    { (yyval.num) = MAKEVERSION((yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num)); }
+#line 1119 "parser.y" /* yacc.c:1646  */
+    { (yyval.type) = type_new_encapsulated_union((yyvsp[-8].str), (yyvsp[-5].var), (yyvsp[-3].var), (yyvsp[-1].var_list)); }
+#line 4927 "parser.tab.c" /* yacc.c:1646  */
     break;
 
   case 387:
     break;
 
   case 387:
+#line 1123 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = MAKEVERSION((yyvsp[0].num), 0); }
+#line 4933 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
-/* Line 1806 of yacc.c  */
-#line 1117 "parser.y"
-    { (yyval.num) = (yyvsp[(1) - (1)].num); }
+  case 388:
+#line 1124 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = MAKEVERSION((yyvsp[-2].num), (yyvsp[0].num)); }
+#line 4939 "parser.tab.c" /* yacc.c:1646  */
     break;
 
     break;
 
+  case 389:
+#line 1125 "parser.y" /* yacc.c:1646  */
+    { (yyval.num) = (yyvsp[0].num); }
+#line 4945 "parser.tab.c" /* yacc.c:1646  */
+    break;
 
 
 
 
-/* Line 1806 of yacc.c  */
-#line 5590 "parser.tab.c"
+#line 4949 "parser.tab.c" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -5608,7 +4967,7 @@ yyreduce:
 
   *++yyvsp = yyval;
 
 
   *++yyvsp = yyval;
 
-  /* Now `shift' the result of the reduction.  Determine what state
+  /* Now 'shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
 
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
 
@@ -5623,9 +4982,9 @@ yyreduce:
   goto yynewstate;
 
 
   goto yynewstate;
 
 
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error |
+`--------------------------------------*/
 yyerrlab:
   /* Make sure we have latest lookahead translation.  See comments at
      user semantic actions for why this is necessary.  */
 yyerrlab:
   /* Make sure we have latest lookahead translation.  See comments at
      user semantic actions for why this is necessary.  */
@@ -5676,20 +5035,20 @@ yyerrlab:
   if (yyerrstatus == 3)
     {
       /* If just tried and failed to reuse lookahead token after an
   if (yyerrstatus == 3)
     {
       /* If just tried and failed to reuse lookahead token after an
-        error, discard it.  */
+         error, discard it.  */
 
       if (yychar <= YYEOF)
 
       if (yychar <= YYEOF)
-       {
-         /* Return failure if at end of input.  */
-         if (yychar == YYEOF)
-           YYABORT;
-       }
+        {
+          /* Return failure if at end of input.  */
+          if (yychar == YYEOF)
+            YYABORT;
+        }
       else
       else
-       {
-         yydestruct ("Error: discarding",
-                     yytoken, &yylval);
-         yychar = YYEMPTY;
-       }
+        {
+          yydestruct ("Error: discarding",
+                      yytoken, &yylval);
+          yychar = YYEMPTY;
+        }
     }
 
   /* Else will try to reuse lookahead token after shifting the error
     }
 
   /* Else will try to reuse lookahead token after shifting the error
@@ -5708,7 +5067,7 @@ yyerrorlab:
   if (/*CONSTCOND*/ 0)
      goto yyerrorlab;
 
   if (/*CONSTCOND*/ 0)
      goto yyerrorlab;
 
-  /* Do not reclaim the symbols of the rule which action triggered
+  /* Do not reclaim the symbols of the rule whose action triggered
      this YYERROR.  */
   YYPOPSTACK (yylen);
   yylen = 0;
      this YYERROR.  */
   YYPOPSTACK (yylen);
   yylen = 0;
@@ -5721,35 +5080,37 @@ yyerrorlab:
 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
 `-------------------------------------------------------------*/
 yyerrlab1:
 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
 `-------------------------------------------------------------*/
 yyerrlab1:
-  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
+  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
 
   for (;;)
     {
       yyn = yypact[yystate];
       if (!yypact_value_is_default (yyn))
 
   for (;;)
     {
       yyn = yypact[yystate];
       if (!yypact_value_is_default (yyn))
-       {
-         yyn += YYTERROR;
-         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-           {
-             yyn = yytable[yyn];
-             if (0 < yyn)
-               break;
-           }
-       }
+        {
+          yyn += YYTERROR;
+          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+            {
+              yyn = yytable[yyn];
+              if (0 < yyn)
+                break;
+            }
+        }
 
       /* Pop the current state because it cannot handle the error token.  */
       if (yyssp == yyss)
 
       /* Pop the current state because it cannot handle the error token.  */
       if (yyssp == yyss)
-       YYABORT;
+        YYABORT;
 
 
       yydestruct ("Error: popping",
 
 
       yydestruct ("Error: popping",
-                 yystos[yystate], yyvsp);
+                  yystos[yystate], yyvsp);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
 
   /* Shift the error token.  */
 
 
   /* Shift the error token.  */
@@ -5773,7 +5134,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
   yyresult = 1;
   goto yyreturn;
 
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -5792,14 +5153,14 @@ yyreturn:
       yydestruct ("Cleanup: discarding lookahead",
                   yytoken, &yylval);
     }
       yydestruct ("Cleanup: discarding lookahead",
                   yytoken, &yylval);
     }
-  /* Do not reclaim the symbols of the rule which action triggered
+  /* Do not reclaim the symbols of the rule whose action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
   YY_STACK_PRINT (yyss, yyssp);
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
   YY_STACK_PRINT (yyss, yyssp);
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-                 yystos[*yyssp], yyvsp);
+                  yystos[*yyssp], yyvsp);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
@@ -5810,25 +5171,20 @@ yyreturn:
   if (yymsg != yymsgbuf)
     YYSTACK_FREE (yymsg);
 #endif
   if (yymsg != yymsgbuf)
     YYSTACK_FREE (yymsg);
 #endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
+  return yyresult;
 }
 }
-
-
-
-/* Line 2067 of yacc.c  */
-#line 1120 "parser.y"
+#line 1128 "parser.y" /* yacc.c:1906  */
 
 
 static void decl_builtin_basic(const char *name, enum type_basic_type type)
 {
   type_t *t = type_new_basic(type);
 
 
 static void decl_builtin_basic(const char *name, enum type_basic_type type)
 {
   type_t *t = type_new_basic(type);
-  reg_type(t, name, 0);
+  reg_type(t, name, NULL, 0);
 }
 
 static void decl_builtin_alias(const char *name, type_t *t)
 {
 }
 
 static void decl_builtin_alias(const char *name, type_t *t)
 {
-  reg_type(type_new_alias(t, name), name, 0);
+  reg_type(type_new_alias(t, name), name, NULL, 0);
 }
 
 void init_types(void)
 }
 
 void init_types(void)
@@ -6432,8 +5788,6 @@ static typelib_t *make_library(const char *name, const attr_list_t *attrs)
     return typelib;
 }
 
     return typelib;
 }
 
-#define HASHMAX 64
-
 static int hash_ident(const char *name)
 {
   const char *p = name;
 static int hash_ident(const char *name)
 {
   const char *p = name;
@@ -6448,6 +5802,41 @@ static int hash_ident(const char *name)
 
 /***** type repository *****/
 
 
 /***** type repository *****/
 
+static struct namespace *find_sub_namespace(struct namespace *namespace, const char *name)
+{
+  struct namespace *cur;
+
+  LIST_FOR_EACH_ENTRY(cur, &namespace->children, struct namespace, entry) {
+    if(!strcmp(cur->name, name))
+      return cur;
+  }
+
+  return NULL;
+}
+
+static void push_namespace(const char *name)
+{
+  struct namespace *namespace;
+
+  namespace = find_sub_namespace(current_namespace, name);
+  if(!namespace) {
+    namespace = xmalloc(sizeof(*namespace));
+    namespace->name = xstrdup(name);
+    namespace->parent = current_namespace;
+    list_add_tail(&current_namespace->children, &namespace->entry);
+    list_init(&namespace->children);
+    memset(namespace->type_hash, 0, sizeof(namespace->type_hash));
+  }
+
+  current_namespace = namespace;
+}
+
+static void pop_namespace(const char *name)
+{
+  assert(!strcmp(current_namespace->name, name) && current_namespace->parent);
+  current_namespace = current_namespace->parent;
+}
+
 struct rtype {
   const char *name;
   type_t *type;
 struct rtype {
   const char *name;
   type_t *type;
@@ -6455,9 +5844,7 @@ struct rtype {
   struct rtype *next;
 };
 
   struct rtype *next;
 };
 
-struct rtype *type_hash[HASHMAX];
-
-type_t *reg_type(type_t *type, const char *name, int t)
+type_t *reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
 {
   struct rtype *nt;
   int hash;
 {
   struct rtype *nt;
   int hash;
@@ -6465,13 +5852,19 @@ type_t *reg_type(type_t *type, const char *name, int t)
     error_loc("registering named type without name\n");
     return type;
   }
     error_loc("registering named type without name\n");
     return type;
   }
+  if (!namespace)
+    namespace = &global_namespace;
   hash = hash_ident(name);
   nt = xmalloc(sizeof(struct rtype));
   nt->name = name;
   hash = hash_ident(name);
   nt = xmalloc(sizeof(struct rtype));
   nt->name = name;
+  if (is_global_namespace(namespace))
+    type->c_name = name;
+  else
+    type->c_name = format_namespace(namespace, "__x_", "_C", name);
   nt->type = type;
   nt->t = t;
   nt->type = type;
   nt->t = t;
-  nt->next = type_hash[hash];
-  type_hash[hash] = nt;
+  nt->next = namespace->type_hash[hash];
+  namespace->type_hash[hash] = nt;
   if ((t == tsSTRUCT || t == tsUNION))
     fix_incomplete_types(type);
   return type;
   if ((t == tsSTRUCT || t == tsUNION))
     fix_incomplete_types(type);
   return type;
@@ -6536,28 +5929,32 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
   const declarator_t *decl;
   type_t *type = decl_spec->type;
 
   const declarator_t *decl;
   type_t *type = decl_spec->type;
 
+  if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
+    attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
+
   /* We must generate names for tagless enum, struct or union.
      Typedef-ing a tagless enum, struct or union means we want the typedef
      to be included in a library hence the public attribute.  */
   /* We must generate names for tagless enum, struct or union.
      Typedef-ing a tagless enum, struct or union means we want the typedef
      to be included in a library hence the public attribute.  */
-  if ((type_get_type_detect_alias(type) == TYPE_ENUM ||
-       type_get_type_detect_alias(type) == TYPE_STRUCT ||
-       type_get_type_detect_alias(type) == TYPE_UNION ||
-       type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) &&
-      !type->name)
+  if (type_get_type_detect_alias(type) == TYPE_ENUM ||
+      type_get_type_detect_alias(type) == TYPE_STRUCT ||
+      type_get_type_detect_alias(type) == TYPE_UNION ||
+      type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION)
   {
   {
-    if (! is_attr(attrs, ATTR_PUBLIC) && ! is_attr (attrs, ATTR_HIDDEN))
-      attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
-    type->name = gen_name();
+    if (!type->name)
+      type->name = gen_name();
+
+    /* replace existing attributes when generating a typelib */
+    if (do_typelib)
+        type->attrs = attrs;
   }
   }
-  else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)
-          && !is_attr(attrs, ATTR_HIDDEN))
-    attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
 
 
-  /* Append the SWITCHTYPE attribute to a union if it does not already have one.  */
+#ifdef __REACTOS__
+  /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it.  */
   if (type_get_type_detect_alias(type) == TYPE_UNION &&
       is_attr(attrs, ATTR_SWITCHTYPE) &&
       !is_attr(type->attrs, ATTR_SWITCHTYPE))
     type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
   if (type_get_type_detect_alias(type) == TYPE_UNION &&
       is_attr(attrs, ATTR_SWITCHTYPE) &&
       !is_attr(type->attrs, ATTR_SWITCHTYPE))
     type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
+#endif
 
   LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
   {
 
   LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
   {
@@ -6566,7 +5963,7 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
       type_t *cur;
       var_t *name;
 
       type_t *cur;
       var_t *name;
 
-      cur = find_type(decl->var->name, 0);
+      cur = find_type(decl->var->name, current_namespace, 0);
 
       /*
        * MIDL allows shadowing types that are declared in imported files.
 
       /*
        * MIDL allows shadowing types that are declared in imported files.
@@ -6588,23 +5985,32 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
 
       if (is_incomplete(cur))
         add_incomplete(cur);
 
       if (is_incomplete(cur))
         add_incomplete(cur);
-      reg_type(cur, cur->name, 0);
+      reg_type(cur, cur->name, current_namespace, 0);
     }
   }
   return type;
 }
 
     }
   }
   return type;
 }
 
-type_t *find_type(const char *name, int t)
+type_t *find_type(const char *name, struct namespace *namespace, int t)
 {
 {
-  struct rtype *cur = type_hash[hash_ident(name)];
-  while (cur && (cur->t != t || strcmp(cur->name, name)))
-    cur = cur->next;
-  return cur ? cur->type : NULL;
+  struct rtype *cur;
+
+  if(namespace && namespace != &global_namespace) {
+    for(cur = namespace->type_hash[hash_ident(name)]; cur; cur = cur->next) {
+      if(cur->t == t && !strcmp(cur->name, name))
+        return cur->type;
+    }
+  }
+  for(cur = global_namespace.type_hash[hash_ident(name)]; cur; cur = cur->next) {
+    if(cur->t == t && !strcmp(cur->name, name))
+      return cur->type;
+  }
+  return NULL;
 }
 
 static type_t *find_type_or_error(const char *name, int t)
 {
 }
 
 static type_t *find_type_or_error(const char *name, int t)
 {
-  type_t *type = find_type(name, t);
+  type_t *type = find_type(name, NULL, t);
   if (!type) {
     error_loc("type '%s' not found\n", name);
     return NULL;
   if (!type) {
     error_loc("type '%s' not found\n", name);
     return NULL;
@@ -6621,14 +6027,16 @@ static type_t *find_type_or_error2(char *name, int t)
 
 int is_type(const char *name)
 {
 
 int is_type(const char *name)
 {
-  return find_type(name, 0) != NULL;
+  return find_type(name, current_namespace, 0) != NULL;
 }
 
 }
 
-type_t *get_type(enum type_type type, char *name, int t)
+type_t *get_type(enum type_type type, char *name, struct namespace *namespace, int t)
 {
   type_t *tp;
 {
   type_t *tp;
+  if (!namespace)
+    namespace = &global_namespace;
   if (name) {
   if (name) {
-    tp = find_type(name, t);
+    tp = find_type(name, namespace, t);
     if (tp) {
       free(name);
       return tp;
     if (tp) {
       free(name);
       return tp;
@@ -6636,8 +6044,9 @@ type_t *get_type(enum type_type type, char *name, int t)
   }
   tp = make_type(type);
   tp->name = name;
   }
   tp = make_type(type);
   tp->name = name;
+  tp->namespace = namespace;
   if (!name) return tp;
   if (!name) return tp;
-  return reg_type(tp, name, t);
+  return reg_type(tp, name, namespace, t);
 }
 
 /***** constant repository *****/
 }
 
 /***** constant repository *****/
@@ -6713,7 +6122,7 @@ struct allowed_attr
     unsigned int on_arg : 1;
     unsigned int on_type : 1;
     unsigned int on_enum : 1;
     unsigned int on_arg : 1;
     unsigned int on_type : 1;
     unsigned int on_enum : 1;
-    unsigned int on_struct : 1;
+    unsigned int on_struct : 2;
     unsigned int on_union : 1;
     unsigned int on_field : 1;
     unsigned int on_library : 1;
     unsigned int on_union : 1;
     unsigned int on_field : 1;
     unsigned int on_library : 1;
@@ -6824,7 +6233,7 @@ struct allowed_attr allowed_attr[] =
     /* ATTR_UUID */                { 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, "uuid" },
     /* ATTR_V1ENUM */              { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
     /* ATTR_VARARG */              { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
     /* ATTR_UUID */                { 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, "uuid" },
     /* ATTR_V1ENUM */              { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
     /* ATTR_VARARG */              { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
-    /* ATTR_VERSION */             { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, "version" },
+    /* ATTR_VERSION */             { 1, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, "version" },
     /* ATTR_VIPROGID */            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" },
     /* ATTR_WIREMARSHAL */         { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
 };
     /* ATTR_VIPROGID */            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" },
     /* ATTR_WIREMARSHAL */         { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
 };
@@ -6914,11 +6323,12 @@ static attr_list_t *check_enum_attrs(attr_list_t *attrs)
 
 static attr_list_t *check_struct_attrs(attr_list_t *attrs)
 {
 
 static attr_list_t *check_struct_attrs(attr_list_t *attrs)
 {
+  int mask = winrt_mode ? 3 : 1;
   const attr_t *attr;
   if (!attrs) return attrs;
   LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry)
   {
   const attr_t *attr;
   if (!attrs) return attrs;
   LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry)
   {
-    if (!allowed_attr[attr->type].on_struct)
+    if (!(allowed_attr[attr->type].on_struct & mask))
       error_loc("inapplicable attribute %s for struct\n",
                 allowed_attr[attr->type].display_name);
   }
       error_loc("inapplicable attribute %s for struct\n",
                 allowed_attr[attr->type].display_name);
   }
@@ -7363,10 +6773,26 @@ static void check_statements(const statement_list_t *stmts, int is_inside_librar
 
     if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
     {
 
     if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
     {
-      if (stmt->type == STMT_LIBRARY)
-          check_statements(stmt->u.lib->stmts, TRUE);
-      else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
-          check_functions(stmt->u.type, is_inside_library);
+        switch(stmt->type) {
+        case STMT_LIBRARY:
+            check_statements(stmt->u.lib->stmts, TRUE);
+            break;
+        case STMT_TYPE:
+            switch(type_get_type(stmt->u.type)) {
+            case TYPE_INTERFACE:
+                check_functions(stmt->u.type, is_inside_library);
+                break;
+            case TYPE_COCLASS:
+                if(winrt_mode)
+                    error_loc("coclass is not allowed in Windows Runtime mode\n");
+                break;
+            default:
+                break;
+            }
+            break;
+        default:
+            break;
+        }
     }
 }
 
     }
 }
 
@@ -7557,4 +6983,3 @@ static void check_def(const type_t *t)
         error_loc("%s: redefinition error; original definition was at %s:%d\n",
                   t->name, t->loc_info.input_name, t->loc_info.line_number);
 }
         error_loc("%s: redefinition error; original definition was at %s:%d\n",
                   t->name, t->loc_info.input_name, t->loc_info.line_number);
 }
-
index 4a2ac12..37a8c73 100644 (file)
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.5.  */
+/* A Bison parser, made by GNU Bison 3.0.2.  */
 
 /* Bison interface for Yacc-like parsers in C
 
 /* Bison interface for Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-   
+
+   Copyright (C) 1984, 1989-1990, 2000-2013 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/>.  */
 
    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.  */
 
+#ifndef YY_PARSER_PARSER_TAB_H_INCLUDED
+# define YY_PARSER_PARSER_TAB_H_INCLUDED
+/* Debug traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int parser_debug;
+#endif
 
 
-/* Tokens.  */
+/* Token type.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     aIDENTIFIER = 258,
-     aPRAGMA = 259,
-     aKNOWNTYPE = 260,
-     aNUM = 261,
-     aHEXNUM = 262,
-     aDOUBLE = 263,
-     aSTRING = 264,
-     aWSTRING = 265,
-     aSQSTRING = 266,
-     aUUID = 267,
-     aEOF = 268,
-     SHL = 269,
-     SHR = 270,
-     MEMBERPTR = 271,
-     EQUALITY = 272,
-     INEQUALITY = 273,
-     GREATEREQUAL = 274,
-     LESSEQUAL = 275,
-     LOGICALOR = 276,
-     LOGICALAND = 277,
-     ELLIPSIS = 278,
-     tAGGREGATABLE = 279,
-     tALLOCATE = 280,
-     tANNOTATION = 281,
-     tAPPOBJECT = 282,
-     tASYNC = 283,
-     tASYNCUUID = 284,
-     tAUTOHANDLE = 285,
-     tBINDABLE = 286,
-     tBOOLEAN = 287,
-     tBROADCAST = 288,
-     tBYTE = 289,
-     tBYTECOUNT = 290,
-     tCALLAS = 291,
-     tCALLBACK = 292,
-     tCASE = 293,
-     tCDECL = 294,
-     tCHAR = 295,
-     tCOCLASS = 296,
-     tCODE = 297,
-     tCOMMSTATUS = 298,
-     tCONST = 299,
-     tCONTEXTHANDLE = 300,
-     tCONTEXTHANDLENOSERIALIZE = 301,
-     tCONTEXTHANDLESERIALIZE = 302,
-     tCONTROL = 303,
-     tCPPQUOTE = 304,
-     tDECODE = 305,
-     tDEFAULT = 306,
-     tDEFAULTBIND = 307,
-     tDEFAULTCOLLELEM = 308,
-     tDEFAULTVALUE = 309,
-     tDEFAULTVTABLE = 310,
-     tDISABLECONSISTENCYCHECK = 311,
-     tDISPLAYBIND = 312,
-     tDISPINTERFACE = 313,
-     tDLLNAME = 314,
-     tDOUBLE = 315,
-     tDUAL = 316,
-     tENABLEALLOCATE = 317,
-     tENCODE = 318,
-     tENDPOINT = 319,
-     tENTRY = 320,
-     tENUM = 321,
-     tERRORSTATUST = 322,
-     tEXPLICITHANDLE = 323,
-     tEXTERN = 324,
-     tFALSE = 325,
-     tFASTCALL = 326,
-     tFAULTSTATUS = 327,
-     tFLOAT = 328,
-     tFORCEALLOCATE = 329,
-     tHANDLE = 330,
-     tHANDLET = 331,
-     tHELPCONTEXT = 332,
-     tHELPFILE = 333,
-     tHELPSTRING = 334,
-     tHELPSTRINGCONTEXT = 335,
-     tHELPSTRINGDLL = 336,
-     tHIDDEN = 337,
-     tHYPER = 338,
-     tID = 339,
-     tIDEMPOTENT = 340,
-     tIGNORE = 341,
-     tIIDIS = 342,
-     tIMMEDIATEBIND = 343,
-     tIMPLICITHANDLE = 344,
-     tIMPORT = 345,
-     tIMPORTLIB = 346,
-     tIN = 347,
-     tIN_LINE = 348,
-     tINLINE = 349,
-     tINPUTSYNC = 350,
-     tINT = 351,
-     tINT3264 = 352,
-     tINT64 = 353,
-     tINTERFACE = 354,
-     tLCID = 355,
-     tLENGTHIS = 356,
-     tLIBRARY = 357,
-     tLICENSED = 358,
-     tLOCAL = 359,
-     tLONG = 360,
-     tMAYBE = 361,
-     tMESSAGE = 362,
-     tMETHODS = 363,
-     tMODULE = 364,
-     tNAMESPACE = 365,
-     tNOCODE = 366,
-     tNONBROWSABLE = 367,
-     tNONCREATABLE = 368,
-     tNONEXTENSIBLE = 369,
-     tNOTIFY = 370,
-     tNOTIFYFLAG = 371,
-     tNULL = 372,
-     tOBJECT = 373,
-     tODL = 374,
-     tOLEAUTOMATION = 375,
-     tOPTIMIZE = 376,
-     tOPTIONAL = 377,
-     tOUT = 378,
-     tPARTIALIGNORE = 379,
-     tPASCAL = 380,
-     tPOINTERDEFAULT = 381,
-     tPROGID = 382,
-     tPROPERTIES = 383,
-     tPROPGET = 384,
-     tPROPPUT = 385,
-     tPROPPUTREF = 386,
-     tPROXY = 387,
-     tPTR = 388,
-     tPUBLIC = 389,
-     tRANGE = 390,
-     tREADONLY = 391,
-     tREF = 392,
-     tREGISTER = 393,
-     tREPRESENTAS = 394,
-     tREQUESTEDIT = 395,
-     tRESTRICTED = 396,
-     tRETVAL = 397,
-     tSAFEARRAY = 398,
-     tSHORT = 399,
-     tSIGNED = 400,
-     tSIZEIS = 401,
-     tSIZEOF = 402,
-     tSMALL = 403,
-     tSOURCE = 404,
-     tSTATIC = 405,
-     tSTDCALL = 406,
-     tSTRICTCONTEXTHANDLE = 407,
-     tSTRING = 408,
-     tSTRUCT = 409,
-     tSWITCH = 410,
-     tSWITCHIS = 411,
-     tSWITCHTYPE = 412,
-     tTHREADING = 413,
-     tTRANSMITAS = 414,
-     tTRUE = 415,
-     tTYPEDEF = 416,
-     tUIDEFAULT = 417,
-     tUNION = 418,
-     tUNIQUE = 419,
-     tUNSIGNED = 420,
-     tUSESGETLASTERROR = 421,
-     tUSERMARSHAL = 422,
-     tUUID = 423,
-     tV1ENUM = 424,
-     tVARARG = 425,
-     tVERSION = 426,
-     tVIPROGID = 427,
-     tVOID = 428,
-     tWCHAR = 429,
-     tWIREMARSHAL = 430,
-     tAPARTMENT = 431,
-     tNEUTRAL = 432,
-     tSINGLE = 433,
-     tFREE = 434,
-     tBOTH = 435,
-     ADDRESSOF = 436,
-     NEG = 437,
-     POS = 438,
-     PPTR = 439,
-     CAST = 440
-   };
+  enum yytokentype
+  {
+    aIDENTIFIER = 258,
+    aPRAGMA = 259,
+    aKNOWNTYPE = 260,
+    aNUM = 261,
+    aHEXNUM = 262,
+    aDOUBLE = 263,
+    aSTRING = 264,
+    aWSTRING = 265,
+    aSQSTRING = 266,
+    aUUID = 267,
+    aEOF = 268,
+    SHL = 269,
+    SHR = 270,
+    MEMBERPTR = 271,
+    EQUALITY = 272,
+    INEQUALITY = 273,
+    GREATEREQUAL = 274,
+    LESSEQUAL = 275,
+    LOGICALOR = 276,
+    LOGICALAND = 277,
+    ELLIPSIS = 278,
+    tAGGREGATABLE = 279,
+    tALLOCATE = 280,
+    tANNOTATION = 281,
+    tAPPOBJECT = 282,
+    tASYNC = 283,
+    tASYNCUUID = 284,
+    tAUTOHANDLE = 285,
+    tBINDABLE = 286,
+    tBOOLEAN = 287,
+    tBROADCAST = 288,
+    tBYTE = 289,
+    tBYTECOUNT = 290,
+    tCALLAS = 291,
+    tCALLBACK = 292,
+    tCASE = 293,
+    tCDECL = 294,
+    tCHAR = 295,
+    tCOCLASS = 296,
+    tCODE = 297,
+    tCOMMSTATUS = 298,
+    tCONST = 299,
+    tCONTEXTHANDLE = 300,
+    tCONTEXTHANDLENOSERIALIZE = 301,
+    tCONTEXTHANDLESERIALIZE = 302,
+    tCONTROL = 303,
+    tCPPQUOTE = 304,
+    tDECODE = 305,
+    tDEFAULT = 306,
+    tDEFAULTBIND = 307,
+    tDEFAULTCOLLELEM = 308,
+    tDEFAULTVALUE = 309,
+    tDEFAULTVTABLE = 310,
+    tDISABLECONSISTENCYCHECK = 311,
+    tDISPLAYBIND = 312,
+    tDISPINTERFACE = 313,
+    tDLLNAME = 314,
+    tDOUBLE = 315,
+    tDUAL = 316,
+    tENABLEALLOCATE = 317,
+    tENCODE = 318,
+    tENDPOINT = 319,
+    tENTRY = 320,
+    tENUM = 321,
+    tERRORSTATUST = 322,
+    tEXPLICITHANDLE = 323,
+    tEXTERN = 324,
+    tFALSE = 325,
+    tFASTCALL = 326,
+    tFAULTSTATUS = 327,
+    tFLOAT = 328,
+    tFORCEALLOCATE = 329,
+    tHANDLE = 330,
+    tHANDLET = 331,
+    tHELPCONTEXT = 332,
+    tHELPFILE = 333,
+    tHELPSTRING = 334,
+    tHELPSTRINGCONTEXT = 335,
+    tHELPSTRINGDLL = 336,
+    tHIDDEN = 337,
+    tHYPER = 338,
+    tID = 339,
+    tIDEMPOTENT = 340,
+    tIGNORE = 341,
+    tIIDIS = 342,
+    tIMMEDIATEBIND = 343,
+    tIMPLICITHANDLE = 344,
+    tIMPORT = 345,
+    tIMPORTLIB = 346,
+    tIN = 347,
+    tIN_LINE = 348,
+    tINLINE = 349,
+    tINPUTSYNC = 350,
+    tINT = 351,
+    tINT3264 = 352,
+    tINT64 = 353,
+    tINTERFACE = 354,
+    tLCID = 355,
+    tLENGTHIS = 356,
+    tLIBRARY = 357,
+    tLICENSED = 358,
+    tLOCAL = 359,
+    tLONG = 360,
+    tMAYBE = 361,
+    tMESSAGE = 362,
+    tMETHODS = 363,
+    tMODULE = 364,
+    tNAMESPACE = 365,
+    tNOCODE = 366,
+    tNONBROWSABLE = 367,
+    tNONCREATABLE = 368,
+    tNONEXTENSIBLE = 369,
+    tNOTIFY = 370,
+    tNOTIFYFLAG = 371,
+    tNULL = 372,
+    tOBJECT = 373,
+    tODL = 374,
+    tOLEAUTOMATION = 375,
+    tOPTIMIZE = 376,
+    tOPTIONAL = 377,
+    tOUT = 378,
+    tPARTIALIGNORE = 379,
+    tPASCAL = 380,
+    tPOINTERDEFAULT = 381,
+    tPROGID = 382,
+    tPROPERTIES = 383,
+    tPROPGET = 384,
+    tPROPPUT = 385,
+    tPROPPUTREF = 386,
+    tPROXY = 387,
+    tPTR = 388,
+    tPUBLIC = 389,
+    tRANGE = 390,
+    tREADONLY = 391,
+    tREF = 392,
+    tREGISTER = 393,
+    tREPRESENTAS = 394,
+    tREQUESTEDIT = 395,
+    tRESTRICTED = 396,
+    tRETVAL = 397,
+    tSAFEARRAY = 398,
+    tSHORT = 399,
+    tSIGNED = 400,
+    tSIZEIS = 401,
+    tSIZEOF = 402,
+    tSMALL = 403,
+    tSOURCE = 404,
+    tSTATIC = 405,
+    tSTDCALL = 406,
+    tSTRICTCONTEXTHANDLE = 407,
+    tSTRING = 408,
+    tSTRUCT = 409,
+    tSWITCH = 410,
+    tSWITCHIS = 411,
+    tSWITCHTYPE = 412,
+    tTHREADING = 413,
+    tTRANSMITAS = 414,
+    tTRUE = 415,
+    tTYPEDEF = 416,
+    tUIDEFAULT = 417,
+    tUNION = 418,
+    tUNIQUE = 419,
+    tUNSIGNED = 420,
+    tUSESGETLASTERROR = 421,
+    tUSERMARSHAL = 422,
+    tUUID = 423,
+    tV1ENUM = 424,
+    tVARARG = 425,
+    tVERSION = 426,
+    tVIPROGID = 427,
+    tVOID = 428,
+    tWCHAR = 429,
+    tWIREMARSHAL = 430,
+    tAPARTMENT = 431,
+    tNEUTRAL = 432,
+    tSINGLE = 433,
+    tFREE = 434,
+    tBOTH = 435,
+    CAST = 436,
+    PPTR = 437,
+    POS = 438,
+    NEG = 439,
+    ADDRESSOF = 440
+  };
 #endif
 
 #endif
 
-
-
+/* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
 {
 {
-
-/* Line 2068 of yacc.c  */
-#line 129 "parser.y"
+#line 137 "parser.y" /* yacc.c:1909  */
 
        attr_t *attr;
        attr_list_t *attr_list;
 
        attr_t *attr;
        attr_list_t *attr_list;
@@ -257,16 +263,15 @@ typedef union YYSTYPE
        struct _decl_spec_t *declspec;
        enum storage_class stgclass;
 
        struct _decl_spec_t *declspec;
        enum storage_class stgclass;
 
-
-
-/* Line 2068 of yacc.c  */
-#line 264 "parser.tab.h"
-} YYSTYPE;
+#line 267 "parser.tab.h" /* yacc.c:1909  */
+};
 # define YYSTYPE_IS_TRIVIAL 1
 # define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 #endif
 
 # define YYSTYPE_IS_DECLARED 1
 #endif
 
+
 extern YYSTYPE parser_lval;
 
 extern YYSTYPE parser_lval;
 
+int parser_parse (void);
 
 
+#endif /* !YY_PARSER_PARSER_TAB_H_INCLUDED  */
index 2192bea..93f6547 100644 (file)
@@ -90,6 +90,9 @@ static type_t *find_type_or_error2(char *name, int t);
 
 static var_t *reg_const(var_t *var);
 
 
 static var_t *reg_const(var_t *var);
 
+static void push_namespace(const char *name);
+static void pop_namespace(const char *name);
+
 static char *gen_name(void);
 static void check_arg_attrs(const var_t *arg);
 static void check_statements(const statement_list_t *stmts, int is_inside_library);
 static char *gen_name(void);
 static void check_arg_attrs(const var_t *arg);
 static void check_statements(const statement_list_t *stmts, int is_inside_library);
@@ -120,11 +123,16 @@ static statement_t *make_statement_importlib(const char *str);
 static statement_t *make_statement_module(type_t *type);
 static statement_t *make_statement_typedef(var_list_t *names);
 static statement_t *make_statement_import(const char *str);
 static statement_t *make_statement_module(type_t *type);
 static statement_t *make_statement_typedef(var_list_t *names);
 static statement_t *make_statement_import(const char *str);
-static statement_t *make_statement_typedef(var_list_t *names);
 static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt);
 static statement_list_t *append_statements(statement_list_t *, statement_list_t *);
 static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
 
 static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt);
 static statement_list_t *append_statements(statement_list_t *, statement_list_t *);
 static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
 
+static struct namespace global_namespace = {
+    NULL, NULL, LIST_INIT(global_namespace.entry), LIST_INIT(global_namespace.children)
+};
+
+static struct namespace *current_namespace = &global_namespace;
+
 %}
 %union {
        attr_t *attr;
 %}
 %union {
        attr_t *attr;
@@ -262,7 +270,7 @@ static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
 %type <type> inherit interface interfacedef interfacedec
 %type <type> dispinterface dispinterfacehdr dispinterfacedef
 %type <type> module modulehdr moduledef
 %type <type> inherit interface interfacedef interfacedec
 %type <type> dispinterface dispinterfacehdr dispinterfacedef
 %type <type> module modulehdr moduledef
-%type <type> namespacedef
+%type <str> namespacedef
 %type <type> base_type int_std
 %type <type> enumdef structdef uniondef typedecl
 %type <type> type
 %type <type> base_type int_std
 %type <type> enumdef structdef uniondef typedecl
 %type <type> type
@@ -320,15 +328,15 @@ input:   gbl_statements                           { fix_incomplete();
        ;
 
 gbl_statements:                                        { $$ = NULL; }
        ;
 
 gbl_statements:                                        { $$ = NULL; }
-       | gbl_statements namespacedef '{' gbl_statements '}'
-                                               { $$ = append_statements($1, $4); }
+       | gbl_statements namespacedef '{' { push_namespace($2); } gbl_statements '}'
+                                               { pop_namespace($2); $$ = append_statements($1, $5); }
        | gbl_statements interfacedec           { $$ = append_statement($1, make_statement_reference($2)); }
        | gbl_statements interfacedef           { $$ = append_statement($1, make_statement_type_decl($2)); }
        | gbl_statements coclass ';'            { $$ = $1;
        | gbl_statements interfacedec           { $$ = append_statement($1, make_statement_reference($2)); }
        | gbl_statements interfacedef           { $$ = append_statement($1, make_statement_type_decl($2)); }
        | gbl_statements coclass ';'            { $$ = $1;
-                                                 reg_type($2, $2->name, 0);
+                                                 reg_type($2, $2->name, current_namespace, 0);
                                                }
        | gbl_statements coclassdef             { $$ = append_statement($1, make_statement_type_decl($2));
                                                }
        | gbl_statements coclassdef             { $$ = append_statement($1, make_statement_type_decl($2));
-                                                 reg_type($2, $2->name, 0);
+                                                 reg_type($2, $2->name, current_namespace, 0);
                                                }
        | gbl_statements moduledef              { $$ = append_statement($1, make_statement_module($2)); }
        | gbl_statements librarydef             { $$ = append_statement($1, make_statement_library($2)); }
                                                }
        | gbl_statements moduledef              { $$ = append_statement($1, make_statement_module($2)); }
        | gbl_statements librarydef             { $$ = append_statement($1, make_statement_library($2)); }
@@ -337,12 +345,12 @@ gbl_statements:                                   { $$ = NULL; }
 
 imp_statements:                                        { $$ = NULL; }
        | imp_statements interfacedec           { $$ = append_statement($1, make_statement_reference($2)); }
 
 imp_statements:                                        { $$ = NULL; }
        | imp_statements interfacedec           { $$ = append_statement($1, make_statement_reference($2)); }
-       | imp_statements namespacedef '{' imp_statements '}'
-                                               { $$ = append_statements($1, $4); }
+       | imp_statements namespacedef '{' { push_namespace($2); } imp_statements '}'
+                                               { pop_namespace($2); $$ = append_statements($1, $5); }
        | imp_statements interfacedef           { $$ = append_statement($1, make_statement_type_decl($2)); }
        | imp_statements interfacedef           { $$ = append_statement($1, make_statement_type_decl($2)); }
-       | imp_statements coclass ';'            { $$ = $1; reg_type($2, $2->name, 0); }
+       | imp_statements coclass ';'            { $$ = $1; reg_type($2, $2->name, current_namespace, 0); }
        | imp_statements coclassdef             { $$ = append_statement($1, make_statement_type_decl($2));
        | imp_statements coclassdef             { $$ = append_statement($1, make_statement_type_decl($2));
-                                                 reg_type($2, $2->name, 0);
+                                                 reg_type($2, $2->name, current_namespace, 0);
                                                }
        | imp_statements moduledef              { $$ = append_statement($1, make_statement_module($2)); }
        | imp_statements statement              { $$ = append_statement($1, $2); }
                                                }
        | imp_statements moduledef              { $$ = append_statement($1, make_statement_module($2)); }
        | imp_statements statement              { $$ = append_statement($1, $2); }
@@ -369,9 +377,9 @@ statement:
 
 typedecl:
          enumdef
 
 typedecl:
          enumdef
-       | tENUM aIDENTIFIER                     { $$ = type_new_enum($2, FALSE, NULL); }
+       | tENUM aIDENTIFIER                     { $$ = type_new_enum($2, current_namespace, FALSE, NULL); }
        | structdef
        | structdef
-       | tSTRUCT aIDENTIFIER                   { $$ = type_new_struct($2, FALSE, NULL); }
+       | tSTRUCT aIDENTIFIER                   { $$ = type_new_struct($2, current_namespace, FALSE, NULL); }
        | uniondef
        | tUNION aIDENTIFIER                    { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); }
        | attributes enumdef                    { $$ = $2; $$->attrs = check_enum_attrs($1); }
        | uniondef
        | tUNION aIDENTIFIER                    { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); }
        | attributes enumdef                    { $$ = $2; $$->attrs = check_enum_attrs($1); }
@@ -624,7 +632,7 @@ enum:         ident '=' expr_int_const              { $$ = reg_const($1);
                                                }
        ;
 
                                                }
        ;
 
-enumdef: tENUM t_ident '{' enums '}'           { $$ = type_new_enum($2, TRUE, $4); }
+enumdef: tENUM t_ident '{' enums '}'           { $$ = type_new_enum($2, current_namespace, TRUE, $4); }
        ;
 
 m_exprs:  m_expr                                { $$ = append_expr( NULL, $1 ); }
        ;
 
 m_exprs:  m_expr                                { $$ = append_expr( NULL, $1 ); }
@@ -794,7 +802,7 @@ int_std:  tINT                                      { $$ = type_new_int(TYPE_BASIC_INT, 0); }
        ;
 
 coclass:  tCOCLASS aIDENTIFIER                 { $$ = type_new_coclass($2); }
        ;
 
 coclass:  tCOCLASS aIDENTIFIER                 { $$ = type_new_coclass($2); }
-       | tCOCLASS aKNOWNTYPE                   { $$ = find_type($2, 0);
+       | tCOCLASS aKNOWNTYPE                   { $$ = find_type($2, NULL, 0);
                                                  if (type_get_type_detect_alias($$) != TYPE_COCLASS)
                                                    error_loc("%s was not declared a coclass at %s:%d\n",
                                                              $2, $$->loc_info.input_name,
                                                  if (type_get_type_detect_alias($$) != TYPE_COCLASS)
                                                    error_loc("%s was not declared a coclass at %s:%d\n",
                                                              $2, $$->loc_info.input_name,
@@ -812,7 +820,7 @@ coclassdef: coclasshdr '{' coclass_ints '}' semicolon_opt
                                                { $$ = type_coclass_define($1, $3); }
        ;
 
                                                { $$ = type_coclass_define($1, $3); }
        ;
 
-namespacedef: tNAMESPACE aIDENTIFIER           { $$ = NULL; }
+namespacedef: tNAMESPACE aIDENTIFIER           { $$ = $2; }
        ;
 
 coclass_ints:                                  { $$ = NULL; }
        ;
 
 coclass_ints:                                  { $$ = NULL; }
@@ -823,8 +831,8 @@ coclass_int:
          m_attributes interfacedec             { $$ = make_ifref($2); $$->attrs = $1; }
        ;
 
          m_attributes interfacedec             { $$ = make_ifref($2); $$->attrs = $1; }
        ;
 
-dispinterface: tDISPINTERFACE aIDENTIFIER      { $$ = get_type(TYPE_INTERFACE, $2, 0); }
-       |      tDISPINTERFACE aKNOWNTYPE        { $$ = get_type(TYPE_INTERFACE, $2, 0); }
+dispinterface: tDISPINTERFACE aIDENTIFIER      { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+       |      tDISPINTERFACE aKNOWNTYPE        { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
        ;
 
 dispinterfacehdr: attributes dispinterface     { attr_t *attrs;
        ;
 
 dispinterfacehdr: attributes dispinterface     { attr_t *attrs;
@@ -860,8 +868,8 @@ inherit:                                    { $$ = NULL; }
        | ':' aKNOWNTYPE                        { $$ = find_type_or_error2($2, 0); }
        ;
 
        | ':' aKNOWNTYPE                        { $$ = find_type_or_error2($2, 0); }
        ;
 
-interface: tINTERFACE aIDENTIFIER              { $$ = get_type(TYPE_INTERFACE, $2, 0); }
-       |  tINTERFACE aKNOWNTYPE                { $$ = get_type(TYPE_INTERFACE, $2, 0); }
+interface: tINTERFACE aIDENTIFIER              { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+       |  tINTERFACE aKNOWNTYPE                { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
        ;
 
 interfacehdr: attributes interface             { $$.interface = $2;
        ;
 
 interfacehdr: attributes interface             { $$.interface = $2;
@@ -1082,16 +1090,16 @@ pointer_type:
        | tPTR                                  { $$ = RPC_FC_FP; }
        ;
 
        | tPTR                                  { $$ = RPC_FC_FP; }
        ;
 
-structdef: tSTRUCT t_ident '{' fields '}'      { $$ = type_new_struct($2, TRUE, $4); }
+structdef: tSTRUCT t_ident '{' fields '}'      { $$ = type_new_struct($2, current_namespace, TRUE, $4); }
        ;
 
 type:    tVOID                                 { $$ = type_new_void(); }
        | aKNOWNTYPE                            { $$ = find_type_or_error($1, 0); }
        | base_type                             { $$ = $1; }
        | enumdef                               { $$ = $1; }
        ;
 
 type:    tVOID                                 { $$ = type_new_void(); }
        | aKNOWNTYPE                            { $$ = find_type_or_error($1, 0); }
        | base_type                             { $$ = $1; }
        | enumdef                               { $$ = $1; }
-       | tENUM aIDENTIFIER                     { $$ = type_new_enum($2, FALSE, NULL); }
+       | tENUM aIDENTIFIER                     { $$ = type_new_enum($2, current_namespace, FALSE, NULL); }
        | structdef                             { $$ = $1; }
        | structdef                             { $$ = $1; }
-       | tSTRUCT aIDENTIFIER                   { $$ = type_new_struct($2, FALSE, NULL); }
+       | tSTRUCT aIDENTIFIER                   { $$ = type_new_struct($2, current_namespace, FALSE, NULL); }
        | uniondef                              { $$ = $1; }
        | tUNION aIDENTIFIER                    { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); }
        | tSAFEARRAY '(' type ')'               { $$ = make_safearray($3); }
        | uniondef                              { $$ = $1; }
        | tUNION aIDENTIFIER                    { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); }
        | tSAFEARRAY '(' type ')'               { $$ = make_safearray($3); }
@@ -1122,12 +1130,12 @@ version:
 static void decl_builtin_basic(const char *name, enum type_basic_type type)
 {
   type_t *t = type_new_basic(type);
 static void decl_builtin_basic(const char *name, enum type_basic_type type)
 {
   type_t *t = type_new_basic(type);
-  reg_type(t, name, 0);
+  reg_type(t, name, NULL, 0);
 }
 
 static void decl_builtin_alias(const char *name, type_t *t)
 {
 }
 
 static void decl_builtin_alias(const char *name, type_t *t)
 {
-  reg_type(type_new_alias(t, name), name, 0);
+  reg_type(type_new_alias(t, name), name, NULL, 0);
 }
 
 void init_types(void)
 }
 
 void init_types(void)
@@ -1731,8 +1739,6 @@ static typelib_t *make_library(const char *name, const attr_list_t *attrs)
     return typelib;
 }
 
     return typelib;
 }
 
-#define HASHMAX 64
-
 static int hash_ident(const char *name)
 {
   const char *p = name;
 static int hash_ident(const char *name)
 {
   const char *p = name;
@@ -1747,6 +1753,41 @@ static int hash_ident(const char *name)
 
 /***** type repository *****/
 
 
 /***** type repository *****/
 
+static struct namespace *find_sub_namespace(struct namespace *namespace, const char *name)
+{
+  struct namespace *cur;
+
+  LIST_FOR_EACH_ENTRY(cur, &namespace->children, struct namespace, entry) {
+    if(!strcmp(cur->name, name))
+      return cur;
+  }
+
+  return NULL;
+}
+
+static void push_namespace(const char *name)
+{
+  struct namespace *namespace;
+
+  namespace = find_sub_namespace(current_namespace, name);
+  if(!namespace) {
+    namespace = xmalloc(sizeof(*namespace));
+    namespace->name = xstrdup(name);
+    namespace->parent = current_namespace;
+    list_add_tail(&current_namespace->children, &namespace->entry);
+    list_init(&namespace->children);
+    memset(namespace->type_hash, 0, sizeof(namespace->type_hash));
+  }
+
+  current_namespace = namespace;
+}
+
+static void pop_namespace(const char *name)
+{
+  assert(!strcmp(current_namespace->name, name) && current_namespace->parent);
+  current_namespace = current_namespace->parent;
+}
+
 struct rtype {
   const char *name;
   type_t *type;
 struct rtype {
   const char *name;
   type_t *type;
@@ -1754,9 +1795,7 @@ struct rtype {
   struct rtype *next;
 };
 
   struct rtype *next;
 };
 
-struct rtype *type_hash[HASHMAX];
-
-type_t *reg_type(type_t *type, const char *name, int t)
+type_t *reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
 {
   struct rtype *nt;
   int hash;
 {
   struct rtype *nt;
   int hash;
@@ -1764,13 +1803,19 @@ type_t *reg_type(type_t *type, const char *name, int t)
     error_loc("registering named type without name\n");
     return type;
   }
     error_loc("registering named type without name\n");
     return type;
   }
+  if (!namespace)
+    namespace = &global_namespace;
   hash = hash_ident(name);
   nt = xmalloc(sizeof(struct rtype));
   nt->name = name;
   hash = hash_ident(name);
   nt = xmalloc(sizeof(struct rtype));
   nt->name = name;
+  if (is_global_namespace(namespace))
+    type->c_name = name;
+  else
+    type->c_name = format_namespace(namespace, "__x_", "_C", name);
   nt->type = type;
   nt->t = t;
   nt->type = type;
   nt->t = t;
-  nt->next = type_hash[hash];
-  type_hash[hash] = nt;
+  nt->next = namespace->type_hash[hash];
+  namespace->type_hash[hash] = nt;
   if ((t == tsSTRUCT || t == tsUNION))
     fix_incomplete_types(type);
   return type;
   if ((t == tsSTRUCT || t == tsUNION))
     fix_incomplete_types(type);
   return type;
@@ -1835,28 +1880,32 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
   const declarator_t *decl;
   type_t *type = decl_spec->type;
 
   const declarator_t *decl;
   type_t *type = decl_spec->type;
 
+  if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
+    attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
+
   /* We must generate names for tagless enum, struct or union.
      Typedef-ing a tagless enum, struct or union means we want the typedef
      to be included in a library hence the public attribute.  */
   /* We must generate names for tagless enum, struct or union.
      Typedef-ing a tagless enum, struct or union means we want the typedef
      to be included in a library hence the public attribute.  */
-  if ((type_get_type_detect_alias(type) == TYPE_ENUM ||
-       type_get_type_detect_alias(type) == TYPE_STRUCT ||
-       type_get_type_detect_alias(type) == TYPE_UNION ||
-       type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) &&
-      !type->name)
+  if (type_get_type_detect_alias(type) == TYPE_ENUM ||
+      type_get_type_detect_alias(type) == TYPE_STRUCT ||
+      type_get_type_detect_alias(type) == TYPE_UNION ||
+      type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION)
   {
   {
-    if (! is_attr(attrs, ATTR_PUBLIC) && ! is_attr (attrs, ATTR_HIDDEN))
-      attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
-    type->name = gen_name();
+    if (!type->name)
+      type->name = gen_name();
+
+    /* replace existing attributes when generating a typelib */
+    if (do_typelib)
+        type->attrs = attrs;
   }
   }
-  else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)
-          && !is_attr(attrs, ATTR_HIDDEN))
-    attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
 
 
+#ifdef __REACTOS__
   /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it.  */
   if (type_get_type_detect_alias(type) == TYPE_UNION &&
       is_attr(attrs, ATTR_SWITCHTYPE) &&
       !is_attr(type->attrs, ATTR_SWITCHTYPE))
     type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
   /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it.  */
   if (type_get_type_detect_alias(type) == TYPE_UNION &&
       is_attr(attrs, ATTR_SWITCHTYPE) &&
       !is_attr(type->attrs, ATTR_SWITCHTYPE))
     type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
+#endif
 
   LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
   {
 
   LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
   {
@@ -1865,7 +1914,7 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
       type_t *cur;
       var_t *name;
 
       type_t *cur;
       var_t *name;
 
-      cur = find_type(decl->var->name, 0);
+      cur = find_type(decl->var->name, current_namespace, 0);
 
       /*
        * MIDL allows shadowing types that are declared in imported files.
 
       /*
        * MIDL allows shadowing types that are declared in imported files.
@@ -1887,23 +1936,32 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
 
       if (is_incomplete(cur))
         add_incomplete(cur);
 
       if (is_incomplete(cur))
         add_incomplete(cur);
-      reg_type(cur, cur->name, 0);
+      reg_type(cur, cur->name, current_namespace, 0);
     }
   }
   return type;
 }
 
     }
   }
   return type;
 }
 
-type_t *find_type(const char *name, int t)
+type_t *find_type(const char *name, struct namespace *namespace, int t)
 {
 {
-  struct rtype *cur = type_hash[hash_ident(name)];
-  while (cur && (cur->t != t || strcmp(cur->name, name)))
-    cur = cur->next;
-  return cur ? cur->type : NULL;
+  struct rtype *cur;
+
+  if(namespace && namespace != &global_namespace) {
+    for(cur = namespace->type_hash[hash_ident(name)]; cur; cur = cur->next) {
+      if(cur->t == t && !strcmp(cur->name, name))
+        return cur->type;
+    }
+  }
+  for(cur = global_namespace.type_hash[hash_ident(name)]; cur; cur = cur->next) {
+    if(cur->t == t && !strcmp(cur->name, name))
+      return cur->type;
+  }
+  return NULL;
 }
 
 static type_t *find_type_or_error(const char *name, int t)
 {
 }
 
 static type_t *find_type_or_error(const char *name, int t)
 {
-  type_t *type = find_type(name, t);
+  type_t *type = find_type(name, NULL, t);
   if (!type) {
     error_loc("type '%s' not found\n", name);
     return NULL;
   if (!type) {
     error_loc("type '%s' not found\n", name);
     return NULL;
@@ -1920,14 +1978,16 @@ static type_t *find_type_or_error2(char *name, int t)
 
 int is_type(const char *name)
 {
 
 int is_type(const char *name)
 {
-  return find_type(name, 0) != NULL;
+  return find_type(name, current_namespace, 0) != NULL;
 }
 
 }
 
-type_t *get_type(enum type_type type, char *name, int t)
+type_t *get_type(enum type_type type, char *name, struct namespace *namespace, int t)
 {
   type_t *tp;
 {
   type_t *tp;
+  if (!namespace)
+    namespace = &global_namespace;
   if (name) {
   if (name) {
-    tp = find_type(name, t);
+    tp = find_type(name, namespace, t);
     if (tp) {
       free(name);
       return tp;
     if (tp) {
       free(name);
       return tp;
@@ -1935,8 +1995,9 @@ type_t *get_type(enum type_type type, char *name, int t)
   }
   tp = make_type(type);
   tp->name = name;
   }
   tp = make_type(type);
   tp->name = name;
+  tp->namespace = namespace;
   if (!name) return tp;
   if (!name) return tp;
-  return reg_type(tp, name, t);
+  return reg_type(tp, name, namespace, t);
 }
 
 /***** constant repository *****/
 }
 
 /***** constant repository *****/
@@ -2012,7 +2073,7 @@ struct allowed_attr
     unsigned int on_arg : 1;
     unsigned int on_type : 1;
     unsigned int on_enum : 1;
     unsigned int on_arg : 1;
     unsigned int on_type : 1;
     unsigned int on_enum : 1;
-    unsigned int on_struct : 1;
+    unsigned int on_struct : 2;
     unsigned int on_union : 1;
     unsigned int on_field : 1;
     unsigned int on_library : 1;
     unsigned int on_union : 1;
     unsigned int on_field : 1;
     unsigned int on_library : 1;
@@ -2123,7 +2184,7 @@ struct allowed_attr allowed_attr[] =
     /* ATTR_UUID */                { 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, "uuid" },
     /* ATTR_V1ENUM */              { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
     /* ATTR_VARARG */              { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
     /* ATTR_UUID */                { 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, "uuid" },
     /* ATTR_V1ENUM */              { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
     /* ATTR_VARARG */              { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
-    /* ATTR_VERSION */             { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, "version" },
+    /* ATTR_VERSION */             { 1, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, "version" },
     /* ATTR_VIPROGID */            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" },
     /* ATTR_WIREMARSHAL */         { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
 };
     /* ATTR_VIPROGID */            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" },
     /* ATTR_WIREMARSHAL */         { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
 };
@@ -2213,11 +2274,12 @@ static attr_list_t *check_enum_attrs(attr_list_t *attrs)
 
 static attr_list_t *check_struct_attrs(attr_list_t *attrs)
 {
 
 static attr_list_t *check_struct_attrs(attr_list_t *attrs)
 {
+  int mask = winrt_mode ? 3 : 1;
   const attr_t *attr;
   if (!attrs) return attrs;
   LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry)
   {
   const attr_t *attr;
   if (!attrs) return attrs;
   LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry)
   {
-    if (!allowed_attr[attr->type].on_struct)
+    if (!(allowed_attr[attr->type].on_struct & mask))
       error_loc("inapplicable attribute %s for struct\n",
                 allowed_attr[attr->type].display_name);
   }
       error_loc("inapplicable attribute %s for struct\n",
                 allowed_attr[attr->type].display_name);
   }
@@ -2662,10 +2724,26 @@ static void check_statements(const statement_list_t *stmts, int is_inside_librar
 
     if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
     {
 
     if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
     {
-      if (stmt->type == STMT_LIBRARY)
-          check_statements(stmt->u.lib->stmts, TRUE);
-      else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
-          check_functions(stmt->u.type, is_inside_library);
+        switch(stmt->type) {
+        case STMT_LIBRARY:
+            check_statements(stmt->u.lib->stmts, TRUE);
+            break;
+        case STMT_TYPE:
+            switch(type_get_type(stmt->u.type)) {
+            case TYPE_INTERFACE:
+                check_functions(stmt->u.type, is_inside_library);
+                break;
+            case TYPE_COCLASS:
+                if(winrt_mode)
+                    error_loc("coclass is not allowed in Windows Runtime mode\n");
+                break;
+            default:
+                break;
+            }
+            break;
+        default:
+            break;
+        }
     }
 }
 
     }
 }
 
index 5340952..5741505 100644 (file)
@@ -388,8 +388,8 @@ static void yy_fatal_error (yyconst char msg[]  );
        *yy_cp = '\0'; \
        (yy_c_buf_p) = yy_cp;
 
        *yy_cp = '\0'; \
        (yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 39
-#define YY_END_OF_BUFFER 40
+#define YY_NUM_RULES 40
+#define YY_END_OF_BUFFER 41
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -397,27 +397,27 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static yyconst flex_int16_t yy_accept[174] =
+static yyconst flex_int16_t yy_accept[180] =
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    3,    3,
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    3,    3,
-        5,    5,    0,    0,   40,   38,   27,   26,   38,    6,
-       38,   10,   38,   38,   22,   22,   38,   38,   38,   25,
-       25,   25,   17,   38,   27,    2,   16,   39,    7,   16,
-        9,   22,   22,   19,   19,   19,   18,   27,    2,    3,
-        5,    5,   11,   16,   32,   36,   30,    0,    0,   22,
-       22,   22,    0,   28,   34,   31,   33,   29,   25,    8,
-       25,   35,    0,    2,    2,    0,   15,   13,   12,   22,
-        0,   19,   19,    0,    2,    2,    3,    5,    5,   14,
-       37,   23,   22,   22,   21,   25,    0,   22,    0,   19,
-
-        5,    0,   21,   21,   25,    0,   22,    0,   19,    5,
-        0,   23,   21,   21,   25,    0,   22,    0,   19,    5,
-       25,    0,   22,    0,   19,    5,   25,    0,   22,    0,
-       19,    5,   25,    1,   22,    0,   19,    5,   25,    0,
-       22,    4,    0,   24,    0,    4,    0,    0,    0,    0,
+        6,    6,    0,    0,   41,   39,   28,   27,   39,    7,
+       39,   11,   39,   39,   23,   23,   39,   39,   39,   26,
+       26,   26,   18,   39,   28,    2,   17,   40,    8,   17,
+       10,   23,   23,   20,   20,   20,   19,   28,    2,    3,
+        6,    6,    6,   12,   17,   33,   37,   31,    0,    0,
+       23,   23,   23,    0,   29,   35,   32,   34,   30,   26,
+        9,   26,   36,    0,    2,    2,    0,   16,   14,   13,
+       23,    0,   20,   20,    0,    2,    2,    3,    6,    6,
+        6,   15,   38,   24,   23,   23,   22,   26,    0,   23,
+
+        0,   20,    6,    6,    0,   22,   22,   26,    0,   23,
+        0,   20,    6,    6,    0,   24,   22,   22,   26,    0,
+       23,    0,   20,    6,    5,   26,    0,   23,    0,   20,
+        6,    5,   26,    0,   23,    0,   20,    6,   26,    1,
+       23,    0,   20,    6,   26,    0,   23,    4,    0,   25,
+        0,    4,    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,    0,    0,    0,    0,    0,
-        0,   20,    0
+        0,    0,    0,    0,    0,    0,    0,   21,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -433,9 +433,9 @@ static yyconst flex_int32_t yy_ec[256] =
        22,   24,   25,   22,   26,   22,   22,   27,   28,   22,
        29,   30,   31,    1,   32,    1,   33,   19,   34,   35,
 
        22,   24,   25,   22,   26,   22,   22,   27,   28,   22,
        29,   30,   31,    1,   32,    1,   33,   19,   34,   35,
 
-       36,   19,   37,   38,   39,   22,   22,   40,   41,   22,
-       42,   43,   22,   44,   22,   22,   45,   22,   22,   46,
-       22,   22,    1,   47,    1,    1,    1,    1,    1,    1,
+       36,   19,   37,   38,   39,   22,   22,   40,   41,   42,
+       43,   44,   22,   45,   22,   46,   47,   22,   48,   49,
+       22,   22,    1,   50,    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,
         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,
@@ -452,227 +452,237 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[48] =
+static yyconst flex_int32_t yy_meta[51] =
     {   0,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    3,    3,    1,    1,    1,    3,    3,    3,
         3,    4,    4,    4,    4,    4,    4,    4,    1,    1,
         1,    4,    3,    3,    3,    3,    4,    4,    4,    4,
     {   0,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    3,    3,    1,    1,    1,    3,    3,    3,
         3,    4,    4,    4,    4,    4,    4,    4,    1,    1,
         1,    4,    3,    3,    3,    3,    4,    4,    4,    4,
-        4,    4,    4,    4,    4,    4,    1
+        4,    4,    4,    4,    4,    4,    4,    4,    4,    1
     } ;
 
     } ;
 
-static yyconst flex_int16_t yy_base[214] =
+static yyconst flex_int16_t yy_base[221] =
     {   0,
     {   0,
-        0,   46,   46,   50,   51,   54,   84,   56,  345,  344,
-      129,  130,  131,  132,  346,  639,  639,  639,  325,  639,
-      333,  639,  322,  326,  160,  124,   45,  321,   47,    0,
-      331,  316,  639,  286,   63,  139,  639,  639,  639,   45,
-      639,  194,  117,  228,    0,  326,  639,   64,  324,    0,
-        0,  286,  639,  135,  639,  639,  639,  312,   54,  154,
-      130,  119,    0,  639,  639,  639,  639,  639,    0,  639,
-      296,  639,   71,  146,  147,  272,  639,  639,  639,  252,
-        0,  285,    0,   72,  313,  312,    0,    0,  278,  639,
-      639,  140,  639,  639,  158,  291,  277,  309,    0,  342,
-
-      269,  182,  152,  162,  290,  265,  366,    0,  399,  269,
-       58,  196,  639,  639,  276,  255,  423,    0,  456,  259,
-      270,  258,  480,    0,  513,  255,  266,  281,  537,    0,
-      570,  244,  251,  275,  212,  265,  263,  227,  143,    0,
-      267,    0,  149,  639,    0,    0,    0,    0,  257,    0,
-        0,    0,    0,  256,    0,    0,    0,    0,  249,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,  639,  639,  606,  610,  614,  616,  620,  622,  626,
-      630,  256,  255,  253,  252,  251,  250,  248,  247,  634,
-      242,  241,  240,  234,  233,  230,  228,  221,  219,  216,
-
-      215,  208,  201,  198,  188,  185,  176,  154,  152,  143,
-       80,   79,   76
+        0,   49,   49,   53,   54,   57,   87,   59,  335,  334,
+      135,  136,  137,  138,  335,  674,  674,  674,  318,  674,
+      326,  674,  315,  319,  173,  135,   48,  314,   50,    0,
+      323,  305,  674,  272,   66,  148,  674,  674,  674,   48,
+      674,  210,  115,  247,    0,  316,  674,   67,  315,    0,
+        0,  277,  275,  674,  135,  674,  674,  674,  301,   57,
+      167,  125,  129,    0,  674,  674,  674,  674,  674,    0,
+      674,  289,  674,   74,  151,  153,  264,  674,  674,  674,
+      271,    0,  306,    0,   75,  306,  299,    0,    0,  264,
+      256,  674,  674,  189,  674,  674,  131,  276,  262,  330,
+
+        0,  365,  253,  243,  149,  144,  133,  269,  249,  389,
+        0,  424,  247,  232,   61,  191,  674,  674,  253,  235,
+      448,    0,  483,  239,    0,  250,  240,  507,    0,  542,
+      238,    0,  253,  268,  566,    0,  601,  231,  236,  261,
+      289,  251,  247,  213,  192,    0,  348,    0,  206,  674,
+        0,    0,    0,    0,  244,    0,    0,    0,    0,  243,
+        0,    0,    0,    0,  242,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,  674,  674,  637,
+      641,  645,  647,  651,  653,  657,  661,  249,  248,  246,
+      245,  244,  665,  239,  238,  237,  669,  236,  235,  232,
+
+      231,  229,  223,  218,  216,  215,  214,  213,  209,  207,
+      203,  195,  186,  185,  171,  163,  141,   83,   82,   79
     } ;
 
     } ;
 
-static yyconst flex_int16_t yy_def[214] =
+static yyconst flex_int16_t yy_def[221] =
     {   0,
     {   0,
-      173,    1,  174,  174,  174,  174,  173,    7,  175,  175,
-      176,  176,  174,  174,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  177,
-      177,  177,  173,  173,  173,  173,  173,  173,  173,  178,
-      173,  173,   42,  179,  179,  179,  173,  173,  173,  180,
-      181,  181,  173,  178,  173,  173,  173,  173,  173,  173,
-      173,  173,  182,  173,  173,  173,  173,  173,  177,  173,
-      177,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      183,  179,  179,  173,  173,  173,  180,  181,  181,  173,
-      173,  173,  173,  173,  182,  177,  173,  173,  184,  179,
-
-      181,  173,  173,  173,  177,  173,  173,  185,  179,  181,
-      173,  173,  173,  173,  177,  173,  173,  186,  179,  181,
-      177,  173,  173,  187,  179,  181,  177,  173,  173,  188,
-      179,  181,  177,  173,  173,  173,  179,  181,  177,  189,
-      173,  190,  173,  173,  191,  190,  192,  193,  173,  194,
-      195,  196,  197,  173,  198,  199,  200,  201,  173,  202,
-      203,  204,  205,  206,  207,  208,  209,  210,  211,  212,
-      213,  173,    0,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173
+      179,    1,  180,  180,  180,  180,  179,    7,  181,  181,
+      182,  182,  180,  180,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  183,
+      183,  183,  179,  179,  179,  179,  179,  179,  179,  184,
+      179,  179,   42,  185,  185,  185,  179,  179,  179,  186,
+      187,  187,  187,  179,  184,  179,  179,  179,  179,  179,
+      179,  179,  179,  188,  179,  179,  179,  179,  179,  183,
+      179,  183,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  189,  185,  185,  179,  179,  179,  186,  187,  187,
+      187,  179,  179,  179,  179,  179,  188,  183,  179,  179,
+
+      190,  185,  187,  187,  179,  179,  179,  183,  179,  179,
+      191,  185,  187,  187,  179,  179,  179,  179,  183,  179,
+      179,  192,  185,  187,  193,  183,  179,  179,  194,  185,
+      187,  193,  183,  179,  179,  195,  185,  187,  183,  179,
+      179,  179,  185,  187,  183,  196,  179,  197,  179,  179,
+      198,  197,  199,  200,  179,  201,  202,  203,  204,  179,
+      205,  206,  207,  208,  179,  209,  210,  211,  212,  213,
+      214,  215,  216,  217,  218,  219,  220,  179,    0,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179
     } ;
 
     } ;
 
-static yyconst flex_int16_t yy_nxt[687] =
+static yyconst flex_int16_t yy_nxt[725] =
     {   0,
        16,   17,   18,   19,   20,   16,   21,   22,   16,   16,
        23,   24,   25,   26,   27,   28,   29,   30,   30,   30,
        30,   30,   31,   30,   32,   30,   30,   30,   33,   16,
        16,   30,   30,   30,   30,   30,   30,   30,   30,   30,
     {   0,
        16,   17,   18,   19,   20,   16,   21,   22,   16,   16,
        23,   24,   25,   26,   27,   28,   29,   30,   30,   30,
        30,   30,   31,   30,   32,   30,   30,   30,   33,   16,
        16,   30,   30,   30,   30,   30,   30,   30,   30,   30,
-       30,   30,   30,   30,   30,   30,   34,   35,   38,   78,
-       39,   36,   38,   38,   39,   41,   38,   48,   41,   64,
-       65,   49,   67,   68,   73,   84,   92,   92,   74,   85,
-      112,  112,   73,   84,   79,   40,   74,   85,  172,   40,
-       40,  171,  170,   40,   16,   17,   18,   19,   20,   16,
-       21,   22,   16,   16,   23,   24,   42,   43,   27,   28,
-
-       29,   44,   44,   44,   44,   45,   46,   45,   45,   45,
-       45,   45,   33,   16,   47,   45,   44,   44,   44,   44,
-       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       34,   38,   38,   38,   38,   59,   60,   60,   53,   53,
-       75,   94,   90,  173,  143,  169,   61,   75,   75,   62,
-      143,  144,   92,   92,  168,   93,  167,  144,   94,  102,
-       54,   54,  173,   61,   79,   59,   60,   60,   62,   52,
-       52,   59,   60,   60,   93,  102,   61,  113,  166,   62,
-      103,   76,   61,  104,  114,   62,   63,  165,   76,   76,
-      164,  111,  111,   61,  112,  112,  113,  103,   62,   61,
-
-      163,  114,  104,  162,   62,   63,   80,   80,  112,  112,
-      161,   81,   81,   81,   81,  102,   61,  159,  158,   62,
-       63,  157,  140,  156,  141,  141,   81,   81,   81,   81,
-      154,  102,  153,   61,   61,  152,  151,   62,   62,   63,
-       82,   82,  149,  148,  147,   82,   82,   82,   82,  145,
-      136,   61,  130,  124,  118,  108,   62,   99,   95,  160,
-       82,   82,   82,   82,   98,   98,  155,  150,  142,   99,
-       99,   99,   99,  140,   61,  140,  134,   62,  139,  141,
-      141,  138,  134,  133,   99,   99,   99,   99,  132,   61,
-      128,   61,   62,  127,  126,  122,   62,  100,  100,  121,
-
-      120,  116,  100,  100,  100,  100,   61,  115,  110,  106,
-      105,   62,  101,   86,   86,   97,   96,  100,  100,  100,
-      100,  107,  107,   91,   89,   86,  108,  108,  108,  108,
-       70,   61,   72,   71,   62,   70,   66,   58,   57,   56,
-       55,  108,  108,  108,  108,  173,   38,   38,   61,  173,
-      173,  173,  173,   62,  109,  109,  173,  173,  173,  109,
-      109,  109,  109,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  109,  109,  109,  109,  117,  117,
-      173,  173,  173,  118,  118,  118,  118,  173,   61,  173,
-      173,   62,  173,  173,  173,  173,  173,  173,  118,  118,
-
-      118,  118,  173,  173,  173,   61,  173,  173,  173,  173,
-       62,  119,  119,  173,  173,  173,  119,  119,  119,  119,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  119,  119,  119,  119,  123,  123,  173,  173,  173,
-      124,  124,  124,  124,  173,   61,  173,  173,   62,  173,
-      173,  173,  173,  173,  173,  124,  124,  124,  124,  173,
-      173,  173,   61,  173,  173,  173,  173,   62,  125,  125,
-      173,  173,  173,  125,  125,  125,  125,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  125,  125,
-      125,  125,  129,  129,  173,  173,  173,  130,  130,  130,
-
-      130,  173,   61,  173,  173,   62,  173,  173,  173,  173,
-      173,  173,  130,  130,  130,  130,  173,  173,  173,   61,
-      173,  173,  173,  173,   62,  131,  131,  173,  173,  173,
-      131,  131,  131,  131,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  131,  131,  131,  131,  135,
-      135,  173,  173,  173,  136,  136,  136,  136,  173,   61,
-      173,  173,   62,  173,  173,  173,  173,  173,  173,  136,
-      136,  136,  136,  173,  173,  173,   61,  173,  173,  173,
-      173,   62,  137,  137,  173,  173,  173,  137,  137,  137,
-      137,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-
-      173,  173,  137,  137,  137,  137,   37,   37,   37,   37,
-       50,   50,   50,   50,   51,   51,   51,   51,   69,   69,
-       77,  173,   77,   77,   83,   83,   87,  173,   87,   87,
-       88,  173,   88,   88,  146,  173,  146,  146,   15,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173
+       30,   30,   30,   30,   30,   30,   30,   30,   30,   34,
+       35,   38,   79,   39,   36,   38,   38,   39,   41,   38,
+       48,   41,   65,   66,   49,   68,   69,   74,   85,   94,
+       94,   75,   86,  116,  116,   74,   85,   80,   40,   75,
+       86,  178,   40,   40,  177,  176,   40,   16,   17,   18,
+       19,   20,   16,   21,   22,   16,   16,   23,   24,   42,
+
+       43,   27,   28,   29,   44,   44,   44,   44,   45,   46,
+       45,   45,   45,   45,   45,   33,   16,   47,   45,   44,
+       44,   44,   44,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,   45,   45,   45,   34,   38,   38,   38,
+       38,  179,   92,  175,   54,   54,   60,   61,   61,   76,
+       95,   96,   76,  106,   76,  118,  107,   62,  115,  115,
+       63,  116,  116,  179,   80,  174,   55,   55,   96,  117,
+      106,   95,  118,  173,   62,   52,   52,  107,   60,   61,
+       61,   63,   53,   53,   60,   61,   61,  172,  171,   62,
+      117,   77,   63,  149,   77,   62,   77,  170,   63,   64,
+
+      150,   94,   94,  116,  116,  169,   62,  149,  105,  168,
+      105,  167,   62,   63,  150,  165,  164,  163,  162,   63,
+      160,   64,   81,   81,  105,  159,  105,   82,   82,   82,
+       82,  158,   62,  157,  155,   63,   64,  154,  153,  151,
+      142,  136,   82,   82,   82,   82,  129,  122,  111,   62,
+      101,   97,  166,  161,  156,  148,   63,  146,   64,   83,
+       83,  146,  140,  145,   83,   83,   83,   83,  144,  140,
+      139,  138,  134,  133,  131,  127,  126,  125,  124,   83,
+       83,   83,   83,  100,  100,  120,  119,  114,  101,  101,
+      101,  101,  113,   62,  109,  108,   63,  104,  103,  146,
+
+       87,  147,  147,  101,  101,  101,  101,   87,   99,   98,
+       62,   62,   93,   91,   63,   90,   87,   63,  102,  102,
+       71,   73,   72,  102,  102,  102,  102,   71,   62,   67,
+       59,   58,   57,   56,  179,   63,   38,   38,  102,  102,
+      102,  102,  110,  110,  179,  179,  179,  111,  111,  111,
+      111,  179,   62,  179,  179,   63,  179,  179,  179,  179,
+      147,  147,  111,  111,  111,  111,  179,  179,  179,   62,
+       62,  179,  179,   63,  179,  179,   63,  112,  112,  179,
+      179,  179,  112,  112,  112,  112,  179,   62,  179,  179,
+      179,  179,  179,  179,   63,  179,  179,  112,  112,  112,
+
+      112,  121,  121,  179,  179,  179,  122,  122,  122,  122,
+      179,   62,  179,  179,   63,  179,  179,  179,  179,  179,
+      179,  122,  122,  122,  122,  179,  179,  179,   62,  179,
+      179,  179,  179,  179,  179,   63,  123,  123,  179,  179,
+      179,  123,  123,  123,  123,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  123,  123,  123,  123,
+      128,  128,  179,  179,  179,  129,  129,  129,  129,  179,
+       62,  179,  179,   63,  179,  179,  179,  179,  179,  179,
+      129,  129,  129,  129,  179,  179,  179,   62,  179,  179,
+      179,  179,  179,  179,   63,  130,  130,  179,  179,  179,
+
+      130,  130,  130,  130,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  130,  130,  130,  130,  135,
+      135,  179,  179,  179,  136,  136,  136,  136,  179,   62,
+      179,  179,   63,  179,  179,  179,  179,  179,  179,  136,
+      136,  136,  136,  179,  179,  179,   62,  179,  179,  179,
+      179,  179,  179,   63,  137,  137,  179,  179,  179,  137,
+      137,  137,  137,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  137,  137,  137,  137,  141,  141,
+      179,  179,  179,  142,  142,  142,  142,  179,   62,  179,
+      179,   63,  179,  179,  179,  179,  179,  179,  142,  142,
+
+      142,  142,  179,  179,  179,   62,  179,  179,  179,  179,
+      179,  179,   63,  143,  143,  179,  179,  179,  143,  143,
+      143,  143,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  143,  143,  143,  143,   37,   37,   37,
+       37,   50,   50,   50,   50,   51,   51,   51,   51,   70,
+       70,   78,  179,   78,   78,   84,   84,   88,  179,   88,
+       88,   89,  179,   89,   89,  132,  179,  132,  132,  152,
+      179,  152,  152,   15,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179
     } ;
 
     } ;
 
-static yyconst flex_int16_t yy_chk[687] =
+static yyconst flex_int16_t yy_chk[725] =
     {   0,
         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,    1,    1,    1,    1,
     {   0,
         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,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    2,    3,   40,
-        3,    2,    4,    5,    4,    5,    6,    8,    6,   27,
-       27,    8,   29,   29,   35,   48,   59,   59,   35,   48,
-      111,  111,   73,   84,   40,    3,   73,   84,  213,    4,
-        5,  212,  211,    6,    7,    7,    7,    7,    7,    7,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        2,    3,   40,    3,    2,    4,    5,    4,    5,    6,
+        8,    6,   27,   27,    8,   29,   29,   35,   48,   60,
+       60,   35,   48,  115,  115,   74,   85,   40,    3,   74,
+       85,  220,    4,    5,  219,  218,    6,    7,    7,    7,
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
 
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
 
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
-        7,   11,   12,   13,   14,   26,   26,   26,   13,   14,
-       36,   62,   54,   43,  139,  210,   26,   74,   75,   26,
-      143,  139,   92,   92,  209,   61,  208,  143,   62,   92,
-       13,   14,   43,   26,   54,   60,   60,   60,   26,   11,
-       12,   25,   25,   25,   61,   92,   60,  103,  207,   60,
-       95,   36,   25,   95,  104,   25,   25,  206,   74,   75,
-      205,  102,  102,   60,  102,  102,  103,   95,   60,   25,
-
-      204,  104,   95,  203,   25,   25,   42,   42,  112,  112,
-      202,   42,   42,   42,   42,  112,   42,  201,  200,   42,
-       42,  199,  135,  198,  135,  135,   42,   42,   42,   42,
-      197,  112,  196,   42,  135,  195,  194,  135,   42,   42,
-       44,   44,  193,  192,  191,   44,   44,   44,   44,  189,
-      188,  135,  187,  186,  185,  184,  135,  183,  182,  159,
-       44,   44,   44,   44,   80,   80,  154,  149,  138,   80,
-       80,   80,   80,  137,   80,  136,  134,   80,  133,  141,
-      141,  132,  128,  127,   80,   80,   80,   80,  126,  141,
-      122,   80,  141,  121,  120,  116,   80,   82,   82,  115,
-
-      110,  106,   82,   82,   82,   82,  141,  105,  101,   97,
-       96,  141,   89,   86,   85,   76,   71,   82,   82,   82,
-       82,   98,   98,   58,   52,   49,   98,   98,   98,   98,
-       46,   98,   34,   32,   98,   31,   28,   24,   23,   21,
-       19,   98,   98,   98,   98,   15,   10,    9,   98,    0,
-        0,    0,    0,   98,  100,  100,    0,    0,    0,  100,
-      100,  100,  100,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,  100,  100,  100,  100,  107,  107,
-        0,    0,    0,  107,  107,  107,  107,    0,  107,    0,
-        0,  107,    0,    0,    0,    0,    0,    0,  107,  107,
-
-      107,  107,    0,    0,    0,  107,    0,    0,    0,    0,
-      107,  109,  109,    0,    0,    0,  109,  109,  109,  109,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,  109,  109,  109,  109,  117,  117,    0,    0,    0,
-      117,  117,  117,  117,    0,  117,    0,    0,  117,    0,
-        0,    0,    0,    0,    0,  117,  117,  117,  117,    0,
-        0,    0,  117,    0,    0,    0,    0,  117,  119,  119,
-        0,    0,    0,  119,  119,  119,  119,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,  119,  119,
-      119,  119,  123,  123,    0,    0,    0,  123,  123,  123,
-
-      123,    0,  123,    0,    0,  123,    0,    0,    0,    0,
-        0,    0,  123,  123,  123,  123,    0,    0,    0,  123,
-        0,    0,    0,    0,  123,  125,  125,    0,    0,    0,
-      125,  125,  125,  125,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,  125,  125,  125,  125,  129,
-      129,    0,    0,    0,  129,  129,  129,  129,    0,  129,
-        0,    0,  129,    0,    0,    0,    0,    0,    0,  129,
-      129,  129,  129,    0,    0,    0,  129,    0,    0,    0,
-        0,  129,  131,  131,    0,    0,    0,  131,  131,  131,
-      131,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-
-        0,    0,  131,  131,  131,  131,  174,  174,  174,  174,
-      175,  175,  175,  175,  176,  176,  176,  176,  177,  177,
-      178,    0,  178,  178,  179,  179,  180,    0,  180,  180,
-      181,    0,  181,  181,  190,    0,  190,  190,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173
+        7,    7,    7,    7,    7,    7,    7,   11,   12,   13,
+       14,   43,   55,  217,   13,   14,   26,   26,   26,   36,
+       62,   63,   75,   97,   76,  107,   97,   26,  105,  105,
+       26,  105,  105,   43,   55,  216,   13,   14,   63,  106,
+       97,   62,  107,  215,   26,   11,   12,   97,   61,   61,
+       61,   26,   11,   12,   25,   25,   25,  214,  213,   61,
+      106,   36,   61,  145,   75,   25,   76,  212,   25,   25,
+
+      145,   94,   94,  116,  116,  211,   61,  149,   94,  210,
+      116,  209,   25,   61,  149,  208,  207,  206,  205,   25,
+      204,   25,   42,   42,   94,  203,  116,   42,   42,   42,
+       42,  202,   42,  201,  200,   42,   42,  199,  198,  196,
+      195,  194,   42,   42,   42,   42,  192,  191,  190,   42,
+      189,  188,  165,  160,  155,  144,   42,  143,   42,   44,
+       44,  142,  140,  139,   44,   44,   44,   44,  138,  134,
+      133,  131,  127,  126,  124,  120,  119,  114,  113,   44,
+       44,   44,   44,   81,   81,  109,  108,  104,   81,   81,
+       81,   81,  103,   81,   99,   98,   81,   91,   90,  141,
+
+       87,  141,  141,   81,   81,   81,   81,   86,   77,   72,
+       81,  141,   59,   53,  141,   52,   49,   81,   83,   83,
+       46,   34,   32,   83,   83,   83,   83,   31,  141,   28,
+       24,   23,   21,   19,   15,  141,   10,    9,   83,   83,
+       83,   83,  100,  100,    0,    0,    0,  100,  100,  100,
+      100,    0,  100,    0,    0,  100,    0,    0,    0,    0,
+      147,  147,  100,  100,  100,  100,    0,    0,    0,  100,
+      147,    0,    0,  147,    0,    0,  100,  102,  102,    0,
+        0,    0,  102,  102,  102,  102,    0,  147,    0,    0,
+        0,    0,    0,    0,  147,    0,    0,  102,  102,  102,
+
+      102,  110,  110,    0,    0,    0,  110,  110,  110,  110,
+        0,  110,    0,    0,  110,    0,    0,    0,    0,    0,
+        0,  110,  110,  110,  110,    0,    0,    0,  110,    0,
+        0,    0,    0,    0,    0,  110,  112,  112,    0,    0,
+        0,  112,  112,  112,  112,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,  112,  112,  112,  112,
+      121,  121,    0,    0,    0,  121,  121,  121,  121,    0,
+      121,    0,    0,  121,    0,    0,    0,    0,    0,    0,
+      121,  121,  121,  121,    0,    0,    0,  121,    0,    0,
+        0,    0,    0,    0,  121,  123,  123,    0,    0,    0,
+
+      123,  123,  123,  123,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,  123,  123,  123,  123,  128,
+      128,    0,    0,    0,  128,  128,  128,  128,    0,  128,
+        0,    0,  128,    0,    0,    0,    0,    0,    0,  128,
+      128,  128,  128,    0,    0,    0,  128,    0,    0,    0,
+        0,    0,    0,  128,  130,  130,    0,    0,    0,  130,
+      130,  130,  130,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  130,  130,  130,  130,  135,  135,
+        0,    0,    0,  135,  135,  135,  135,    0,  135,    0,
+        0,  135,    0,    0,    0,    0,    0,    0,  135,  135,
+
+      135,  135,    0,    0,    0,  135,    0,    0,    0,    0,
+        0,    0,  135,  137,  137,    0,    0,    0,  137,  137,
+      137,  137,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,  137,  137,  137,  137,  180,  180,  180,
+      180,  181,  181,  181,  181,  182,  182,  182,  182,  183,
+      183,  184,    0,  184,  184,  185,  185,  186,    0,  186,
+      186,  187,    0,  187,  187,  193,    0,  193,  193,  197,
+        0,  197,  197,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
+      179,  179,  179,  179
     } ;
 
 static yy_state_type yy_last_accepting_state;
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -799,7 +809,7 @@ UUID *parse_uuid(const char *u)
  * The flexer starts here
  **************************************************************************
  */
  * The flexer starts here
  **************************************************************************
  */
-#line 803 "parser.yy.c"
+#line 813 "parser.yy.c"
 
 #define INITIAL 0
 #define QUOTE 1
 
 #define INITIAL 0
 #define QUOTE 1
@@ -1003,7 +1013,7 @@ YY_DECL
     
 #line 128 "parser.l"
 
     
 #line 128 "parser.l"
 
-#line 1007 "parser.yy.c"
+#line 1017 "parser.yy.c"
 
        if ( !(yy_init) )
                {
 
        if ( !(yy_init) )
                {
@@ -1057,13 +1067,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 174 )
+                               if ( yy_current_state >= 180 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
-               while ( yy_current_state != 173 );
+               while ( yy_current_state != 179 );
                yy_cp = (yy_last_accepting_cpos);
                yy_current_state = (yy_last_accepting_state);
 
                yy_cp = (yy_last_accepting_cpos);
                yy_current_state = (yy_last_accepting_state);
 
@@ -1123,196 +1133,216 @@ yyless(9); yy_pop_state(); return tCPPQUOTE;
 case 5:
 YY_RULE_SETUP
 #line 150 "parser.l"
 case 5:
 YY_RULE_SETUP
 #line 150 "parser.l"
-parser_lval.str = xstrdup(parser_text); yy_pop_state(); return aPRAGMA;
+{
+                            if(import_stack_ptr) {
+                                if(!winrt_mode)
+                                    error_loc("winrt IDL file imported in non-winrt mode\n");
+                            }else {
+                                const char *ptr = parser_text+5;
+
+                                winrt_mode = TRUE;
+
+                                while(isspace(*ptr))
+                                    ptr++;
+                                if(!strncmp(ptr, "ns_prefix", 9) && (!*(ptr += 9) || isspace(*ptr)))
+                                    use_abi_namespace = TRUE;
+                            }
+                            yy_pop_state();
+                        }
        YY_BREAK
 case 6:
 YY_RULE_SETUP
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 151 "parser.l"
-yy_push_state(QUOTE); cbufidx = 0;
+#line 166 "parser.l"
+parser_lval.str = xstrdup(parser_text); yy_pop_state(); return aPRAGMA;
        YY_BREAK
 case 7:
 YY_RULE_SETUP
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 152 "parser.l"
+#line 167 "parser.l"
+yy_push_state(QUOTE); cbufidx = 0;
+       YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 168 "parser.l"
 {
                                yy_pop_state();
                                parser_lval.str = get_buffered_cstring();
                                return aSTRING;
                        }
        YY_BREAK
 {
                                yy_pop_state();
                                parser_lval.str = get_buffered_cstring();
                                return aSTRING;
                        }
        YY_BREAK
-case 8:
+case 9:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 157 "parser.l"
+#line 173 "parser.l"
 yy_push_state(WSTRQUOTE); cbufidx = 0;
        YY_BREAK
 yy_push_state(WSTRQUOTE); cbufidx = 0;
        YY_BREAK
-case 9:
+case 10:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 158 "parser.l"
+#line 174 "parser.l"
 {
                                yy_pop_state();
                                parser_lval.str = get_buffered_cstring();
                                return aWSTRING;
                        }
        YY_BREAK
 {
                                yy_pop_state();
                                parser_lval.str = get_buffered_cstring();
                                return aWSTRING;
                        }
        YY_BREAK
-case 10:
+case 11:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 163 "parser.l"
+#line 179 "parser.l"
 yy_push_state(SQUOTE); cbufidx = 0;
        YY_BREAK
 yy_push_state(SQUOTE); cbufidx = 0;
        YY_BREAK
-case 11:
+case 12:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 164 "parser.l"
+#line 180 "parser.l"
 {
                                yy_pop_state();
                                parser_lval.str = get_buffered_cstring();
                                return aSQSTRING;
                        }
        YY_BREAK
 {
                                yy_pop_state();
                                parser_lval.str = get_buffered_cstring();
                                return aSQSTRING;
                        }
        YY_BREAK
-case 12:
-#line 170 "parser.l"
 case 13:
 case 13:
+#line 186 "parser.l"
+case 14:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 170 "parser.l"
+#line 186 "parser.l"
 addcchar(parser_text[1]);
        YY_BREAK
 addcchar(parser_text[1]);
        YY_BREAK
-case 14:
+case 15:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 171 "parser.l"
+#line 187 "parser.l"
 addcchar(parser_text[1]);
        YY_BREAK
 addcchar(parser_text[1]);
        YY_BREAK
-case 15:
+case 16:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 172 "parser.l"
+#line 188 "parser.l"
 addcchar('\\'); addcchar(parser_text[1]);
        YY_BREAK
 addcchar('\\'); addcchar(parser_text[1]);
        YY_BREAK
-case 16:
+case 17:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 173 "parser.l"
+#line 189 "parser.l"
 addcchar(parser_text[0]);
        YY_BREAK
 addcchar(parser_text[0]);
        YY_BREAK
-case 17:
+case 18:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 174 "parser.l"
+#line 190 "parser.l"
 yy_push_state(ATTR); return '[';
        YY_BREAK
 yy_push_state(ATTR); return '[';
        YY_BREAK
-case 18:
+case 19:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 175 "parser.l"
+#line 191 "parser.l"
 yy_pop_state(); return ']';
        YY_BREAK
 yy_pop_state(); return ']';
        YY_BREAK
-case 19:
+case 20:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 176 "parser.l"
+#line 192 "parser.l"
 return attr_token(parser_text);
        YY_BREAK
 return attr_token(parser_text);
        YY_BREAK
-case 20:
+case 21:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 177 "parser.l"
+#line 193 "parser.l"
 {
                                parser_lval.uuid = parse_uuid(parser_text);
                                return aUUID;
                        }
        YY_BREAK
 {
                                parser_lval.uuid = parse_uuid(parser_text);
                                return aUUID;
                        }
        YY_BREAK
-case 21:
+case 22:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 181 "parser.l"
+#line 197 "parser.l"
 {
                                parser_lval.num = xstrtoul(parser_text, NULL, 0);
                                return aHEXNUM;
                        }
        YY_BREAK
 {
                                parser_lval.num = xstrtoul(parser_text, NULL, 0);
                                return aHEXNUM;
                        }
        YY_BREAK
-case 22:
+case 23:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 185 "parser.l"
+#line 201 "parser.l"
 {
                                parser_lval.num = xstrtoul(parser_text, NULL, 0);
                                return aNUM;
                        }
        YY_BREAK
 {
                                parser_lval.num = xstrtoul(parser_text, NULL, 0);
                                return aNUM;
                        }
        YY_BREAK
-case 23:
+case 24:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 189 "parser.l"
+#line 205 "parser.l"
 {
                                parser_lval.dbl = strtod(parser_text, NULL);
                                return aDOUBLE;
                        }
        YY_BREAK
 {
                                parser_lval.dbl = strtod(parser_text, NULL);
                                return aDOUBLE;
                        }
        YY_BREAK
-case 24:
+case 25:
 *yy_cp = (yy_hold_char); /* undo effects of setting up parser_text */
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up parser_text again */
 YY_RULE_SETUP
 *yy_cp = (yy_hold_char); /* undo effects of setting up parser_text */
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up parser_text again */
 YY_RULE_SETUP
-#line 193 "parser.l"
+#line 209 "parser.l"
 return tSAFEARRAY;
        YY_BREAK
 return tSAFEARRAY;
        YY_BREAK
-case 25:
+case 26:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 194 "parser.l"
+#line 210 "parser.l"
 return kw_token(parser_text);
        YY_BREAK
 return kw_token(parser_text);
        YY_BREAK
-case 26:
-/* rule 26 can match eol */
+case 27:
+/* rule 27 can match eol */
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 195 "parser.l"
+#line 211 "parser.l"
 line_number++;
        YY_BREAK
 line_number++;
        YY_BREAK
-case 27:
+case 28:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 196 "parser.l"
+#line 212 "parser.l"
 
        YY_BREAK
 
        YY_BREAK
-case 28:
+case 29:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 197 "parser.l"
+#line 213 "parser.l"
 return SHL;
        YY_BREAK
 return SHL;
        YY_BREAK
-case 29:
+case 30:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 198 "parser.l"
+#line 214 "parser.l"
 return SHR;
        YY_BREAK
 return SHR;
        YY_BREAK
-case 30:
+case 31:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 199 "parser.l"
+#line 215 "parser.l"
 return MEMBERPTR;
        YY_BREAK
 return MEMBERPTR;
        YY_BREAK
-case 31:
+case 32:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 200 "parser.l"
+#line 216 "parser.l"
 return EQUALITY;
        YY_BREAK
 return EQUALITY;
        YY_BREAK
-case 32:
+case 33:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 201 "parser.l"
+#line 217 "parser.l"
 return INEQUALITY;
        YY_BREAK
 return INEQUALITY;
        YY_BREAK
-case 33:
+case 34:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 202 "parser.l"
+#line 218 "parser.l"
 return GREATEREQUAL;
        YY_BREAK
 return GREATEREQUAL;
        YY_BREAK
-case 34:
+case 35:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 203 "parser.l"
+#line 219 "parser.l"
 return LESSEQUAL;
        YY_BREAK
 return LESSEQUAL;
        YY_BREAK
-case 35:
+case 36:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 204 "parser.l"
+#line 220 "parser.l"
 return LOGICALOR;
        YY_BREAK
 return LOGICALOR;
        YY_BREAK
-case 36:
+case 37:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 205 "parser.l"
+#line 221 "parser.l"
 return LOGICALAND;
        YY_BREAK
 return LOGICALAND;
        YY_BREAK
-case 37:
+case 38:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 206 "parser.l"
+#line 222 "parser.l"
 return ELLIPSIS;
        YY_BREAK
 return ELLIPSIS;
        YY_BREAK
-case 38:
+case 39:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 207 "parser.l"
+#line 223 "parser.l"
 return parser_text[0];
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
 return parser_text[0];
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
@@ -1322,19 +1352,19 @@ case YY_STATE_EOF(ATTR):
 case YY_STATE_EOF(PP_LINE):
 case YY_STATE_EOF(PP_PRAGMA):
 case YY_STATE_EOF(SQUOTE):
 case YY_STATE_EOF(PP_LINE):
 case YY_STATE_EOF(PP_PRAGMA):
 case YY_STATE_EOF(SQUOTE):
-#line 208 "parser.l"
+#line 224 "parser.l"
 {
                                if (import_stack_ptr)
                                        return aEOF;
                                else yyterminate();
                        }
        YY_BREAK
 {
                                if (import_stack_ptr)
                                        return aEOF;
                                else yyterminate();
                        }
        YY_BREAK
-case 39:
+case 40:
 YY_RULE_SETUP
 YY_RULE_SETUP
-#line 213 "parser.l"
+#line 229 "parser.l"
 ECHO;
        YY_BREAK
 ECHO;
        YY_BREAK
-#line 1338 "parser.yy.c"
+#line 1368 "parser.yy.c"
 
        case YY_END_OF_BUFFER:
                {
 
        case YY_END_OF_BUFFER:
                {
@@ -1626,7 +1656,7 @@ static int yy_get_next_buffer (void)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 174 )
+                       if ( yy_current_state >= 180 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1654,11 +1684,11 @@ static int yy_get_next_buffer (void)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 174 )
+               if ( yy_current_state >= 180 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 173);
+       yy_is_jam = (yy_current_state == 179);
 
        return yy_is_jam ? 0 : yy_current_state;
 }
 
        return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2333,7 +2363,7 @@ void parser_free (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
 
 #define YYTABLES_NAME "yytables"
 
-#line 213 "parser.l"
+#line 229 "parser.l"
 
 
 
 
 
 
@@ -2544,7 +2574,7 @@ static int kw_token(const char *kw)
        struct keyword key, *kwp;
        key.kw = kw;
        kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func);
        struct keyword key, *kwp;
        key.kw = kw;
        kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func);
-       if (kwp && (do_rt_extension || kwp->token != tNAMESPACE)) {
+       if (kwp && (winrt_mode || kwp->token != tNAMESPACE)) {
                parser_lval.str = xstrdup(kwp->kw);
                return kwp->token;
        }
                parser_lval.str = xstrdup(kwp->kw);
                return kwp->token;
        }
index 99631c9..794fc5d 100644 (file)
 #include "typegen.h"
 #include "expr.h"
 
 #include "typegen.h"
 #include "expr.h"
 
-#define END_OF_LIST(list)       \
-  do {                          \
-    if (list) {                 \
-      while (NEXT_LINK(list))   \
-        list = NEXT_LINK(list); \
-    }                           \
-  } while(0)
-
 static FILE* proxy;
 static int indent = 0;
 
 static FILE* proxy;
 static int indent = 0;
 
index d8b34d9..9a4f219 100644 (file)
@@ -280,6 +280,8 @@ void output_typelib_regscript( const typelib_t *typelib )
     const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID );
     unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION );
     unsigned int flags = 0;
     const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID );
     unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION );
     unsigned int flags = 0;
+    char id_part[12] = "";
+    expr_t *expr;
 
     if (is_attr( typelib->attrs, ATTR_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */
     if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */
 
     if (is_attr( typelib->attrs, ATTR_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */
     if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */
@@ -295,8 +297,11 @@ void output_typelib_regscript( const typelib_t *typelib )
     put_str( indent, "'%u.%u' = s '%s'\n",
              MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name );
     put_str( indent++, "{\n" );
     put_str( indent, "'%u.%u' = s '%s'\n",
              MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name );
     put_str( indent++, "{\n" );
-    put_str( indent, "'%x' { %s = s '%%MODULE%%' }\n",
-             lcid_expr ? lcid_expr->cval : 0, typelib_kind == SYS_WIN64 ? "win64" : "win32" );
+    expr = get_attrp( typelib->attrs, ATTR_ID );
+    if (expr)
+        sprintf(id_part, "\\%d", expr->cval);
+    put_str( indent, "'%x' { %s = s '%%MODULE%%%s' }\n",
+             lcid_expr ? lcid_expr->cval : 0, typelib_kind == SYS_WIN64 ? "win64" : "win32", id_part );
     put_str( indent, "FLAGS = s '%u'\n", flags );
     put_str( --indent, "}\n" );
     put_str( --indent, "}\n" );
     put_str( indent, "FLAGS = s '%u'\n", flags );
     put_str( --indent, "}\n" );
     put_str( --indent, "}\n" );
index ebfd433..ca3f82f 100644 (file)
@@ -1142,7 +1142,7 @@ static unsigned char get_func_oi2_flags( const var_t *func )
 static unsigned int write_new_procformatstring_type(FILE *file, int indent, const var_t *var,
                                                     int is_return, unsigned int *stack_offset)
 {
 static unsigned int write_new_procformatstring_type(FILE *file, int indent, const var_t *var,
                                                     int is_return, unsigned int *stack_offset)
 {
-    char buffer[64];
+    char buffer[128];
     unsigned int stack_size, typestring_offset;
     unsigned short flags;
     unsigned char fc = get_parameter_fc( var, is_return, &flags, &stack_size, &typestring_offset );
     unsigned int stack_size, typestring_offset;
     unsigned short flags;
     unsigned char fc = get_parameter_fc( var, is_return, &flags, &stack_size, &typestring_offset );
@@ -4735,7 +4735,7 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun
     if (args) LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry )
     {
         print_file(file, 2, "%s", "");
     if (args) LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry )
     {
         print_file(file, 2, "%s", "");
-        write_type_left( file, (type_t *)arg->type, TRUE );
+        write_type_left( file, (type_t *)arg->type, NAME_DEFAULT, TRUE );
         if (needs_space_after( arg->type )) fputc( ' ', file );
         if (is_array( arg->type ) && !type_array_is_decl_as_ptr( arg->type )) fputc( '*', file );
 
         if (needs_space_after( arg->type )) fputc( ' ', file );
         if (is_array( arg->type ) && !type_array_is_decl_as_ptr( arg->type )) fputc( '*', file );
 
@@ -4800,9 +4800,9 @@ int write_expr_eval_routines(FILE *file, const char *iface)
         else
         {
             print_file(file, 1, "%s", "");
         else
         {
             print_file(file, 1, "%s", "");
-            write_type_left(file, (type_t *)eval->cont_type, TRUE);
+            write_type_left(file, (type_t *)eval->cont_type, NAME_DEFAULT, TRUE);
             fprintf(file, " *%s = (", var_name);
             fprintf(file, " *%s = (", var_name);
-            write_type_left(file, (type_t *)eval->cont_type, TRUE);
+            write_type_left(file, (type_t *)eval->cont_type, NAME_DEFAULT, TRUE);
             fprintf(file, " *)(pStubMsg->StackTop - %u);\n", eval->baseoff);
         }
         print_file(file, 1, "pStubMsg->Offset = 0;\n"); /* FIXME */
             fprintf(file, " *)(pStubMsg->StackTop - %u);\n", eval->baseoff);
         }
         print_file(file, 1, "pStubMsg->Offset = 0;\n"); /* FIXME */
index d28a8e7..9a5466d 100644 (file)
@@ -32,9 +32,6 @@
 #include <string.h>
 #include <ctype.h>
 
 #include <string.h>
 #include <ctype.h>
 
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
 #include <typedefs.h>
 #include "widl.h"
 #include "utils.h"
 #include <typedefs.h>
 #include "widl.h"
 #include "utils.h"
index a9e71be..e316614 100644 (file)
@@ -45,8 +45,10 @@ type_t *make_type(enum type_type type)
 {
     type_t *t = alloc_type();
     t->name = NULL;
 {
     type_t *t = alloc_type();
     t->name = NULL;
+    t->namespace = NULL;
     t->type_type = type;
     t->attrs = NULL;
     t->type_type = type;
     t->attrs = NULL;
+    t->c_name = NULL;
     t->orig = NULL;
     memset(&t->details, 0, sizeof(t->details));
     t->typestring_offset = 0;
     t->orig = NULL;
     memset(&t->details, 0, sizeof(t->details));
     t->typestring_offset = 0;
@@ -76,6 +78,56 @@ static const var_t *find_arg(const var_list_t *args, const char *name)
     return NULL;
 }
 
     return NULL;
 }
 
+const char *type_get_name(const type_t *type, enum name_type name_type)
+{
+    switch(name_type) {
+    case NAME_DEFAULT:
+        return type->name;
+    case NAME_C:
+        return type->c_name;
+    }
+
+    assert(0);
+    return NULL;
+}
+
+static char *append_namespace(char *ptr, struct namespace *namespace, const char *separator)
+{
+    if(is_global_namespace(namespace)) {
+        if(!use_abi_namespace)
+            return ptr;
+        strcpy(ptr, "ABI");
+        strcat(ptr, separator);
+        return ptr + strlen(ptr);
+    }
+
+    ptr = append_namespace(ptr, namespace->parent, separator);
+    strcpy(ptr, namespace->name);
+    strcat(ptr, separator);
+    return ptr + strlen(ptr);
+}
+
+char *format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix)
+{
+    unsigned len = strlen(prefix) + strlen(suffix);
+    unsigned sep_len = strlen(separator);
+    struct namespace *iter;
+    char *ret, *ptr;
+
+    if(use_abi_namespace && !is_global_namespace(namespace))
+        len += 3 /* strlen("ABI") */ + sep_len;
+
+    for(iter = namespace; !is_global_namespace(iter); iter = iter->parent)
+        len += strlen(iter->name) + sep_len;
+
+    ret = xmalloc(len+1);
+    strcpy(ret, prefix);
+    ptr = append_namespace(ret + strlen(ret), namespace, separator);
+    strcpy(ptr, suffix);
+
+    return ret;
+}
+
 type_t *type_new_function(var_list_t *args)
 {
     var_t *arg;
 type_t *type_new_function(var_list_t *args)
 {
     var_t *arg;
@@ -152,7 +204,7 @@ type_t *type_new_alias(type_t *t, const char *name)
 
 type_t *type_new_module(char *name)
 {
 
 type_t *type_new_module(char *name)
 {
-    type_t *type = get_type(TYPE_MODULE, name, 0);
+    type_t *type = get_type(TYPE_MODULE, name, NULL, 0);
     if (type->type_type != TYPE_MODULE || type->defined)
         error_loc("%s: redefinition error; original definition was at %s:%d\n",
                   type->name, type->loc_info.input_name, type->loc_info.line_number);
     if (type->type_type != TYPE_MODULE || type->defined)
         error_loc("%s: redefinition error; original definition was at %s:%d\n",
                   type->name, type->loc_info.input_name, type->loc_info.line_number);
@@ -162,7 +214,7 @@ type_t *type_new_module(char *name)
 
 type_t *type_new_coclass(char *name)
 {
 
 type_t *type_new_coclass(char *name)
 {
-    type_t *type = get_type(TYPE_COCLASS, name, 0);
+    type_t *type = get_type(TYPE_COCLASS, name, NULL, 0);
     if (type->type_type != TYPE_COCLASS || type->defined)
         error_loc("%s: redefinition error; original definition was at %s:%d\n",
                   type->name, type->loc_info.input_name, type->loc_info.line_number);
     if (type->type_type != TYPE_COCLASS || type->defined)
         error_loc("%s: redefinition error; original definition was at %s:%d\n",
                   type->name, type->loc_info.input_name, type->loc_info.line_number);
@@ -219,11 +271,12 @@ type_t *type_new_void(void)
     return void_type;
 }
 
     return void_type;
 }
 
-type_t *type_new_enum(const char *name, int defined, var_list_t *enums)
+type_t *type_new_enum(const char *name, struct namespace *namespace, int defined, var_list_t *enums)
 {
 {
-    type_t *tag_type = name ? find_type(name, tsENUM) : NULL;
+    type_t *tag_type = name ? find_type(name, namespace, tsENUM) : NULL;
     type_t *t = make_type(TYPE_ENUM);
     t->name = name;
     type_t *t = make_type(TYPE_ENUM);
     t->name = name;
+    t->namespace = namespace;
 
     if (tag_type && tag_type->details.enumeration)
         t->details.enumeration = tag_type->details.enumeration;
 
     if (tag_type && tag_type->details.enumeration)
         t->details.enumeration = tag_type->details.enumeration;
@@ -237,18 +290,25 @@ type_t *type_new_enum(const char *name, int defined, var_list_t *enums)
     if (name)
     {
         if (defined)
     if (name)
     {
         if (defined)
-            reg_type(t, name, tsENUM);
+            reg_type(t, name, namespace, tsENUM);
         else
             add_incomplete(t);
     }
     return t;
 }
 
         else
             add_incomplete(t);
     }
     return t;
 }
 
-type_t *type_new_struct(char *name, int defined, var_list_t *fields)
+type_t *type_new_struct(char *name, struct namespace *namespace, int defined, var_list_t *fields)
 {
 {
-    type_t *tag_type = name ? find_type(name, tsSTRUCT) : NULL;
-    type_t *t = make_type(TYPE_STRUCT);
+    type_t *tag_type = name ? find_type(name, namespace, tsSTRUCT) : NULL;
+    type_t *t;
+
+    /* avoid creating duplicate typelib type entries */
+    if (tag_type && do_typelib) return tag_type;
+
+    t = make_type(TYPE_STRUCT);
     t->name = name;
     t->name = name;
+    t->namespace = namespace;
+
     if (tag_type && tag_type->details.structure)
         t->details.structure = tag_type->details.structure;
     else if (defined)
     if (tag_type && tag_type->details.structure)
         t->details.structure = tag_type->details.structure;
     else if (defined)
@@ -260,7 +320,7 @@ type_t *type_new_struct(char *name, int defined, var_list_t *fields)
     if (name)
     {
         if (defined)
     if (name)
     {
         if (defined)
-            reg_type(t, name, tsSTRUCT);
+            reg_type(t, name, namespace, tsSTRUCT);
         else
             add_incomplete(t);
     }
         else
             add_incomplete(t);
     }
@@ -269,7 +329,7 @@ type_t *type_new_struct(char *name, int defined, var_list_t *fields)
 
 type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields)
 {
 
 type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields)
 {
-    type_t *tag_type = name ? find_type(name, tsUNION) : NULL;
+    type_t *tag_type = name ? find_type(name, NULL, tsUNION) : NULL;
     type_t *t = make_type(TYPE_UNION);
     t->name = name;
     if (tag_type && tag_type->details.structure)
     type_t *t = make_type(TYPE_UNION);
     t->name = name;
     if (tag_type && tag_type->details.structure)
@@ -283,7 +343,7 @@ type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t
     if (name)
     {
         if (defined)
     if (name)
     {
         if (defined)
-            reg_type(t, name, tsUNION);
+            reg_type(t, name, NULL, tsUNION);
         else
             add_incomplete(t);
     }
         else
             add_incomplete(t);
     }
@@ -292,7 +352,7 @@ type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t
 
 type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases)
 {
 
 type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases)
 {
-    type_t *t = get_type(TYPE_ENCAPSULATED_UNION, name, tsUNION);
+    type_t *t = get_type(TYPE_ENCAPSULATED_UNION, name, NULL, tsUNION);
     if (!union_field) union_field = make_var( xstrdup("tagged_union") );
     union_field->type = type_new_nonencapsulated_union(NULL, TRUE, cases);
     t->details.structure = xmalloc(sizeof(*t->details.structure));
     if (!union_field) union_field = make_var( xstrdup("tagged_union") );
     union_field->type = type_new_nonencapsulated_union(NULL, TRUE, cases);
     t->details.structure = xmalloc(sizeof(*t->details.structure));
@@ -392,7 +452,7 @@ void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *met
     iface->details.iface->disp_props = props;
     iface->details.iface->disp_methods = methods;
     iface->details.iface->stmts = NULL;
     iface->details.iface->disp_props = props;
     iface->details.iface->disp_methods = methods;
     iface->details.iface->stmts = NULL;
-    iface->details.iface->inherit = find_type("IDispatch", 0);
+    iface->details.iface->inherit = find_type("IDispatch", NULL, 0);
     if (!iface->details.iface->inherit) error_loc("IDispatch is undefined\n");
     iface->defined = TRUE;
     compute_method_indexes(iface);
     if (!iface->details.iface->inherit) error_loc("IDispatch is undefined\n");
     iface->defined = TRUE;
     compute_method_indexes(iface);
index 1e7ed88..bf05f25 100644 (file)
 #ifndef WIDL_TYPE_TREE_H
 #define WIDL_TYPE_TREE_H
 
 #ifndef WIDL_TYPE_TREE_H
 #define WIDL_TYPE_TREE_H
 
+enum name_type {
+    NAME_DEFAULT,
+    NAME_C
+};
+
 type_t *type_new_function(var_list_t *args);
 type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t *attrs);
 type_t *type_new_alias(type_t *t, const char *name);
 type_t *type_new_function(var_list_t *args);
 type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t *attrs);
 type_t *type_new_alias(type_t *t, const char *name);
@@ -35,8 +40,8 @@ type_t *type_new_basic(enum type_basic_type basic_type);
 type_t *type_new_int(enum type_basic_type basic_type, int sign);
 type_t *type_new_void(void);
 type_t *type_new_coclass(char *name);
 type_t *type_new_int(enum type_basic_type basic_type, int sign);
 type_t *type_new_void(void);
 type_t *type_new_coclass(char *name);
-type_t *type_new_enum(const char *name, int defined, var_list_t *enums);
-type_t *type_new_struct(char *name, int defined, var_list_t *fields);
+type_t *type_new_enum(const char *name, struct namespace *namespace, int defined, var_list_t *enums);
+type_t *type_new_struct(char *name, struct namespace *namespace, int defined, var_list_t *fields);
 type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields);
 type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases);
 type_t *type_new_bitfield(type_t *field_type, const expr_t *bits);
 type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields);
 type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases);
 type_t *type_new_bitfield(type_t *field_type, const expr_t *bits);
@@ -46,6 +51,7 @@ void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface);
 void type_module_define(type_t *module, statement_list_t *stmts);
 type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces);
 int type_is_equal(const type_t *type1, const type_t *type2);
 void type_module_define(type_t *module, statement_list_t *stmts);
 type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces);
 int type_is_equal(const type_t *type1, const type_t *type2);
+const char *type_get_name(const type_t *type, enum name_type name_type);
 
 /* FIXME: shouldn't need to export this */
 type_t *duptype(type_t *t, int dupname);
 
 /* FIXME: shouldn't need to export this */
 type_t *duptype(type_t *t, int dupname);
index fb13954..816301c 100644 (file)
@@ -72,7 +72,8 @@ static const char usage[] =
 "   --prefix-client=p  Prefix names of client stubs with 'p'\n"
 "   --prefix-server=p  Prefix names of server functions with 'p'\n"
 "   -r                 Generate registration script\n"
 "   --prefix-client=p  Prefix names of client stubs with 'p'\n"
 "   --prefix-server=p  Prefix names of server functions with 'p'\n"
 "   -r                 Generate registration script\n"
-"   --rt               Enable WinRT's language extensions for IDL\n"
+"   --winrt            Enable Windows Runtime mode\n"
+"   --ns_prefix        Prefix namespaces with ABI namespace\n"
 "   -s                 Generate server stub\n"
 "   -t                 Generate typelib\n"
 "   -u                 Generate interface identifiers file\n"
 "   -s                 Generate server stub\n"
 "   -t                 Generate typelib\n"
 "   -u                 Generate interface identifiers file\n"
@@ -114,7 +115,8 @@ int do_win32 = 1;
 int do_win64 = 1;
 int win32_packing = 8;
 int win64_packing = 8;
 int do_win64 = 1;
 int win32_packing = 8;
 int win64_packing = 8;
-int do_rt_extension = 0;
+int winrt_mode = 0;
+int use_abi_namespace = 0;
 static enum stub_mode stub_mode = MODE_Os;
 
 char *input_name;
 static enum stub_mode stub_mode = MODE_Os;
 
 char *input_name;
@@ -155,6 +157,7 @@ enum {
     PREFIX_CLIENT_OPTION,
     PREFIX_SERVER_OPTION,
     PRINT_HELP,
     PREFIX_CLIENT_OPTION,
     PREFIX_SERVER_OPTION,
     PRINT_HELP,
+    RT_NS_PREFIX,
     RT_OPTION,
     WIN32_OPTION,
     WIN64_OPTION,
     RT_OPTION,
     WIN32_OPTION,
     WIN64_OPTION,
@@ -170,12 +173,13 @@ static const struct option long_options[] = {
     { "dlldata-only", 0, NULL, DLLDATA_ONLY_OPTION },
     { "help", 0, NULL, PRINT_HELP },
     { "local-stubs", 1, NULL, LOCAL_STUBS_OPTION },
     { "dlldata-only", 0, NULL, DLLDATA_ONLY_OPTION },
     { "help", 0, NULL, PRINT_HELP },
     { "local-stubs", 1, NULL, LOCAL_STUBS_OPTION },
+    { "ns_prefix", 0, NULL, RT_NS_PREFIX },
     { "oldnames", 0, NULL, OLDNAMES_OPTION },
     { "output", 0, NULL, 'o' },
     { "prefix-all", 1, NULL, PREFIX_ALL_OPTION },
     { "prefix-client", 1, NULL, PREFIX_CLIENT_OPTION },
     { "prefix-server", 1, NULL, PREFIX_SERVER_OPTION },
     { "oldnames", 0, NULL, OLDNAMES_OPTION },
     { "output", 0, NULL, 'o' },
     { "prefix-all", 1, NULL, PREFIX_ALL_OPTION },
     { "prefix-client", 1, NULL, PREFIX_CLIENT_OPTION },
     { "prefix-server", 1, NULL, PREFIX_SERVER_OPTION },
-    { "rt", 0, NULL, RT_OPTION },
+    { "winrt", 0, NULL, RT_OPTION },
     { "win32", 0, NULL, WIN32_OPTION },
     { "win64", 0, NULL, WIN64_OPTION },
     { "win32-align", 1, NULL, WIN32_ALIGN_OPTION },
     { "win32", 0, NULL, WIN32_OPTION },
     { "win64", 0, NULL, WIN64_OPTION },
     { "win32-align", 1, NULL, WIN32_ALIGN_OPTION },
@@ -590,7 +594,10 @@ int main(int argc,char *argv[])
       fprintf(stderr, "%s", usage);
       return 0;
     case RT_OPTION:
       fprintf(stderr, "%s", usage);
       return 0;
     case RT_OPTION:
-      do_rt_extension = 1;
+      winrt_mode = 1;
+      break;
+    case RT_NS_PREFIX:
+      use_abi_namespace = 1;
       break;
     case WIN32_OPTION:
       do_win32 = 1;
       break;
     case WIN32_OPTION:
       do_win32 = 1;
index 9e09f76..09e7871 100644 (file)
@@ -49,7 +49,8 @@ extern int do_win32;
 extern int do_win64;
 extern int win32_packing;
 extern int win64_packing;
 extern int do_win64;
 extern int win32_packing;
 extern int win64_packing;
-extern int do_rt_extension;
+extern int winrt_mode;
+extern int use_abi_namespace;
 
 extern char *input_name;
 extern char *input_idl_name;
 
 extern char *input_name;
 extern char *input_idl_name;
index 8c853a7..fc5275b 100644 (file)
@@ -1,6 +1,6 @@
-diff -u wine-1.3.4/tools/widl/hash.c tools/widl/hash.c
---- wine-1.3.4/tools/widl/hash.c       2010-09-19 17:48:47.640625000 +0200
-+++ tools/widl/hash.c  2010-09-19 19:17:19.000000000 +0200
+diff -pudN e:\wine-patched\tools\widl/hash.c e:\reactos-sync-clean\tools\widl/hash.c
+--- e:\wine-patched\tools\widl/hash.c  2015-02-22 13:23:48 +0100
++++ e:\reactos-sync-clean\tools\widl/hash.c    2013-10-15 20:06:18 +0100
 @@ -21,9 +21,7 @@
  #include <stdio.h>
  #include <stdarg.h>
 @@ -21,9 +21,7 @@
  #include <stdio.h>
  #include <stdarg.h>
@@ -8,82 +8,210 @@ diff -u wine-1.3.4/tools/widl/hash.c tools/widl/hash.c
 -#include "windef.h"
 -#include "winbase.h"
 -#include "winnls.h"
 -#include "windef.h"
 -#include "winbase.h"
 -#include "winnls.h"
-+#include <host/nls.h>
++#include <nls.h>
  
  #include "widltypes.h"
  #include "hash.h"
  
  #include "widltypes.h"
  #include "hash.h"
-diff -u wine-1.3.4/tools/widl/header.c tools/widl/header.c
---- wine-1.3.4/tools/widl/header.c     2010-09-19 17:48:47.640625000 +0200
-+++ tools/widl/header.c        2010-10-26 18:30:19.000000000 +0200
-@@ -1081,15 +1081,7 @@
- {
-   unsigned int ver = get_attrv(iface->attrs, ATTR_VERSION);
-   const char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
--  static int allocate_written = 0;
--  if (!allocate_written)
--  {
--    allocate_written = 1;
--    fprintf(header, "void * __RPC_USER MIDL_user_allocate(SIZE_T);\n");
--    fprintf(header, "void __RPC_USER MIDL_user_free(void *);\n\n");
--  }
--
-   fprintf(header, "/*****************************************************************************\n");
-   fprintf(header, " * %s interface (v%d.%d)\n", iface->name, MAJORVERSION(ver), MINORVERSION(ver));
-   fprintf(header, " */\n");
-diff -u wine-1.3.4/tools/widl/parser.y tools/widl/parser.y
---- wine-1.3.4/tools/widl/parser.y     2010-09-19 17:49:40.578125000 +0200
-+++ tools/widl/parser.y        2010-10-03 16:44:18.781250000 +0200
-@@ -1816,6 +1816,12 @@
-   else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
-     attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
-+  /* Append the SWITCHTYPE attribute to a union if it does not already have one.  */
+@@ -539,10 +537,10 @@ unsigned int lhash_val_of_name_sys( sysk
+   case LANG_VIETNAMESE: case LANG_MALTESE:    case LANG_IRISH:
+   case LANG_SAMI:       case LANG_UPPER_SORBIAN: case LANG_TSWANA:
+   case LANG_XHOSA:      case LANG_ZULU:       case LANG_WELSH:
+-  case LANG_BRETON:     case LANG_SCOTTISH_GAELIC: case LANG_NEUTRAL:
++  case LANG_BRETON:     case LANG_NEUTRAL:
+ /* some languages not in all windows versions or ReactOS */
+-#ifdef LANG_MANX_GAELIC
+-  case LANG_MANX_GAELIC:
++#ifdef LANG_GAELIC
++  case LANG_GAELIC:
+ #endif
+ #ifdef LANG_TAJIK
+   case LANG_TAJIK:
+diff -pudN e:\wine-patched\tools\widl/header.c e:\reactos-sync-clean\tools\widl/header.c
+--- e:\wine-patched\tools\widl/header.c        2015-10-30 18:41:54 +0100
++++ e:\reactos-sync-clean\tools\widl/header.c  2015-11-16 20:04:15 +0100
+@@ -1068,7 +1068,7 @@ static void write_inline_wrappers(FILE *
+     if (!is_callas(func->attrs)) {
+       const var_t *arg;
+-      fprintf(header, "static FORCEINLINE ");
++      fprintf(header, "FORCEINLINE ");
+       write_type_decl_left(header, type_function_get_rettype(func->type));
+       fprintf(header, " %s_%s(", name, get_name(func));
+       write_args(header, type_get_function_args(func->type), name, 1, FALSE);
+@@ -1103,6 +1103,15 @@ static void do_write_c_method_def(FILE *
+   if (type_iface_get_inherit(iface))
+     do_write_c_method_def(header, type_iface_get_inherit(iface), name);
++  else if (type_iface_get_stmts(iface) == NULL)
++  {
++    fprintf(header, "#ifndef __cplusplus\n");
++    indent(header, 0);
++    fprintf(header, "char dummy;\n");
++    fprintf(header, "#endif\n");
++    fprintf(header, "\n");
++    return;
++  }
+   STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface))
+   {
+@@ -1640,6 +1649,10 @@ void write_header(const statement_list_t
+   fprintf(header, "#define __REQUIRED_RPCNDR_H_VERSION__ 475\n");
+   fprintf(header, "#endif\n\n");
++  fprintf(header, "#ifdef __REACTOS__\n");
++  fprintf(header, "#define WIN32_LEAN_AND_MEAN\n");
++  fprintf(header, "#endif\n\n");
++
+   fprintf(header, "#include <rpc.h>\n" );
+   fprintf(header, "#include <rpcndr.h>\n\n" );
+diff -pudN e:\wine-patched\tools\widl/parser.y e:\reactos-sync-clean\tools\widl/parser.y
+--- e:\wine-patched\tools\widl/parser.y        2015-11-15 19:23:32 +0100
++++ e:\reactos-sync-clean\tools\widl/parser.y  2015-11-16 20:04:15 +0100
+@@ -1899,6 +1899,14 @@ static type_t *reg_typedefs(decl_spec_t 
+         type->attrs = attrs;
+   }
++#ifdef __REACTOS__
++  /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it.  */
 +  if (type_get_type_detect_alias(type) == TYPE_UNION &&
 +      is_attr(attrs, ATTR_SWITCHTYPE) &&
 +      !is_attr(type->attrs, ATTR_SWITCHTYPE))
 +    type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
 +  if (type_get_type_detect_alias(type) == TYPE_UNION &&
 +      is_attr(attrs, ATTR_SWITCHTYPE) &&
 +      !is_attr(type->attrs, ATTR_SWITCHTYPE))
 +    type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
++#endif
 +
    LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
    {
  
 +
    LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
    {
  
-diff -u wine-1.3.4/tools/widl/typelib.c tools/widl/typelib.c
---- wine-1.3.4/tools/widl/typelib.c    2010-09-19 17:50:24.000000000 +0200
-+++ tools/widl/typelib.c       2010-09-26 20:23:47.000000000 +0200
-@@ -35,8 +35,7 @@
- #define NONAMELESSUNION
- #define NONAMELESSSTRUCT
+diff -pudN e:\wine-patched\tools\widl/proxy.c e:\reactos-sync-clean\tools\widl/proxy.c
+--- e:\wine-patched\tools\widl/proxy.c 2015-02-22 13:23:48 +0100
++++ e:\reactos-sync-clean\tools\widl/proxy.c   2015-11-16 20:04:15 +0100
+@@ -87,7 +87,13 @@ static void init_proxy(const statement_l
+     error("Could not open %s for output\n", proxy_name);
+   print_proxy( "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
+   print_proxy( "\n");
+-  print_proxy( "#define __midl_proxy\n");
++  print_proxy( "#define __midl_proxy\n\n");
++
++  print_proxy( "#ifdef __REACTOS__\n");
++  print_proxy( "#define WIN32_NO_STATUS\n");
++  print_proxy( "#define WIN32_LEAN_AND_MEAN\n");
++  print_proxy( "#endif\n\n");
++
+   print_proxy( "#include \"objbase.h\"\n");
+   print_proxy( "\n");
+   print_proxy( "#ifndef DECLSPEC_HIDDEN\n");
+@@ -476,14 +482,15 @@ static const statement_t * get_callas_so
+   return NULL;
+ }
+-static void write_proxy_procformatstring_offsets( const type_t *iface, int skip )
++static int write_proxy_procformatstring_offsets( const type_t *iface, int skip )
+ {
+     const statement_t *stmt;
++    int i = 0;
+     if (type_iface_get_inherit(iface))
+-        write_proxy_procformatstring_offsets( type_iface_get_inherit(iface), need_delegation(iface));
++        i = write_proxy_procformatstring_offsets( type_iface_get_inherit(iface), need_delegation(iface));
+     else
+-        return;
++        return 0;
+     STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) )
+     {
+@@ -503,7 +510,9 @@ static void write_proxy_procformatstring
+             print_proxy( "(unsigned short)-1,  /* %s::%s */\n", iface->name, get_name(func));
+         else
+             print_proxy( "%u,  /* %s::%s */\n", func->procstring_offset, iface->name, get_name(func));
++        i++;
+     }
++    return i;
+ }
+ static int write_proxy_methods(type_t *iface, int skip)
+@@ -636,7 +645,10 @@ static void write_proxy(type_t *iface, u
+   print_proxy( "static const unsigned short %s_FormatStringOffsetTable[] =\n", iface->name );
+   print_proxy( "{\n" );
+   indent++;
+-  write_proxy_procformatstring_offsets( iface, 0 );
++  if (write_proxy_procformatstring_offsets( iface, 0 ) == 0)
++  {
++      print_proxy( "0\n" );
++  }
+   indent--;
+   print_proxy( "};\n\n" );
+@@ -710,7 +722,10 @@ static void write_proxy(type_t *iface, u
+       print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name);
+       print_proxy( "{\n");
+       indent++;
+-      write_stub_methods(iface, FALSE);
++      if (write_stub_methods(iface, FALSE) == 0)
++      {
++          fprintf(proxy, "0");
++      }
+       fprintf(proxy, "\n");
+       indent--;
+       fprintf(proxy, "};\n\n");
+diff -pudN e:\wine-patched\tools\widl/typegen.c e:\reactos-sync-clean\tools\widl/typegen.c
+--- e:\wine-patched\tools\widl/typegen.c       2015-10-30 18:41:54 +0100
++++ e:\reactos-sync-clean\tools\widl/typegen.c 2015-11-16 20:04:16 +0100
+@@ -4747,7 +4747,7 @@ void write_func_param_struct( FILE *file
+         if (align >= pointer_size)
+             fprintf( file, "%s;\n", arg->name );
+         else
+-            fprintf( file, "%s DECLSPEC_ALIGN(%u);\n", arg->name, pointer_size );
++            fprintf( file, "DECLSPEC_ALIGN(%u) %s;\n", pointer_size, arg->name );
+     }
+     if (add_retval && !is_void( retval->type ))
+     {
+diff -pudN e:\wine-patched\tools\widl/typelib.c e:\reactos-sync-clean\tools\widl/typelib.c
+--- e:\wine-patched\tools\widl/typelib.c       2015-10-30 18:41:54 +0100
++++ e:\reactos-sync-clean\tools\widl/typelib.c 2015-11-16 20:04:16 +0100
+@@ -32,9 +32,7 @@
+ #include <string.h>
+ #include <ctype.h>
  
 -#include "windef.h"
 -#include "winbase.h"
  
 -#include "windef.h"
 -#include "winbase.h"
-+#include <host/typedefs.h>
+-
++#include <typedefs.h>
  #include "widl.h"
  #include "utils.h"
  #include "widl.h"
  #include "utils.h"
-diff -u wine-1.3.4/tools/widl/typelib_struct.h tools/widl/typelib_struct.h
---- wine-1.3.4/tools/widl/typelib_struct.h     2010-09-19 17:50:40.953125000 +0200
-+++ tools/widl/typelib_struct.h        2010-10-10 00:50:32.921875000 +0200
-@@ -302,7 +302,7 @@
-  *
-  */
--#include "pshpack1.h"
-+#include <host/pshpack1.h>
- typedef struct {
- /*00*/        DWORD SLTG_magic;       /* 0x47544c53  == "SLTG" */
-@@ -599,7 +599,7 @@
- WORD typeofarray
- */
--#include "poppack.h"
-+#include <host/poppack.h>
- /*---------------------------END--------------------------------------------*/
- #endif
-diff -u wine-1.3.4/tools/widl/widltypes.h tools/widl/widltypes.h
---- wine-1.3.4/tools/widl/widltypes.h  2010-09-19 17:51:38.890625000 +0200
-+++ tools/widl/widltypes.h     2010-09-19 19:17:19.656250000 +0200
+ #include "parser.h"
+diff -pudN e:\wine-patched\tools\widl/widl.c e:\reactos-sync-clean\tools\widl/widl.c
+--- e:\wine-patched\tools\widl/widl.c  2015-10-30 18:41:54 +0100
++++ e:\reactos-sync-clean\tools\widl/widl.c    2015-11-16 20:04:16 +0100
+@@ -364,6 +364,12 @@ static void write_dlldata_list(struct li
+   fprintf(dlldata, "- Do not edit ***/\n\n");
+   if (define_proxy_delegation)
+       fprintf(dlldata, "#define PROXY_DELEGATION\n");
++
++  fprintf(dlldata, "#ifdef __REACTOS__\n");
++  fprintf(dlldata, "#define WIN32_NO_STATUS\n");
++  fprintf(dlldata, "#define WIN32_LEAN_AND_MEAN\n");
++  fprintf(dlldata, "#endif\n\n");
++
+   fprintf(dlldata, "#include <objbase.h>\n");
+   fprintf(dlldata, "#include <rpcproxy.h>\n\n");
+   start_cplusplus_guard(dlldata);
+@@ -504,6 +510,12 @@ void write_id_data(const statement_list_
+   fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
+   fprintf(idfile, "from %s - Do not edit ***/\n\n", input_idl_name);
++
++  fprintf(idfile, "#ifdef __REACTOS__\n");
++  fprintf(idfile, "#define WIN32_NO_STATUS\n");
++  fprintf(idfile, "#define WIN32_LEAN_AND_MEAN\n");
++  fprintf(idfile, "#endif\n\n");
++
+   fprintf(idfile, "#include <rpc.h>\n");
+   fprintf(idfile, "#include <rpcndr.h>\n\n");
+diff -pudN e:\wine-patched\tools\widl/widltypes.h e:\reactos-sync-clean\tools\widl/widltypes.h
+--- e:\wine-patched\tools\widl/widltypes.h     2015-10-30 18:41:54 +0100
++++ e:\reactos-sync-clean\tools\widl/widltypes.h       2015-11-16 20:04:16 +0100
 @@ -21,6 +21,15 @@
  #ifndef __WIDL_WIDLTYPES_H
  #define __WIDL_WIDLTYPES_H
 @@ -21,6 +21,15 @@
  #ifndef __WIDL_WIDLTYPES_H
  #define __WIDL_WIDLTYPES_H
@@ -100,54 +228,19 @@ diff -u wine-1.3.4/tools/widl/widltypes.h tools/widl/widltypes.h
  #include <stdarg.h>
  #include <assert.h>
  #include "guiddef.h"
  #include <stdarg.h>
  #include <assert.h>
  #include "guiddef.h"
-@@ -32,7 +39,9 @@
- typedef GUID UUID;
- #endif
-+#ifndef TRUE
- #define TRUE 1
-+#endif
- #define FALSE 0
+diff -pudN e:\wine-patched\tools\widl/write_msft.c e:\reactos-sync-clean\tools\widl/write_msft.c
+--- e:\wine-patched\tools\widl/write_msft.c    2015-11-15 19:23:32 +0100
++++ e:\reactos-sync-clean\tools\widl/write_msft.c      2015-11-16 20:04:16 +0100
+@@ -39,10 +39,8 @@
  
  
- typedef struct _loc_info_t loc_info_t;
-diff -u wine-1.3.4/tools/widl/write_msft.c tools/widl/write_msft.c
---- wine-1.3.4/tools/widl/write_msft.c 2010-09-19 17:51:48.531250000 +0200
-+++ tools/widl/write_msft.c    2010-09-26 20:23:47.000000000 +0200
-@@ -40,10 +40,8 @@
  #define NONAMELESSUNION
  #define NONAMELESSUNION
- #define NONAMELESSSTRUCT
  
 -#include "winerror.h"
 -#include "windef.h"
 -#include "winbase.h"
 -#include "winnls.h"
  
 -#include "winerror.h"
 -#include "windef.h"
 -#include "winbase.h"
 -#include "winnls.h"
-+#include <host/typedefs.h>
-+#include <host/nls.h>
++#include <typedefs.h>
++#include <nls.h>
  
  #include "widl.h"
  #include "typelib.h"
  
  #include "widl.h"
  #include "typelib.h"
-@@ -2023,7 +2023,10 @@
-     }
-     if (is_attr(interface->attrs, ATTR_DISPINTERFACE))
--        return add_dispinterface_typeinfo(typelib, interface);
-+    {
-+        add_dispinterface_typeinfo(typelib, interface);
-+        return;
-+    }
-     /* midl adds the parent interface first, unless the parent itself
-        has no parent (i.e. it stops before IUnknown). */
-diff -u wine-1.3.4/tools/widl/typegen.c tools/widl/typegen.c
---- wine-1.3.4/tools/widl/typegen.c    2010-09-19 17:51:48.531250000 +0200
-+++ tools/widl/typegen.c       2012-08-12 14:19:47.000000000 +0200
-@@ -2345,7 +2345,8 @@
-             return;
-         }
-     }
--    return write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff);
-+    write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff);
-+    return;
- }
- static void write_end(FILE *file, unsigned int *tfsoff)
index 159b4e2..4fec418 100644 (file)
@@ -391,6 +391,16 @@ struct bitfield_details
   const expr_t *bits;
 };
 
   const expr_t *bits;
 };
 
+#define HASHMAX 64
+
+struct namespace {
+    const char *name;
+    struct namespace *parent;
+    struct list entry;
+    struct list children;
+    struct rtype *type_hash[HASHMAX];
+};
+
 enum type_type
 {
     TYPE_VOID,
 enum type_type
 {
     TYPE_VOID,
@@ -411,6 +421,7 @@ enum type_type
 
 struct _type_t {
   const char *name;
 
 struct _type_t {
   const char *name;
+  struct namespace *namespace;
   enum type_type type_type;
   attr_list_t *attrs;
   union
   enum type_type type_type;
   attr_list_t *attrs;
   union
@@ -426,6 +437,7 @@ struct _type_t {
     struct pointer_details pointer;
     struct bitfield_details bitfield;
   } details;
     struct pointer_details pointer;
     struct bitfield_details bitfield;
   } details;
+  const char *c_name;
   type_t *orig;                   /* dup'd types */
   unsigned int typestring_offset;
   unsigned int ptrdesc;           /* used for complex structs */
   type_t *orig;                   /* dup'd types */
   unsigned int typestring_offset;
   unsigned int ptrdesc;           /* used for complex structs */
@@ -558,10 +570,10 @@ void clear_all_offsets(void);
 #define tsUNION  3
 
 var_t *find_const(const char *name, int f);
 #define tsUNION  3
 
 var_t *find_const(const char *name, int f);
-type_t *find_type(const char *name, int t);
+type_t *find_type(const char *name, struct namespace *namespace, int t);
 type_t *make_type(enum type_type type);
 type_t *make_type(enum type_type type);
-type_t *get_type(enum type_type type, char *name, int t);
-type_t *reg_type(type_t *type, const char *name, int t);
+type_t *get_type(enum type_type type, char *name, struct namespace *namespace, int t);
+type_t *reg_type(type_t *type, const char *name, struct namespace *namespace, int t);
 void add_incomplete(type_t *t);
 
 var_t *make_var(char *name);
 void add_incomplete(type_t *t);
 
 var_t *make_var(char *name);
@@ -569,6 +581,8 @@ var_list_t *append_var(var_list_t *list, var_t *var);
 
 void init_loc_info(loc_info_t *);
 
 
 void init_loc_info(loc_info_t *);
 
+char *format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix);
+
 static inline var_list_t *type_get_function_args(const type_t *func_type)
 {
   return func_type->details.function->args;
 static inline var_list_t *type_get_function_args(const type_t *func_type)
 {
   return func_type->details.function->args;
@@ -598,4 +612,9 @@ static inline int statements_has_func(const statement_list_t *stmts)
   return has_func;
 }
 
   return has_func;
 }
 
+static inline int is_global_namespace(const struct namespace *namespace)
+{
+    return !namespace->name;
+}
+
 #endif
 #endif
index a191bef..c3d40f8 100644 (file)
@@ -38,7 +38,6 @@
 #include <time.h>
 
 #define NONAMELESSUNION
 #include <time.h>
 
 #define NONAMELESSUNION
-#define NONAMELESSSTRUCT
 
 #include <typedefs.h>
 #include <nls.h>
 
 #include <typedefs.h>
 #include <nls.h>
@@ -493,10 +492,23 @@ static int ctl2_alloc_guid(
     MSFT_GuidEntry *guid_space;
     int hash_key;
 
     MSFT_GuidEntry *guid_space;
     int hash_key;
 
+    chat("adding uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
+         guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
+         guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
+         guid->guid.Data4[4], guid->guid.Data4[5], guid->guid.Data4[6], guid->guid.Data4[7]);
+
     hash_key = ctl2_hash_guid(&guid->guid);
 
     offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
     hash_key = ctl2_hash_guid(&guid->guid);
 
     offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
-    if (offset != -1) return offset;
+    if (offset != -1)
+    {
+        if (pedantic)
+            warning("duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
+                    guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
+                    guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
+                    guid->guid.Data4[4], guid->guid.Data4[5], guid->guid.Data4[6], guid->guid.Data4[7]);
+        return -1;
+    }
 
     offset = ctl2_alloc_segment(typelib, MSFT_SEG_GUID, sizeof(MSFT_GuidEntry), 0);
 
 
     offset = ctl2_alloc_segment(typelib, MSFT_SEG_GUID, sizeof(MSFT_GuidEntry), 0);
 
@@ -744,6 +756,7 @@ static importinfo_t *find_importinfo(msft_typelib_t *typelib, const char *name)
 static void add_structure_typeinfo(msft_typelib_t *typelib, type_t *structure);
 static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface);
 static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration);
 static void add_structure_typeinfo(msft_typelib_t *typelib, type_t *structure);
 static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface);
 static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration);
+static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion);
 static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls);
 static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface);
 
 static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls);
 static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface);
 
@@ -992,6 +1005,9 @@ static int encode_type(
             case TYPE_ENUM:
                 add_enum_typeinfo(typelib, type);
                 break;
             case TYPE_ENUM:
                 add_enum_typeinfo(typelib, type);
                 break;
+            case TYPE_UNION:
+                add_union_typeinfo(typelib, type);
+                break;
             case TYPE_COCLASS:
                 add_coclass_typeinfo(typelib, type);
                 break;
             case TYPE_COCLASS:
                 add_coclass_typeinfo(typelib, type);
                 break;
@@ -1127,9 +1143,12 @@ static int encode_var(
 
        if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) {
            int mix_field;
 
        if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) {
            int mix_field;
-           
+
            if (target_type & 0x80000000) {
                mix_field = ((target_type >> 16) & 0x3fff) | VT_BYREF;
            if (target_type & 0x80000000) {
                mix_field = ((target_type >> 16) & 0x3fff) | VT_BYREF;
+           } else if (is_array(ref)) {
+               type_t *element_type = type_alias_get_aliasee(type_array_get_element(ref));
+               mix_field = get_type_vt(element_type) | VT_ARRAY | VT_BYREF;
            } else {
                typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][target_type];
                mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe;
            } else {
                typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][target_type];
                mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe;
@@ -1266,7 +1285,7 @@ static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid,
    any default value. */
 static int get_defaultvalue_vt(type_t *type)
 {
    any default value. */
 static int get_defaultvalue_vt(type_t *type)
 {
-    int vt = get_type_vt(type);
+    int vt;
     if (type_get_type(type) == TYPE_ENUM)
         vt = VT_I4;
     else
     if (type_get_type(type) == TYPE_ENUM)
         vt = VT_I4;
     else
@@ -1748,6 +1767,10 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var)
         typedata[4] = typeinfo->datawidth;
         typeinfo->datawidth += var_datawidth;
         break;
         typedata[4] = typeinfo->datawidth;
         typeinfo->datawidth += var_datawidth;
         break;
+    case TKIND_UNION:
+        typedata[4] = typeinfo->datawidth;
+        typeinfo->datawidth = max(typeinfo->datawidth, var_datawidth);
+        break;
     case TKIND_DISPATCH:
         var_kind = 3; /* VAR_DISPATCH */
         typeinfo->datawidth = pointer_size;
     case TKIND_DISPATCH:
         var_kind = 3; /* VAR_DISPATCH */
         typeinfo->datawidth = pointer_size;
@@ -1832,7 +1855,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
     MSFT_TypeInfoBase *typeinfo;
     MSFT_GuidEntry guidentry;
 
     MSFT_TypeInfoBase *typeinfo;
     MSFT_GuidEntry guidentry;
 
-    chat("create_msft_typeinfo: name %s kind %d\n", name, kind);
+    chat("create_msft_typeinfo: name %s kind %d index %d\n", name, kind, typelib->typelib_header.nrtypeinfos);
 
     msft_typeinfo = xmalloc(sizeof(*msft_typeinfo));
     memset( msft_typeinfo, 0, sizeof(*msft_typeinfo) );
 
     msft_typeinfo = xmalloc(sizeof(*msft_typeinfo));
     memset( msft_typeinfo, 0, sizeof(*msft_typeinfo) );
@@ -1966,7 +1989,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
 
 static void add_dispatch(msft_typelib_t *typelib)
 {
 
 static void add_dispatch(msft_typelib_t *typelib)
 {
-    int guid_offset, impfile_offset;
+    int guid_offset, impfile_offset, hash_key;
     MSFT_GuidEntry guidentry;
     MSFT_ImpInfo impinfo;
     GUID stdole =        {0x00020430,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}};
     MSFT_GuidEntry guidentry;
     MSFT_ImpInfo impinfo;
     GUID stdole =        {0x00020430,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}};
@@ -1977,7 +2000,10 @@ static void add_dispatch(msft_typelib_t *typelib)
     guidentry.guid = stdole;
     guidentry.hreftype = 2;
     guidentry.next_hash = -1;
     guidentry.guid = stdole;
     guidentry.hreftype = 2;
     guidentry.next_hash = -1;
-    guid_offset = ctl2_alloc_guid(typelib, &guidentry);
+    hash_key = ctl2_hash_guid(&guidentry.guid);
+    guid_offset = ctl2_find_guid(typelib, hash_key, &guidentry.guid);
+    if (guid_offset == -1)
+        guid_offset = ctl2_alloc_guid(typelib, &guidentry);
     impfile_offset = alloc_importfile(typelib, guid_offset, 2, 0, "stdole2.tlb");
 
     guidentry.guid = iid_idispatch;
     impfile_offset = alloc_importfile(typelib, guid_offset, 2, 0, "stdole2.tlb");
 
     guidentry.guid = iid_idispatch;
@@ -1985,7 +2011,11 @@ static void add_dispatch(msft_typelib_t *typelib)
     guidentry.next_hash = -1;
     impinfo.flags = TKIND_INTERFACE << 24 | MSFT_IMPINFO_OFFSET_IS_GUID;
     impinfo.oImpFile = impfile_offset;
     guidentry.next_hash = -1;
     impinfo.flags = TKIND_INTERFACE << 24 | MSFT_IMPINFO_OFFSET_IS_GUID;
     impinfo.oImpFile = impfile_offset;
-    impinfo.oGuid = ctl2_alloc_guid(typelib, &guidentry);
+    hash_key = ctl2_hash_guid(&guidentry.guid);
+    guid_offset = ctl2_find_guid(typelib, hash_key, &guidentry.guid);
+    if (guid_offset == -1)
+        guid_offset = ctl2_alloc_guid(typelib, &guidentry);
+    impinfo.oGuid = guid_offset;
     typelib->typelib_header.dispatchpos = alloc_msft_importinfo(typelib, &impinfo) | 0x01;
 }
 
     typelib->typelib_header.dispatchpos = alloc_msft_importinfo(typelib, &impinfo) | 0x01;
 }
 
@@ -2066,6 +2096,10 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface)
             add_interface_typeinfo(typelib, inherit);
     }
 
             add_interface_typeinfo(typelib, inherit);
     }
 
+    /* check typelib_idx again, it could have been added while resolving the parent interface */
+    if (-1 < interface->typelib_idx)
+        return;
+
     interface->typelib_idx = typelib->typelib_header.nrtypeinfos;
     msft_typeinfo = create_msft_typeinfo(typelib, TKIND_INTERFACE, interface->name, interface->attrs);
     msft_typeinfo->typeinfo->size = pointer_size;
     interface->typelib_idx = typelib->typelib_header.nrtypeinfos;
     msft_typeinfo = create_msft_typeinfo(typelib, TKIND_INTERFACE, interface->name, interface->attrs);
     msft_typeinfo->typeinfo->size = pointer_size;
@@ -2137,22 +2171,57 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration)
             add_var_desc(msft_typeinfo, idx++, cur);
 }
 
             add_var_desc(msft_typeinfo, idx++, cur);
 }
 
-static void add_typedef_typeinfo(msft_typelib_t *typelib, type_t *tdef)
+static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion)
 {
 {
+    int idx = 0;
+    var_t *cur;
     msft_typeinfo_t *msft_typeinfo;
     msft_typeinfo_t *msft_typeinfo;
-    int alignment;
+
+    if (-1 < tunion->typelib_idx)
+        return;
+
+    tunion->typelib_idx = typelib->typelib_header.nrtypeinfos;
+    msft_typeinfo = create_msft_typeinfo(typelib, TKIND_UNION, tunion->name, tunion->attrs);
+    msft_typeinfo->typeinfo->size = 0;
+
+    if (type_union_get_cases(tunion))
+        LIST_FOR_EACH_ENTRY(cur, type_union_get_cases(tunion), var_t, entry)
+            add_var_desc(msft_typeinfo, idx++, cur);
+}
+
+static void add_typedef_typeinfo(msft_typelib_t *typelib, type_t *tdef)
+{
+    msft_typeinfo_t *msft_typeinfo = NULL;
+    int alignment, datatype1, datatype2, size, duplicate = 0;
+    type_t *type;
 
     if (-1 < tdef->typelib_idx)
         return;
 
 
     if (-1 < tdef->typelib_idx)
         return;
 
-    tdef->typelib_idx = typelib->typelib_header.nrtypeinfos;
-    msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ALIAS, tdef->name, tdef->attrs);
-    encode_type(typelib, get_type_vt(type_alias_get_aliasee(tdef)),
-                type_alias_get_aliasee(tdef),
-                &msft_typeinfo->typeinfo->datatype1,
-                &msft_typeinfo->typeinfo->size,
-                &alignment, &msft_typeinfo->typeinfo->datatype2);
-    msft_typeinfo->typeinfo->typekind |= (alignment << 11 | alignment << 6);
+    type = type_alias_get_aliasee(tdef);
+
+    if (!type->name || strcmp(tdef->name, type->name) != 0)
+    {
+        tdef->typelib_idx = typelib->typelib_header.nrtypeinfos;
+        msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ALIAS, tdef->name, tdef->attrs);
+    }
+    else
+        duplicate = 1;
+
+    encode_type(typelib, get_type_vt(type), type,
+                &datatype1, &size, &alignment, &datatype2);
+
+    if (msft_typeinfo)
+    {
+        msft_typeinfo->typeinfo->datatype1 = datatype1;
+        msft_typeinfo->typeinfo->size = size;
+        msft_typeinfo->typeinfo->datatype2 = datatype2;
+        msft_typeinfo->typeinfo->typekind |= (alignment << 11 | alignment << 6);
+    }
+
+    /* avoid adding duplicate type definitions */
+    if (duplicate)
+        tdef->typelib_idx = type->typelib_idx;
 }
 
 static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)
 }
 
 static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)
@@ -2273,6 +2342,9 @@ static void add_type_typeinfo(msft_typelib_t *typelib, type_t *type)
     case TYPE_ENUM:
         add_enum_typeinfo(typelib, type);
         break;
     case TYPE_ENUM:
         add_enum_typeinfo(typelib, type);
         break;
+    case TYPE_UNION:
+        add_union_typeinfo(typelib, type);
+        break;
     case TYPE_COCLASS:
         add_coclass_typeinfo(typelib, type);
         break;
     case TYPE_COCLASS:
         add_coclass_typeinfo(typelib, type);
         break;