/* A Bison parser, made by GNU Bison 3.8.2.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 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 <https://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   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.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output, and Bison version.  */
#define YYBISON 30802

/* Bison version string.  */
#define YYBISON_VERSION "3.8.2"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1




/* First part of user prologue.  */
#line 24 "./parser.y"

#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include "rename.h"
#include "util.h"

#define REF_IDENTS

#define do_binop(rv,op,a,b)		do {		\
	if (IDL_binop_chktypes (op, a, b))		\
		YYABORT;				\
	if (!(__IDL_flags & IDLF_NO_EVAL_CONST)) {	\
		rv = IDL_binop_eval (op, a, b);		\
		IDL_tree_free (a);			\
		IDL_tree_free (b);			\
		if (!rv) YYABORT;			\
	} else {					\
		rv = IDL_binop_new (op, a, b);		\
	}						\
} while (0)

#define do_unaryop(rv,op,a)		do {		\
	if (IDL_unaryop_chktypes (op, a))		\
		YYABORT;				\
	if (!(__IDL_flags & IDLF_NO_EVAL_CONST)) {	\
		rv = IDL_unaryop_eval (op, a);		\
		IDL_tree_free (a);			\
		if (!rv) YYABORT;			\
	} else {					\
		rv = IDL_unaryop_new (op, a);		\
	}						\
} while (0)

#define IS_INHIBIT_STATE()				\
	(__IDL_inhibits > 0 ||				\
	  ((__IDL_flags & IDLF_INHIBIT_INCLUDES) &&	\
	     (__IDL_flagsi & IDLFP_IN_INCLUDES) ) )


#define assign_declspec(tree,declspec)	do {		\
	IDL_NODE_DECLSPEC (tree) = declspec;		\
	if ( IS_INHIBIT_STATE() ) {			\
		IDL_NODE_DECLSPEC (tree) |=		\
			IDLF_DECLSPEC_EXIST |		\
			IDLF_DECLSPEC_INHIBIT;		\
	}						\
	if ( __IDL_pidl > 0 ) {				\
		IDL_NODE_DECLSPEC (tree) |=		\
			IDLF_DECLSPEC_PIDL;		\
	}						\
} while (0)

#define assign_props(tree,props)	do {		\
	if (__IDL_flags & IDLF_PROPERTIES)		\
		IDL_NODE_PROPERTIES (tree) = (props);	\
	else						\
		__IDL_free_properties (props);		\
} while (0)

extern int		yylex				(void);
static IDL_declspec_t	IDL_parse_declspec		(const char *strspec);
static int		IDL_binop_chktypes		(enum IDL_binop op,
							 IDL_tree a,
							 IDL_tree b);
static int		IDL_unaryop_chktypes		(enum IDL_unaryop op,
							 IDL_tree a);
static IDL_tree		IDL_binop_eval			(enum IDL_binop op,
							 IDL_tree a,
							 IDL_tree b);
static IDL_tree		IDL_unaryop_eval		(enum IDL_unaryop op,
							 IDL_tree a);
static IDL_tree		list_start			(IDL_tree a,
							 gboolean filter_null);
static IDL_tree		list_chain			(IDL_tree a,
							 IDL_tree b,
							 gboolean filter_null);
static IDL_tree		zlist_chain			(IDL_tree a,
							 IDL_tree b,
							 gboolean filter_null);
static int		do_token_error			(IDL_tree p,
							 const char *message,
							 gboolean prev);
static void		illegal_context_type_error	(IDL_tree p,
							 const char *what);
static void		illegal_type_error		(IDL_tree p,
							 const char *message);

#line 164 "y.tab.c"

# ifndef YY_CAST
#  ifdef __cplusplus
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
#  else
#   define YY_CAST(Type, Val) ((Type) (Val))
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
#  endif
# endif
# ifndef YY_NULLPTR
#  if defined __cplusplus
#   if 201103L <= __cplusplus
#    define YY_NULLPTR nullptr
#   else
#    define YY_NULLPTR 0
#   endif
#  else
#   define YY_NULLPTR ((void*)0)
#  endif
# endif

/* Use api.header.include to #include this header
   instead of duplicating it here.  */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif

/* Token kinds.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    YYEMPTY = -2,
    YYEOF = 0,                     /* "end of file"  */
    YYerror = 256,                 /* error  */
    YYUNDEF = 257,                 /* "invalid token"  */
    TOK_ANY = 258,                 /* TOK_ANY  */
    TOK_ATTRIBUTE = 259,           /* TOK_ATTRIBUTE  */
    TOK_BOOLEAN = 260,             /* TOK_BOOLEAN  */
    TOK_CASE = 261,                /* TOK_CASE  */
    TOK_CHAR = 262,                /* TOK_CHAR  */
    TOK_CONST = 263,               /* TOK_CONST  */
    TOK_CONTEXT = 264,             /* TOK_CONTEXT  */
    TOK_DEFAULT = 265,             /* TOK_DEFAULT  */
    TOK_DOUBLE = 266,              /* TOK_DOUBLE  */
    TOK_ENUM = 267,                /* TOK_ENUM  */
    TOK_EXCEPTION = 268,           /* TOK_EXCEPTION  */
    TOK_FALSE = 269,               /* TOK_FALSE  */
    TOK_FIXED = 270,               /* TOK_FIXED  */
    TOK_FLOAT = 271,               /* TOK_FLOAT  */
    TOK_IN = 272,                  /* TOK_IN  */
    TOK_INOUT = 273,               /* TOK_INOUT  */
    TOK_INTERFACE = 274,           /* TOK_INTERFACE  */
    TOK_LONG = 275,                /* TOK_LONG  */
    TOK_MODULE = 276,              /* TOK_MODULE  */
    TOK_NATIVE = 277,              /* TOK_NATIVE  */
    TOK_OBJECT = 278,              /* TOK_OBJECT  */
    TOK_OCTET = 279,               /* TOK_OCTET  */
    TOK_ONEWAY = 280,              /* TOK_ONEWAY  */
    TOK_OP_SCOPE = 281,            /* TOK_OP_SCOPE  */
    TOK_OP_SHL = 282,              /* TOK_OP_SHL  */
    TOK_OP_SHR = 283,              /* TOK_OP_SHR  */
    TOK_OUT = 284,                 /* TOK_OUT  */
    TOK_RAISES = 285,              /* TOK_RAISES  */
    TOK_READONLY = 286,            /* TOK_READONLY  */
    TOK_SEQUENCE = 287,            /* TOK_SEQUENCE  */
    TOK_SHORT = 288,               /* TOK_SHORT  */
    TOK_STRING = 289,              /* TOK_STRING  */
    TOK_STRUCT = 290,              /* TOK_STRUCT  */
    TOK_SWITCH = 291,              /* TOK_SWITCH  */
    TOK_TRUE = 292,                /* TOK_TRUE  */
    TOK_TYPECODE = 293,            /* TOK_TYPECODE  */
    TOK_TYPEDEF = 294,             /* TOK_TYPEDEF  */
    TOK_UNION = 295,               /* TOK_UNION  */
    TOK_UNSIGNED = 296,            /* TOK_UNSIGNED  */
    TOK_VARARGS = 297,             /* TOK_VARARGS  */
    TOK_VOID = 298,                /* TOK_VOID  */
    TOK_WCHAR = 299,               /* TOK_WCHAR  */
    TOK_WSTRING = 300,             /* TOK_WSTRING  */
    TOK_FLOATP = 301,              /* TOK_FLOATP  */
    TOK_INTEGER = 302,             /* TOK_INTEGER  */
    TOK_DECLSPEC = 303,            /* TOK_DECLSPEC  */
    TOK_PROP_KEY = 304,            /* TOK_PROP_KEY  */
    TOK_PROP_VALUE = 305,          /* TOK_PROP_VALUE  */
    TOK_NATIVE_TYPE = 306,         /* TOK_NATIVE_TYPE  */
    TOK_IDENT = 307,               /* TOK_IDENT  */
    TOK_SQSTRING = 308,            /* TOK_SQSTRING  */
    TOK_DQSTRING = 309,            /* TOK_DQSTRING  */
    TOK_FIXEDP = 310,              /* TOK_FIXEDP  */
    TOK_CODEFRAG = 311,            /* TOK_CODEFRAG  */
    TOK_SRCFILE = 312              /* TOK_SRCFILE  */
  };
  typedef enum yytokentype yytoken_kind_t;
#endif
/* Token kinds.  */
#define YYEMPTY -2
#define YYEOF 0
#define YYerror 256
#define YYUNDEF 257
#define TOK_ANY 258
#define TOK_ATTRIBUTE 259
#define TOK_BOOLEAN 260
#define TOK_CASE 261
#define TOK_CHAR 262
#define TOK_CONST 263
#define TOK_CONTEXT 264
#define TOK_DEFAULT 265
#define TOK_DOUBLE 266
#define TOK_ENUM 267
#define TOK_EXCEPTION 268
#define TOK_FALSE 269
#define TOK_FIXED 270
#define TOK_FLOAT 271
#define TOK_IN 272
#define TOK_INOUT 273
#define TOK_INTERFACE 274
#define TOK_LONG 275
#define TOK_MODULE 276
#define TOK_NATIVE 277
#define TOK_OBJECT 278
#define TOK_OCTET 279
#define TOK_ONEWAY 280
#define TOK_OP_SCOPE 281
#define TOK_OP_SHL 282
#define TOK_OP_SHR 283
#define TOK_OUT 284
#define TOK_RAISES 285
#define TOK_READONLY 286
#define TOK_SEQUENCE 287
#define TOK_SHORT 288
#define TOK_STRING 289
#define TOK_STRUCT 290
#define TOK_SWITCH 291
#define TOK_TRUE 292
#define TOK_TYPECODE 293
#define TOK_TYPEDEF 294
#define TOK_UNION 295
#define TOK_UNSIGNED 296
#define TOK_VARARGS 297
#define TOK_VOID 298
#define TOK_WCHAR 299
#define TOK_WSTRING 300
#define TOK_FLOATP 301
#define TOK_INTEGER 302
#define TOK_DECLSPEC 303
#define TOK_PROP_KEY 304
#define TOK_PROP_VALUE 305
#define TOK_NATIVE_TYPE 306
#define TOK_IDENT 307
#define TOK_SQSTRING 308
#define TOK_DQSTRING 309
#define TOK_FIXEDP 310
#define TOK_CODEFRAG 311
#define TOK_SRCFILE 312

/* Value type.  */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
#line 117 "./parser.y"

	IDL_tree tree;
	struct {
		IDL_tree tree;
		gpointer data;
	} treedata;
	GHashTable *hash_table;
	char *str;
	gboolean boolean;
	IDL_declspec_t declspec;
	IDL_longlong_t integer;
	double floatp;
	enum IDL_unaryop unaryop;
	enum IDL_param_attr paramattr;

#line 347 "y.tab.c"

};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif


extern YYSTYPE yylval;


int yyparse (void);


#endif /* !YY_YY_Y_TAB_H_INCLUDED  */
/* Symbol kind.  */
enum yysymbol_kind_t
{
  YYSYMBOL_YYEMPTY = -2,
  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
  YYSYMBOL_YYerror = 1,                    /* error  */
  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
  YYSYMBOL_TOK_ANY = 3,                    /* TOK_ANY  */
  YYSYMBOL_TOK_ATTRIBUTE = 4,              /* TOK_ATTRIBUTE  */
  YYSYMBOL_TOK_BOOLEAN = 5,                /* TOK_BOOLEAN  */
  YYSYMBOL_TOK_CASE = 6,                   /* TOK_CASE  */
  YYSYMBOL_TOK_CHAR = 7,                   /* TOK_CHAR  */
  YYSYMBOL_TOK_CONST = 8,                  /* TOK_CONST  */
  YYSYMBOL_TOK_CONTEXT = 9,                /* TOK_CONTEXT  */
  YYSYMBOL_TOK_DEFAULT = 10,               /* TOK_DEFAULT  */
  YYSYMBOL_TOK_DOUBLE = 11,                /* TOK_DOUBLE  */
  YYSYMBOL_TOK_ENUM = 12,                  /* TOK_ENUM  */
  YYSYMBOL_TOK_EXCEPTION = 13,             /* TOK_EXCEPTION  */
  YYSYMBOL_TOK_FALSE = 14,                 /* TOK_FALSE  */
  YYSYMBOL_TOK_FIXED = 15,                 /* TOK_FIXED  */
  YYSYMBOL_TOK_FLOAT = 16,                 /* TOK_FLOAT  */
  YYSYMBOL_TOK_IN = 17,                    /* TOK_IN  */
  YYSYMBOL_TOK_INOUT = 18,                 /* TOK_INOUT  */
  YYSYMBOL_TOK_INTERFACE = 19,             /* TOK_INTERFACE  */
  YYSYMBOL_TOK_LONG = 20,                  /* TOK_LONG  */
  YYSYMBOL_TOK_MODULE = 21,                /* TOK_MODULE  */
  YYSYMBOL_TOK_NATIVE = 22,                /* TOK_NATIVE  */
  YYSYMBOL_TOK_OBJECT = 23,                /* TOK_OBJECT  */
  YYSYMBOL_TOK_OCTET = 24,                 /* TOK_OCTET  */
  YYSYMBOL_TOK_ONEWAY = 25,                /* TOK_ONEWAY  */
  YYSYMBOL_TOK_OP_SCOPE = 26,              /* TOK_OP_SCOPE  */
  YYSYMBOL_TOK_OP_SHL = 27,                /* TOK_OP_SHL  */
  YYSYMBOL_TOK_OP_SHR = 28,                /* TOK_OP_SHR  */
  YYSYMBOL_TOK_OUT = 29,                   /* TOK_OUT  */
  YYSYMBOL_TOK_RAISES = 30,                /* TOK_RAISES  */
  YYSYMBOL_TOK_READONLY = 31,              /* TOK_READONLY  */
  YYSYMBOL_TOK_SEQUENCE = 32,              /* TOK_SEQUENCE  */
  YYSYMBOL_TOK_SHORT = 33,                 /* TOK_SHORT  */
  YYSYMBOL_TOK_STRING = 34,                /* TOK_STRING  */
  YYSYMBOL_TOK_STRUCT = 35,                /* TOK_STRUCT  */
  YYSYMBOL_TOK_SWITCH = 36,                /* TOK_SWITCH  */
  YYSYMBOL_TOK_TRUE = 37,                  /* TOK_TRUE  */
  YYSYMBOL_TOK_TYPECODE = 38,              /* TOK_TYPECODE  */
  YYSYMBOL_TOK_TYPEDEF = 39,               /* TOK_TYPEDEF  */
  YYSYMBOL_TOK_UNION = 40,                 /* TOK_UNION  */
  YYSYMBOL_TOK_UNSIGNED = 41,              /* TOK_UNSIGNED  */
  YYSYMBOL_TOK_VARARGS = 42,               /* TOK_VARARGS  */
  YYSYMBOL_TOK_VOID = 43,                  /* TOK_VOID  */
  YYSYMBOL_TOK_WCHAR = 44,                 /* TOK_WCHAR  */
  YYSYMBOL_TOK_WSTRING = 45,               /* TOK_WSTRING  */
  YYSYMBOL_TOK_FLOATP = 46,                /* TOK_FLOATP  */
  YYSYMBOL_TOK_INTEGER = 47,               /* TOK_INTEGER  */
  YYSYMBOL_TOK_DECLSPEC = 48,              /* TOK_DECLSPEC  */
  YYSYMBOL_TOK_PROP_KEY = 49,              /* TOK_PROP_KEY  */
  YYSYMBOL_TOK_PROP_VALUE = 50,            /* TOK_PROP_VALUE  */
  YYSYMBOL_TOK_NATIVE_TYPE = 51,           /* TOK_NATIVE_TYPE  */
  YYSYMBOL_TOK_IDENT = 52,                 /* TOK_IDENT  */
  YYSYMBOL_TOK_SQSTRING = 53,              /* TOK_SQSTRING  */
  YYSYMBOL_TOK_DQSTRING = 54,              /* TOK_DQSTRING  */
  YYSYMBOL_TOK_FIXEDP = 55,                /* TOK_FIXEDP  */
  YYSYMBOL_TOK_CODEFRAG = 56,              /* TOK_CODEFRAG  */
  YYSYMBOL_TOK_SRCFILE = 57,               /* TOK_SRCFILE  */
  YYSYMBOL_58_ = 58,                       /* ';'  */
  YYSYMBOL_59_ = 59,                       /* ','  */
  YYSYMBOL_60_ = 60,                       /* '{'  */
  YYSYMBOL_61_ = 61,                       /* '}'  */
  YYSYMBOL_62_ = 62,                       /* ':'  */
  YYSYMBOL_63_ = 63,                       /* '('  */
  YYSYMBOL_64_ = 64,                       /* ')'  */
  YYSYMBOL_65_ = 65,                       /* '='  */
  YYSYMBOL_66_ = 66,                       /* '|'  */
  YYSYMBOL_67_ = 67,                       /* '^'  */
  YYSYMBOL_68_ = 68,                       /* '&'  */
  YYSYMBOL_69_ = 69,                       /* '+'  */
  YYSYMBOL_70_ = 70,                       /* '-'  */
  YYSYMBOL_71_ = 71,                       /* '*'  */
  YYSYMBOL_72_ = 72,                       /* '/'  */
  YYSYMBOL_73_ = 73,                       /* '%'  */
  YYSYMBOL_74_ = 74,                       /* '~'  */
  YYSYMBOL_75_ = 75,                       /* '<'  */
  YYSYMBOL_76_ = 76,                       /* '>'  */
  YYSYMBOL_77_ = 77,                       /* '['  */
  YYSYMBOL_78_ = 78,                       /* ']'  */
  YYSYMBOL_YYACCEPT = 79,                  /* $accept  */
  YYSYMBOL_specification = 80,             /* specification  */
  YYSYMBOL_z_definition_list = 81,         /* z_definition_list  */
  YYSYMBOL_definition_list = 82,           /* definition_list  */
  YYSYMBOL_check_semicolon = 83,           /* check_semicolon  */
  YYSYMBOL_useless_semicolon = 84,         /* useless_semicolon  */
  YYSYMBOL_check_comma = 85,               /* check_comma  */
  YYSYMBOL_illegal_ident = 86,             /* illegal_ident  */
  YYSYMBOL_definition = 87,                /* definition  */
  YYSYMBOL_module_declspec = 88,           /* module_declspec  */
  YYSYMBOL_module = 89,                    /* module  */
  YYSYMBOL_90_1 = 90,                      /* $@1  */
  YYSYMBOL_interface_catch_ident = 91,     /* interface_catch_ident  */
  YYSYMBOL_interface = 92,                 /* interface  */
  YYSYMBOL_93_2 = 93,                      /* $@2  */
  YYSYMBOL_94_3 = 94,                      /* $@3  */
  YYSYMBOL_z_inheritance = 95,             /* z_inheritance  */
  YYSYMBOL_scoped_name_list = 96,          /* scoped_name_list  */
  YYSYMBOL_interface_body = 97,            /* interface_body  */
  YYSYMBOL_export_list = 98,               /* export_list  */
  YYSYMBOL_export = 99,                    /* export  */
  YYSYMBOL_type_dcl = 100,                 /* type_dcl  */
  YYSYMBOL_type_dcl_def = 101,             /* type_dcl_def  */
  YYSYMBOL_102_4 = 102,                    /* $@4  */
  YYSYMBOL_type_declarator = 103,          /* type_declarator  */
  YYSYMBOL_type_spec = 104,                /* type_spec  */
  YYSYMBOL_simple_type_spec = 105,         /* simple_type_spec  */
  YYSYMBOL_constr_type_spec = 106,         /* constr_type_spec  */
  YYSYMBOL_z_new_ident_catch = 107,        /* z_new_ident_catch  */
  YYSYMBOL_z_new_scope_catch = 108,        /* z_new_scope_catch  */
  YYSYMBOL_struct_type = 109,              /* struct_type  */
  YYSYMBOL_110_5 = 110,                    /* @5  */
  YYSYMBOL_111_6 = 111,                    /* @6  */
  YYSYMBOL_union_type = 112,               /* union_type  */
  YYSYMBOL_113_7 = 113,                    /* @7  */
  YYSYMBOL_114_8 = 114,                    /* @8  */
  YYSYMBOL_switch_type_spec = 115,         /* switch_type_spec  */
  YYSYMBOL_switch_body = 116,              /* switch_body  */
  YYSYMBOL_case_stmt_list = 117,           /* case_stmt_list  */
  YYSYMBOL_case_stmt = 118,                /* case_stmt  */
  YYSYMBOL_element_spec = 119,             /* element_spec  */
  YYSYMBOL_case_label_list = 120,          /* case_label_list  */
  YYSYMBOL_case_label = 121,               /* case_label  */
  YYSYMBOL_const_dcl = 122,                /* const_dcl  */
  YYSYMBOL_const_dcl_def = 123,            /* const_dcl_def  */
  YYSYMBOL_except_dcl = 124,               /* except_dcl  */
  YYSYMBOL_except_dcl_def = 125,           /* except_dcl_def  */
  YYSYMBOL_member_zlist = 126,             /* member_zlist  */
  YYSYMBOL_is_readonly = 127,              /* is_readonly  */
  YYSYMBOL_attr_dcl = 128,                 /* attr_dcl  */
  YYSYMBOL_attr_dcl_def = 129,             /* attr_dcl_def  */
  YYSYMBOL_130_9 = 130,                    /* @9  */
  YYSYMBOL_param_type_spec = 131,          /* param_type_spec  */
  YYSYMBOL_op_param_type_spec_illegal = 132, /* op_param_type_spec_illegal  */
  YYSYMBOL_op_param_type_spec = 133,       /* op_param_type_spec  */
  YYSYMBOL_is_oneway = 134,                /* is_oneway  */
  YYSYMBOL_op_dcl = 135,                   /* op_dcl  */
  YYSYMBOL_op_dcl_def = 136,               /* op_dcl_def  */
  YYSYMBOL_op_type_spec = 137,             /* op_type_spec  */
  YYSYMBOL_138_10 = 138,                   /* @10  */
  YYSYMBOL_is_varargs = 139,               /* is_varargs  */
  YYSYMBOL_is_cvarargs = 140,              /* is_cvarargs  */
  YYSYMBOL_parameter_dcls = 141,           /* parameter_dcls  */
  YYSYMBOL_param_dcl_list = 142,           /* param_dcl_list  */
  YYSYMBOL_param_dcl = 143,                /* param_dcl  */
  YYSYMBOL_144_11 = 144,                   /* @11  */
  YYSYMBOL_param_attribute = 145,          /* param_attribute  */
  YYSYMBOL_is_raises_expr = 146,           /* is_raises_expr  */
  YYSYMBOL_is_context_expr = 147,          /* is_context_expr  */
  YYSYMBOL_raises_expr = 148,              /* raises_expr  */
  YYSYMBOL_context_expr = 149,             /* context_expr  */
  YYSYMBOL_const_type = 150,               /* const_type  */
  YYSYMBOL_const_exp = 151,                /* const_exp  */
  YYSYMBOL_or_expr = 152,                  /* or_expr  */
  YYSYMBOL_xor_expr = 153,                 /* xor_expr  */
  YYSYMBOL_and_expr = 154,                 /* and_expr  */
  YYSYMBOL_shift_expr = 155,               /* shift_expr  */
  YYSYMBOL_add_expr = 156,                 /* add_expr  */
  YYSYMBOL_mult_expr = 157,                /* mult_expr  */
  YYSYMBOL_unary_expr = 158,               /* unary_expr  */
  YYSYMBOL_unary_op = 159,                 /* unary_op  */
  YYSYMBOL_primary_expr = 160,             /* primary_expr  */
  YYSYMBOL_literal = 161,                  /* literal  */
  YYSYMBOL_enum_type = 162,                /* enum_type  */
  YYSYMBOL_163_12 = 163,                   /* @12  */
  YYSYMBOL_scoped_name = 164,              /* scoped_name  */
  YYSYMBOL_ns_scoped_name = 165,           /* ns_scoped_name  */
  YYSYMBOL_enumerator_list = 166,          /* enumerator_list  */
  YYSYMBOL_member_list = 167,              /* member_list  */
  YYSYMBOL_member = 168,                   /* member  */
  YYSYMBOL_base_type_spec = 169,           /* base_type_spec  */
  YYSYMBOL_template_type_spec = 170,       /* template_type_spec  */
  YYSYMBOL_sequence_type = 171,            /* sequence_type  */
  YYSYMBOL_floating_pt_type = 172,         /* floating_pt_type  */
  YYSYMBOL_fixed_pt_type = 173,            /* fixed_pt_type  */
  YYSYMBOL_fixed_pt_const_type = 174,      /* fixed_pt_const_type  */
  YYSYMBOL_integer_type = 175,             /* integer_type  */
  YYSYMBOL_signed_int = 176,               /* signed_int  */
  YYSYMBOL_signed_short_int = 177,         /* signed_short_int  */
  YYSYMBOL_signed_long_int = 178,          /* signed_long_int  */
  YYSYMBOL_signed_longlong_int = 179,      /* signed_longlong_int  */
  YYSYMBOL_unsigned_int = 180,             /* unsigned_int  */
  YYSYMBOL_unsigned_short_int = 181,       /* unsigned_short_int  */
  YYSYMBOL_unsigned_long_int = 182,        /* unsigned_long_int  */
  YYSYMBOL_unsigned_longlong_int = 183,    /* unsigned_longlong_int  */
  YYSYMBOL_char_type = 184,                /* char_type  */
  YYSYMBOL_wide_char_type = 185,           /* wide_char_type  */
  YYSYMBOL_boolean_type = 186,             /* boolean_type  */
  YYSYMBOL_octet_type = 187,               /* octet_type  */
  YYSYMBOL_any_type = 188,                 /* any_type  */
  YYSYMBOL_object_type = 189,              /* object_type  */
  YYSYMBOL_typecode_type = 190,            /* typecode_type  */
  YYSYMBOL_string_type = 191,              /* string_type  */
  YYSYMBOL_wide_string_type = 192,         /* wide_string_type  */
  YYSYMBOL_declarator_list = 193,          /* declarator_list  */
  YYSYMBOL_declarator = 194,               /* declarator  */
  YYSYMBOL_simple_declarator = 195,        /* simple_declarator  */
  YYSYMBOL_complex_declarator = 196,       /* complex_declarator  */
  YYSYMBOL_simple_declarator_list = 197,   /* simple_declarator_list  */
  YYSYMBOL_array_declarator = 198,         /* array_declarator  */
  YYSYMBOL_fixed_array_size_list = 199,    /* fixed_array_size_list  */
  YYSYMBOL_fixed_array_size = 200,         /* fixed_array_size  */
  YYSYMBOL_prop_hash = 201,                /* prop_hash  */
  YYSYMBOL_ident = 202,                    /* ident  */
  YYSYMBOL_new_ident = 203,                /* new_ident  */
  YYSYMBOL_new_scope = 204,                /* new_scope  */
  YYSYMBOL_new_or_prev_scope = 205,        /* new_or_prev_scope  */
  YYSYMBOL_pop_scope = 206,                /* pop_scope  */
  YYSYMBOL_ns_new_ident = 207,             /* ns_new_ident  */
  YYSYMBOL_ns_prev_ident = 208,            /* ns_prev_ident  */
  YYSYMBOL_cur_ns_new_or_prev_ident = 209, /* cur_ns_new_or_prev_ident  */
  YYSYMBOL_ns_global_ident = 210,          /* ns_global_ident  */
  YYSYMBOL_string_lit_list = 211,          /* string_lit_list  */
  YYSYMBOL_positive_int_const = 212,       /* positive_int_const  */
  YYSYMBOL_z_declspec = 213,               /* z_declspec  */
  YYSYMBOL_z_props = 214,                  /* z_props  */
  YYSYMBOL_215_13 = 215,                   /* $@13  */
  YYSYMBOL_integer_lit = 216,              /* integer_lit  */
  YYSYMBOL_string_lit = 217,               /* string_lit  */
  YYSYMBOL_char_lit = 218,                 /* char_lit  */
  YYSYMBOL_fixed_pt_lit = 219,             /* fixed_pt_lit  */
  YYSYMBOL_floating_pt_lit = 220,          /* floating_pt_lit  */
  YYSYMBOL_boolean_lit = 221,              /* boolean_lit  */
  YYSYMBOL_codefrag = 222,                 /* codefrag  */
  YYSYMBOL_srcfile = 223,                  /* srcfile  */
  YYSYMBOL_dqstring_cat = 224,             /* dqstring_cat  */
  YYSYMBOL_dqstring = 225,                 /* dqstring  */
  YYSYMBOL_sqstring = 226                  /* sqstring  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;




#ifdef short
# undef short
#endif

/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
   <limits.h> and (if available) <stdint.h> are included
   so that the code can choose integer types of a good width.  */

#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
#  define YY_STDINT_H
# endif
#endif

/* Narrow types that promote to a signed type and that can represent a
   signed or unsigned integer of at least N bits.  In tables they can
   save space and decrease cache pressure.  Promoting to a signed type
   helps avoid bugs in integer arithmetic.  */

#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif

/* Work around bug in HP-UX 11.23, which defines these macros
   incorrectly for preprocessor constants.  This workaround can likely
   be removed in 2023, as HPE has promised support for HP-UX 11.23
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif

#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif

#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif

#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
#  ifndef ptrdiff_t
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  endif
#  define YYPTRDIFF_T ptrdiff_t
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned
# endif
#endif

#define YYSIZE_MAXIMUM                                  \
  YY_CAST (YYPTRDIFF_T,                                 \
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
            ? YYPTRDIFF_MAXIMUM                         \
            : YY_CAST (YYSIZE_T, -1)))

#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))


/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
#  define YY_ATTRIBUTE_UNUSED
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YY_USE(E) ((void) (E))
#else
# define YY_USE(E) /* empty */
#endif

/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#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

#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
    _Pragma ("GCC diagnostic push")                            \
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END            \
    _Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif


#define YY_ASSERT(E) ((void) (0 && (E)))

#if !defined yyoverflow

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     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
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* 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
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* !defined yyoverflow */

#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yy_state_t yyss_alloc;
  YYSTYPE yyvs_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   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                                                                  \
      {                                                                 \
        YYPTRDIFF_T yynewbytes;                                         \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYPTRDIFF_T yyi;                      \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  26
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   695

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  79
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  148
/* YYNRULES -- Number of rules.  */
#define YYNRULES  279
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  397

/* YYMAXUTOK -- Last valid token kind.  */
#define YYMAXUTOK   312


/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, with out-of-bounds checking.  */
#define YYTRANSLATE(YYX)                                \
  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
   : YYSYMBOL_YYUNDEF)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_int8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,    73,    68,     2,
      63,    64,    71,    69,    59,    70,     2,    72,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    62,    58,
      75,    65,    76,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,    77,     2,    78,    67,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    60,    66,    61,    74,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57
};

#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   309,   309,   310,   313,   314,   317,   318,   321,   322,
     328,   334,   335,   341,   350,   351,   352,   353,   354,   355,
     356,   357,   358,   361,   365,   364,   402,   403,   407,   416,
     439,   413,   451,   464,   465,   511,   512,   516,   519,   520,
     523,   524,   525,   526,   527,   528,   529,   532,   538,   551,
     552,   553,   554,   560,   559,   575,   578,   579,   582,   583,
     584,   587,   588,   589,   592,   596,   599,   603,   607,   608,
     606,   622,   625,   621,   638,   639,   640,   641,   642,   645,
     648,   649,   652,   656,   670,   671,   674,   675,   678,   684,
     691,   697,   702,   703,   706,   707,   710,   719,   716,   735,
     736,   743,   744,   747,   748,   749,   750,   751,   752,   758,
     759,   762,   768,   780,   780,   782,   785,   786,   789,   790,
     793,   800,   806,   807,   813,   811,   821,   822,   823,   824,
     830,   831,   834,   835,   838,   843,   848,   849,   850,   851,
     852,   853,   854,   855,   856,   857,   860,   863,   864,   867,
     868,   871,   872,   875,   876,   877,   880,   881,   882,   885,
     886,   887,   888,   891,   892,   895,   896,   897,   900,   914,
     915,   918,   919,   920,   921,   922,   923,   927,   926,   936,
     944,   945,   946,   972,   973,   977,   978,   981,   996,   997,
     998,   999,  1000,  1001,  1002,  1003,  1004,  1007,  1008,  1009,
    1010,  1013,  1016,  1021,  1022,  1023,  1026,  1031,  1034,  1035,
    1038,  1039,  1040,  1043,  1046,  1049,  1052,  1053,  1054,  1057,
    1060,  1063,  1066,  1069,  1072,  1075,  1078,  1081,  1084,  1087,
    1090,  1093,  1096,  1099,  1100,  1104,  1105,  1108,  1111,  1114,
    1115,  1119,  1134,  1135,  1139,  1140,  1143,  1148,  1154,  1158,
    1165,  1168,  1176,  1189,  1206,  1218,  1256,  1275,  1305,  1324,
    1325,  1329,  1368,  1369,  1375,  1376,  1376,  1388,  1391,  1394,
    1397,  1400,  1403,  1404,  1407,  1413,  1418,  1419,  1427,  1434
};
#endif

/** Accessing symbol of state STATE.  */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])

#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
   YYSYMBOL.  No bounds checking.  */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;

/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "\"end of file\"", "error", "\"invalid token\"", "TOK_ANY",
  "TOK_ATTRIBUTE", "TOK_BOOLEAN", "TOK_CASE", "TOK_CHAR", "TOK_CONST",
  "TOK_CONTEXT", "TOK_DEFAULT", "TOK_DOUBLE", "TOK_ENUM", "TOK_EXCEPTION",
  "TOK_FALSE", "TOK_FIXED", "TOK_FLOAT", "TOK_IN", "TOK_INOUT",
  "TOK_INTERFACE", "TOK_LONG", "TOK_MODULE", "TOK_NATIVE", "TOK_OBJECT",
  "TOK_OCTET", "TOK_ONEWAY", "TOK_OP_SCOPE", "TOK_OP_SHL", "TOK_OP_SHR",
  "TOK_OUT", "TOK_RAISES", "TOK_READONLY", "TOK_SEQUENCE", "TOK_SHORT",
  "TOK_STRING", "TOK_STRUCT", "TOK_SWITCH", "TOK_TRUE", "TOK_TYPECODE",
  "TOK_TYPEDEF", "TOK_UNION", "TOK_UNSIGNED", "TOK_VARARGS", "TOK_VOID",
  "TOK_WCHAR", "TOK_WSTRING", "TOK_FLOATP", "TOK_INTEGER", "TOK_DECLSPEC",
  "TOK_PROP_KEY", "TOK_PROP_VALUE", "TOK_NATIVE_TYPE", "TOK_IDENT",
  "TOK_SQSTRING", "TOK_DQSTRING", "TOK_FIXEDP", "TOK_CODEFRAG",
  "TOK_SRCFILE", "';'", "','", "'{'", "'}'", "':'", "'('", "')'", "'='",
  "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'<'",
  "'>'", "'['", "']'", "$accept", "specification", "z_definition_list",
  "definition_list", "check_semicolon", "useless_semicolon", "check_comma",
  "illegal_ident", "definition", "module_declspec", "module", "$@1",
  "interface_catch_ident", "interface", "$@2", "$@3", "z_inheritance",
  "scoped_name_list", "interface_body", "export_list", "export",
  "type_dcl", "type_dcl_def", "$@4", "type_declarator", "type_spec",
  "simple_type_spec", "constr_type_spec", "z_new_ident_catch",
  "z_new_scope_catch", "struct_type", "@5", "@6", "union_type", "@7", "@8",
  "switch_type_spec", "switch_body", "case_stmt_list", "case_stmt",
  "element_spec", "case_label_list", "case_label", "const_dcl",
  "const_dcl_def", "except_dcl", "except_dcl_def", "member_zlist",
  "is_readonly", "attr_dcl", "attr_dcl_def", "@9", "param_type_spec",
  "op_param_type_spec_illegal", "op_param_type_spec", "is_oneway",
  "op_dcl", "op_dcl_def", "op_type_spec", "@10", "is_varargs",
  "is_cvarargs", "parameter_dcls", "param_dcl_list", "param_dcl", "@11",
  "param_attribute", "is_raises_expr", "is_context_expr", "raises_expr",
  "context_expr", "const_type", "const_exp", "or_expr", "xor_expr",
  "and_expr", "shift_expr", "add_expr", "mult_expr", "unary_expr",
  "unary_op", "primary_expr", "literal", "enum_type", "@12", "scoped_name",
  "ns_scoped_name", "enumerator_list", "member_list", "member",
  "base_type_spec", "template_type_spec", "sequence_type",
  "floating_pt_type", "fixed_pt_type", "fixed_pt_const_type",
  "integer_type", "signed_int", "signed_short_int", "signed_long_int",
  "signed_longlong_int", "unsigned_int", "unsigned_short_int",
  "unsigned_long_int", "unsigned_longlong_int", "char_type",
  "wide_char_type", "boolean_type", "octet_type", "any_type",
  "object_type", "typecode_type", "string_type", "wide_string_type",
  "declarator_list", "declarator", "simple_declarator",
  "complex_declarator", "simple_declarator_list", "array_declarator",
  "fixed_array_size_list", "fixed_array_size", "prop_hash", "ident",
  "new_ident", "new_scope", "new_or_prev_scope", "pop_scope",
  "ns_new_ident", "ns_prev_ident", "cur_ns_new_or_prev_ident",
  "ns_global_ident", "string_lit_list", "positive_int_const", "z_declspec",
  "z_props", "$@13", "integer_lit", "string_lit", "char_lit",
  "fixed_pt_lit", "floating_pt_lit", "boolean_lit", "codefrag", "srcfile",
  "dqstring_cat", "dqstring", "sqstring", YY_NULLPTR
};

static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
  return yytname[yysymbol];
}
#endif

#define YYPACT_NINF (-302)

#define yypact_value_is_default(Yyn) \
  ((Yyn) == YYPACT_NINF)

#define YYTABLE_NINF (-119)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
      57,    -7,  -302,  -302,  -302,  -302,    24,   223,  -302,  -302,
    -302,    -7,    -3,    -3,    -3,    -3,    -3,  -302,    46,  -302,
    -302,    29,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,  -302,  -302,  -302,    -7,   643,    -7,
    -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,   320,
      32,  -302,  -302,  -302,  -302,  -302,  -302,   124,  -302,  -302,
      48,    69,  -302,    61,    -7,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,    47,  -302,    90,  -302,    18,    -7,
    -302,   562,  -302,   376,  -302,  -302,   183,   130,  -302,   183,
     105,  -302,  -302,   133,     6,    -7,  -302,  -302,    15,  -302,
     109,  -302,    -7,  -302,   125,  -302,   140,  -302,  -302,    -7,
    -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,  -302,
    -302,    36,    -7,   156,   518,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,   183,  -302,  -302,  -302,  -302,   153,   146,   154,
     152,   119,   123,  -302,   319,  -302,  -302,  -302,   148,  -302,
    -302,  -302,  -302,  -302,  -302,   173,  -302,  -302,  -302,   157,
     183,   420,  -302,   185,  -302,   184,  -302,  -302,  -302,  -302,
     187,  -302,   183,   608,    38,  -302,  -302,  -302,  -302,   171,
     214,  -302,   190,   183,   183,   183,   183,   183,   183,   183,
     183,   183,   183,  -302,  -302,  -302,  -302,  -302,  -302,    -7,
    -302,   201,    -7,   193,   207,  -302,   202,   -15,  -302,    -7,
     138,   171,  -302,   199,  -302,  -302,   146,   154,   152,   119,
     119,   123,   123,  -302,  -302,  -302,  -302,   147,  -302,    34,
    -302,     8,  -302,  -302,   562,   216,   183,  -302,  -302,  -302,
     191,  -302,    26,  -302,  -302,    -7,   151,  -302,   205,   468,
    -302,   192,   194,  -302,   252,   209,  -302,  -302,  -302,  -302,
    -302,   264,  -302,     8,  -302,  -302,  -302,  -302,  -302,   217,
    -302,   221,    82,  -302,  -302,  -302,  -302,  -302,    -3,    -3,
      -3,    -3,    -3,    17,  -302,   163,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,   318,   183,   222,   224,   163,  -302,
     122,  -302,  -302,  -302,   283,   248,   230,  -302,  -302,  -302,
      -7,    -3,  -302,  -302,  -302,    -7,   562,  -302,  -302,  -302,
    -302,   516,   231,  -302,  -302,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,    -7,  -302,    44,  -302,  -302,    38,  -302,
     229,    58,  -302,   374,   265,    -7,  -302,   254,   220,   234,
    -302,  -302,  -302,  -302,  -302,   236,   293,  -302,  -302,  -302,
    -302,  -302,   516,     8,   240,  -302,  -302,    -7,    98,   173,
    -302,  -302,   117,  -302,  -302,   173,  -302
};

/* 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_int16 yydefact[] =
{
     262,     0,   263,   250,   275,    10,     0,   262,    22,    21,
       6,     0,     9,     9,     9,     9,     9,    13,   179,   256,
     180,   264,    19,    20,   258,   181,     1,     7,   257,    24,
     253,     8,    18,    17,    14,    15,    16,     0,     0,     0,
      23,   274,   265,    47,    49,    50,    88,    90,    51,     0,
       0,   182,   224,   222,   204,   207,   203,   214,   225,   213,
     230,     0,   223,   232,     0,   145,   141,   144,   136,   208,
     210,   211,   212,   209,   216,   217,   218,   137,   139,   140,
     138,   142,   143,   255,     0,   252,     0,   177,     0,     0,
      68,   264,    71,   262,   205,   215,     0,   220,   219,     0,
       0,   251,    92,   248,     0,    64,    27,    28,   254,    26,
      52,   237,    66,   226,     0,   227,     0,   228,    48,     0,
      56,    57,    61,    62,    63,    60,    58,    59,   197,   188,
     200,   189,   190,   191,   192,   193,   194,   195,   196,   198,
     199,     0,    66,     0,   262,   273,   272,   271,   267,   279,
     278,   270,     0,   166,   165,   167,   261,   146,   147,   149,
     151,   153,   156,   159,     0,   164,   169,   168,     0,   171,
     172,   173,   174,   175,   176,   268,   276,   269,   221,     0,
       0,   264,   246,     0,   266,     0,    65,   254,    32,    53,
       0,    67,     0,     0,    55,   233,   235,   236,   238,   237,
       0,   254,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   163,   229,   277,   231,    89,   254,     0,
      93,   249,     0,    33,     0,    69,     0,     0,    11,     0,
       0,   241,   242,     0,    25,   170,   148,   150,   152,   155,
     154,   157,   158,   160,   161,   162,    91,     9,   247,    12,
     183,     0,    30,    54,   264,     0,     0,   202,   234,   245,
       0,   243,   264,   187,   178,     0,    12,    35,     0,   264,
     185,     0,     0,   244,   214,     0,    77,    78,    74,    75,
      76,     0,   184,     0,    38,   254,   186,   206,   201,     0,
      36,     0,   262,    70,    72,   254,    46,    39,     9,     9,
       9,     9,     9,   264,    45,     0,    31,    40,    44,    41,
      43,    42,    96,   111,   109,     0,     0,     0,    79,    80,
     264,    84,   110,    95,     0,   113,     0,    87,   254,    81,
       0,     9,    85,    97,   115,     0,   264,    86,    73,    83,
      82,   264,     0,   102,   108,   114,   107,   103,   101,   106,
     104,   105,   100,     0,    99,   264,   254,   239,    98,   117,
       0,    12,   122,   264,   130,     0,   121,    11,   264,     0,
     126,   128,   127,   129,   124,     0,   132,   131,   240,   119,
     123,   120,   264,     0,     0,   112,   133,     0,    12,     0,
     125,   134,    12,   259,   135,     0,   260
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -302,  -302,  -302,   215,    13,    25,  -227,  -302,    14,  -302,
    -302,  -302,  -302,  -302,  -302,  -302,  -302,   -73,  -302,  -302,
    -302,    27,  -302,  -302,  -302,   -77,   127,  -301,  -302,   174,
     -14,  -302,  -302,   -13,  -302,  -302,  -302,  -302,  -302,     0,
    -302,  -302,     1,    31,  -302,    35,  -302,  -302,  -302,  -302,
    -302,  -302,  -263,  -302,   -12,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,   -42,  -302,  -302,  -302,  -302,  -302,
    -302,  -302,  -133,  -302,   134,   132,   149,    19,    23,    -8,
    -302,   197,  -302,   -17,  -302,     5,  -302,  -302,  -302,  -203,
    -283,  -302,  -272,   300,  -262,  -302,   -23,  -302,  -302,  -302,
    -302,  -302,  -302,  -302,  -302,   -22,   313,   -21,   324,  -302,
    -302,  -302,   -35,   -32,   144,  -206,   -87,  -302,  -302,  -302,
    -302,   136,  -302,    -1,   -51,   -28,   281,  -169,   -30,  -302,
    -302,  -302,  -302,   -79,    78,   -20,  -302,   120,  -242,  -302,
    -302,  -302,  -302,    84,  -302,  -302,   203,  -302
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
       0,     6,   143,     7,    32,     8,   229,     9,    10,    11,
      12,    50,   108,    13,   187,   268,   252,   266,   291,   292,
     297,    14,    43,   224,   118,   219,   120,   121,   185,   190,
     122,   112,   254,   123,   142,   305,   275,   317,   318,   319,
     331,   320,   321,    15,    46,    16,    47,   181,   324,   301,
     312,   341,   353,   344,   354,   325,   302,   313,   335,   336,
     360,   369,   356,   361,   362,   382,   374,   376,   385,   377,
     386,    64,   156,   157,   158,   159,   160,   161,   162,   163,
     164,   165,   166,   124,   105,   167,    18,   249,   269,   220,
     126,   127,   128,   129,   130,    67,   131,    69,    70,    71,
      72,    73,    74,    75,    76,   132,   133,   134,   135,   136,
     137,   138,   139,   140,   194,   195,   196,   197,   358,   198,
     231,   232,   104,    19,   111,   191,    29,   188,   101,    20,
      30,    25,   392,   168,    21,   141,    86,   169,   170,   171,
     172,   173,   174,    22,    23,   175,   176,   177
};

/* 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[] =
{
      24,    49,   110,    81,    48,    17,    82,    44,    45,    85,
      28,    84,    17,   100,   119,    68,    77,    79,   223,   202,
     179,    27,   265,   258,    26,    38,    33,    34,    35,    36,
      39,    52,   234,    53,     1,   343,    51,    38,    83,   283,
     343,   106,    39,    65,   256,     3,   274,   217,    87,   246,
      40,   270,     1,   347,   186,    31,   107,    -2,   347,    59,
       3,   257,   343,    83,   348,   183,   286,    61,   199,   348,
       3,    90,    37,    41,   349,   -29,    92,   -29,     3,   349,
     347,   343,    85,     1,   184,    41,   359,    28,    83,    97,
     -12,   348,    93,   228,    42,   264,   125,   228,    17,   347,
     373,   349,    98,    42,    83,     2,    42,   102,  -116,     3,
     348,    83,    85,   226,     4,     5,   293,   367,    83,   387,
     349,    42,  -118,    96,   339,   113,   306,    52,   315,    53,
       2,   365,   316,    54,   368,    94,    99,   114,    56,   103,
       5,    83,    57,   -37,    95,   115,    58,   393,     1,    17,
     178,   260,   145,   396,   116,    59,    60,   228,    27,   338,
     117,   283,   391,    61,     1,   395,    62,    63,   199,   315,
     180,   250,   189,   316,     3,   146,   228,   272,   199,   206,
     207,   394,   326,   182,   147,   148,   125,   364,   208,   209,
       3,   149,   150,   151,   210,   211,   212,   145,   125,    42,
     192,   152,   243,   244,   245,    31,   228,   153,   154,     1,
     228,   -34,   155,   204,   282,   193,   259,   201,    83,   203,
     146,    83,   205,    -3,   214,   239,   240,   150,    83,   147,
     148,   241,   242,   216,   221,     3,   149,   150,   151,   278,
     279,   280,   281,   330,   222,   276,   152,   225,   230,     1,
     233,   248,   153,   154,   235,   251,   267,   155,   253,   125,
     263,   255,   262,   148,    83,   284,   357,   277,   287,   273,
     288,     2,    95,   289,   125,     3,    87,   294,   378,   199,
       4,     5,   295,   314,   327,   328,    48,   333,   290,    44,
      45,   334,   337,   366,   355,   375,   379,    42,   381,   383,
     390,   350,   384,   389,   351,    85,   350,   342,   144,   351,
     388,   307,   308,   309,   310,   311,   200,   296,   329,   298,
     227,   332,   -94,   299,   345,   125,   380,   300,   350,    83,
      87,   351,    87,   145,    83,   363,   237,   236,    66,    88,
      89,   346,    89,   322,   340,     1,   346,   350,   363,   323,
     351,    78,    83,    90,   238,    90,   146,    91,    92,    91,
      92,   213,    80,   247,    83,   147,   148,   261,   346,   109,
     303,     3,   149,   150,   151,   271,   304,   113,   215,    52,
       0,    53,   152,     0,     0,    54,    83,   346,   267,   114,
      56,   370,   371,     0,    57,     0,     0,   115,    58,     0,
       1,     0,     1,   372,     0,     0,   116,    59,    60,     0,
       0,     0,   117,     0,     0,    61,     0,   352,    62,    63,
       0,     0,     0,   113,     2,    52,     3,    53,     3,     0,
       0,    54,     0,     4,     5,   114,    56,    -4,     0,     0,
      57,     0,     0,   115,    58,     0,     1,     0,     0,     0,
       0,    42,   116,    59,    60,     0,     0,     0,   117,     0,
       0,    61,     0,     0,    62,    63,     0,     0,     0,     0,
       0,   113,     3,    52,     0,    53,     0,     0,     0,    54,
       0,   218,     0,   114,    56,     0,     0,     0,    57,     0,
       0,   115,    58,     0,     1,     0,     0,    42,     0,     0,
     116,    59,    60,     0,     0,     0,   117,     0,     0,    61,
       0,     0,    62,    63,     0,     0,     0,     0,     0,   113,
       3,    52,     0,    53,     0,     0,     0,    54,     0,   285,
       0,   114,    56,     0,     0,     0,    57,     0,     0,   115,
      58,     0,     1,     0,     1,    42,     0,     0,   116,    59,
      60,     0,     0,     0,   117,     0,     0,    61,     0,   352,
      62,    63,     0,     0,     0,   113,     2,    52,     3,    53,
       3,     0,     0,    54,     0,     4,     5,   114,    56,    -5,
       0,     0,    57,     0,     0,   115,    58,     0,     1,     0,
       0,     0,     0,    42,   116,    59,    60,     0,     0,     0,
     117,     0,     0,    61,     0,     0,    62,    63,     0,     0,
       0,   113,     0,    52,     3,    53,     0,     0,     0,    54,
       0,     0,     0,   114,    56,     0,     0,     0,    57,     0,
       0,   115,    58,     0,     1,     0,     0,     0,     0,    42,
     116,    59,    60,     0,     0,     0,   117,     0,    52,    61,
      53,     0,    62,    63,    54,     0,     0,     0,    55,    56,
       3,     0,     0,    57,     0,     0,     0,    58,     0,     1,
       0,     0,     0,     0,     0,     0,    59,    60,     0,     0,
       0,     0,     0,     0,    61,     0,     0,    62,    63,     0,
       0,     0,     0,     0,     0,     3
};

static const yytype_int16 yycheck[] =
{
       1,    21,    89,    38,    21,     0,    38,    21,    21,    39,
      11,    39,     7,    64,    91,    38,    38,    38,   187,   152,
      99,     7,   249,   229,     0,     8,    13,    14,    15,    16,
      13,     5,   201,     7,    26,   336,    37,     8,    39,   266,
     341,    23,    13,    38,    59,    52,    20,   180,    12,   218,
      21,   254,    26,   336,   105,    58,    38,     0,   341,    33,
      52,    76,   363,    64,   336,    59,   269,    41,   119,   341,
      52,    35,    26,    56,   336,    60,    40,    62,    52,   341,
     363,   382,   112,    26,    78,    56,    42,    88,    89,    20,
      52,   363,    60,    59,    77,    61,    91,    59,    93,   382,
     363,   363,    33,    77,   105,    48,    77,    60,    64,    52,
     382,   112,   142,   192,    57,    58,   285,    59,   119,   382,
     382,    77,    64,    75,   330,     3,   295,     5,     6,     7,
      48,   358,    10,    11,   361,    11,    75,    15,    16,    49,
      58,   142,    20,    61,    20,    23,    24,   389,    26,   144,
      20,   230,    14,   395,    32,    33,    34,    59,   144,   328,
      38,   388,    64,    41,    26,   392,    44,    45,   219,     6,
      65,   222,    63,    10,    52,    37,    59,   256,   229,    27,
      28,    64,   315,    50,    46,    47,   181,   356,    69,    70,
      52,    53,    54,    55,    71,    72,    73,    14,   193,    77,
      75,    63,   210,   211,   212,    58,    59,    69,    70,    26,
      59,    60,    74,    67,   265,    75,    78,    61,   219,    66,
      37,   222,    68,     0,    76,   206,   207,    54,   229,    46,
      47,   208,   209,    76,    49,    52,    53,    54,    55,   262,
     262,   262,   262,   320,    60,   262,    63,    60,    77,    26,
      36,    50,    69,    70,    64,    62,   251,    74,    51,   254,
     247,    59,    63,    47,   265,    60,   353,   262,    76,    78,
      76,    48,    20,    64,   269,    52,    12,    60,   365,   330,
      57,    58,    61,   303,    62,    61,   303,     4,   283,   303,
     303,    43,    62,    64,    63,    30,    42,    77,    64,    63,
     387,   336,     9,    63,   336,   335,   341,   335,    93,   341,
     383,   298,   299,   300,   301,   302,   142,   292,   318,   292,
     193,   320,     4,   292,   336,   320,   368,   292,   363,   330,
      12,   363,    12,    14,   335,   355,   204,   203,    38,    19,
      22,   336,    22,    25,   331,    26,   341,   382,   368,    31,
     382,    38,   353,    35,   205,    35,    37,    39,    40,    39,
      40,   164,    38,   219,   365,    46,    47,   231,   363,    88,
     292,    52,    53,    54,    55,   255,   292,     3,   175,     5,
      -1,     7,    63,    -1,    -1,    11,   387,   382,   383,    15,
      16,    17,    18,    -1,    20,    -1,    -1,    23,    24,    -1,
      26,    -1,    26,    29,    -1,    -1,    32,    33,    34,    -1,
      -1,    -1,    38,    -1,    -1,    41,    -1,    43,    44,    45,
      -1,    -1,    -1,     3,    48,     5,    52,     7,    52,    -1,
      -1,    11,    -1,    57,    58,    15,    16,    61,    -1,    -1,
      20,    -1,    -1,    23,    24,    -1,    26,    -1,    -1,    -1,
      -1,    77,    32,    33,    34,    -1,    -1,    -1,    38,    -1,
      -1,    41,    -1,    -1,    44,    45,    -1,    -1,    -1,    -1,
      -1,     3,    52,     5,    -1,     7,    -1,    -1,    -1,    11,
      -1,    61,    -1,    15,    16,    -1,    -1,    -1,    20,    -1,
      -1,    23,    24,    -1,    26,    -1,    -1,    77,    -1,    -1,
      32,    33,    34,    -1,    -1,    -1,    38,    -1,    -1,    41,
      -1,    -1,    44,    45,    -1,    -1,    -1,    -1,    -1,     3,
      52,     5,    -1,     7,    -1,    -1,    -1,    11,    -1,    61,
      -1,    15,    16,    -1,    -1,    -1,    20,    -1,    -1,    23,
      24,    -1,    26,    -1,    26,    77,    -1,    -1,    32,    33,
      34,    -1,    -1,    -1,    38,    -1,    -1,    41,    -1,    43,
      44,    45,    -1,    -1,    -1,     3,    48,     5,    52,     7,
      52,    -1,    -1,    11,    -1,    57,    58,    15,    16,    61,
      -1,    -1,    20,    -1,    -1,    23,    24,    -1,    26,    -1,
      -1,    -1,    -1,    77,    32,    33,    34,    -1,    -1,    -1,
      38,    -1,    -1,    41,    -1,    -1,    44,    45,    -1,    -1,
      -1,     3,    -1,     5,    52,     7,    -1,    -1,    -1,    11,
      -1,    -1,    -1,    15,    16,    -1,    -1,    -1,    20,    -1,
      -1,    23,    24,    -1,    26,    -1,    -1,    -1,    -1,    77,
      32,    33,    34,    -1,    -1,    -1,    38,    -1,     5,    41,
       7,    -1,    44,    45,    11,    -1,    -1,    -1,    15,    16,
      52,    -1,    -1,    20,    -1,    -1,    -1,    24,    -1,    26,
      -1,    -1,    -1,    -1,    -1,    -1,    33,    34,    -1,    -1,
      -1,    -1,    -1,    -1,    41,    -1,    -1,    44,    45,    -1,
      -1,    -1,    -1,    -1,    -1,    52
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,    26,    48,    52,    57,    58,    80,    82,    84,    86,
      87,    88,    89,    92,   100,   122,   124,   164,   165,   202,
     208,   213,   222,   223,   202,   210,     0,    87,   202,   205,
     209,    58,    83,    83,    83,    83,    83,    26,     8,    13,
      21,    56,    77,   101,   109,   112,   123,   125,   162,   214,
      90,   202,     5,     7,    11,    15,    16,    20,    24,    33,
      34,    41,    44,    45,   150,   164,   172,   174,   175,   176,
     177,   178,   179,   180,   181,   182,   183,   184,   185,   186,
     187,   191,   192,   202,   204,   207,   215,    12,    19,    22,
      35,    39,    40,    60,    11,    20,    75,    20,    33,    75,
     203,   207,    60,    49,   201,   163,    23,    38,    91,   205,
     195,   203,   110,     3,    15,    23,    32,    38,   103,   104,
     105,   106,   109,   112,   162,   164,   169,   170,   171,   172,
     173,   175,   184,   185,   186,   187,   188,   189,   190,   191,
     192,   214,   113,    81,    82,    14,    37,    46,    47,    53,
      54,    55,    63,    69,    70,    74,   151,   152,   153,   154,
     155,   156,   157,   158,   159,   160,   161,   164,   212,   216,
     217,   218,   219,   220,   221,   224,   225,   226,    20,   212,
      65,   126,    50,    59,    78,   107,   203,    93,   206,    63,
     108,   204,    75,    75,   193,   194,   195,   196,   198,   203,
     108,    61,   151,    66,    67,    68,    27,    28,    69,    70,
      71,    72,    73,   160,    76,   225,    76,   151,    61,   104,
     168,    49,    60,   206,   102,    60,   212,   105,    59,    85,
      77,   199,   200,    36,   206,    64,   153,   154,   155,   156,
     156,   157,   157,   158,   158,   158,   206,   193,    50,   166,
     203,    62,    95,    51,   111,    59,    59,    76,   194,    78,
     212,   200,    63,    83,    61,    85,    96,   164,    94,   167,
     168,   216,   212,    78,    20,   115,   162,   164,   175,   184,
     186,   214,   203,    85,    60,    61,   168,    76,    76,    64,
     164,    97,    98,   206,    60,    61,    84,    99,   100,   122,
     124,   128,   135,   213,   222,   114,   206,    83,    83,    83,
      83,    83,   129,   136,   214,     6,    10,   116,   117,   118,
     120,   121,    25,    31,   127,   134,   151,    62,    61,   118,
     104,   119,   121,     4,    43,   137,   138,    62,   206,   194,
      83,   130,   204,   106,   132,   133,   164,   169,   171,   173,
     191,   192,    43,   131,   133,    63,   141,   195,   197,    42,
     139,   142,   143,   214,   206,    85,    64,    59,    85,   140,
      17,    18,    29,   131,   145,    30,   146,   148,   195,    42,
     143,    64,   144,    63,     9,   147,   149,   131,    96,    63,
     195,    64,   211,   217,    64,    85,   217
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_uint8 yyr1[] =
{
       0,    79,    80,    80,    81,    81,    82,    82,    83,    83,
      84,    85,    85,    86,    87,    87,    87,    87,    87,    87,
      87,    87,    87,    88,    90,    89,    91,    91,    91,    93,
      94,    92,    92,    95,    95,    96,    96,    97,    98,    98,
      99,    99,    99,    99,    99,    99,    99,   100,   101,   101,
     101,   101,   101,   102,   101,   103,   104,   104,   105,   105,
     105,   106,   106,   106,   107,   107,   108,   108,   110,   111,
     109,   113,   114,   112,   115,   115,   115,   115,   115,   116,
     117,   117,   118,   119,   120,   120,   121,   121,   122,   123,
     124,   125,   126,   126,   127,   127,   128,   130,   129,   131,
     131,   132,   132,   133,   133,   133,   133,   133,   133,   134,
     134,   135,   136,   138,   137,   137,   139,   139,   140,   140,
     141,   141,   142,   142,   144,   143,   145,   145,   145,   145,
     146,   146,   147,   147,   148,   149,   150,   150,   150,   150,
     150,   150,   150,   150,   150,   150,   151,   152,   152,   153,
     153,   154,   154,   155,   155,   155,   156,   156,   156,   157,
     157,   157,   157,   158,   158,   159,   159,   159,   160,   160,
     160,   161,   161,   161,   161,   161,   161,   163,   162,   164,
     165,   165,   165,   166,   166,   167,   167,   168,   169,   169,
     169,   169,   169,   169,   169,   169,   169,   170,   170,   170,
     170,   171,   171,   172,   172,   172,   173,   174,   175,   175,
     176,   176,   176,   177,   178,   179,   180,   180,   180,   181,
     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
     191,   192,   192,   193,   193,   194,   194,   195,   196,   197,
     197,   198,   199,   199,   200,   200,   201,   201,   201,   201,
     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
     211,   212,   213,   213,   214,   215,   214,   216,   217,   218,
     219,   220,   221,   221,   222,   223,   224,   224,   225,   226
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     0,     1,     0,     1,     1,     2,     1,     0,
       1,     1,     0,     1,     2,     2,     2,     2,     2,     1,
       1,     1,     1,     2,     0,     7,     1,     1,     1,     0,
       0,    12,     5,     0,     2,     1,     3,     1,     0,     2,
       2,     2,     2,     2,     2,     1,     1,     2,     3,     1,
       1,     1,     3,     0,     6,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     0,     1,     0,     1,     0,     0,
       9,     0,     0,    13,     1,     1,     1,     1,     1,     1,
       1,     2,     3,     2,     1,     2,     3,     2,     2,     5,
       2,     6,     0,     2,     0,     1,     2,     0,     6,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
       1,     2,     8,     0,     2,     1,     0,     1,     0,     2,
       4,     3,     1,     3,     0,     5,     1,     1,     1,     1,
       0,     1,     0,     1,     4,     4,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     3,     1,
       3,     1,     3,     1,     3,     3,     1,     3,     3,     1,
       3,     3,     3,     2,     1,     1,     1,     1,     1,     1,
       3,     1,     1,     1,     1,     1,     1,     0,     7,     1,
       1,     2,     3,     1,     3,     1,     2,     3,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     6,     4,     1,     1,     2,     6,     1,     1,     1,
       1,     1,     1,     1,     1,     2,     1,     1,     1,     2,
       2,     3,     1,     1,     1,     1,     1,     1,     1,     4,
       1,     4,     1,     1,     3,     1,     1,     1,     1,     1,
       3,     2,     1,     2,     3,     2,     2,     4,     1,     3,
       1,     1,     1,     1,     0,     1,     1,     1,     1,     1,
       3,     1,     0,     1,     0,     0,     4,     1,     1,     1,
       1,     1,     1,     1,     2,     1,     1,     2,     1,     1
};


enum { YYENOMEM = -2 };

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYNOMEM         goto yyexhaustedlab


#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)

/* Backward compatibility with an undocumented macro.
   Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF


/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)




# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Kind, Value); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*-----------------------------------.
| Print this symbol's value on YYO.  |
`-----------------------------------*/

static void
yy_symbol_value_print (FILE *yyo,
                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  if (!yyvaluep)
    return;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/*---------------------------.
| Print this symbol on YYO.  |
`---------------------------*/

static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  yy_symbol_value_print (yyo, yykind, yyvaluep);
  YYFPRINTF (yyo, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# 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.  |
`------------------------------------------------*/

static void
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
                 int yyrule)
{
  int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
                       &yyvsp[(yyi + 1) - (yynrhs)]);
      YYFPRINTF (stderr, "\n");
    }
}

# 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.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif






/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
yydestruct (const char *yymsg,
            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
  YY_USE (yyvaluep);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/* Lookahead token kind.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Number of syntax errors so far.  */
int yynerrs;




/*----------.
| yyparse.  |
`----------*/

int
yyparse (void)
{
    yy_state_fast_t yystate = 0;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus = 0;

    /* Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* Their size.  */
    YYPTRDIFF_T yystacksize = YYINITDEPTH;

    /* The state stack: array, bottom, top.  */
    yy_state_t yyssa[YYINITDEPTH];
    yy_state_t *yyss = yyssa;
    yy_state_t *yyssp = yyss;

    /* The semantic value stack: array, bottom, top.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs = yyvsa;
    YYSTYPE *yyvsp = yyvs;

  int yyn;
  /* The return value of yyparse.  */
  int yyresult;
  /* Lookahead symbol kind.  */
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;



#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yychar = YYEMPTY; /* Cause a token to be read.  */

  goto yysetstate;


/*------------------------------------------------------------.
| yynewstate -- push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;


/*--------------------------------------------------------------------.
| yysetstate -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  YY_IGNORE_USELESS_CAST_BEGIN
  *yyssp = YY_CAST (yy_state_t, yystate);
  YY_IGNORE_USELESS_CAST_END
  YY_STACK_PRINT (yyss, yyssp);

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    YYNOMEM;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

# if defined 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.  */
        yy_state_t *yyss1 = yyss;
        YYSTYPE *yyvs1 = yyvs;

        /* 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 * YYSIZEOF (*yyssp),
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        YYNOMEM;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yy_state_t *yyss1 = yyss;
        union yyalloc *yyptr =
          YY_CAST (union yyalloc *,
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
        if (! yyptr)
          YYNOMEM;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YY_IGNORE_USELESS_CAST_BEGIN
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
                  YY_CAST (long, yystacksize)));
      YY_IGNORE_USELESS_CAST_END

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */


  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;


/*-----------.
| yybackup.  |
`-----------*/
yybackup:
  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yylex ();
    }

  if (yychar <= YYEOF)
    {
      yychar = YYEOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == YYerror)
    {
      /* The scanner already issued an error message, process directly
         to error recovery.  But do not keep the error token as
         lookahead, it is too special and may lead us to an endless
         loop in error recovery. */
      yychar = YYUNDEF;
      yytoken = YYSYMBOL_YYerror;
      goto yyerrlab1;
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yytable_value_is_error (yyn))
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  /* Discard the shifted token.  */
  yychar = YYEMPTY;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     '$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 2: /* specification: %empty  */
#line 309 "./parser.y"
                                                        { yyerror ("Empty file"); YYABORT; }
#line 1956 "y.tab.c"
    break;

  case 3: /* specification: definition_list  */
#line 310 "./parser.y"
                                                        { __IDL_root = (yyvsp[0].tree); }
#line 1962 "y.tab.c"
    break;

  case 4: /* z_definition_list: %empty  */
#line 313 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 1968 "y.tab.c"
    break;

  case 6: /* definition_list: definition  */
#line 317 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 1974 "y.tab.c"
    break;

  case 7: /* definition_list: definition_list definition  */
#line 318 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-1].tree), (yyvsp[0].tree), TRUE); }
#line 1980 "y.tab.c"
    break;

  case 9: /* check_semicolon: %empty  */
#line 322 "./parser.y"
                                                        {
	if (do_token_error ((yyvsp[0].tree), "Missing semicolon after", TRUE))
		YYABORT;
}
#line 1989 "y.tab.c"
    break;

  case 10: /* useless_semicolon: ';'  */
#line 328 "./parser.y"
                                                        {
	yyerror ("Dangling semicolon has no effect");
	(yyval.tree) = NULL;
}
#line 1998 "y.tab.c"
    break;

  case 12: /* check_comma: %empty  */
#line 335 "./parser.y"
                                                        {
	if (do_token_error ((yyvsp[0].tree), "Missing comma after", TRUE))
		YYABORT;
}
#line 2007 "y.tab.c"
    break;

  case 13: /* illegal_ident: scoped_name  */
#line 341 "./parser.y"
                                                        {
	if (IDL_NODE_UP ((yyvsp[0].tree)))
		do_token_error (IDL_NODE_UP ((yyvsp[0].tree)), "Illegal context for", FALSE);
	else
		yyerror ("Illegal context for identifier");
	YYABORT;
}
#line 2019 "y.tab.c"
    break;

  case 24: /* $@1: %empty  */
#line 365 "./parser.y"
                                                        {
	if (IDL_NODE_UP ((yyvsp[0].tree)) != NULL &&
	    IDL_NODE_TYPE (IDL_NODE_UP ((yyvsp[0].tree))) != IDLN_MODULE) {
		yyerror ("Module definition conflicts");
		do_token_error (IDL_NODE_UP ((yyvsp[0].tree)), "with", FALSE);
		YYABORT;
	}
}
#line 2032 "y.tab.c"
    break;

  case 25: /* module: module_declspec new_or_prev_scope $@1 '{' z_definition_list '}' pop_scope  */
#line 374 "./parser.y"
                                                        {
	IDL_tree module;

	if ((yyvsp[-2].tree) == NULL) {
		yyerrorv ("Empty module declaration `%s' is not legal IDL",
			  IDL_IDENT ((yyvsp[-5].tree)).str);
		module = NULL;
	}

	if (__IDL_flags & IDLF_COMBINE_REOPENED_MODULES) {
		if (IDL_NODE_UP ((yyvsp[-5].tree)) == NULL)
			module = IDL_module_new ((yyvsp[-5].tree), (yyvsp[-2].tree));
		else {
			module = IDL_NODE_UP ((yyvsp[-5].tree));
			IDL_MODULE (module).definition_list =
				IDL_list_concat (IDL_MODULE (module).definition_list, (yyvsp[-2].tree));
			module = NULL;
		}
	} else
		module = IDL_module_new ((yyvsp[-5].tree), (yyvsp[-2].tree));

	(yyval.tree) = module;
	if ((yyval.tree)) assign_declspec ((yyval.tree), (yyvsp[-6].declspec));
}
#line 2061 "y.tab.c"
    break;

  case 27: /* interface_catch_ident: TOK_OBJECT  */
#line 403 "./parser.y"
                                                        {
	yyerror ("Interfaces cannot be named `Object'");
	YYABORT;
}
#line 2070 "y.tab.c"
    break;

  case 28: /* interface_catch_ident: TOK_TYPECODE  */
#line 407 "./parser.y"
                                                        {
	yyerror ("Interfaces cannot be named `TypeCode'");
	YYABORT;
}
#line 2079 "y.tab.c"
    break;

  case 29: /* $@2: %empty  */
#line 416 "./parser.y"
                                                        {
	assert ((yyvsp[0].tree) != NULL);
	assert (IDL_NODE_TYPE ((yyvsp[0].tree)) == IDLN_IDENT);
	assert (IDL_IDENT_TO_NS ((yyvsp[0].tree)) != NULL);
	assert (IDL_NODE_TYPE (IDL_IDENT_TO_NS ((yyvsp[0].tree))) == IDLN_GENTREE);

	if (IDL_NODE_UP ((yyvsp[0].tree)) != NULL &&
	    IDL_NODE_TYPE (IDL_NODE_UP ((yyvsp[0].tree))) != IDLN_INTERFACE &&
	    IDL_NODE_TYPE (IDL_NODE_UP ((yyvsp[0].tree))) != IDLN_FORWARD_DCL) {
		yyerrorl ("Interface definition conflicts",
			  __IDL_prev_token_line - __IDL_cur_token_line);
		do_token_error (IDL_NODE_UP ((yyvsp[0].tree)), "with", FALSE);
		YYABORT;
	} else if (IDL_NODE_UP ((yyvsp[0].tree)) != NULL &&
		   IDL_NODE_TYPE (IDL_NODE_UP ((yyvsp[0].tree))) != IDLN_FORWARD_DCL) {
		yyerrorv ("Cannot redeclare interface `%s'", IDL_IDENT ((yyvsp[0].tree)).str);
		IDL_tree_error ((yyvsp[0].tree), "Previous declaration of interface `%s'", IDL_IDENT ((yyvsp[0].tree)).str);
		YYABORT;
	} else if (IDL_NODE_UP ((yyvsp[0].tree)) != NULL &&
		   IDL_NODE_TYPE (IDL_NODE_UP ((yyvsp[0].tree))) == IDLN_FORWARD_DCL)
		__IDL_assign_this_location ((yyvsp[0].tree), __IDL_cur_filename, __IDL_cur_line);
}
#line 2106 "y.tab.c"
    break;

  case 30: /* $@3: %empty  */
#line 439 "./parser.y"
                                                        {
	IDL_GENTREE (IDL_IDENT_TO_NS ((yyvsp[-3].tree)))._import = (yyvsp[0].tree);
	IDL_ns_push_scope (__IDL_root_ns, IDL_IDENT_TO_NS ((yyvsp[-3].tree)));
	if (IDL_ns_check_for_ambiguous_inheritance ((yyvsp[-3].tree), (yyvsp[0].tree)))
		__IDL_is_okay = FALSE;
}
#line 2117 "y.tab.c"
    break;

  case 31: /* interface: z_declspec z_props TOK_INTERFACE interface_catch_ident $@2 pop_scope z_inheritance $@3 '{' interface_body '}' pop_scope  */
#line 446 "./parser.y"
                                                        {
 	(yyval.tree) = IDL_interface_new ((yyvsp[-8].tree), (yyvsp[-5].tree), (yyvsp[-2].tree));
	assign_declspec ((yyval.tree), (yyvsp[-11].declspec));
	assign_props (IDL_INTERFACE ((yyval.tree)).ident, (yyvsp[-10].hash_table));
}
#line 2127 "y.tab.c"
    break;

  case 32: /* interface: z_declspec z_props TOK_INTERFACE interface_catch_ident pop_scope  */
#line 455 "./parser.y"
                                                        {
	if ((yyvsp[-3].hash_table)) yywarningv (IDL_WARNING1,
			    "Ignoring properties for forward declaration `%s'",
			    IDL_IDENT ((yyvsp[-1].tree)).str);
	(yyval.tree) = IDL_forward_dcl_new ((yyvsp[-1].tree));
	assign_declspec ((yyval.tree), (yyvsp[-4].declspec));
}
#line 2139 "y.tab.c"
    break;

  case 33: /* z_inheritance: %empty  */
#line 464 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2145 "y.tab.c"
    break;

  case 34: /* z_inheritance: ':' scoped_name_list  */
#line 465 "./parser.y"
                                                        {
	GHashTable *table = g_hash_table_new (g_direct_hash, g_direct_equal);
	gboolean die = FALSE;
	IDL_tree p = (yyvsp[0].tree);

	assert (IDL_NODE_TYPE (p) == IDLN_LIST);
	for (; p != NULL && !die; p = IDL_LIST (p).next) {
		assert (IDL_LIST (p).data != NULL);
		assert (IDL_NODE_TYPE (IDL_LIST (p).data) == IDLN_IDENT);

		if (g_hash_table_lookup_extended (table, IDL_LIST (p).data, NULL, NULL)) {
			char *s = IDL_ns_ident_to_qstring (IDL_LIST (p).data, "::", 0);
			yyerrorv ("Cannot inherit from interface `%s' more than once", s);
			g_free (s);
			die = TRUE;
			break;
		} else
			g_hash_table_insert (table, IDL_LIST (p).data, NULL);

		if (IDL_NODE_TYPE (IDL_NODE_UP (IDL_LIST (p).data)) == IDLN_FORWARD_DCL) {
			char *s = IDL_ns_ident_to_qstring (IDL_LIST (p).data, "::", 0);
			yyerrorv ("Incomplete definition of interface `%s'", s);
			IDL_tree_error (IDL_LIST (p).data,
					"Previous forward declaration of `%s'", s);
			g_free (s);
			die = TRUE;
		}
		else if (IDL_NODE_TYPE (IDL_NODE_UP (IDL_LIST (p).data)) != IDLN_INTERFACE) {
			char *s = IDL_ns_ident_to_qstring (IDL_LIST (p).data, "::", 0);
			yyerrorv ("`%s' is not an interface", s);
			IDL_tree_error (IDL_LIST (p).data,
					"Previous declaration of `%s'", s);
			g_free (s);
			die = TRUE;
		}
	}

	g_hash_table_destroy (table);

	if (die)
		YYABORT;

	(yyval.tree) = (yyvsp[0].tree);
}
#line 2194 "y.tab.c"
    break;

  case 35: /* scoped_name_list: scoped_name  */
#line 511 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 2200 "y.tab.c"
    break;

  case 36: /* scoped_name_list: scoped_name_list check_comma scoped_name  */
#line 513 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-2].tree), (yyvsp[0].tree), TRUE); }
#line 2206 "y.tab.c"
    break;

  case 38: /* export_list: %empty  */
#line 519 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2212 "y.tab.c"
    break;

  case 39: /* export_list: export_list export  */
#line 520 "./parser.y"
                                                        { (yyval.tree) = zlist_chain ((yyvsp[-1].tree), (yyvsp[0].tree), TRUE); }
#line 2218 "y.tab.c"
    break;

  case 47: /* type_dcl: z_declspec type_dcl_def  */
#line 532 "./parser.y"
                                                        {
	(yyval.tree) = (yyvsp[0].tree);
	assign_declspec ((yyval.tree), (yyvsp[-1].declspec));
}
#line 2227 "y.tab.c"
    break;

  case 48: /* type_dcl_def: z_props TOK_TYPEDEF type_declarator  */
#line 539 "./parser.y"
                                                        {
	IDL_tree_node node;
	IDL_tree p, dcl;

	(yyval.tree) = (yyvsp[0].tree);
	node.properties = (yyvsp[-2].hash_table);
	for (p = IDL_TYPE_DCL ((yyvsp[0].tree)).dcls; p; p = IDL_LIST (p).next) {
		dcl = IDL_LIST (p).data;
		IDL_tree_properties_copy (&node, dcl);
	}
	__IDL_free_properties (node.properties);
}
#line 2244 "y.tab.c"
    break;

  case 52: /* type_dcl_def: z_props TOK_NATIVE simple_declarator  */
#line 555 "./parser.y"
                                                        {
	(yyval.tree) = IDL_native_new ((yyvsp[0].tree));
	assign_props (IDL_NATIVE ((yyval.tree)).ident, (yyvsp[-2].hash_table));
}
#line 2253 "y.tab.c"
    break;

  case 53: /* $@4: %empty  */
#line 560 "./parser.y"
                                                        {
	/* Enable native type scanning */
	if (__IDL_pidl > 0)
		__IDL_flagsi |= IDLFP_NATIVE;
	else {
		yyerror ("Native syntax not enabled");
		YYABORT;
	}
}
#line 2267 "y.tab.c"
    break;

  case 54: /* type_dcl_def: z_props TOK_NATIVE simple_declarator '(' $@4 TOK_NATIVE_TYPE  */
#line 568 "./parser.y"
                                                        {
	(yyval.tree) = IDL_native_new ((yyvsp[-3].tree));
	IDL_NATIVE ((yyval.tree)).user_type = (yyvsp[0].str);
	assign_props (IDL_NATIVE ((yyval.tree)).ident, (yyvsp[-5].hash_table));
}
#line 2277 "y.tab.c"
    break;

  case 55: /* type_declarator: type_spec declarator_list  */
#line 575 "./parser.y"
                                                        { (yyval.tree) = IDL_type_dcl_new ((yyvsp[-1].tree), (yyvsp[0].tree)); }
#line 2283 "y.tab.c"
    break;

  case 64: /* z_new_ident_catch: %empty  */
#line 592 "./parser.y"
                                                        {
	yyerrorv ("Missing identifier in %s definition", (yyvsp[0].str));
	YYABORT;
}
#line 2292 "y.tab.c"
    break;

  case 66: /* z_new_scope_catch: %empty  */
#line 599 "./parser.y"
                                                        {
	yyerrorv ("Missing identifier in %s definition", (yyvsp[0].str));
	YYABORT;
}
#line 2301 "y.tab.c"
    break;

  case 68: /* @5: %empty  */
#line 607 "./parser.y"
                        { (yyval.str) = "struct"; }
#line 2307 "y.tab.c"
    break;

  case 69: /* @6: %empty  */
#line 608 "./parser.y"
                                                        {
	g_hash_table_insert (__IDL_structunion_ht, (yyvsp[-1].tree), (yyvsp[-1].tree));
	(yyval.tree) = IDL_type_struct_new ((yyvsp[-1].tree), NULL);
}
#line 2316 "y.tab.c"
    break;

  case 70: /* struct_type: z_props TOK_STRUCT @5 z_new_scope_catch '{' @6 member_list '}' pop_scope  */
#line 612 "./parser.y"
                                                        {
	g_hash_table_remove (__IDL_structunion_ht, (yyvsp[-5].tree));
	(yyval.tree) = (yyvsp[-3].tree);
	__IDL_assign_up_node ((yyval.tree), (yyvsp[-2].tree));
	IDL_TYPE_STRUCT ((yyval.tree)).member_list = (yyvsp[-2].tree);
	assign_props (IDL_TYPE_STRUCT ((yyval.tree)).ident, (yyvsp[-8].hash_table));
}
#line 2328 "y.tab.c"
    break;

  case 71: /* @7: %empty  */
#line 622 "./parser.y"
                        { (yyval.str) = "union"; }
#line 2334 "y.tab.c"
    break;

  case 72: /* @8: %empty  */
#line 625 "./parser.y"
                                                        {
	g_hash_table_insert (__IDL_structunion_ht, (yyvsp[-5].tree), (yyvsp[-5].tree));
	(yyval.tree) = IDL_type_union_new ((yyvsp[-5].tree), (yyvsp[-2].tree), NULL);
}
#line 2343 "y.tab.c"
    break;

  case 73: /* union_type: z_props TOK_UNION @7 z_new_scope_catch TOK_SWITCH '(' switch_type_spec ')' '{' @8 switch_body '}' pop_scope  */
#line 629 "./parser.y"
                                                        {
	g_hash_table_remove (__IDL_structunion_ht, (yyvsp[-9].tree));
	(yyval.tree) = (yyvsp[-3].tree);
	__IDL_assign_up_node ((yyval.tree), (yyvsp[-2].tree));
	IDL_TYPE_UNION ((yyval.tree)).switch_body = (yyvsp[-2].tree);
	assign_props (IDL_TYPE_UNION ((yyval.tree)).ident, (yyvsp[-12].hash_table));
}
#line 2355 "y.tab.c"
    break;

  case 80: /* case_stmt_list: case_stmt  */
#line 648 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 2361 "y.tab.c"
    break;

  case 81: /* case_stmt_list: case_stmt_list case_stmt  */
#line 649 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-1].tree), (yyvsp[0].tree), TRUE); }
#line 2367 "y.tab.c"
    break;

  case 82: /* case_stmt: case_label_list element_spec check_semicolon  */
#line 653 "./parser.y"
                                                        { (yyval.tree) = IDL_case_stmt_new ((yyvsp[-2].tree), (yyvsp[-1].tree)); }
#line 2373 "y.tab.c"
    break;

  case 83: /* element_spec: type_spec declarator  */
#line 656 "./parser.y"
                                                        {
	char *s;

	(yyval.tree) = IDL_member_new ((yyvsp[-1].tree), list_start ((yyvsp[0].tree), TRUE));
	if (IDL_NODE_TYPE ((yyvsp[-1].tree)) == IDLN_IDENT &&
	    g_hash_table_lookup (__IDL_structunion_ht, (yyvsp[-1].tree))) {
		s = IDL_ns_ident_to_qstring ((yyvsp[0].tree), "::", 0);
		yyerrorv ("Member `%s'", s);
		do_token_error (IDL_NODE_UP ((yyvsp[-1].tree)), "recurses", TRUE);
		g_free (s);
	}
}
#line 2390 "y.tab.c"
    break;

  case 84: /* case_label_list: case_label  */
#line 670 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), FALSE); }
#line 2396 "y.tab.c"
    break;

  case 85: /* case_label_list: case_label_list case_label  */
#line 671 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-1].tree), (yyvsp[0].tree), FALSE); }
#line 2402 "y.tab.c"
    break;

  case 86: /* case_label: TOK_CASE const_exp ':'  */
#line 674 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[-1].tree); }
#line 2408 "y.tab.c"
    break;

  case 87: /* case_label: TOK_DEFAULT ':'  */
#line 675 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2414 "y.tab.c"
    break;

  case 88: /* const_dcl: z_declspec const_dcl_def  */
#line 678 "./parser.y"
                                                        {
	(yyval.tree) = (yyvsp[0].tree);
	assign_declspec ((yyval.tree), (yyvsp[-1].declspec));
}
#line 2423 "y.tab.c"
    break;

  case 89: /* const_dcl_def: TOK_CONST const_type new_ident '=' const_exp  */
#line 685 "./parser.y"
                                                        {
	(yyval.tree) = IDL_const_dcl_new ((yyvsp[-3].tree), (yyvsp[-2].tree), (yyvsp[0].tree));
	/* Should probably do some type checking here... */
}
#line 2432 "y.tab.c"
    break;

  case 90: /* except_dcl: z_declspec except_dcl_def  */
#line 691 "./parser.y"
                                                        {
	(yyval.tree) = (yyvsp[0].tree);
	assign_declspec ((yyval.tree), (yyvsp[-1].declspec));
}
#line 2441 "y.tab.c"
    break;

  case 91: /* except_dcl_def: TOK_EXCEPTION new_scope '{' member_zlist '}' pop_scope  */
#line 699 "./parser.y"
                                                        { (yyval.tree) = IDL_except_dcl_new ((yyvsp[-4].tree), (yyvsp[-2].tree)); }
#line 2447 "y.tab.c"
    break;

  case 92: /* member_zlist: %empty  */
#line 702 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2453 "y.tab.c"
    break;

  case 93: /* member_zlist: member_zlist member  */
#line 703 "./parser.y"
                                                        { (yyval.tree) = zlist_chain ((yyvsp[-1].tree), (yyvsp[0].tree), TRUE); }
#line 2459 "y.tab.c"
    break;

  case 94: /* is_readonly: %empty  */
#line 706 "./parser.y"
                                                        { (yyval.boolean) = FALSE; }
#line 2465 "y.tab.c"
    break;

  case 95: /* is_readonly: TOK_READONLY  */
#line 707 "./parser.y"
                                                        { (yyval.boolean) = TRUE; }
#line 2471 "y.tab.c"
    break;

  case 96: /* attr_dcl: z_declspec attr_dcl_def  */
#line 710 "./parser.y"
                                                        {
	(yyval.tree) = (yyvsp[0].tree);
	assign_declspec ((yyval.tree), (yyvsp[-1].declspec));
}
#line 2480 "y.tab.c"
    break;

  case 97: /* @9: %empty  */
#line 719 "./parser.y"
                        { (yyval.str) = "attribute"; }
#line 2486 "y.tab.c"
    break;

  case 98: /* attr_dcl_def: z_props is_readonly TOK_ATTRIBUTE @9 param_type_spec simple_declarator_list  */
#line 721 "./parser.y"
                                                        {
	IDL_tree_node node;
	IDL_tree p, dcl;

	(yyval.tree) = IDL_attr_dcl_new ((yyvsp[-4].boolean), (yyvsp[-1].tree), (yyvsp[0].tree));
	node.properties = (yyvsp[-5].hash_table);
	for (p = (yyvsp[0].tree); p; p = IDL_LIST (p).next) {
		dcl = IDL_LIST (p).data;
		IDL_tree_properties_copy (&node, dcl);
	}
	__IDL_free_properties (node.properties);
}
#line 2503 "y.tab.c"
    break;

  case 100: /* param_type_spec: TOK_VOID  */
#line 736 "./parser.y"
                                                        {
	yyerrorv ("Illegal type `void' for %s", (yyvsp[-1].str));
	(yyval.tree) = NULL;
}
#line 2512 "y.tab.c"
    break;

  case 108: /* op_param_type_spec: op_param_type_spec_illegal  */
#line 752 "./parser.y"
                                                        {
	illegal_context_type_error ((yyvsp[0].tree), (yyvsp[-1].str));
	(yyval.tree) = (yyvsp[0].tree);
}
#line 2521 "y.tab.c"
    break;

  case 109: /* is_oneway: %empty  */
#line 758 "./parser.y"
                                                        { (yyval.boolean) = FALSE; }
#line 2527 "y.tab.c"
    break;

  case 110: /* is_oneway: TOK_ONEWAY  */
#line 759 "./parser.y"
                                                        { (yyval.boolean) = TRUE; }
#line 2533 "y.tab.c"
    break;

  case 111: /* op_dcl: z_declspec op_dcl_def  */
#line 762 "./parser.y"
                                                        {
	(yyval.tree) = (yyvsp[0].tree);
	assign_declspec ((yyval.tree), (yyvsp[-1].declspec));
}
#line 2542 "y.tab.c"
    break;

  case 112: /* op_dcl_def: z_props is_oneway op_type_spec new_scope parameter_dcls pop_scope is_raises_expr is_context_expr  */
#line 773 "./parser.y"
                                                        {
	(yyval.tree) = IDL_op_dcl_new ((yyvsp[-6].boolean), (yyvsp[-5].tree), (yyvsp[-4].tree), (yyvsp[-3].treedata).tree, (yyvsp[-1].tree), (yyvsp[0].tree));
	IDL_OP_DCL ((yyval.tree)).f_varargs = GPOINTER_TO_INT ((yyvsp[-3].treedata).data);
	assign_props (IDL_OP_DCL ((yyval.tree)).ident, (yyvsp[-7].hash_table));
}
#line 2552 "y.tab.c"
    break;

  case 113: /* @10: %empty  */
#line 780 "./parser.y"
                        { (yyval.str) = "operation return value"; }
#line 2558 "y.tab.c"
    break;

  case 114: /* op_type_spec: @10 op_param_type_spec  */
#line 781 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[0].tree); }
#line 2564 "y.tab.c"
    break;

  case 115: /* op_type_spec: TOK_VOID  */
#line 782 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2570 "y.tab.c"
    break;

  case 116: /* is_varargs: %empty  */
#line 785 "./parser.y"
                                                        { (yyval.boolean) = FALSE; }
#line 2576 "y.tab.c"
    break;

  case 117: /* is_varargs: TOK_VARARGS  */
#line 786 "./parser.y"
                                                        { (yyval.boolean) = TRUE; }
#line 2582 "y.tab.c"
    break;

  case 118: /* is_cvarargs: %empty  */
#line 789 "./parser.y"
                                                        { (yyval.boolean) = FALSE; }
#line 2588 "y.tab.c"
    break;

  case 119: /* is_cvarargs: ',' TOK_VARARGS  */
#line 790 "./parser.y"
                                                        { (yyval.boolean) = TRUE; }
#line 2594 "y.tab.c"
    break;

  case 120: /* parameter_dcls: '(' param_dcl_list is_cvarargs ')'  */
#line 796 "./parser.y"
                                                        {
	(yyval.treedata).tree = (yyvsp[-2].tree);
	(yyval.treedata).data = GINT_TO_POINTER ((yyvsp[-1].boolean));
}
#line 2603 "y.tab.c"
    break;

  case 121: /* parameter_dcls: '(' is_varargs ')'  */
#line 800 "./parser.y"
                                                        {
	(yyval.treedata).tree = NULL;
	(yyval.treedata).data = GINT_TO_POINTER ((yyvsp[-1].boolean));
}
#line 2612 "y.tab.c"
    break;

  case 122: /* param_dcl_list: param_dcl  */
#line 806 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 2618 "y.tab.c"
    break;

  case 123: /* param_dcl_list: param_dcl_list check_comma param_dcl  */
#line 808 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-2].tree), (yyvsp[0].tree), TRUE); }
#line 2624 "y.tab.c"
    break;

  case 124: /* @11: %empty  */
#line 813 "./parser.y"
                        { (yyval.str) = "parameter"; }
#line 2630 "y.tab.c"
    break;

  case 125: /* param_dcl: z_props param_attribute @11 param_type_spec simple_declarator  */
#line 815 "./parser.y"
                                                        {
	(yyval.tree) = IDL_param_dcl_new ((yyvsp[-3].paramattr), (yyvsp[-1].tree), (yyvsp[0].tree));
	assign_props (IDL_PARAM_DCL ((yyval.tree)).simple_declarator, (yyvsp[-4].hash_table));
}
#line 2639 "y.tab.c"
    break;

  case 126: /* param_attribute: TOK_IN  */
#line 821 "./parser.y"
                                                        { (yyval.paramattr) = IDL_PARAM_IN; }
#line 2645 "y.tab.c"
    break;

  case 127: /* param_attribute: TOK_OUT  */
#line 822 "./parser.y"
                                                        { (yyval.paramattr) = IDL_PARAM_OUT; }
#line 2651 "y.tab.c"
    break;

  case 128: /* param_attribute: TOK_INOUT  */
#line 823 "./parser.y"
                                                        { (yyval.paramattr) = IDL_PARAM_INOUT; }
#line 2657 "y.tab.c"
    break;

  case 129: /* param_attribute: param_type_spec  */
#line 824 "./parser.y"
                                                        {
	yyerrorv ("Missing direction attribute (in, out, inout) before parameter");
	IDL_tree_free ((yyvsp[0].tree));
}
#line 2666 "y.tab.c"
    break;

  case 130: /* is_raises_expr: %empty  */
#line 830 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2672 "y.tab.c"
    break;

  case 132: /* is_context_expr: %empty  */
#line 834 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 2678 "y.tab.c"
    break;

  case 134: /* raises_expr: TOK_RAISES '(' scoped_name_list ')'  */
#line 840 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[-1].tree); }
#line 2684 "y.tab.c"
    break;

  case 135: /* context_expr: TOK_CONTEXT '(' string_lit_list ')'  */
#line 845 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[-1].tree); }
#line 2690 "y.tab.c"
    break;

  case 148: /* or_expr: or_expr '|' xor_expr  */
#line 864 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_OR, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2696 "y.tab.c"
    break;

  case 150: /* xor_expr: xor_expr '^' and_expr  */
#line 868 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_XOR, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2702 "y.tab.c"
    break;

  case 152: /* and_expr: and_expr '&' shift_expr  */
#line 872 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_AND, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2708 "y.tab.c"
    break;

  case 154: /* shift_expr: shift_expr TOK_OP_SHR add_expr  */
#line 876 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_SHR, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2714 "y.tab.c"
    break;

  case 155: /* shift_expr: shift_expr TOK_OP_SHL add_expr  */
#line 877 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_SHL, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2720 "y.tab.c"
    break;

  case 157: /* add_expr: add_expr '+' mult_expr  */
#line 881 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_ADD, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2726 "y.tab.c"
    break;

  case 158: /* add_expr: add_expr '-' mult_expr  */
#line 882 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_SUB, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2732 "y.tab.c"
    break;

  case 160: /* mult_expr: mult_expr '*' unary_expr  */
#line 886 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_MULT, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2738 "y.tab.c"
    break;

  case 161: /* mult_expr: mult_expr '/' unary_expr  */
#line 887 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_DIV, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2744 "y.tab.c"
    break;

  case 162: /* mult_expr: mult_expr '%' unary_expr  */
#line 888 "./parser.y"
                                                        { do_binop ((yyval.tree), IDL_BINOP_MOD, (yyvsp[-2].tree), (yyvsp[0].tree)); }
#line 2750 "y.tab.c"
    break;

  case 163: /* unary_expr: unary_op primary_expr  */
#line 891 "./parser.y"
                                                        { do_unaryop ((yyval.tree), (yyvsp[-1].unaryop), (yyvsp[0].tree)); }
#line 2756 "y.tab.c"
    break;

  case 165: /* unary_op: '-'  */
#line 895 "./parser.y"
                                                        { (yyval.unaryop) = IDL_UNARYOP_MINUS; }
#line 2762 "y.tab.c"
    break;

  case 166: /* unary_op: '+'  */
#line 896 "./parser.y"
                                                        { (yyval.unaryop) = IDL_UNARYOP_PLUS; }
#line 2768 "y.tab.c"
    break;

  case 167: /* unary_op: '~'  */
#line 897 "./parser.y"
                                                        { (yyval.unaryop) = IDL_UNARYOP_COMPLEMENT; }
#line 2774 "y.tab.c"
    break;

  case 168: /* primary_expr: scoped_name  */
#line 900 "./parser.y"
                                                        {
	IDL_tree p, literal;
	
	assert (IDL_NODE_TYPE ((yyvsp[0].tree)) == IDLN_IDENT);

	p = IDL_NODE_UP ((yyvsp[0].tree));
	
	if ((literal = IDL_resolve_const_exp ((yyvsp[0].tree), IDLN_ANY))) {
		++IDL_NODE_REFS (literal);
		(yyval.tree) = literal;
		IDL_tree_free ((yyvsp[0].tree));
	} else
		(yyval.tree) = (yyvsp[0].tree);
}
#line 2793 "y.tab.c"
    break;

  case 170: /* primary_expr: '(' const_exp ')'  */
#line 915 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[-1].tree); }
#line 2799 "y.tab.c"
    break;

  case 177: /* @12: %empty  */
#line 927 "./parser.y"
                        { (yyval.str) = "enum"; }
#line 2805 "y.tab.c"
    break;

  case 178: /* enum_type: z_props TOK_ENUM @12 z_new_ident_catch '{' enumerator_list '}'  */
#line 930 "./parser.y"
                                                        {
	(yyval.tree) = IDL_type_enum_new ((yyvsp[-3].tree), (yyvsp[-1].tree));
	assign_props (IDL_TYPE_ENUM ((yyval.tree)).ident, (yyvsp[-6].hash_table));
}
#line 2814 "y.tab.c"
    break;

  case 179: /* scoped_name: ns_scoped_name  */
#line 936 "./parser.y"
                                                        {
	assert ((yyvsp[0].tree) != NULL);
	assert (IDL_NODE_TYPE ((yyvsp[0].tree)) == IDLN_GENTREE);
	assert (IDL_NODE_TYPE (IDL_GENTREE ((yyvsp[0].tree)).data) == IDLN_IDENT);
	(yyval.tree) = IDL_GENTREE ((yyvsp[0].tree)).data;
}
#line 2825 "y.tab.c"
    break;

  case 181: /* ns_scoped_name: TOK_OP_SCOPE ns_global_ident  */
#line 945 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[0].tree); }
#line 2831 "y.tab.c"
    break;

  case 182: /* ns_scoped_name: ns_scoped_name TOK_OP_SCOPE ident  */
#line 947 "./parser.y"
                                                        {
	IDL_tree p;

	assert (IDL_NODE_TYPE ((yyvsp[-2].tree)) == IDLN_GENTREE);
	assert (IDL_NODE_TYPE ((yyvsp[0].tree)) == IDLN_IDENT);

#ifdef YYDEBUG
	if (yydebug)
		fprintf (stderr, "ns: looking in `%s' for `%s'\n", 
		  IDL_IDENT (IDL_GENTREE ((yyvsp[-2].tree)).data).str, IDL_IDENT((yyvsp[0].tree)).str);
#endif

	if ((p = IDL_ns_lookup_this_scope (__IDL_root_ns, (yyvsp[-2].tree), (yyvsp[0].tree), NULL)) == NULL) {
		yyerrorv ("`%s' undeclared identifier", IDL_IDENT ((yyvsp[0].tree)).str);
		IDL_tree_free ((yyvsp[0].tree));
		YYABORT;
	}
	IDL_tree_free ((yyvsp[0].tree));
#ifdef REF_IDENTS
	++IDL_NODE_REFS (IDL_GENTREE (p).data);
#endif
	(yyval.tree) = p;
}
#line 2859 "y.tab.c"
    break;

  case 183: /* enumerator_list: new_ident  */
#line 972 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 2865 "y.tab.c"
    break;

  case 184: /* enumerator_list: enumerator_list check_comma new_ident  */
#line 974 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-2].tree), (yyvsp[0].tree), TRUE); }
#line 2871 "y.tab.c"
    break;

  case 185: /* member_list: member  */
#line 977 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 2877 "y.tab.c"
    break;

  case 186: /* member_list: member_list member  */
#line 978 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-1].tree), (yyvsp[0].tree), TRUE); }
#line 2883 "y.tab.c"
    break;

  case 187: /* member: type_spec declarator_list check_semicolon  */
#line 982 "./parser.y"
                                                        {
	char *s;

	(yyval.tree) = IDL_member_new ((yyvsp[-2].tree), (yyvsp[-1].tree));
	if (IDL_NODE_TYPE ((yyvsp[-2].tree)) == IDLN_IDENT &&
	    g_hash_table_lookup (__IDL_structunion_ht, (yyvsp[-2].tree))) {
		s = IDL_ns_ident_to_qstring (IDL_LIST ((yyvsp[-1].tree)).data, "::", 0);
		yyerrorv ("Member `%s'", s);
		do_token_error (IDL_NODE_UP ((yyvsp[-2].tree)), "recurses", TRUE);
		g_free (s);
	}
}
#line 2900 "y.tab.c"
    break;

  case 201: /* sequence_type: TOK_SEQUENCE '<' simple_type_spec ',' positive_int_const '>'  */
#line 1015 "./parser.y"
                                                        { (yyval.tree) = IDL_type_sequence_new ((yyvsp[-3].tree), (yyvsp[-1].tree)); }
#line 2906 "y.tab.c"
    break;

  case 202: /* sequence_type: TOK_SEQUENCE '<' simple_type_spec '>'  */
#line 1018 "./parser.y"
                                                        { (yyval.tree) = IDL_type_sequence_new ((yyvsp[-1].tree), NULL); }
#line 2912 "y.tab.c"
    break;

  case 203: /* floating_pt_type: TOK_FLOAT  */
#line 1021 "./parser.y"
                                                        { (yyval.tree) = IDL_type_float_new (IDL_FLOAT_TYPE_FLOAT); }
#line 2918 "y.tab.c"
    break;

  case 204: /* floating_pt_type: TOK_DOUBLE  */
#line 1022 "./parser.y"
                                                        { (yyval.tree) = IDL_type_float_new (IDL_FLOAT_TYPE_DOUBLE); }
#line 2924 "y.tab.c"
    break;

  case 205: /* floating_pt_type: TOK_LONG TOK_DOUBLE  */
#line 1023 "./parser.y"
                                                        { (yyval.tree) = IDL_type_float_new (IDL_FLOAT_TYPE_LONGDOUBLE); }
#line 2930 "y.tab.c"
    break;

  case 206: /* fixed_pt_type: TOK_FIXED '<' positive_int_const ',' integer_lit '>'  */
#line 1028 "./parser.y"
                                                        { (yyval.tree) = IDL_type_fixed_new ((yyvsp[-3].tree), (yyvsp[-1].tree)); }
#line 2936 "y.tab.c"
    break;

  case 207: /* fixed_pt_const_type: TOK_FIXED  */
#line 1031 "./parser.y"
                                                        { (yyval.tree) = IDL_type_fixed_new (NULL, NULL); }
#line 2942 "y.tab.c"
    break;

  case 208: /* integer_type: signed_int  */
#line 1034 "./parser.y"
                                                        { (yyval.tree) = IDL_type_integer_new (TRUE, (yyvsp[0].integer)); }
#line 2948 "y.tab.c"
    break;

  case 209: /* integer_type: unsigned_int  */
#line 1035 "./parser.y"
                                                        { (yyval.tree) = IDL_type_integer_new (FALSE, (yyvsp[0].integer)); }
#line 2954 "y.tab.c"
    break;

  case 210: /* signed_int: signed_short_int  */
#line 1038 "./parser.y"
                                                        { (yyval.integer) = IDL_INTEGER_TYPE_SHORT; }
#line 2960 "y.tab.c"
    break;

  case 211: /* signed_int: signed_long_int  */
#line 1039 "./parser.y"
                                                        { (yyval.integer) = IDL_INTEGER_TYPE_LONG; }
#line 2966 "y.tab.c"
    break;

  case 212: /* signed_int: signed_longlong_int  */
#line 1040 "./parser.y"
                                                        { (yyval.integer) = IDL_INTEGER_TYPE_LONGLONG; }
#line 2972 "y.tab.c"
    break;

  case 216: /* unsigned_int: unsigned_short_int  */
#line 1052 "./parser.y"
                                                        { (yyval.integer) = IDL_INTEGER_TYPE_SHORT; }
#line 2978 "y.tab.c"
    break;

  case 217: /* unsigned_int: unsigned_long_int  */
#line 1053 "./parser.y"
                                                        { (yyval.integer) = IDL_INTEGER_TYPE_LONG; }
#line 2984 "y.tab.c"
    break;

  case 218: /* unsigned_int: unsigned_longlong_int  */
#line 1054 "./parser.y"
                                                        { (yyval.integer) = IDL_INTEGER_TYPE_LONGLONG; }
#line 2990 "y.tab.c"
    break;

  case 222: /* char_type: TOK_CHAR  */
#line 1066 "./parser.y"
                                                        { (yyval.tree) = IDL_type_char_new (); }
#line 2996 "y.tab.c"
    break;

  case 223: /* wide_char_type: TOK_WCHAR  */
#line 1069 "./parser.y"
                                                        { (yyval.tree) = IDL_type_wide_char_new (); }
#line 3002 "y.tab.c"
    break;

  case 224: /* boolean_type: TOK_BOOLEAN  */
#line 1072 "./parser.y"
                                                        { (yyval.tree) = IDL_type_boolean_new (); }
#line 3008 "y.tab.c"
    break;

  case 225: /* octet_type: TOK_OCTET  */
#line 1075 "./parser.y"
                                                        { (yyval.tree) = IDL_type_octet_new (); }
#line 3014 "y.tab.c"
    break;

  case 226: /* any_type: TOK_ANY  */
#line 1078 "./parser.y"
                                                        { (yyval.tree) = IDL_type_any_new (); }
#line 3020 "y.tab.c"
    break;

  case 227: /* object_type: TOK_OBJECT  */
#line 1081 "./parser.y"
                                                        { (yyval.tree) = IDL_type_object_new (); }
#line 3026 "y.tab.c"
    break;

  case 228: /* typecode_type: TOK_TYPECODE  */
#line 1084 "./parser.y"
                                                        { (yyval.tree) = IDL_type_typecode_new (); }
#line 3032 "y.tab.c"
    break;

  case 229: /* string_type: TOK_STRING '<' positive_int_const '>'  */
#line 1089 "./parser.y"
                                                        { (yyval.tree) = IDL_type_string_new ((yyvsp[-1].tree)); }
#line 3038 "y.tab.c"
    break;

  case 230: /* string_type: TOK_STRING  */
#line 1090 "./parser.y"
                                                        { (yyval.tree) = IDL_type_string_new (NULL); }
#line 3044 "y.tab.c"
    break;

  case 231: /* wide_string_type: TOK_WSTRING '<' positive_int_const '>'  */
#line 1095 "./parser.y"
                                                        { (yyval.tree) = IDL_type_wide_string_new ((yyvsp[-1].tree)); }
#line 3050 "y.tab.c"
    break;

  case 232: /* wide_string_type: TOK_WSTRING  */
#line 1096 "./parser.y"
                                                        { (yyval.tree) = IDL_type_wide_string_new (NULL); }
#line 3056 "y.tab.c"
    break;

  case 233: /* declarator_list: declarator  */
#line 1099 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 3062 "y.tab.c"
    break;

  case 234: /* declarator_list: declarator_list check_comma declarator  */
#line 1101 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-2].tree), (yyvsp[0].tree), TRUE); }
#line 3068 "y.tab.c"
    break;

  case 239: /* simple_declarator_list: simple_declarator  */
#line 1114 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 3074 "y.tab.c"
    break;

  case 240: /* simple_declarator_list: simple_declarator_list check_comma simple_declarator  */
#line 1116 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-2].tree), (yyvsp[0].tree), TRUE); }
#line 3080 "y.tab.c"
    break;

  case 241: /* array_declarator: new_ident fixed_array_size_list  */
#line 1120 "./parser.y"
                                                        {
	IDL_tree p;
	int i;

	(yyval.tree) = IDL_type_array_new ((yyvsp[-1].tree), (yyvsp[0].tree));
	for (i = 1, p = (yyvsp[0].tree); p; ++i, p = IDL_LIST (p).next)
		if (!IDL_LIST (p).data) {
			char *s = IDL_ns_ident_to_qstring ((yyvsp[-1].tree), "::", 0);
			yyerrorv ("Missing value in dimension %d of array `%s'", i, s);
			g_free (s);
		}
}
#line 3097 "y.tab.c"
    break;

  case 242: /* fixed_array_size_list: fixed_array_size  */
#line 1134 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), FALSE); }
#line 3103 "y.tab.c"
    break;

  case 243: /* fixed_array_size_list: fixed_array_size_list fixed_array_size  */
#line 1136 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-1].tree), (yyvsp[0].tree), FALSE); }
#line 3109 "y.tab.c"
    break;

  case 244: /* fixed_array_size: '[' positive_int_const ']'  */
#line 1139 "./parser.y"
                                                        { (yyval.tree) = (yyvsp[-1].tree); }
#line 3115 "y.tab.c"
    break;

  case 245: /* fixed_array_size: '[' ']'  */
#line 1140 "./parser.y"
                                                        { (yyval.tree) = NULL; }
#line 3121 "y.tab.c"
    break;

  case 246: /* prop_hash: TOK_PROP_KEY TOK_PROP_VALUE  */
#line 1144 "./parser.y"
                                                        {
	(yyval.hash_table) = g_hash_table_new (IDL_strcase_hash, IDL_strcase_equal);
	g_hash_table_insert ((yyval.hash_table), (yyvsp[-1].str), (yyvsp[0].str));
}
#line 3130 "y.tab.c"
    break;

  case 247: /* prop_hash: prop_hash ',' TOK_PROP_KEY TOK_PROP_VALUE  */
#line 1150 "./parser.y"
                                                        {
	(yyval.hash_table) = (yyvsp[-3].hash_table);
	g_hash_table_insert ((yyval.hash_table), (yyvsp[-1].str), (yyvsp[0].str));
}
#line 3139 "y.tab.c"
    break;

  case 248: /* prop_hash: TOK_PROP_KEY  */
#line 1154 "./parser.y"
                                                        {
	(yyval.hash_table) = g_hash_table_new (IDL_strcase_hash, IDL_strcase_equal);
	g_hash_table_insert ((yyval.hash_table), (yyvsp[0].str), g_strdup (""));
}
#line 3148 "y.tab.c"
    break;

  case 249: /* prop_hash: prop_hash ',' TOK_PROP_KEY  */
#line 1159 "./parser.y"
                                                        {
	(yyval.hash_table) = (yyvsp[-2].hash_table);
	g_hash_table_insert ((yyval.hash_table), (yyvsp[0].str), g_strdup (""));
}
#line 3157 "y.tab.c"
    break;

  case 250: /* ident: TOK_IDENT  */
#line 1165 "./parser.y"
                                                        { (yyval.tree) = IDL_ident_new ((yyvsp[0].str)); }
#line 3163 "y.tab.c"
    break;

  case 251: /* new_ident: ns_new_ident  */
#line 1168 "./parser.y"
                                                        {
	assert ((yyvsp[0].tree) != NULL);
	assert (IDL_NODE_TYPE ((yyvsp[0].tree)) == IDLN_GENTREE);
	assert (IDL_NODE_TYPE (IDL_GENTREE ((yyvsp[0].tree)).data) == IDLN_IDENT);
	(yyval.tree) = IDL_GENTREE ((yyvsp[0].tree)).data;
}
#line 3174 "y.tab.c"
    break;

  case 252: /* new_scope: ns_new_ident  */
#line 1176 "./parser.y"
                                                        {
	IDL_tree	old_top = IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data;
	IDL_ns_push_scope (__IDL_root_ns, (yyvsp[0].tree));
#ifdef YYDEBUG
	if (yydebug)
		fprintf (stderr, "ns: entering new scope `%s' of `%s'\n", 
		       IDL_IDENT (IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data).str, IDL_IDENT(old_top).str);
#endif
	assert (IDL_NODE_TYPE (IDL_GENTREE ((yyvsp[0].tree)).data) == IDLN_IDENT);
	(yyval.tree) = IDL_GENTREE ((yyvsp[0].tree)).data;
}
#line 3190 "y.tab.c"
    break;

  case 253: /* new_or_prev_scope: cur_ns_new_or_prev_ident  */
#line 1189 "./parser.y"
                                                        {
	IDL_tree	old_top = IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data;
	IDL_ns_push_scope (__IDL_root_ns, (yyvsp[0].tree));
	assert (IDL_NS (__IDL_root_ns).current != NULL);
	assert (IDL_NODE_TYPE (IDL_NS (__IDL_root_ns).current) == IDLN_GENTREE);
	assert (IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data != NULL);
	assert (IDL_NODE_TYPE (IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data) == IDLN_IDENT);
#ifdef YYDEBUG
	if (yydebug)
		fprintf (stderr,"ns: entering new/prev scope `%s' of `%s'\n",
		       IDL_IDENT (IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data).str, IDL_IDENT(old_top).str);
#endif
	assert (IDL_NODE_TYPE (IDL_GENTREE ((yyvsp[0].tree)).data) == IDLN_IDENT);
	(yyval.tree) = IDL_GENTREE ((yyvsp[0].tree)).data;
}
#line 3210 "y.tab.c"
    break;

  case 254: /* pop_scope: %empty  */
#line 1206 "./parser.y"
                                                        {
	IDL_tree cur_top = IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data;
	IDL_ns_pop_scope (__IDL_root_ns);
#ifdef YYDEBUG
	if (yydebug)
		fprintf (stderr, "ns: pop scope from `%s' to `%s'\n", 
		       IDL_IDENT(cur_top).str,
		       IDL_IDENT (IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data).str);
#endif
}
#line 3225 "y.tab.c"
    break;

  case 255: /* ns_new_ident: ident  */
#line 1218 "./parser.y"
                                                        {
	IDL_tree p;

	if ((p = IDL_ns_place_new (__IDL_root_ns, (yyvsp[0].tree))) == NULL) {
		IDL_tree q;
		int i;

		p = IDL_ns_lookup_cur_scope (__IDL_root_ns, (yyvsp[0].tree), NULL);

		for (i = 0, q = IDL_GENTREE (p).data;
		     q && (IDL_NODE_TYPE (q) == IDLN_IDENT ||
			   IDL_NODE_TYPE (q) == IDLN_LIST) && i < 4;
		     ++i)
			if (IDL_NODE_UP (q))
				q = IDL_NODE_UP (q);

		if (q) {
			IDL_tree_error ((yyvsp[0].tree), "`%s' conflicts", IDL_IDENT ((yyvsp[0].tree)).str);
			do_token_error (q, "with", FALSE);
		} else
			yyerrorv ("`%s' duplicate identifier", IDL_IDENT ((yyvsp[0].tree)).str);

		IDL_tree_free ((yyvsp[0].tree));
		YYABORT;
	}
	assert (IDL_IDENT ((yyvsp[0].tree))._ns_ref == p);
#ifdef REF_IDENTS
	++IDL_NODE_REFS (IDL_GENTREE (p).data);
#endif
	if (__IDL_new_ident_comments != NULL) {
		assert (IDL_IDENT ((yyvsp[0].tree)).comments == NULL);
		IDL_IDENT ((yyvsp[0].tree)).comments = __IDL_new_ident_comments;
		__IDL_new_ident_comments = NULL;
	}
	(yyval.tree) = p;
}
#line 3266 "y.tab.c"
    break;

  case 256: /* ns_prev_ident: ident  */
#line 1256 "./parser.y"
                                                        {
	IDL_tree p;

	if ((p = IDL_ns_resolve_ident (__IDL_root_ns, (yyvsp[0].tree))) == NULL) {
		yyerrorv ("`%s' undeclared identifier", IDL_IDENT ((yyvsp[0].tree)).str);
		IDL_tree_free ((yyvsp[0].tree));
		YYABORT;
	}
	IDL_tree_free ((yyvsp[0].tree));
	assert (IDL_GENTREE (p).data != NULL);
	assert (IDL_IDENT (IDL_GENTREE (p).data)._ns_ref == p);
#ifdef REF_IDENTS
	++IDL_NODE_REFS (IDL_GENTREE (p).data);
#endif
	(yyval.tree) = p;
}
#line 3287 "y.tab.c"
    break;

  case 257: /* cur_ns_new_or_prev_ident: ident  */
#line 1275 "./parser.y"
                                                        {
	IDL_tree p;

	if ((p = IDL_ns_lookup_cur_scope (__IDL_root_ns, (yyvsp[0].tree), NULL)) == NULL) {
#ifdef YYDEBUG
		if (yydebug)
			fprintf (stderr, "ns: place_new `%s' in `%s'\n", 
		  	  IDL_IDENT((yyvsp[0].tree)).str,
			  IDL_IDENT(IDL_GENTREE (IDL_NS (__IDL_root_ns).current).data).str );
#endif
		p = IDL_ns_place_new (__IDL_root_ns, (yyvsp[0].tree));
		assert (p != NULL);
		assert (IDL_IDENT ((yyvsp[0].tree))._ns_ref == p);
		if (__IDL_new_ident_comments != NULL) {
			assert (IDL_IDENT ((yyvsp[0].tree)).comments == NULL);
			IDL_IDENT ((yyvsp[0].tree)).comments = __IDL_new_ident_comments;
			__IDL_new_ident_comments = NULL;
		}
	} else {
		IDL_tree_free ((yyvsp[0].tree));
		assert (IDL_GENTREE (p).data != NULL);
		assert (IDL_IDENT (IDL_GENTREE (p).data)._ns_ref == p);
	}
#ifdef REF_IDENTS
	++IDL_NODE_REFS (IDL_GENTREE (p).data);
#endif
	(yyval.tree) = p;
}
#line 3320 "y.tab.c"
    break;

  case 258: /* ns_global_ident: ident  */
#line 1305 "./parser.y"
                                                        {
	IDL_tree p;

	if ((p = IDL_ns_lookup_this_scope (
		__IDL_root_ns,IDL_NS (__IDL_root_ns).file, (yyvsp[0].tree), NULL)) == NULL) {
		yyerrorv ("`%s' undeclared identifier", IDL_IDENT ((yyvsp[0].tree)).str);
		IDL_tree_free ((yyvsp[0].tree));
		YYABORT;
	}
	IDL_tree_free ((yyvsp[0].tree));
	assert (IDL_GENTREE (p).data != NULL);
	assert (IDL_IDENT (IDL_GENTREE (p).data)._ns_ref == p);
#ifdef REF_IDENTS
	++IDL_NODE_REFS (IDL_GENTREE (p).data);
#endif
	(yyval.tree) = p;
}
#line 3342 "y.tab.c"
    break;

  case 259: /* string_lit_list: string_lit  */
#line 1324 "./parser.y"
                                                        { (yyval.tree) = list_start ((yyvsp[0].tree), TRUE); }
#line 3348 "y.tab.c"
    break;

  case 260: /* string_lit_list: string_lit_list check_comma string_lit  */
#line 1326 "./parser.y"
                                                        { (yyval.tree) = list_chain ((yyvsp[-2].tree), (yyvsp[0].tree), TRUE); }
#line 3354 "y.tab.c"
    break;

  case 261: /* positive_int_const: const_exp  */
#line 1329 "./parser.y"
                                                        {
	IDL_tree literal, ident = NULL;
	IDL_longlong_t value = 0;

	if ((literal = IDL_resolve_const_exp ((yyvsp[0].tree), IDLN_INTEGER))) {
		assert (IDL_NODE_TYPE (literal) == IDLN_INTEGER);
		++IDL_NODE_REFS (literal);
		value = IDL_INTEGER (literal).value;
		if ( literal != (yyvsp[0].tree) )
			IDL_tree_free ((yyvsp[0].tree));
	}

	if (literal && IDL_NODE_UP (literal) &&
	    IDL_NODE_TYPE (IDL_NODE_UP (literal)) == IDLN_CONST_DCL)
		ident = IDL_CONST_DCL (IDL_NODE_UP (literal)).ident;
	
	if (literal == NULL) {
		if (!(__IDL_flags & IDLF_NO_EVAL_CONST))
			yyerror ("Could not resolve constant expression");
		(yyval.tree) = (yyvsp[0].tree);
	} else if (value == 0) {
		yyerror ("Zero array size is illegal");
		if (ident)
			IDL_tree_error (ident, "From constant declared here");
		(yyval.tree) = NULL;
	} else if (value < 0) {
		yywarningv (IDL_WARNING1, "Cannot use negative value %"
			    IDL_LL "d, using %" IDL_LL "d",
			   value, -value);
		if (ident)
			IDL_tree_warning (ident,
					  IDL_WARNING1, "From constant declared here");
		(yyval.tree) = IDL_integer_new (-value);
	}
	else
		(yyval.tree) = IDL_integer_new (value);
}
#line 3396 "y.tab.c"
    break;

  case 262: /* z_declspec: %empty  */
#line 1368 "./parser.y"
                                                        { (yyval.declspec) = 0; }
#line 3402 "y.tab.c"
    break;

  case 263: /* z_declspec: TOK_DECLSPEC  */
#line 1369 "./parser.y"
                                                        {
	(yyval.declspec) = IDL_parse_declspec ((yyvsp[0].str));
	g_free ((yyvsp[0].str));
}
#line 3411 "y.tab.c"
    break;

  case 264: /* z_props: %empty  */
#line 1375 "./parser.y"
                                                        { (yyval.hash_table) = NULL; }
#line 3417 "y.tab.c"
    break;

  case 265: /* $@13: %empty  */
#line 1376 "./parser.y"
                                                        {
	/* Enable property scanning */
	if (__IDL_flags & IDLF_PROPERTIES)
		__IDL_flagsi |= IDLFP_PROPERTIES;
	else {
		yyerror ("Property syntax not enabled");
		YYABORT;
	}
}
#line 3431 "y.tab.c"
    break;

  case 266: /* z_props: '[' $@13 prop_hash ']'  */
#line 1385 "./parser.y"
                                                        { (yyval.hash_table) = (yyvsp[-1].hash_table); }
#line 3437 "y.tab.c"
    break;

  case 267: /* integer_lit: TOK_INTEGER  */
#line 1388 "./parser.y"
                                                        { (yyval.tree) = IDL_integer_new ((yyvsp[0].integer)); }
#line 3443 "y.tab.c"
    break;

  case 268: /* string_lit: dqstring_cat  */
#line 1391 "./parser.y"
                                                        { (yyval.tree) = IDL_string_new ((yyvsp[0].str)); }
#line 3449 "y.tab.c"
    break;

  case 269: /* char_lit: sqstring  */
#line 1394 "./parser.y"
                                                        { (yyval.tree) = IDL_char_new ((yyvsp[0].str)); }
#line 3455 "y.tab.c"
    break;

  case 270: /* fixed_pt_lit: TOK_FIXEDP  */
#line 1397 "./parser.y"
                                                        { (yyval.tree) = IDL_fixed_new ((yyvsp[0].str)); }
#line 3461 "y.tab.c"
    break;

  case 271: /* floating_pt_lit: TOK_FLOATP  */
#line 1400 "./parser.y"
                                                        { (yyval.tree) = IDL_float_new ((yyvsp[0].floatp)); }
#line 3467 "y.tab.c"
    break;

  case 272: /* boolean_lit: TOK_TRUE  */
#line 1403 "./parser.y"
                                                        { (yyval.tree) = IDL_boolean_new (TRUE); }
#line 3473 "y.tab.c"
    break;

  case 273: /* boolean_lit: TOK_FALSE  */
#line 1404 "./parser.y"
                                                        { (yyval.tree) = IDL_boolean_new (FALSE); }
#line 3479 "y.tab.c"
    break;

  case 274: /* codefrag: z_declspec TOK_CODEFRAG  */
#line 1407 "./parser.y"
                                                        {
	(yyval.tree) = (yyvsp[0].tree);
	assign_declspec ((yyval.tree), (yyvsp[-1].declspec));
}
#line 3488 "y.tab.c"
    break;

  case 275: /* srcfile: TOK_SRCFILE  */
#line 1413 "./parser.y"
                                                {
	(yyval.tree) = (yyvsp[0].tree);
}
#line 3496 "y.tab.c"
    break;

  case 277: /* dqstring_cat: dqstring_cat dqstring  */
#line 1419 "./parser.y"
                                                        {
	char *catstr = g_malloc (strlen ((yyvsp[-1].str)) + strlen ((yyvsp[0].str)) + 1);
	strcpy (catstr, (yyvsp[-1].str)); g_free ((yyvsp[-1].str));
	strcat (catstr, (yyvsp[0].str)); g_free ((yyvsp[0].str));
	(yyval.str) = catstr;
}
#line 3507 "y.tab.c"
    break;

  case 278: /* dqstring: TOK_DQSTRING  */
#line 1427 "./parser.y"
                                                        {
	char *s = IDL_do_escapes ((yyvsp[0].str));
	g_free ((yyvsp[0].str));
	(yyval.str) = s;
}
#line 3517 "y.tab.c"
    break;

  case 279: /* sqstring: TOK_SQSTRING  */
#line 1434 "./parser.y"
                                                        {
	char *s = IDL_do_escapes ((yyvsp[0].str));
	g_free ((yyvsp[0].str));
	(yyval.str) = s;
}
#line 3527 "y.tab.c"
    break;


#line 3531 "y.tab.c"

      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;

  *++yyvsp = yyval;

  /* 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.  */
  {
    const int yylhs = yyr1[yyn] - YYNTOKENS;
    const int yyi = yypgoto[yylhs] + *yyssp;
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
               ? yytable[yyi]
               : yydefgoto[yylhs]);
  }

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (YY_("syntax error"));
    }

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == YYEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval);
          yychar = YYEMPTY;
        }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:
  /* Pacify compilers when the user code never invokes YYERROR and the
     label yyerrorlab therefore never appears in user code.  */
  if (0)
    YYERROR;
  ++yynerrs;

  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  /* Pop stack until we find a state that shifts the error token.  */
  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYSYMBOL_YYerror;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;


      yydestruct ("Error: popping",
                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturnlab;


/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturnlab;


/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
`-----------------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval);
    }
  /* 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",
                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif

  return yyresult;
}

#line 1441 "./parser.y"


void __IDL_parser_reset (void)
{
	yyclearin;
}

static const char *IDL_ns_get_cur_prefix (IDL_ns ns)
{
	IDL_tree p;

	p = IDL_NS (ns).current;

	assert (p != NULL);

	while (p && !IDL_GENTREE (p)._cur_prefix)
		p = IDL_NODE_UP (p);

	return p ? IDL_GENTREE (p)._cur_prefix : NULL;
}

gchar *IDL_ns_ident_make_repo_id (IDL_ns ns, IDL_tree p,
				  const char *p_prefix, int *major, int *minor)
{
	GString *s = g_string_new (NULL);
	const char *prefix;
	char *q;

	assert (p != NULL);
	
	if (IDL_NODE_TYPE (p) == IDLN_IDENT)
		p = IDL_IDENT_TO_NS (p);

	assert (p != NULL);

	prefix = p_prefix ? p_prefix : IDL_ns_get_cur_prefix (ns);

	q = IDL_ns_ident_to_qstring (p, "/", 0);
	g_string_printf (s, "IDL:%s%s%s:%d.%d",
			  prefix ? prefix : "",
			  prefix && *prefix ? "/" : "",
			  q,
			  major ? *major : 1,
			  minor ? *minor : 0);
	g_free (q);

	q = s->str;
	g_string_free (s, FALSE);

	return q;
}

static const char *get_name_token (const char *s, char **tok)
{
	const char *begin = s;
	int state = 0;

	if (!s)
		return NULL;

	while (g_ascii_isspace (*s)) ++s;
	
	while (1) switch (state) {
	case 0:		/* Unknown */
		if (*s == ':')
			state = 1;
		else if (isalnum ((int)*s) || *s == '_') {
			begin = s;
			state = 2;
		} else
			return NULL;
		break;
	case 1:		/* Scope */
		if (strncmp (s, "::", 2) == 0) {
			char *r = g_malloc (3);
			strcpy (r, "::");
			*tok = r;
			return s + 2;
		} else	/* Invalid */
			return NULL;
		break;
	case 2:
		if (isalnum ((int)*s) || *s == '_')
			++s;
		else {
			char *r = g_malloc (s - begin + 1);
			strncpy (r, begin, s - begin + 1);
			r[s - begin] = 0;
			*tok = r;
			return s;
		}
		break;
	}
}

static IDL_tree IDL_ns_pragma_parse_name (IDL_ns ns, const char *s)
{
	IDL_tree p = IDL_NS (ns).current, q;
	int start = 1;
	char *tok;

	/* This is a hack to allow directives for an ident (such
	 * as and interface) to be located within the scope of
	 * that identifier. */
	if ( p && (q=IDL_GENTREE(p).data)!=0
	  && IDL_NODE_TYPE(q)==IDLN_IDENT
	  && strcmp(s,IDL_IDENT(q).str)==0 ) {
		return p;
	}

	while (p && *s && (s = get_name_token (s, &tok))) {
		if (tok == NULL)
			return NULL;
		if (strcmp (tok, "::") == 0) {
			if (start) {
				/* Globally scoped */
				p = IDL_NS (ns).file;
			}
			g_free (tok);
		} else {
			IDL_tree ident = IDL_ident_new (tok);
			p = IDL_ns_lookup_this_scope (__IDL_root_ns, p, ident, NULL);
			IDL_tree_free (ident);
		}
		start = 0;
	}
	
	return p;
}

void IDL_ns_ID (IDL_ns ns, const char *s)
{
	char name[1024], id[1024];
	IDL_tree p, ident;
	int n;

	n = sscanf (s, "%1023s \"%1023s\"", name, id);
	if (n < 2 && __IDL_is_parsing) {
		yywarning (IDL_WARNING1, "Malformed pragma ID");
		return;
	}
	if (id[strlen (id) - 1] == '"')
		id[strlen (id) - 1] = 0;

	p = IDL_ns_pragma_parse_name (__IDL_root_ns, name);
	if (!p && __IDL_is_parsing) {
		yywarningv (IDL_WARNING1, "Unknown identifier `%s' in pragma ID", name);
		return;
	}

	/* We have resolved the identifier, so assign the repo id */
	assert (IDL_NODE_TYPE (p) == IDLN_GENTREE);
	assert (IDL_GENTREE (p).data != NULL);
	assert (IDL_NODE_TYPE (IDL_GENTREE (p).data) == IDLN_IDENT);
	ident = IDL_GENTREE (p).data;

	if (IDL_IDENT_REPO_ID (ident) != NULL)
		g_free (IDL_IDENT_REPO_ID (ident));

	IDL_IDENT_REPO_ID (ident) = g_strdup (id);
}

void IDL_ns_version (IDL_ns ns, const char *s)
{
	char name[1024];
	int n, major, minor;
	IDL_tree p, ident;

	n = sscanf (s, "%1023s %u.%u", name, &major, &minor);
	if (n < 3 && __IDL_is_parsing) {
		yywarning (IDL_WARNING1, "Malformed pragma version");
		return;
	}

	p = IDL_ns_pragma_parse_name (__IDL_root_ns, name);
	if (!p && __IDL_is_parsing) {
		yywarningv (IDL_WARNING1, "Unknown identifier `%s' in pragma version", name);
		return;
	}

	/* We have resolved the identifier, so assign the repo id */
	assert (IDL_NODE_TYPE (p) == IDLN_GENTREE);
	assert (IDL_GENTREE (p).data != NULL);
	assert (IDL_NODE_TYPE (IDL_GENTREE (p).data) == IDLN_IDENT);
	ident = IDL_GENTREE (p).data;

	if (IDL_IDENT_REPO_ID (ident) != NULL) {
		char *v = strrchr (IDL_IDENT_REPO_ID (ident), ':');
		if (v) {
			GString *s;

			*v = 0;
			s = g_string_new (NULL);
			g_string_printf (s, "%s:%d.%d",
					  IDL_IDENT_REPO_ID (ident), major, minor);
			g_free (IDL_IDENT_REPO_ID (ident));
			IDL_IDENT_REPO_ID (ident) = s->str;
			g_string_free (s, FALSE);
		} else if (__IDL_is_parsing)
			yywarningv (IDL_WARNING1, "Cannot find RepositoryID OMG IDL version in ID `%s'",
				    IDL_IDENT_REPO_ID (ident));
	} else
		IDL_IDENT_REPO_ID (ident) =
			IDL_ns_ident_make_repo_id (
				__IDL_root_ns, p, NULL, &major, &minor);
}

int IDL_inhibit_get (void)
{
	g_return_val_if_fail (__IDL_is_parsing, -1);

	return __IDL_inhibits;
}

void IDL_inhibit_push (void)
{
	g_return_if_fail (__IDL_is_parsing);

	++__IDL_inhibits;
}

void IDL_inhibit_pop (void)
{
	g_return_if_fail (__IDL_is_parsing);

	if (--__IDL_inhibits < 0)
		__IDL_inhibits = 0;
}

static void IDL_inhibit (IDL_ns ns, const char *s)
{
	if (g_ascii_strcasecmp ("push", s) == 0)
		IDL_inhibit_push ();
	else if (g_ascii_strcasecmp ("pop", s) == 0)
		IDL_inhibit_pop ();
}

static void IDL_typecodes_as_tok (IDL_ns ns, const char *s)
{
	if (g_ascii_strcasecmp ("push", s) == 0)
		++(__IDL_typecodes_as_tok);
	else if (g_ascii_strcasecmp ("pop", s) == 0)
		--(__IDL_typecodes_as_tok);
}

static void IDL_pidl (IDL_ns ns, const char *s)
{
	if (g_ascii_strcasecmp ("push", s) == 0)
		++(__IDL_pidl);
	else if (g_ascii_strcasecmp ("pop", s) == 0)
		--(__IDL_pidl);
}

void __IDL_do_pragma (const char *s)
{
	int n;
	char directive[256];

	g_return_if_fail (__IDL_is_parsing);
	g_return_if_fail (s != NULL);

	if (sscanf (s, "%255s%n", directive, &n) < 1)
		return;
	s += n;
	while (g_ascii_isspace (*s)) ++s;

	if (strcmp (directive, "prefix") == 0)
		IDL_ns_prefix (__IDL_root_ns, s);
	else if (strcmp (directive, "ID") == 0)
		IDL_ns_ID (__IDL_root_ns, s);
	else if (strcmp (directive, "version") == 0)
		IDL_ns_version (__IDL_root_ns, s);
	else if (strcmp (directive, "inhibit") == 0)
		IDL_inhibit (__IDL_root_ns, s);
	else if (strcmp (directive, "typecodes_as_tok") == 0)
		IDL_typecodes_as_tok (__IDL_root_ns, s);
	else if (strcmp (directive, "pidl") == 0)
		IDL_pidl (__IDL_root_ns, s);
}

static IDL_declspec_t IDL_parse_declspec (const char *strspec)
{
	IDL_declspec_t flags = IDLF_DECLSPEC_EXIST;

	if (strspec == NULL)
		return flags;

	if (strcmp (strspec, "inhibit") == 0)
		flags |= IDLF_DECLSPEC_INHIBIT;
	if (strcmp (strspec, "pidl") == 0)
		flags |= IDLF_DECLSPEC_PIDL;
	else if (__IDL_is_parsing)
		yywarningv (IDL_WARNING1, "Ignoring unknown declspec `%s'", strspec);

	return flags;
}

IDL_tree IDL_file_set (const char *filename, int line)
{
	IDL_fileinfo *fi;
	IDL_tree tree = NULL;

	g_return_val_if_fail (__IDL_is_parsing, NULL);

	if (filename) {
		const char *oldfilename = __IDL_cur_filename;
		gboolean wasInhibit = IS_INHIBIT_STATE();
		gboolean isTop = 
#ifdef HAVE_CPP_PIPE_STDIN
			strlen (filename)==0;
#else
			__IDL_tmp_filename &&
			strcmp (filename, __IDL_tmp_filename)==0;
#endif
		if ( isTop ) {
			filename = __IDL_real_filename;
			__IDL_flagsi &= ~IDLFP_IN_INCLUDES;
		} else {
			__IDL_flagsi |= IDLFP_IN_INCLUDES;
		}

		if ((fi=g_hash_table_lookup(__IDL_filename_hash, filename)) ) {
			__IDL_cur_fileinfo = fi;
			++(fi->seenCnt);
		} else {
			fi = g_new0 (IDL_fileinfo, 1);
			fi->name = g_strdup(filename);
			g_hash_table_insert (__IDL_filename_hash, fi->name, fi);
		}
		__IDL_cur_fileinfo = fi;
		__IDL_cur_filename = fi->name;
		if ( (__IDL_flags & IDLF_SRCFILES)!=0
		  && (oldfilename==0 
		  	    || strcmp(oldfilename,fi->name)!=0) ) {
			tree = IDL_srcfile_new(fi->name, fi->seenCnt, isTop, wasInhibit);
		}
	}

	if (__IDL_cur_line > 0)
		__IDL_cur_line = line;
	return tree;
}

void IDL_file_get (const char **filename, int *line)
{
	g_return_if_fail (__IDL_is_parsing);

	if (filename)
		*filename = __IDL_cur_filename;

	if (line)
		*line = __IDL_cur_line;
}

static int do_token_error (IDL_tree p, const char *message, gboolean prev)
{
	int dienow;
	char *what = NULL, *who = NULL;

	assert (p != NULL);

	dienow = IDL_tree_get_node_info (p, &what, &who);

	assert (what != NULL);
	
	if (who && *who)
		IDL_tree_error (p, "%s %s `%s'", message, what, who);
	else
		IDL_tree_error (p, "%s %s", message, what);
	
	return dienow;
}

static void illegal_context_type_error (IDL_tree p, const char *what)
{
	GString *s = g_string_new (NULL);

	g_string_printf (s, "Illegal type `%%s' for %s", what);
	illegal_type_error (p, s->str);
	g_string_free (s, TRUE);
}

static void illegal_type_error (IDL_tree p, const char *message)
{
	GString *s;

	s = IDL_tree_to_IDL_string (p, NULL, IDLF_OUTPUT_NO_NEWLINES);
	yyerrorv (message, s->str);
	g_string_free (s, TRUE);
}

static IDL_tree list_start (IDL_tree a, gboolean filter_null)
{
	IDL_tree p;

	if (!a && filter_null)
		return NULL;

	p = IDL_list_new (a);

	return p;
}

static IDL_tree list_chain (IDL_tree a, IDL_tree b, gboolean filter_null)
{
	IDL_tree p;

	if (filter_null) {
		if (!b)
			return a;
		if (!a)
			return list_start (b, filter_null);
	}

	p = IDL_list_new (b);
	a = IDL_list_concat (a, p);

	return a;
}

static IDL_tree zlist_chain (IDL_tree a, IDL_tree b, gboolean filter_null)
{
	if (a == NULL)
		return list_start (b, filter_null);
	else
		return list_chain (a, b, filter_null);
}

static int IDL_binop_chktypes (enum IDL_binop op, IDL_tree a, IDL_tree b)
{
	if (IDL_NODE_TYPE (a) != IDLN_BINOP &&
	    IDL_NODE_TYPE (b) != IDLN_BINOP &&
	    IDL_NODE_TYPE (a) != IDLN_UNARYOP &&
	    IDL_NODE_TYPE (b) != IDLN_UNARYOP &&
	    IDL_NODE_TYPE (a) != IDL_NODE_TYPE (b)) {
		yyerror ("Invalid mix of types in constant expression");
		return -1;
	}

	switch (op) {
	case IDL_BINOP_MULT:
	case IDL_BINOP_DIV:
	case IDL_BINOP_ADD:
	case IDL_BINOP_SUB:
		break;

	case IDL_BINOP_MOD:
	case IDL_BINOP_SHR:
	case IDL_BINOP_SHL:
	case IDL_BINOP_AND:
	case IDL_BINOP_OR:
	case IDL_BINOP_XOR:
		if ((IDL_NODE_TYPE (a) != IDLN_INTEGER ||
		     IDL_NODE_TYPE (b) != IDLN_INTEGER) &&
		    !(IDL_NODE_TYPE (a) == IDLN_BINOP ||
		      IDL_NODE_TYPE (b) == IDLN_BINOP ||
		      IDL_NODE_TYPE (a) == IDLN_UNARYOP ||
		      IDL_NODE_TYPE (b) == IDLN_UNARYOP)) {
			yyerror ("Invalid operation on non-integer value");
			return -1;
		}
		break;
	}

	return 0;
}

static int IDL_unaryop_chktypes (enum IDL_unaryop op, IDL_tree a)
{
	switch (op) {
	case IDL_UNARYOP_PLUS:
	case IDL_UNARYOP_MINUS:
		break;

	case IDL_UNARYOP_COMPLEMENT:
		if (IDL_NODE_TYPE (a) != IDLN_INTEGER &&
		    !(IDL_NODE_TYPE (a) == IDLN_BINOP ||
		      IDL_NODE_TYPE (a) == IDLN_UNARYOP)) {
			yyerror ("Operand to complement must be integer");
			return -1;
		}
		break;
	}

	return 0;
}

static IDL_tree IDL_binop_eval_integer (enum IDL_binop op, IDL_tree a, IDL_tree b)
{
	IDL_tree p = NULL;

	assert (IDL_NODE_TYPE (a) == IDLN_INTEGER);

	switch (op) {
	case IDL_BINOP_MULT:
		p = IDL_integer_new (IDL_INTEGER (a).value * IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_DIV:
		if (IDL_INTEGER (b).value == 0) {
			yyerror ("Divide by zero in constant expression");
			return NULL;
		}
		p = IDL_integer_new (IDL_INTEGER (a).value / IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_ADD:
		p = IDL_integer_new (IDL_INTEGER (a).value + IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_SUB:
		p = IDL_integer_new (IDL_INTEGER (a).value - IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_MOD:
		if (IDL_INTEGER (b).value == 0) {
			yyerror ("Modulo by zero in constant expression");
			return NULL;
		}
		p = IDL_integer_new (IDL_INTEGER (a).value % IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_SHR:
		p = IDL_integer_new (IDL_INTEGER (a).value >> IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_SHL:
		p = IDL_integer_new (IDL_INTEGER (a).value << IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_AND:
		p = IDL_integer_new (IDL_INTEGER (a).value & IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_OR:
		p = IDL_integer_new (IDL_INTEGER (a).value | IDL_INTEGER (b).value);
		break;

	case IDL_BINOP_XOR:
		p = IDL_integer_new (IDL_INTEGER (a).value ^ IDL_INTEGER (b).value);
		break;
	}

	return p;
}

static IDL_tree IDL_binop_eval_float (enum IDL_binop op, IDL_tree a, IDL_tree b)
{
	IDL_tree p = NULL;

	assert (IDL_NODE_TYPE (a) == IDLN_FLOAT);

	switch (op) {
	case IDL_BINOP_MULT:
		p = IDL_float_new (IDL_FLOAT (a).value * IDL_FLOAT (b).value);
		break;

	case IDL_BINOP_DIV:
		if (IDL_FLOAT (b).value == 0.0) {
			yyerror ("Divide by zero in constant expression");
			return NULL;
		}
		p = IDL_float_new (IDL_FLOAT (a).value / IDL_FLOAT (b).value);
		break;

	case IDL_BINOP_ADD:
		p = IDL_float_new (IDL_FLOAT (a).value + IDL_FLOAT (b).value);
		break;

	case IDL_BINOP_SUB:
		p = IDL_float_new (IDL_FLOAT (a).value - IDL_FLOAT (b).value);
		break;

	default:
		break;
	}

	return p;
}

static IDL_tree IDL_binop_eval (enum IDL_binop op, IDL_tree a, IDL_tree b)
{
	assert (IDL_NODE_TYPE (a) == IDL_NODE_TYPE (b));

	switch (IDL_NODE_TYPE (a)) {
	case IDLN_INTEGER: return IDL_binop_eval_integer (op, a, b);
	case IDLN_FLOAT: return IDL_binop_eval_float (op, a, b);
	default: return NULL;
	}
}

static IDL_tree IDL_unaryop_eval_integer (enum IDL_unaryop op, IDL_tree a)
{
	IDL_tree p = NULL;

	assert (IDL_NODE_TYPE (a) == IDLN_INTEGER);

	switch (op) {
	case IDL_UNARYOP_PLUS:
		p = IDL_integer_new (IDL_INTEGER (a).value);
		break;

	case IDL_UNARYOP_MINUS:
		p = IDL_integer_new (-IDL_INTEGER (a).value);
		break;

	case IDL_UNARYOP_COMPLEMENT:
		p = IDL_integer_new (~IDL_INTEGER (a).value);
		break;
	}
       
	return p;
}

static IDL_tree IDL_unaryop_eval_fixed (enum IDL_unaryop op, IDL_tree a)
{
	IDL_tree p = NULL;

	assert (IDL_NODE_TYPE (a) == IDLN_FIXED);

	switch (op) {
	case IDL_UNARYOP_PLUS:
		p = IDL_fixed_new (IDL_FIXED (a).value);
		break;

	default:
		break;
	}
       
	return p;
}

static IDL_tree IDL_unaryop_eval_float (enum IDL_unaryop op, IDL_tree a)
{
	IDL_tree p = NULL;

	assert (IDL_NODE_TYPE (a) == IDLN_FLOAT);

	switch (op) {
	case IDL_UNARYOP_PLUS:
		p = IDL_float_new (IDL_FLOAT (a).value);
		break;

	case IDL_UNARYOP_MINUS:
		p = IDL_float_new (-IDL_FLOAT (a).value);
		break;

	default:
		break;
	}
       
	return p;
}

static IDL_tree IDL_unaryop_eval (enum IDL_unaryop op, IDL_tree a)
{
	switch (IDL_NODE_TYPE (a)) {
	case IDLN_INTEGER: return IDL_unaryop_eval_integer (op, a);
	case IDLN_FIXED: return IDL_unaryop_eval_fixed (op, a);
	case IDLN_FLOAT: return IDL_unaryop_eval_float (op, a);
	default: return NULL;
	}
}

IDL_tree IDL_resolve_const_exp (IDL_tree p, IDL_tree_type type)
{
	gboolean resolved_value = FALSE, die = FALSE;
	gboolean wrong_type = FALSE;

	while (!resolved_value && !die) {
		if (IDL_NODE_TYPE (p) == IDLN_IDENT) {
			IDL_tree q = IDL_NODE_UP (p);
			
			assert (q != NULL);
			if (IDL_NODE_UP (q) &&
			    IDL_NODE_TYPE (IDL_NODE_UP (q)) == IDLN_TYPE_ENUM) {
				p = q;
				die = TRUE;
				break;
			} else if (IDL_NODE_TYPE (q) != IDLN_CONST_DCL) {
				p = q;
				wrong_type = TRUE;
				die = TRUE;
			} else
 				p = IDL_CONST_DCL (q).const_exp;
		}
		
		if (p == NULL ||
		    IDL_NODE_TYPE (p) == IDLN_BINOP ||
		    IDL_NODE_TYPE (p) == IDLN_UNARYOP) {
			die = TRUE;
			continue;
		}
		
		resolved_value = IDL_NODE_IS_LITERAL (p);
	}

	if (resolved_value &&
	    type != IDLN_ANY &&
	    IDL_NODE_TYPE (p) != type)
		wrong_type = TRUE;
	
	if (wrong_type) {
		yyerror ("Invalid type for constant");
		IDL_tree_error (p, "Previous resolved type declaration");
		return NULL;
	}

	return resolved_value ? p : NULL;
}

void IDL_queue_new_ident_comment (const char *str)
{
	g_return_if_fail (str != NULL);

	__IDL_new_ident_comments = g_slist_append (__IDL_new_ident_comments, g_strdup (str));
}

/*
 * Local variables:
 * mode: C
 * c-basic-offset: 8
 * tab-width: 8
 * indent-tabs-mode: t
 * End:
 */
