/* 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 42 "soapcpp2_yacc.y"


#include "soapcpp2.h"

#ifdef WIN32
#ifndef __STDC__
#define __STDC__
#endif
#define YYINCLUDED_STDLIB_H
#ifdef WIN32_WITHOUT_SOLARIS_FLEX
extern int soapcpp2lex(void);
#else
extern int yylex(void);
#endif
#else
extern int yylex(void);
#endif

#define MAXNEST 16      /* max. nesting depth of scopes */

typedef struct Scope
{
  Table   *table;
  Entry   *entry;
  Node    node;
  LONG64  val;
  int     offset;
  Bool    grow;   /* true if offset grows with declarations */
  Bool    mask;   /* true if enum is mask */
} Scope;

Scope stack[MAXNEST], /* stack of tables and offsets */
      *sp;            /* current scope stack pointer */

Table *classtable = NULL,
      *enumtable = NULL,
      *typetable = NULL,
      *booltable = NULL,
      *templatetable = NULL;

int     transient = 0;
int     permission = 0;
int     custom_header = 1;
int     custom_fault = 1;
Pragma  *pragmas = NULL;
Tnode   *qname = NULL;
Tnode   *xml = NULL;

/* function prototypes for support routine section */
static Entry      *undefined(Symbol*);
static Tnode      *mgtype(Tnode*, Tnode*);
static Node       op(const char*, Node, Node),
                  iop(const char*, Node, Node),
                  relop(const char*, Node, Node);
static void       mkscope(Table*, int),
                  enterscope(Table*, int),
                  exitscope(void);
static int        integer(Tnode*),
                  real(Tnode*),
                  numeric(Tnode*);
static void       set_value(Entry *p, Tnode *t, Node *n),
                  add_soap(void),
                  add_XML(void),
                  add_qname(void),
                  add_header(void),
                  add_fault(void),
                  add_response(Entry*, Entry*),
                  add_result(Tnode*),
                  add_request(Symbol*, Scope*),
                  add_pragma(const char*);

/* imported from symbol2.c */
extern int        is_string(Tnode*),
                  is_wstring(Tnode*),
                  is_smart(Tnode*),
                  is_XML(Tnode*),
                  is_stdXML(Tnode*),
                  is_anyType(Tnode*),
                  is_anyAttribute(Tnode*);
extern char       *c_storage(Storage);
extern const char *c_type(Tnode*);
extern int        is_primitive_or_string(Tnode*),
                  is_stdstr(Tnode*),
                  is_binary(Tnode*),
                  is_external(Tnode*),
                  is_mutable(Entry*);
extern Entry      *unlinklast(Table*);

/* Temporaries used in semantic rules */
int        i;
char       *s, *s1;
const char *s2;
Symbol     *sym;
Entry      *p, *q;
Tnode      *t;
Node       tmp, c;


#line 170 "soapcpp2_yacc.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_SOAPCPP_YACC_H_INCLUDED
# define YY_YY_SOAPCPP_YACC_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"  */
    PRAGMA = 258,                  /* PRAGMA  */
    AUTO = 259,                    /* AUTO  */
    DOUBLE = 260,                  /* DOUBLE  */
    INT = 261,                     /* INT  */
    STRUCT = 262,                  /* STRUCT  */
    BREAK = 263,                   /* BREAK  */
    ELSE = 264,                    /* ELSE  */
    LONG = 265,                    /* LONG  */
    SWITCH = 266,                  /* SWITCH  */
    CASE = 267,                    /* CASE  */
    ENUM = 268,                    /* ENUM  */
    REGISTER = 269,                /* REGISTER  */
    TYPEDEF = 270,                 /* TYPEDEF  */
    CHAR = 271,                    /* CHAR  */
    EXTERN = 272,                  /* EXTERN  */
    RETURN = 273,                  /* RETURN  */
    UNION = 274,                   /* UNION  */
    CONST = 275,                   /* CONST  */
    FLOAT = 276,                   /* FLOAT  */
    SHORT = 277,                   /* SHORT  */
    UNSIGNED = 278,                /* UNSIGNED  */
    CONTINUE = 279,                /* CONTINUE  */
    FOR = 280,                     /* FOR  */
    SIGNED = 281,                  /* SIGNED  */
    VOID = 282,                    /* VOID  */
    DEFAULT = 283,                 /* DEFAULT  */
    GOTO = 284,                    /* GOTO  */
    SIZEOF = 285,                  /* SIZEOF  */
    VOLATILE = 286,                /* VOLATILE  */
    DO = 287,                      /* DO  */
    IF = 288,                      /* IF  */
    STATIC = 289,                  /* STATIC  */
    WHILE = 290,                   /* WHILE  */
    CLASS = 291,                   /* CLASS  */
    PRIVATE = 292,                 /* PRIVATE  */
    PROTECTED = 293,               /* PROTECTED  */
    PUBLIC = 294,                  /* PUBLIC  */
    VIRTUAL = 295,                 /* VIRTUAL  */
    INLINE = 296,                  /* INLINE  */
    OPERATOR = 297,                /* OPERATOR  */
    LLONG = 298,                   /* LLONG  */
    BOOL = 299,                    /* BOOL  */
    CFALSE = 300,                  /* CFALSE  */
    CTRUE = 301,                   /* CTRUE  */
    WCHAR = 302,                   /* WCHAR  */
    TIME = 303,                    /* TIME  */
    USING = 304,                   /* USING  */
    NAMESPACE = 305,               /* NAMESPACE  */
    ULLONG = 306,                  /* ULLONG  */
    MUSTUNDERSTAND = 307,          /* MUSTUNDERSTAND  */
    SIZE = 308,                    /* SIZE  */
    FRIEND = 309,                  /* FRIEND  */
    TEMPLATE = 310,                /* TEMPLATE  */
    EXPLICIT = 311,                /* EXPLICIT  */
    TYPENAME = 312,                /* TYPENAME  */
    MUTABLE = 313,                 /* MUTABLE  */
    null = 314,                    /* null  */
    RESTRICT = 315,                /* RESTRICT  */
    FINAL = 316,                   /* FINAL  */
    OVERRIDE = 317,                /* OVERRIDE  */
    UCHAR = 318,                   /* UCHAR  */
    USHORT = 319,                  /* USHORT  */
    UINT = 320,                    /* UINT  */
    ULONG = 321,                   /* ULONG  */
    NONE = 322,                    /* NONE  */
    ID = 323,                      /* ID  */
    LAB = 324,                     /* LAB  */
    TYPE = 325,                    /* TYPE  */
    LNG = 326,                     /* LNG  */
    DBL = 327,                     /* DBL  */
    CHR = 328,                     /* CHR  */
    TAG = 329,                     /* TAG  */
    STR = 330,                     /* STR  */
    PA = 331,                      /* PA  */
    NA = 332,                      /* NA  */
    TA = 333,                      /* TA  */
    DA = 334,                      /* DA  */
    MA = 335,                      /* MA  */
    AA = 336,                      /* AA  */
    XA = 337,                      /* XA  */
    OA = 338,                      /* OA  */
    LA = 339,                      /* LA  */
    RA = 340,                      /* RA  */
    OR = 341,                      /* OR  */
    AN = 342,                      /* AN  */
    EQ = 343,                      /* EQ  */
    NE = 344,                      /* NE  */
    LE = 345,                      /* LE  */
    GE = 346,                      /* GE  */
    LS = 347,                      /* LS  */
    RS = 348,                      /* RS  */
    AR = 349,                      /* AR  */
    PP = 350,                      /* PP  */
    NN = 351                       /* NN  */
  };
  typedef enum yytokentype yytoken_kind_t;
#endif
/* Token kinds.  */
#define YYEMPTY -2
#define YYEOF 0
#define YYerror 256
#define YYUNDEF 257
#define PRAGMA 258
#define AUTO 259
#define DOUBLE 260
#define INT 261
#define STRUCT 262
#define BREAK 263
#define ELSE 264
#define LONG 265
#define SWITCH 266
#define CASE 267
#define ENUM 268
#define REGISTER 269
#define TYPEDEF 270
#define CHAR 271
#define EXTERN 272
#define RETURN 273
#define UNION 274
#define CONST 275
#define FLOAT 276
#define SHORT 277
#define UNSIGNED 278
#define CONTINUE 279
#define FOR 280
#define SIGNED 281
#define VOID 282
#define DEFAULT 283
#define GOTO 284
#define SIZEOF 285
#define VOLATILE 286
#define DO 287
#define IF 288
#define STATIC 289
#define WHILE 290
#define CLASS 291
#define PRIVATE 292
#define PROTECTED 293
#define PUBLIC 294
#define VIRTUAL 295
#define INLINE 296
#define OPERATOR 297
#define LLONG 298
#define BOOL 299
#define CFALSE 300
#define CTRUE 301
#define WCHAR 302
#define TIME 303
#define USING 304
#define NAMESPACE 305
#define ULLONG 306
#define MUSTUNDERSTAND 307
#define SIZE 308
#define FRIEND 309
#define TEMPLATE 310
#define EXPLICIT 311
#define TYPENAME 312
#define MUTABLE 313
#define null 314
#define RESTRICT 315
#define FINAL 316
#define OVERRIDE 317
#define UCHAR 318
#define USHORT 319
#define UINT 320
#define ULONG 321
#define NONE 322
#define ID 323
#define LAB 324
#define TYPE 325
#define LNG 326
#define DBL 327
#define CHR 328
#define TAG 329
#define STR 330
#define PA 331
#define NA 332
#define TA 333
#define DA 334
#define MA 335
#define AA 336
#define XA 337
#define OA 338
#define LA 339
#define RA 340
#define OR 341
#define AN 342
#define EQ 343
#define NE 344
#define LE 345
#define GE 346
#define LS 347
#define RS 348
#define AR 349
#define PP 350
#define NN 351

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

  Symbol  *sym;
  LONG64  i;
  double  r;
  char    c;
  char    *s;
  Tnode   *typ;
  Storage sto;
  Node    rec;
  Entry   *e;
  IR      ir;

#line 428 "soapcpp2_yacc.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_SOAPCPP_YACC_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_PRAGMA = 3,                     /* PRAGMA  */
  YYSYMBOL_AUTO = 4,                       /* AUTO  */
  YYSYMBOL_DOUBLE = 5,                     /* DOUBLE  */
  YYSYMBOL_INT = 6,                        /* INT  */
  YYSYMBOL_STRUCT = 7,                     /* STRUCT  */
  YYSYMBOL_BREAK = 8,                      /* BREAK  */
  YYSYMBOL_ELSE = 9,                       /* ELSE  */
  YYSYMBOL_LONG = 10,                      /* LONG  */
  YYSYMBOL_SWITCH = 11,                    /* SWITCH  */
  YYSYMBOL_CASE = 12,                      /* CASE  */
  YYSYMBOL_ENUM = 13,                      /* ENUM  */
  YYSYMBOL_REGISTER = 14,                  /* REGISTER  */
  YYSYMBOL_TYPEDEF = 15,                   /* TYPEDEF  */
  YYSYMBOL_CHAR = 16,                      /* CHAR  */
  YYSYMBOL_EXTERN = 17,                    /* EXTERN  */
  YYSYMBOL_RETURN = 18,                    /* RETURN  */
  YYSYMBOL_UNION = 19,                     /* UNION  */
  YYSYMBOL_CONST = 20,                     /* CONST  */
  YYSYMBOL_FLOAT = 21,                     /* FLOAT  */
  YYSYMBOL_SHORT = 22,                     /* SHORT  */
  YYSYMBOL_UNSIGNED = 23,                  /* UNSIGNED  */
  YYSYMBOL_CONTINUE = 24,                  /* CONTINUE  */
  YYSYMBOL_FOR = 25,                       /* FOR  */
  YYSYMBOL_SIGNED = 26,                    /* SIGNED  */
  YYSYMBOL_VOID = 27,                      /* VOID  */
  YYSYMBOL_DEFAULT = 28,                   /* DEFAULT  */
  YYSYMBOL_GOTO = 29,                      /* GOTO  */
  YYSYMBOL_SIZEOF = 30,                    /* SIZEOF  */
  YYSYMBOL_VOLATILE = 31,                  /* VOLATILE  */
  YYSYMBOL_DO = 32,                        /* DO  */
  YYSYMBOL_IF = 33,                        /* IF  */
  YYSYMBOL_STATIC = 34,                    /* STATIC  */
  YYSYMBOL_WHILE = 35,                     /* WHILE  */
  YYSYMBOL_CLASS = 36,                     /* CLASS  */
  YYSYMBOL_PRIVATE = 37,                   /* PRIVATE  */
  YYSYMBOL_PROTECTED = 38,                 /* PROTECTED  */
  YYSYMBOL_PUBLIC = 39,                    /* PUBLIC  */
  YYSYMBOL_VIRTUAL = 40,                   /* VIRTUAL  */
  YYSYMBOL_INLINE = 41,                    /* INLINE  */
  YYSYMBOL_OPERATOR = 42,                  /* OPERATOR  */
  YYSYMBOL_LLONG = 43,                     /* LLONG  */
  YYSYMBOL_BOOL = 44,                      /* BOOL  */
  YYSYMBOL_CFALSE = 45,                    /* CFALSE  */
  YYSYMBOL_CTRUE = 46,                     /* CTRUE  */
  YYSYMBOL_WCHAR = 47,                     /* WCHAR  */
  YYSYMBOL_TIME = 48,                      /* TIME  */
  YYSYMBOL_USING = 49,                     /* USING  */
  YYSYMBOL_NAMESPACE = 50,                 /* NAMESPACE  */
  YYSYMBOL_ULLONG = 51,                    /* ULLONG  */
  YYSYMBOL_MUSTUNDERSTAND = 52,            /* MUSTUNDERSTAND  */
  YYSYMBOL_SIZE = 53,                      /* SIZE  */
  YYSYMBOL_FRIEND = 54,                    /* FRIEND  */
  YYSYMBOL_TEMPLATE = 55,                  /* TEMPLATE  */
  YYSYMBOL_EXPLICIT = 56,                  /* EXPLICIT  */
  YYSYMBOL_TYPENAME = 57,                  /* TYPENAME  */
  YYSYMBOL_MUTABLE = 58,                   /* MUTABLE  */
  YYSYMBOL_null = 59,                      /* null  */
  YYSYMBOL_RESTRICT = 60,                  /* RESTRICT  */
  YYSYMBOL_FINAL = 61,                     /* FINAL  */
  YYSYMBOL_OVERRIDE = 62,                  /* OVERRIDE  */
  YYSYMBOL_UCHAR = 63,                     /* UCHAR  */
  YYSYMBOL_USHORT = 64,                    /* USHORT  */
  YYSYMBOL_UINT = 65,                      /* UINT  */
  YYSYMBOL_ULONG = 66,                     /* ULONG  */
  YYSYMBOL_NONE = 67,                      /* NONE  */
  YYSYMBOL_ID = 68,                        /* ID  */
  YYSYMBOL_LAB = 69,                       /* LAB  */
  YYSYMBOL_TYPE = 70,                      /* TYPE  */
  YYSYMBOL_LNG = 71,                       /* LNG  */
  YYSYMBOL_DBL = 72,                       /* DBL  */
  YYSYMBOL_CHR = 73,                       /* CHR  */
  YYSYMBOL_TAG = 74,                       /* TAG  */
  YYSYMBOL_STR = 75,                       /* STR  */
  YYSYMBOL_76_ = 76,                       /* ','  */
  YYSYMBOL_77_ = 77,                       /* '='  */
  YYSYMBOL_PA = 78,                        /* PA  */
  YYSYMBOL_NA = 79,                        /* NA  */
  YYSYMBOL_TA = 80,                        /* TA  */
  YYSYMBOL_DA = 81,                        /* DA  */
  YYSYMBOL_MA = 82,                        /* MA  */
  YYSYMBOL_AA = 83,                        /* AA  */
  YYSYMBOL_XA = 84,                        /* XA  */
  YYSYMBOL_OA = 85,                        /* OA  */
  YYSYMBOL_LA = 86,                        /* LA  */
  YYSYMBOL_RA = 87,                        /* RA  */
  YYSYMBOL_88_ = 88,                       /* '?'  */
  YYSYMBOL_89_ = 89,                       /* ':'  */
  YYSYMBOL_OR = 90,                        /* OR  */
  YYSYMBOL_AN = 91,                        /* AN  */
  YYSYMBOL_92_ = 92,                       /* '|'  */
  YYSYMBOL_93_ = 93,                       /* '^'  */
  YYSYMBOL_94_ = 94,                       /* '&'  */
  YYSYMBOL_EQ = 95,                        /* EQ  */
  YYSYMBOL_NE = 96,                        /* NE  */
  YYSYMBOL_97_ = 97,                       /* '<'  */
  YYSYMBOL_LE = 98,                        /* LE  */
  YYSYMBOL_99_ = 99,                       /* '>'  */
  YYSYMBOL_GE = 100,                       /* GE  */
  YYSYMBOL_LS = 101,                       /* LS  */
  YYSYMBOL_RS = 102,                       /* RS  */
  YYSYMBOL_103_ = 103,                     /* '+'  */
  YYSYMBOL_104_ = 104,                     /* '-'  */
  YYSYMBOL_105_ = 105,                     /* '*'  */
  YYSYMBOL_106_ = 106,                     /* '/'  */
  YYSYMBOL_107_ = 107,                     /* '%'  */
  YYSYMBOL_AR = 108,                       /* AR  */
  YYSYMBOL_PP = 109,                       /* PP  */
  YYSYMBOL_NN = 110,                       /* NN  */
  YYSYMBOL_111_ = 111,                     /* '{'  */
  YYSYMBOL_112_ = 112,                     /* '}'  */
  YYSYMBOL_113_ = 113,                     /* ';'  */
  YYSYMBOL_114_ = 114,                     /* '['  */
  YYSYMBOL_115_ = 115,                     /* ']'  */
  YYSYMBOL_116_ = 116,                     /* ')'  */
  YYSYMBOL_117_ = 117,                     /* '!'  */
  YYSYMBOL_118_ = 118,                     /* '~'  */
  YYSYMBOL_119_ = 119,                     /* '('  */
  YYSYMBOL_120_ = 120,                     /* '@'  */
  YYSYMBOL_121_ = 121,                     /* '$'  */
  YYSYMBOL_YYACCEPT = 122,                 /* $accept  */
  YYSYMBOL_prog = 123,                     /* prog  */
  YYSYMBOL_s1 = 124,                       /* s1  */
  YYSYMBOL_exts = 125,                     /* exts  */
  YYSYMBOL_exts1 = 126,                    /* exts1  */
  YYSYMBOL_ext = 127,                      /* ext  */
  YYSYMBOL_pragma = 128,                   /* pragma  */
  YYSYMBOL_decls = 129,                    /* decls  */
  YYSYMBOL_t1 = 130,                       /* t1  */
  YYSYMBOL_t2 = 131,                       /* t2  */
  YYSYMBOL_t3 = 132,                       /* t3  */
  YYSYMBOL_t4 = 133,                       /* t4  */
  YYSYMBOL_t5 = 134,                       /* t5  */
  YYSYMBOL_dclrs = 135,                    /* dclrs  */
  YYSYMBOL_dclr = 136,                     /* dclr  */
  YYSYMBOL_fdclr = 137,                    /* fdclr  */
  YYSYMBOL_id = 138,                       /* id  */
  YYSYMBOL_name = 139,                     /* name  */
  YYSYMBOL_ctor = 140,                     /* ctor  */
  YYSYMBOL_dtor = 141,                     /* dtor  */
  YYSYMBOL_func = 142,                     /* func  */
  YYSYMBOL_fname = 143,                    /* fname  */
  YYSYMBOL_fargso = 144,                   /* fargso  */
  YYSYMBOL_fargs = 145,                    /* fargs  */
  YYSYMBOL_farg = 146,                     /* farg  */
  YYSYMBOL_arg = 147,                      /* arg  */
  YYSYMBOL_sym = 148,                      /* sym  */
  YYSYMBOL_texpf = 149,                    /* texpf  */
  YYSYMBOL_texpfs = 150,                   /* texpfs  */
  YYSYMBOL_texp = 151,                     /* texp  */
  YYSYMBOL_spec = 152,                     /* spec  */
  YYSYMBOL_tspec = 153,                    /* tspec  */
  YYSYMBOL_type = 154,                     /* type  */
  YYSYMBOL_structid = 155,                 /* structid  */
  YYSYMBOL_struct = 156,                   /* struct  */
  YYSYMBOL_classid = 157,                  /* classid  */
  YYSYMBOL_class = 158,                    /* class  */
  YYSYMBOL_unionid = 159,                  /* unionid  */
  YYSYMBOL_union = 160,                    /* union  */
  YYSYMBOL_enum = 161,                     /* enum  */
  YYSYMBOL_enumsc = 162,                   /* enumsc  */
  YYSYMBOL_mask = 163,                     /* mask  */
  YYSYMBOL_masksc = 164,                   /* masksc  */
  YYSYMBOL_sc = 165,                       /* sc  */
  YYSYMBOL_utype = 166,                    /* utype  */
  YYSYMBOL_tname = 167,                    /* tname  */
  YYSYMBOL_base = 168,                     /* base  */
  YYSYMBOL_s2 = 169,                       /* s2  */
  YYSYMBOL_s3 = 170,                       /* s3  */
  YYSYMBOL_s4 = 171,                       /* s4  */
  YYSYMBOL_s5 = 172,                       /* s5  */
  YYSYMBOL_s6 = 173,                       /* s6  */
  YYSYMBOL_store = 174,                    /* store  */
  YYSYMBOL_const = 175,                    /* const  */
  YYSYMBOL_abstract = 176,                 /* abstract  */
  YYSYMBOL_virtual = 177,                  /* virtual  */
  YYSYMBOL_ptrs = 178,                     /* ptrs  */
  YYSYMBOL_array = 179,                    /* array  */
  YYSYMBOL_arrayck = 180,                  /* arrayck  */
  YYSYMBOL_brinit = 181,                   /* brinit  */
  YYSYMBOL_init = 182,                     /* init  */
  YYSYMBOL_tag = 183,                      /* tag  */
  YYSYMBOL_occurs = 184,                   /* occurs  */
  YYSYMBOL_bounds = 185,                   /* bounds  */
  YYSYMBOL_nullptr = 186,                  /* nullptr  */
  YYSYMBOL_patt = 187,                     /* patt  */
  YYSYMBOL_value = 188,                    /* value  */
  YYSYMBOL_min = 189,                      /* min  */
  YYSYMBOL_minmax = 190,                   /* minmax  */
  YYSYMBOL_max = 191,                      /* max  */
  YYSYMBOL_expr = 192,                     /* expr  */
  YYSYMBOL_cexp = 193,                     /* cexp  */
  YYSYMBOL_qexp = 194,                     /* qexp  */
  YYSYMBOL_oexp = 195,                     /* oexp  */
  YYSYMBOL_obex = 196,                     /* obex  */
  YYSYMBOL_aexp = 197,                     /* aexp  */
  YYSYMBOL_abex = 198,                     /* abex  */
  YYSYMBOL_rexp = 199,                     /* rexp  */
  YYSYMBOL_lexp = 200,                     /* lexp  */
  YYSYMBOL_pexp = 201                      /* pexp  */
};
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  3
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   1821

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  122
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  80
/* YYNRULES -- Number of rules.  */
#define YYNRULES  304
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  473

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


/* 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,   117,     2,     2,   121,   107,    94,     2,
     119,   116,   105,   103,    76,   104,     2,   106,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    89,   113,
      97,    77,    99,    88,   120,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,   114,     2,   115,    93,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,   111,    92,   112,   118,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    78,    79,    80,    81,    82,    83,    84,    85,    86,
      87,    90,    91,    95,    96,    98,   100,   101,   102,   108,
     109,   110
};

#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   223,   223,   243,   258,   260,   262,   267,   269,   270,
     271,   272,   273,   283,   292,   296,   298,   300,   302,   304,
     306,   307,   312,   314,   316,   318,   320,   322,   323,   324,
     326,   327,   328,   329,   331,   333,   338,   343,   467,   485,
     486,   488,   489,   490,   491,   492,   493,   494,   495,   496,
     497,   498,   499,   500,   501,   502,   503,   504,   505,   506,
     507,   508,   509,   510,   511,   512,   513,   514,   515,   516,
     517,   518,   519,   520,   521,   522,   523,   524,   525,   537,
     559,   593,   654,   656,   657,   659,   660,   662,   666,   671,
     674,   696,   740,   772,   773,   780,   783,   785,   787,   795,
     800,   841,   893,   900,   905,   946,   998,   999,  1000,  1001,
    1002,  1003,  1004,  1005,  1006,  1007,  1008,  1009,  1010,  1011,
    1012,  1013,  1014,  1015,  1016,  1017,  1027,  1053,  1080,  1104,
    1108,  1136,  1161,  1182,  1210,  1235,  1256,  1283,  1310,  1319,
    1328,  1342,  1356,  1373,  1391,  1439,  1513,  1517,  1523,  1528,
    1532,  1538,  1544,  1550,  1557,  1562,  1587,  1592,  1619,  1624,
    1649,  1667,  1686,  1708,  1731,  1736,  1742,  1743,  1744,  1745,
    1746,  1747,  1748,  1758,  1762,  1764,  1765,  1766,  1768,  1770,
    1771,  1772,  1781,  1789,  1799,  1807,  1816,  1823,  1824,  1826,
    1835,  1836,  1837,  1838,  1839,  1840,  1841,  1842,  1843,  1844,
    1845,  1846,  1847,  1849,  1850,  1855,  1856,  1857,  1859,  1860,
    1861,  1862,  1865,  1866,  1868,  1869,  1871,  1872,  1880,  1885,
    1891,  1892,  1910,  1915,  1930,  1931,  1946,  1950,  1964,  1979,
    1980,  1982,  1996,  2012,  2029,  2054,  2075,  2090,  2107,  2132,
    2152,  2153,  2155,  2156,  2158,  2159,  2160,  2161,  2162,  2164,
    2165,  2166,  2167,  2169,  2170,  2171,  2172,  2173,  2175,  2176,
    2177,  2186,  2187,  2190,  2196,  2199,  2202,  2206,  2208,  2211,
    2214,  2216,  2219,  2220,  2221,  2222,  2223,  2224,  2225,  2226,
    2227,  2228,  2229,  2230,  2231,  2232,  2233,  2234,  2235,  2238,
    2244,  2250,  2263,  2264,  2275,  2280,  2287,  2290,  2291,  2300,
    2306,  2312,  2318,  2324,  2330
};
#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\"", "PRAGMA", "AUTO",
  "DOUBLE", "INT", "STRUCT", "BREAK", "ELSE", "LONG", "SWITCH", "CASE",
  "ENUM", "REGISTER", "TYPEDEF", "CHAR", "EXTERN", "RETURN", "UNION",
  "CONST", "FLOAT", "SHORT", "UNSIGNED", "CONTINUE", "FOR", "SIGNED",
  "VOID", "DEFAULT", "GOTO", "SIZEOF", "VOLATILE", "DO", "IF", "STATIC",
  "WHILE", "CLASS", "PRIVATE", "PROTECTED", "PUBLIC", "VIRTUAL", "INLINE",
  "OPERATOR", "LLONG", "BOOL", "CFALSE", "CTRUE", "WCHAR", "TIME", "USING",
  "NAMESPACE", "ULLONG", "MUSTUNDERSTAND", "SIZE", "FRIEND", "TEMPLATE",
  "EXPLICIT", "TYPENAME", "MUTABLE", "null", "RESTRICT", "FINAL",
  "OVERRIDE", "UCHAR", "USHORT", "UINT", "ULONG", "NONE", "ID", "LAB",
  "TYPE", "LNG", "DBL", "CHR", "TAG", "STR", "','", "'='", "PA", "NA",
  "TA", "DA", "MA", "AA", "XA", "OA", "LA", "RA", "'?'", "':'", "OR", "AN",
  "'|'", "'^'", "'&'", "EQ", "NE", "'<'", "LE", "'>'", "GE", "LS", "RS",
  "'+'", "'-'", "'*'", "'/'", "'%'", "AR", "PP", "NN", "'{'", "'}'", "';'",
  "'['", "']'", "')'", "'!'", "'~'", "'('", "'@'", "'$'", "$accept",
  "prog", "s1", "exts", "exts1", "ext", "pragma", "decls", "t1", "t2",
  "t3", "t4", "t5", "dclrs", "dclr", "fdclr", "id", "name", "ctor", "dtor",
  "func", "fname", "fargso", "fargs", "farg", "arg", "sym", "texpf",
  "texpfs", "texp", "spec", "tspec", "type", "structid", "struct",
  "classid", "class", "unionid", "union", "enum", "enumsc", "mask",
  "masksc", "sc", "utype", "tname", "base", "s2", "s3", "s4", "s5", "s6",
  "store", "const", "abstract", "virtual", "ptrs", "array", "arrayck",
  "brinit", "init", "tag", "occurs", "bounds", "nullptr", "patt", "value",
  "min", "minmax", "max", "expr", "cexp", "qexp", "oexp", "obex", "aexp",
  "abex", "rexp", "lexp", "pexp", YY_NULLPTR
};

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

#define YYPACT_NINF (-373)

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

#define YYTABLE_NINF (-272)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
    -373,    40,     9,  -373,    -8,  -373,   330,   -45,   -51,  -373,
    -373,  -373,  -373,    18,  -373,    22,  -373,  -373,  -373,  -373,
    -373,    26,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,
      29,   -18,  -373,   448,  -373,  -373,  -373,  -373,  -373,  -373,
    -373,  -373,    52,  -373,  -373,  -373,  -373,  -373,  -373,  -373,
    -373,   -32,     4,  -373,  -373,  -373,  -373,  -373,  -373,  -373,
    -373,   -22,  -373,  -373,  -373,  -373,  -373,    67,  1165,    88,
    -373,    55,    66,    89,  -373,    93,   100,   108,   114,  1629,
     127,  -373,    19,  -373,  -373,  -373,   120,  -373,  -373,  -373,
     115,   128,   135,   135,    15,  -373,    75,    75,   134,  -373,
     141,   142,  -373,  -373,    85,  -373,   164,  -373,  -373,  -373,
    -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,
    -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,
    -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,   156,
    -373,  -373,   160,  -373,  -373,   569,   690,    48,  -373,   161,
    1487,  -373,  -373,  -373,   170,  -373,  -373,  -373,    60,  -373,
     929,  -373,   131,   929,  -373,   929,  -373,  -373,  -373,  -373,
    -373,  -373,   135,  1286,  -373,  -373,  -373,   929,  -373,  -373,
    -373,  -373,   194,   194,  1404,    28,  -373,  -373,  -373,   929,
    -373,   929,    25,  -373,  -373,    80,  -373,  -373,  -373,  -373,
    -373,   135,   197,   197,  -373,  -373,   217,  -373,  -373,  -373,
    -373,  -373,  -373,   -67,  -373,  -373,  -373,  -373,    79,   205,
     208,   215,   811,   196,  1047,    -9,   135,   135,   131,   131,
     131,  -373,   210,   226,   227,  1404,  1404,  1404,  1404,  -373,
    -373,   229,  1404,  -373,  -373,    77,   231,  -373,  -373,  -373,
    -373,  -373,  -373,  -373,   230,   242,   241,   145,  -373,   259,
     240,  -373,  -373,  -373,  -373,  -373,  -373,  -373,   197,   197,
     197,   197,   197,   197,   197,  -373,   122,   143,   271,   277,
     326,  -373,  -373,  -373,  1629,   276,    68,  -373,  1558,  -373,
     302,  -373,  -373,  -373,  -373,  -373,  -373,   264,   811,  -373,
    -373,  -373,  -373,  -373,   929,  -373,  -373,   231,   231,   231,
     231,  -373,   231,   268,   275,  -373,  -373,  -373,   241,   274,
     354,  1629,  -373,  -373,  -373,  -373,  -373,  -373,   -48,  -373,
     197,   197,   197,   197,   197,   197,   197,   197,   197,   197,
     197,   197,   197,   197,   197,   197,   197,   197,   197,  -373,
    -373,  -373,   -35,   281,  -373,   323,  -373,   381,   811,   811,
     811,   811,  -373,   329,   331,   334,   335,   344,   345,  -373,
    -373,   241,   135,   343,   197,  -373,   366,   371,   271,   326,
     789,   803,   552,   671,   671,   222,   222,   222,   222,   537,
     537,    51,    51,  -373,  -373,  -373,  1558,    23,  -373,  -373,
    1700,   153,  -373,    39,   397,  -373,  -373,  -373,  -373,  -373,
    -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,  -373,   197,
     357,    16,  -373,   241,  -373,   161,   197,  -373,  -373,  -373,
     206,  -373,  -373,  -373,  -373,  -373,   405,  -373,   302,  -373,
     365,  -373,  -373,  -373,   383,  -373,   125,   125,   -40,   125,
    -373,   381,  -373,  -373,  -373,  -373,   202,   209,  -373,   125,
    -373,   161,   195,  -373,   214,  -373,  -373,   389,   410,  -373,
     412,  -373,  -373
};

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

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -373,  -373,  -373,  -373,   404,  -373,  -373,  -152,     8,   189,
    -373,  -373,  -373,    -1,   420,   423,   -12,   336,  -373,  -373,
     -49,  -373,    97,    98,  -373,  -373,  -373,   213,  -373,   -29,
     -36,   -25,   -33,  -373,  -373,  -373,  -373,  -373,  -373,  -373,
    -373,  -373,  -373,   411,   -76,  -373,  -119,   -26,   408,  -125,
     212,   157,   -31,  -373,  -373,  -373,  -134,  -183,  -199,  -373,
    -372,  -275,  -373,  -373,    64,  -373,  -127,  -373,  -373,  -373,
    -295,  -196,  -373,  -373,  -373,   185,  -373,    69,   166,  -373
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
       0,     1,     2,     5,     6,    57,    58,   223,   224,    60,
     358,   359,   360,   225,   209,   210,    62,    63,    64,    65,
     153,   154,   353,   354,   355,   424,    66,   206,   285,   207,
      67,   356,    68,    69,    70,    71,    72,    73,    74,    75,
      76,    77,    78,    97,   186,   201,   232,   161,   166,   237,
     314,   288,    79,   421,   437,    80,   158,   289,   290,   427,
     204,   149,   461,   403,   404,   430,   448,   458,   459,   449,
     328,   329,   377,   276,   277,   278,   279,   280,   281,   282
};

/* 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[] =
{
     145,    90,   146,    96,   143,    61,   275,   283,   144,   100,
     195,   233,   258,   234,    59,   357,   155,    82,   103,    86,
     174,   187,    92,    91,   174,   241,   174,    98,   374,    92,
     101,   428,   159,   397,   247,   376,   433,   254,   248,   255,
       3,   398,   148,   171,   249,   238,   164,   257,    83,   456,
     250,    93,   -39,   439,   151,   198,   242,   457,    93,     4,
       7,   319,    84,   177,    83,    85,    81,   151,   375,   184,
     295,   251,   297,   317,   286,   252,   191,   434,   435,   418,
     179,   180,   182,    87,   199,    88,    87,   -39,    88,   466,
      87,   152,    88,   436,    87,   -35,    88,    87,   253,    88,
    -215,   150,    33,   258,   298,   200,   243,   244,   212,   301,
     302,   303,   145,   145,   146,   146,   202,   145,   175,   146,
     196,   197,   175,   -40,   175,   208,   181,    94,   213,    89,
      88,   -35,   -35,    95,   203,   370,   256,    99,   226,   -87,
     102,   235,   236,   -27,   162,    82,   362,    82,   256,   147,
     426,   214,   363,   192,   215,  -184,   346,   347,   348,   214,
     239,   287,   215,   451,   185,   216,   163,   227,   228,   229,
     230,   214,    61,   216,   215,   260,    83,  -184,    83,   -27,
     -27,    59,   257,   246,    83,   216,  -174,   351,   415,   259,
     261,   262,   291,    85,   257,    85,   441,   442,   443,   160,
     165,   231,   425,    87,   167,    88,   405,   406,   407,   408,
    -268,   168,  -268,   263,   299,   300,   264,   265,   266,   169,
     267,   423,   401,   431,   438,   170,  -155,   260,   446,   447,
     440,   330,   176,   331,   307,   308,   309,   310,   202,   268,
     178,   312,   261,   262,   214,   172,   188,   215,   269,   270,
     271,   145,  -159,   146,   190,   145,   203,   146,   216,   208,
     318,   150,   272,   273,   274,   263,   467,   257,   264,   265,
     266,   193,   267,  -253,  -253,  -253,   194,   441,   442,   443,
    -257,  -257,  -257,   185,   468,  -254,  -254,  -254,   145,   211,
     146,   268,   373,   284,   292,   444,   144,   293,   464,   463,
     269,   270,   271,   445,   294,  -253,  -253,   313,   296,   446,
     447,   469,  -257,  -257,   272,   273,   274,  -254,  -254,   454,
     455,   304,   460,   342,   343,   344,   345,   346,   347,   348,
      -5,     8,   465,     9,    10,    11,    12,    13,   305,   306,
      14,   311,   315,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,   316,   257,    26,    27,   320,   321,
     416,    28,  -271,   145,    29,   146,    30,   145,   332,   146,
      31,    32,    33,    34,    35,   350,   148,    36,    37,    54,
    -188,    38,    39,    40,    41,    42,    43,   369,    44,   371,
     372,    45,    46,    47,    48,    49,    50,   399,    51,   400,
      52,   379,   380,   381,   382,   383,   384,   385,   386,   387,
     388,   389,   390,   391,   392,   393,   394,   395,   333,   334,
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
     345,   346,   347,   348,   322,   323,   324,   325,   326,   327,
     402,   409,   374,   410,    53,    54,   411,   412,  -214,   104,
      55,    56,    10,    11,    12,    13,   413,   414,    14,   417,
     419,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,   429,   432,    26,    27,   450,   452,   470,    28,
     453,   471,    29,   472,    30,   173,   361,   156,   105,    32,
     157,    34,    35,   420,   217,    36,    37,   349,   422,    38,
      39,    40,    41,    42,    43,   183,    44,   189,   396,    45,
      46,    47,    48,    49,    50,   462,   378,     0,   106,   364,
     365,   366,   367,     0,   368,   107,   108,   109,   110,   111,
     112,   113,   114,   115,   116,   117,     0,     0,   118,   119,
     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
     130,   131,   132,   133,   134,   135,   136,   137,   138,     0,
       0,     0,   139,     0,     0,   140,   141,   142,    55,    56,
     104,     0,     0,    10,    11,    12,    13,     0,     0,    14,
       0,     0,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,     0,     0,    26,    27,     0,     0,     0,
      28,     0,     0,    29,     0,    30,     0,     0,     0,   105,
      32,     0,    34,    35,     0,     0,    36,    37,     0,     0,
      38,    39,    40,    41,    42,    43,     0,    44,     0,     0,
      45,    46,    47,    48,    49,    50,     0,  -103,     0,   106,
     344,   345,   346,   347,   348,  -103,  -103,   336,   337,   338,
     339,   340,   341,   342,   343,   344,   345,   346,   347,   348,
    -103,     0,     0,  -103,  -103,     0,     0,     0,  -103,     0,
       0,     0,     0,     0,  -103,     0,     0,     0,     0,     0,
       0,     0,     0,  -103,     0,  -103,     0,     0,  -103,    55,
      56,   104,     0,     0,    10,    11,    12,    13,     0,     0,
      14,     0,     0,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,     0,     0,    26,    27,     0,     0,
       0,    28,     0,     0,    29,     0,    30,     0,     0,     0,
     105,    32,     0,    34,    35,     0,     0,    36,    37,     0,
       0,    38,    39,    40,    41,    42,    43,     0,    44,     0,
       0,    45,    46,    47,    48,    49,    50,     0,  -102,     0,
     106,     0,     0,     0,     0,     0,  -102,  -102,   338,   339,
     340,   341,   342,   343,   344,   345,   346,   347,   348,     0,
       0,  -102,     0,     0,  -102,  -102,     0,     0,     0,  -102,
       0,     0,     0,     0,     0,  -102,     0,     0,     0,     0,
       0,     0,     0,     0,  -102,     0,  -102,     0,     0,  -102,
      55,    56,   218,     0,     0,    10,    11,    12,    13,     0,
       0,    14,     0,     0,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,     0,     0,    26,    27,     0,
       0,     0,    28,     0,     0,    29,     0,    30,   219,   220,
     221,    31,    32,    33,    34,    35,     0,     0,    36,    37,
       0,     0,    38,    39,    40,    41,    42,    43,     0,    44,
       0,     0,    45,    46,    47,    48,    49,    50,     0,    51,
       0,    52,   334,   335,   336,   337,   338,   339,   340,   341,
     342,   343,   344,   345,   346,   347,   348,   335,   336,   337,
     338,   339,   340,   341,   342,   343,   344,   345,   346,   347,
     348,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   -14,   222,    53,   -14,     0,     0,  -214,
     218,    55,    56,    10,    11,    12,    13,     0,     0,    14,
       0,     0,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,     0,     0,    26,    27,     0,     0,     0,
      28,     0,     0,    29,     0,    30,   219,   220,   221,    31,
      32,    33,    34,    35,     0,     0,    36,    37,     0,     0,
      38,    39,    40,    41,    42,    43,     0,    44,     0,     0,
      45,    46,    47,    48,    49,    50,     0,    51,     0,    52,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   -14,   222,    53,     0,     0,     0,  -214,   218,    55,
      56,    10,    11,    12,    13,     0,     0,    14,     0,     0,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,     0,     0,    26,    27,     0,     0,     0,    28,     0,
       0,    29,     0,    30,   219,   220,   221,    31,    32,    33,
      34,    35,     0,     0,    36,    37,     0,     0,    38,    39,
      40,    41,    42,    43,     0,    44,     0,     0,    45,    46,
      47,    48,    49,    50,     0,    51,     0,    52,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     222,    53,   -14,     0,     0,  -214,   104,    55,    56,    10,
      11,    12,    13,     0,     0,    14,     0,     0,    15,    16,
      17,    18,    19,    20,    21,    22,    23,    24,    25,     0,
       0,    26,    27,     0,     0,     0,    28,     0,     0,    29,
       0,    30,     0,     0,     0,   105,    32,   -99,    34,    35,
       0,     0,    36,    37,     0,     0,    38,    39,    40,    41,
      42,    43,     0,    44,     0,     0,    45,    46,    47,    48,
      49,    50,     0,   -99,     0,   106,     0,     0,     0,     0,
       0,   -99,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   -99,     0,     0,   -99,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     -99,     0,     0,     0,     0,     0,     0,   -99,   -99,     0,
       0,     0,     0,     0,     0,    55,    56,     8,     0,     9,
      10,    11,    12,    13,     0,     0,    14,     0,     0,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       0,     0,    26,    27,     0,     0,     0,    28,     0,     0,
      29,     0,    30,     0,     0,     0,    31,    32,    33,    34,
      35,     0,     0,    36,    37,     0,     0,    38,    39,    40,
      41,    42,    43,     0,    44,     0,     0,    45,    46,    47,
      48,    49,    50,     0,    51,     0,    52,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   240,     0,
      53,    54,     0,     0,  -214,   245,    55,    56,    10,    11,
      12,    13,     0,     0,    14,     0,     0,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    25,     0,     0,
      26,    27,     0,     0,     0,    28,     0,     0,    29,     0,
      30,     0,     0,     0,    31,    32,    33,    34,    35,     0,
       0,    36,    37,     0,     0,    38,    39,    40,    41,    42,
      43,     0,    44,     0,     0,    45,    46,    47,    48,    49,
      50,     0,    51,     0,    52,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   104,     0,
       0,    10,    11,    12,    13,     0,     0,    14,     0,     0,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,     0,     0,    26,    27,     0,     0,     0,    28,     0,
       0,    29,  -214,    30,    55,    56,     0,   105,    32,     0,
      34,    35,     0,     0,    36,    37,     0,     0,    38,    39,
      40,    41,    42,    43,     0,    44,     0,     0,    45,    46,
      47,    48,    49,    50,     0,     0,     0,   106,     0,   352,
       0,     0,    10,    11,    12,    13,     0,     0,    14,     0,
       0,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,     0,     0,    26,    27,   205,     0,     0,    28,
       0,     0,    29,     0,    30,     0,     0,     0,   105,    32,
       0,    34,    35,     0,     0,    36,    37,    55,    56,    38,
      39,    40,    41,    42,    43,     0,    44,     0,     0,    45,
      46,    47,    48,    49,    50,     0,     0,     0,   106,     0,
     104,     0,     0,    10,    11,    12,    13,     0,     0,    14,
       0,     0,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,     0,     0,    26,    27,     0,     0,     0,
      28,     0,     0,    29,     0,    30,     0,     0,     0,   105,
      32,     0,    34,    35,   -83,     0,    36,    37,    55,    56,
      38,    39,    40,    41,    42,    43,     0,    44,     0,     0,
      45,    46,    47,    48,    49,    50,     0,     0,     0,   106,
       0,   352,     0,     0,    10,    11,    12,    13,     0,     0,
      14,     0,     0,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,     0,     0,    26,    27,     0,     0,
       0,    28,     0,     0,    29,     0,    30,     0,     0,     0,
     105,    32,     0,    34,    35,     0,     0,    36,    37,    55,
      56,    38,    39,    40,    41,    42,    43,     0,    44,     0,
       0,    45,    46,    47,    48,    49,    50,     0,     0,     0,
     106,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      55,    56
};

static const yytype_int16 yycheck[] =
{
      33,    13,    33,    15,    33,     6,   202,   203,    33,    21,
     144,   163,   195,   165,     6,   290,    65,    68,    30,     1,
       1,    97,     7,     1,     1,   177,     1,     1,    76,     7,
       1,   403,    68,    68,     6,   330,    20,   189,    10,   191,
       0,    76,    74,    79,    16,   170,    72,   114,    99,    89,
      22,    36,   119,   425,    76,     7,   181,    97,    36,    50,
      68,   257,   113,    89,    99,   116,   111,    76,   116,    95,
     222,    43,   224,   256,   208,    47,   102,    61,    62,   374,
      92,    93,    94,    68,    36,    70,    68,   119,    70,   461,
      68,   113,    70,    77,    68,    76,    70,    68,    70,    70,
     118,    97,    42,   286,   113,    57,   182,   183,   157,   228,
     229,   230,   145,   146,   145,   146,    77,   150,    99,   150,
     145,   146,    99,   119,    99,   150,   111,   105,    68,   111,
      70,   112,   113,   111,    95,   318,    68,   111,     7,   116,
     111,   167,   168,    76,    89,    68,   298,    68,    68,    97,
     111,    91,   304,    68,    94,    89,   105,   106,   107,    91,
     172,   210,    94,   438,    89,   105,   111,    36,    37,    38,
      39,    91,   173,   105,    94,    30,    99,   111,    99,   112,
     113,   173,   114,   184,    99,   105,   111,   119,   371,   201,
      45,    46,   113,   116,   114,   116,    71,    72,    73,   111,
     111,    70,   401,    68,   111,    70,   358,   359,   360,   361,
      88,   111,    90,    68,   226,   227,    71,    72,    73,   111,
      75,    68,   356,   419,   423,   111,   111,    30,   103,   104,
     426,    88,   112,    90,   235,   236,   237,   238,    77,    94,
     112,   242,    45,    46,    91,   118,   112,    94,   103,   104,
     105,   284,   111,   284,   112,   288,    95,   288,   105,   284,
     115,    97,   117,   118,   119,    68,    71,   114,    71,    72,
      73,   115,    75,    71,    72,    73,   116,    71,    72,    73,
      71,    72,    73,    89,    89,    71,    72,    73,   321,   119,
     321,    94,   321,    76,    89,    89,   321,    89,    89,    97,
     103,   104,   105,    97,    89,   103,   104,    76,   112,   103,
     104,    97,   103,   104,   117,   118,   119,   103,   104,   446,
     447,   111,   449,   101,   102,   103,   104,   105,   106,   107,
       0,     1,   459,     3,     4,     5,     6,     7,   112,   112,
      10,   112,   112,    13,    14,    15,    16,    17,    18,    19,
      20,    21,    22,    23,   112,   114,    26,    27,    99,   119,
     372,    31,    91,   396,    34,   396,    36,   400,    91,   400,
      40,    41,    42,    43,    44,    99,    74,    47,    48,   115,
     112,    51,    52,    53,    54,    55,    56,   112,    58,   115,
      36,    61,    62,    63,    64,    65,    66,   116,    68,    76,
      70,   332,   333,   334,   335,   336,   337,   338,   339,   340,
     341,   342,   343,   344,   345,   346,   347,   348,    92,    93,
      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
     104,   105,   106,   107,   268,   269,   270,   271,   272,   273,
      59,   112,    76,   112,   114,   115,   112,   112,   118,     1,
     120,   121,     4,     5,     6,     7,   112,   112,    10,   116,
      89,    13,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    75,   116,    26,    27,    71,   112,    89,    31,
      97,    71,    34,    71,    36,    81,   297,    67,    40,    41,
      67,    43,    44,   396,   158,    47,    48,   284,   400,    51,
      52,    53,    54,    55,    56,    94,    58,    99,   351,    61,
      62,    63,    64,    65,    66,   451,   331,    -1,    70,   307,
     308,   309,   310,    -1,   312,    77,    78,    79,    80,    81,
      82,    83,    84,    85,    86,    87,    -1,    -1,    90,    91,
      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
     102,   103,   104,   105,   106,   107,   108,   109,   110,    -1,
      -1,    -1,   114,    -1,    -1,   117,   118,   119,   120,   121,
       1,    -1,    -1,     4,     5,     6,     7,    -1,    -1,    10,
      -1,    -1,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    -1,    -1,    26,    27,    -1,    -1,    -1,
      31,    -1,    -1,    34,    -1,    36,    -1,    -1,    -1,    40,
      41,    -1,    43,    44,    -1,    -1,    47,    48,    -1,    -1,
      51,    52,    53,    54,    55,    56,    -1,    58,    -1,    -1,
      61,    62,    63,    64,    65,    66,    -1,    68,    -1,    70,
     103,   104,   105,   106,   107,    76,    77,    95,    96,    97,
      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
      91,    -1,    -1,    94,    95,    -1,    -1,    -1,    99,    -1,
      -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   114,    -1,   116,    -1,    -1,   119,   120,
     121,     1,    -1,    -1,     4,     5,     6,     7,    -1,    -1,
      10,    -1,    -1,    13,    14,    15,    16,    17,    18,    19,
      20,    21,    22,    23,    -1,    -1,    26,    27,    -1,    -1,
      -1,    31,    -1,    -1,    34,    -1,    36,    -1,    -1,    -1,
      40,    41,    -1,    43,    44,    -1,    -1,    47,    48,    -1,
      -1,    51,    52,    53,    54,    55,    56,    -1,    58,    -1,
      -1,    61,    62,    63,    64,    65,    66,    -1,    68,    -1,
      70,    -1,    -1,    -1,    -1,    -1,    76,    77,    97,    98,
      99,   100,   101,   102,   103,   104,   105,   106,   107,    -1,
      -1,    91,    -1,    -1,    94,    95,    -1,    -1,    -1,    99,
      -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   114,    -1,   116,    -1,    -1,   119,
     120,   121,     1,    -1,    -1,     4,     5,     6,     7,    -1,
      -1,    10,    -1,    -1,    13,    14,    15,    16,    17,    18,
      19,    20,    21,    22,    23,    -1,    -1,    26,    27,    -1,
      -1,    -1,    31,    -1,    -1,    34,    -1,    36,    37,    38,
      39,    40,    41,    42,    43,    44,    -1,    -1,    47,    48,
      -1,    -1,    51,    52,    53,    54,    55,    56,    -1,    58,
      -1,    -1,    61,    62,    63,    64,    65,    66,    -1,    68,
      -1,    70,    93,    94,    95,    96,    97,    98,    99,   100,
     101,   102,   103,   104,   105,   106,   107,    94,    95,    96,
      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
     107,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   112,   113,   114,   115,    -1,    -1,   118,
       1,   120,   121,     4,     5,     6,     7,    -1,    -1,    10,
      -1,    -1,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    -1,    -1,    26,    27,    -1,    -1,    -1,
      31,    -1,    -1,    34,    -1,    36,    37,    38,    39,    40,
      41,    42,    43,    44,    -1,    -1,    47,    48,    -1,    -1,
      51,    52,    53,    54,    55,    56,    -1,    58,    -1,    -1,
      61,    62,    63,    64,    65,    66,    -1,    68,    -1,    70,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   112,   113,   114,    -1,    -1,    -1,   118,     1,   120,
     121,     4,     5,     6,     7,    -1,    -1,    10,    -1,    -1,
      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    -1,    -1,    26,    27,    -1,    -1,    -1,    31,    -1,
      -1,    34,    -1,    36,    37,    38,    39,    40,    41,    42,
      43,    44,    -1,    -1,    47,    48,    -1,    -1,    51,    52,
      53,    54,    55,    56,    -1,    58,    -1,    -1,    61,    62,
      63,    64,    65,    66,    -1,    68,    -1,    70,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     113,   114,   115,    -1,    -1,   118,     1,   120,   121,     4,
       5,     6,     7,    -1,    -1,    10,    -1,    -1,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    -1,
      -1,    26,    27,    -1,    -1,    -1,    31,    -1,    -1,    34,
      -1,    36,    -1,    -1,    -1,    40,    41,    42,    43,    44,
      -1,    -1,    47,    48,    -1,    -1,    51,    52,    53,    54,
      55,    56,    -1,    58,    -1,    -1,    61,    62,    63,    64,
      65,    66,    -1,    68,    -1,    70,    -1,    -1,    -1,    -1,
      -1,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,    94,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     105,    -1,    -1,    -1,    -1,    -1,    -1,   112,   113,    -1,
      -1,    -1,    -1,    -1,    -1,   120,   121,     1,    -1,     3,
       4,     5,     6,     7,    -1,    -1,    10,    -1,    -1,    13,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      -1,    -1,    26,    27,    -1,    -1,    -1,    31,    -1,    -1,
      34,    -1,    36,    -1,    -1,    -1,    40,    41,    42,    43,
      44,    -1,    -1,    47,    48,    -1,    -1,    51,    52,    53,
      54,    55,    56,    -1,    58,    -1,    -1,    61,    62,    63,
      64,    65,    66,    -1,    68,    -1,    70,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,
     114,   115,    -1,    -1,   118,     1,   120,   121,     4,     5,
       6,     7,    -1,    -1,    10,    -1,    -1,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    -1,    -1,
      26,    27,    -1,    -1,    -1,    31,    -1,    -1,    34,    -1,
      36,    -1,    -1,    -1,    40,    41,    42,    43,    44,    -1,
      -1,    47,    48,    -1,    -1,    51,    52,    53,    54,    55,
      56,    -1,    58,    -1,    -1,    61,    62,    63,    64,    65,
      66,    -1,    68,    -1,    70,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     1,    -1,
      -1,     4,     5,     6,     7,    -1,    -1,    10,    -1,    -1,
      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    -1,    -1,    26,    27,    -1,    -1,    -1,    31,    -1,
      -1,    34,   118,    36,   120,   121,    -1,    40,    41,    -1,
      43,    44,    -1,    -1,    47,    48,    -1,    -1,    51,    52,
      53,    54,    55,    56,    -1,    58,    -1,    -1,    61,    62,
      63,    64,    65,    66,    -1,    -1,    -1,    70,    -1,     1,
      -1,    -1,     4,     5,     6,     7,    -1,    -1,    10,    -1,
      -1,    13,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    -1,    -1,    26,    27,    99,    -1,    -1,    31,
      -1,    -1,    34,    -1,    36,    -1,    -1,    -1,    40,    41,
      -1,    43,    44,    -1,    -1,    47,    48,   120,   121,    51,
      52,    53,    54,    55,    56,    -1,    58,    -1,    -1,    61,
      62,    63,    64,    65,    66,    -1,    -1,    -1,    70,    -1,
       1,    -1,    -1,     4,     5,     6,     7,    -1,    -1,    10,
      -1,    -1,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    -1,    -1,    26,    27,    -1,    -1,    -1,
      31,    -1,    -1,    34,    -1,    36,    -1,    -1,    -1,    40,
      41,    -1,    43,    44,   116,    -1,    47,    48,   120,   121,
      51,    52,    53,    54,    55,    56,    -1,    58,    -1,    -1,
      61,    62,    63,    64,    65,    66,    -1,    -1,    -1,    70,
      -1,     1,    -1,    -1,     4,     5,     6,     7,    -1,    -1,
      10,    -1,    -1,    13,    14,    15,    16,    17,    18,    19,
      20,    21,    22,    23,    -1,    -1,    26,    27,    -1,    -1,
      -1,    31,    -1,    -1,    34,    -1,    36,    -1,    -1,    -1,
      40,    41,    -1,    43,    44,    -1,    -1,    47,    48,   120,
     121,    51,    52,    53,    54,    55,    56,    -1,    58,    -1,
      -1,    61,    62,    63,    64,    65,    66,    -1,    -1,    -1,
      70,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     120,   121
};

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

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_uint8 yyr1[] =
{
       0,   122,   123,   124,   125,   125,   126,   126,   127,   127,
     127,   127,   127,   128,   129,   129,   129,   129,   129,   129,
     129,   129,   130,   131,   132,   133,   134,   135,   135,   135,
     135,   135,   135,   135,   135,   135,   135,   136,   137,   138,
     138,   139,   139,   139,   139,   139,   139,   139,   139,   139,
     139,   139,   139,   139,   139,   139,   139,   139,   139,   139,
     139,   139,   139,   139,   139,   139,   139,   139,   139,   139,
     139,   139,   139,   139,   139,   139,   139,   139,   139,   140,
     141,   142,   143,   144,   144,   145,   145,   145,   145,   146,
     147,   147,   148,   149,   149,   150,   150,   151,   151,   152,
     152,   152,   153,   153,   153,   153,   154,   154,   154,   154,
     154,   154,   154,   154,   154,   154,   154,   154,   154,   154,
     154,   154,   154,   154,   154,   154,   154,   154,   154,   154,
     154,   154,   154,   154,   154,   154,   154,   154,   154,   154,
     154,   154,   154,   154,   154,   154,   154,   154,   154,   154,
     154,   154,   154,   154,   155,   156,   157,   158,   159,   160,
     161,   162,   163,   164,   165,   165,   166,   166,   166,   166,
     166,   166,   166,   166,   166,   167,   167,   167,   168,   168,
     168,   168,   168,   168,   169,   170,   171,   172,   172,   173,
     174,   174,   174,   174,   174,   174,   174,   174,   174,   174,
     174,   174,   174,   174,   174,   174,   174,   174,   175,   175,
     175,   175,   176,   176,   177,   177,   178,   178,   178,   178,
     179,   179,   179,   180,   181,   181,   182,   182,   182,   183,
     183,   184,   184,   184,   184,   184,   185,   185,   185,   185,
     186,   186,   187,   187,   188,   188,   188,   188,   188,   189,
     189,   189,   189,   190,   190,   190,   190,   190,   191,   191,
     191,   192,   192,   193,   193,   194,   195,   195,   196,   197,
     197,   198,   199,   199,   199,   199,   199,   199,   199,   199,
     199,   199,   199,   199,   199,   199,   199,   199,   199,   200,
     200,   200,   200,   200,   200,   200,   200,   201,   201,   201,
     201,   201,   201,   201,   201
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     2,     0,     5,     1,     0,     2,     2,     1,
       1,     1,     2,     1,     0,     3,     4,     4,     4,     4,
       2,     2,     1,     1,     0,     0,     0,     1,     2,     3,
       2,     2,     1,     3,     4,     2,     2,     6,     2,     1,
       1,     1,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     3,     3,     2,     1,
       3,     7,     0,     0,     1,     1,     3,     2,     2,     3,
       2,     5,     3,     1,     6,     2,     0,     3,     4,     1,
       2,     2,     1,     1,     2,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     7,     5,     4,     6,     1,
       5,     4,     2,     5,     4,     2,     6,     7,     6,     6,
       6,     6,     2,     2,     1,     5,     3,     3,     3,     2,
       3,     3,     3,     3,     2,     2,     2,     2,     2,     2,
       3,     3,     4,     4,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     1,     0,     1,     1,     1,     2,     2,
       2,     1,     2,     2,     0,     0,     0,     0,     1,     0,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     0,     2,
       2,     2,     0,     2,     0,     1,     0,     2,     2,     2,
       0,     4,     3,     1,     1,     3,     0,     2,     2,     0,
       1,     1,     2,     3,     4,     3,     2,     4,     5,     4,
       0,     1,     0,     1,     1,     1,     1,     2,     2,     0,
       1,     2,     1,     1,     2,     2,     3,     1,     1,     2,
       1,     3,     1,     5,     1,     1,     3,     1,     1,     3,
       1,     1,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     1,     2,
       2,     2,     2,     2,     2,     4,     1,     3,     1,     1,
       1,     1,     1,     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: /* prog: s1 exts  */
#line 223 "soapcpp2_yacc.y"
                        {
                          if (lflag)
                          {
                            custom_header = 0;
                            custom_fault = 0;
                          }
                          else
                          {
                            add_header();
                            add_fault();
                          }
                          compile(sp->table);
                          freetable(classtable);
                          freetable(enumtable);
                          freetable(typetable);
                          freetable(booltable);
                          freetable(templatetable);
                          yylineno = 0;
                        }
#line 2254 "soapcpp2_yacc.c"
    break;

  case 3: /* s1: %empty  */
#line 243 "soapcpp2_yacc.y"
                        {
                          classtable = mktable(NULL);
                          enumtable = mktable(NULL);
                          typetable = mktable(NULL);
                          booltable = mktable(NULL);
                          templatetable = mktable(NULL);
                          p = enter(booltable, lookup("false"));
                          p->info.typ = mkint();
                          p->info.val.i = 0;
                          p = enter(booltable, lookup("true"));
                          p->info.typ = mkint();
                          p->info.val.i = 1;
                          mkscope(mktable(mktable(NULL)), 0);
                        }
#line 2273 "soapcpp2_yacc.c"
    break;

  case 4: /* exts: NAMESPACE ID '{' exts1 '}'  */
#line 259 "soapcpp2_yacc.y"
                        { set_namespace((yyvsp[-3].sym)->name); }
#line 2279 "soapcpp2_yacc.c"
    break;

  case 5: /* exts: exts1  */
#line 260 "soapcpp2_yacc.y"
                        { }
#line 2285 "soapcpp2_yacc.c"
    break;

  case 6: /* exts1: %empty  */
#line 262 "soapcpp2_yacc.y"
                        {
                          add_soap();
                          add_XML();
                          add_qname();
                        }
#line 2295 "soapcpp2_yacc.c"
    break;

  case 7: /* exts1: exts1 ext  */
#line 267 "soapcpp2_yacc.y"
                        { }
#line 2301 "soapcpp2_yacc.c"
    break;

  case 8: /* ext: dclrs ';'  */
#line 269 "soapcpp2_yacc.y"
                        { }
#line 2307 "soapcpp2_yacc.c"
    break;

  case 9: /* ext: pragma  */
#line 270 "soapcpp2_yacc.y"
                        { }
#line 2313 "soapcpp2_yacc.c"
    break;

  case 10: /* ext: t1  */
#line 271 "soapcpp2_yacc.y"
                        { }
#line 2319 "soapcpp2_yacc.c"
    break;

  case 11: /* ext: t2  */
#line 272 "soapcpp2_yacc.y"
                        { }
#line 2325 "soapcpp2_yacc.c"
    break;

  case 12: /* ext: error ';'  */
#line 273 "soapcpp2_yacc.y"
                        {
                          synerror("input before ; skipped");
                          while (sp > stack)
                          {
                            freetable(sp->table);
                            exitscope();
                          }
                          yyerrok;
                        }
#line 2339 "soapcpp2_yacc.c"
    break;

  case 13: /* pragma: PRAGMA  */
#line 283 "soapcpp2_yacc.y"
                        { add_pragma((yyvsp[0].s)); }
#line 2345 "soapcpp2_yacc.c"
    break;

  case 14: /* decls: %empty  */
#line 292 "soapcpp2_yacc.y"
                        {
                          transient &= ~6;
                          permission = 0;
                        }
#line 2354 "soapcpp2_yacc.c"
    break;

  case 15: /* decls: dclrs ';' decls  */
#line 297 "soapcpp2_yacc.y"
                        { }
#line 2360 "soapcpp2_yacc.c"
    break;

  case 16: /* decls: PRIVATE ':' t3 decls  */
#line 299 "soapcpp2_yacc.y"
                        { }
#line 2366 "soapcpp2_yacc.c"
    break;

  case 17: /* decls: PROTECTED ':' t4 decls  */
#line 301 "soapcpp2_yacc.y"
                        { }
#line 2372 "soapcpp2_yacc.c"
    break;

  case 18: /* decls: PUBLIC ':' t5 decls  */
#line 303 "soapcpp2_yacc.y"
                        { }
#line 2378 "soapcpp2_yacc.c"
    break;

  case 19: /* decls: t1 decls t2 decls  */
#line 305 "soapcpp2_yacc.y"
                        { }
#line 2384 "soapcpp2_yacc.c"
    break;

  case 20: /* decls: ';' decls  */
#line 306 "soapcpp2_yacc.y"
                        { }
#line 2390 "soapcpp2_yacc.c"
    break;

  case 21: /* decls: error ';'  */
#line 307 "soapcpp2_yacc.y"
                        {
                          synerror("declaration expected");
                          yyerrok;
                        }
#line 2399 "soapcpp2_yacc.c"
    break;

  case 22: /* t1: '['  */
#line 312 "soapcpp2_yacc.y"
                        { transient |= 1; }
#line 2405 "soapcpp2_yacc.c"
    break;

  case 23: /* t2: ']'  */
#line 314 "soapcpp2_yacc.y"
                        { transient &= ~1; }
#line 2411 "soapcpp2_yacc.c"
    break;

  case 24: /* t3: %empty  */
#line 316 "soapcpp2_yacc.y"
                        { permission = (int)Sprivate; }
#line 2417 "soapcpp2_yacc.c"
    break;

  case 25: /* t4: %empty  */
#line 318 "soapcpp2_yacc.y"
                        { permission = (int)Sprotected; }
#line 2423 "soapcpp2_yacc.c"
    break;

  case 26: /* t5: %empty  */
#line 320 "soapcpp2_yacc.y"
                        { permission = 0; }
#line 2429 "soapcpp2_yacc.c"
    break;

  case 27: /* dclrs: spec  */
#line 322 "soapcpp2_yacc.y"
                        { }
#line 2435 "soapcpp2_yacc.c"
    break;

  case 28: /* dclrs: spec dclr  */
#line 323 "soapcpp2_yacc.y"
                        { }
#line 2441 "soapcpp2_yacc.c"
    break;

  case 29: /* dclrs: spec fdclr func  */
#line 325 "soapcpp2_yacc.y"
                        { }
#line 2447 "soapcpp2_yacc.c"
    break;

  case 30: /* dclrs: ctor func  */
#line 326 "soapcpp2_yacc.y"
                        { }
#line 2453 "soapcpp2_yacc.c"
    break;

  case 31: /* dclrs: dtor func  */
#line 327 "soapcpp2_yacc.y"
                        { }
#line 2459 "soapcpp2_yacc.c"
    break;

  case 32: /* dclrs: sym  */
#line 328 "soapcpp2_yacc.y"
                        { }
#line 2465 "soapcpp2_yacc.c"
    break;

  case 33: /* dclrs: dclrs ',' dclr  */
#line 330 "soapcpp2_yacc.y"
                        { }
#line 2471 "soapcpp2_yacc.c"
    break;

  case 34: /* dclrs: dclrs ',' fdclr func  */
#line 332 "soapcpp2_yacc.y"
                        { }
#line 2477 "soapcpp2_yacc.c"
    break;

  case 35: /* dclrs: error ID  */
#line 333 "soapcpp2_yacc.y"
                        {
                          sprintf(errbuf, "incomplete type in declaration of '%s'", (yyvsp[0].sym)->name);
                          synerror(errbuf);
                          yyerrok;
                        }
#line 2487 "soapcpp2_yacc.c"
    break;

  case 36: /* dclrs: error ')'  */
#line 338 "soapcpp2_yacc.y"
                        {
                          synerror("function declaration?");
                          yyerrok;
                        }
#line 2496 "soapcpp2_yacc.c"
    break;

  case 37: /* dclr: ptrs ID arrayck tag bounds brinit  */
#line 344 "soapcpp2_yacc.y"
                        {
                          if (((int)(yyvsp[-3].rec).sto & (int)Stypedef) && sp->table->level == GLOBAL)
                          {
                            if (((yyvsp[-3].rec).typ->type != Tstruct &&
                                  (yyvsp[-3].rec).typ->type != Tclass &&
                                  (yyvsp[-3].rec).typ->type != Tunion &&
                                  (yyvsp[-3].rec).typ->type != Tenum &&
                                  (yyvsp[-3].rec).typ->type != Tenumsc) ||
                                ((is_binary((yyvsp[-3].rec).typ) || is_stdstr((yyvsp[-3].rec).typ)) && strcmp((yyvsp[-4].sym)->name, (yyvsp[-3].rec).typ->id->name)) ||
                                strcmp((yyvsp[-4].sym)->name, (yyvsp[-3].rec).typ->id->name))
                            {
                              p = enter(typetable, (yyvsp[-4].sym));
                              p->info.typ = mksymtype((yyvsp[-3].rec).typ, (yyvsp[-4].sym));
                              if (((int)(yyvsp[-3].rec).sto & (int)Sextern))
                              {
                                p->info.typ->transient = -1;
                                p->info.typ->extsym = (yyvsp[-4].sym);
                              }
                              else if (is_external((yyvsp[-3].rec).typ))
                              {
                                p->info.typ->transient = -3; /* extern and volatile */
                              }
                              else
                              {
                                p->info.typ->transient = (yyvsp[-3].rec).typ->transient;
                              }
                              if (p->info.typ->width == 0)
                                p->info.typ->width = 8;
                              p->info.sto = (yyvsp[-3].rec).sto;
                              p->info.typ->restriction = (yyvsp[-3].rec).typ->sym;
                              p->info.typ->synonym = (yyvsp[-3].rec).typ->sym;
                              if ((yyvsp[-1].rec).hasmin)
                              {
                                p->info.typ->hasmin = (yyvsp[-1].rec).hasmin;
                                p->info.typ->incmin = (yyvsp[-1].rec).incmin;
                                p->info.typ->imin = (yyvsp[-1].rec).imin;
                                p->info.typ->rmin = (yyvsp[-1].rec).rmin;
                                p->info.typ->synonym = NULL;
                              }
                              else
                              {
                                p->info.typ->hasmin = (yyvsp[-3].rec).typ->hasmin;
                                p->info.typ->incmin = (yyvsp[-3].rec).typ->incmin;
                                p->info.typ->imin = (yyvsp[-3].rec).typ->imin;
                                p->info.typ->rmin = (yyvsp[-3].rec).typ->rmin;
                              }
                              if ((yyvsp[-1].rec).hasmax)
                              {
                                p->info.typ->hasmax = (yyvsp[-1].rec).hasmax;
                                p->info.typ->incmax = (yyvsp[-1].rec).incmax;
                                p->info.typ->imax = (yyvsp[-1].rec).imax;
                                p->info.typ->rmax = (yyvsp[-1].rec).rmax;
                                p->info.typ->synonym = NULL;
                              }
                              else
                              {
                                p->info.typ->hasmax = (yyvsp[-3].rec).typ->hasmax;
                                p->info.typ->incmax = (yyvsp[-3].rec).typ->incmax;
                                p->info.typ->imax = (yyvsp[-3].rec).typ->imax;
                                p->info.typ->rmax = (yyvsp[-3].rec).typ->rmax;
                              }
                              if (p->info.typ->property == 1)
                                p->info.typ->property = (yyvsp[-3].rec).typ->property;
                              if ((yyvsp[-1].rec).pattern)
                              {
                                p->info.typ->pattern = (yyvsp[-1].rec).pattern;
                                p->info.typ->synonym = NULL;
                              }
                              else if (!p->info.typ->pattern)
                              {
                                p->info.typ->pattern = (yyvsp[-3].rec).typ->pattern;
                              }
                            }
                            if ((yyvsp[0].rec).hasval)
                              set_value(p, (yyvsp[-3].rec).typ, &(yyvsp[0].rec));
                            (yyvsp[-4].sym)->token = TYPE;
                          }
                          else
                          {
                            p = enter(sp->table, (yyvsp[-4].sym));
                            p->tag = (yyvsp[-2].s);
                            p->info.typ = (yyvsp[-3].rec).typ;
                            p->info.sto = (Storage)((int)(yyvsp[-3].rec).sto | permission);
                            if ((yyvsp[0].rec).hasval)
                              set_value(p, (yyvsp[-3].rec).typ, &(yyvsp[0].rec));
                            else
                              p->info.val.i = sp->val;
                            if ((yyvsp[-1].rec).minOccurs < 0)
                            {
                              if ((yyvsp[0].rec).hasval ||
                                  ((int)(yyvsp[-3].rec).sto & (int)Sattribute) ||
                                  ((int)(yyvsp[-3].rec).sto & (int)Sspecial) ||
                                  (yyvsp[-3].rec).typ->type == Tpointer ||
                                  (yyvsp[-3].rec).typ->type == Ttemplate ||
                                  is_anyAttribute((yyvsp[-3].rec).typ) ||
                                  !strncmp((yyvsp[-4].sym)->name, "__size", 6))
                                p->info.minOccurs = 0;
                              else
                                p->info.minOccurs = 1;
                            }
                            else
                            {
                              p->info.minOccurs = (yyvsp[-1].rec).minOccurs;
                            }
                            p->info.maxOccurs = (yyvsp[-1].rec).maxOccurs;
                            p->info.nillable = (yyvsp[-1].rec).nillable;
                            if (sp->mask)
                              sp->val <<= 1;
                            else
                              sp->val++;
                            p->info.offset = sp->offset;
                            if (((int)(yyvsp[-3].rec).sto & (int)Sextern))
                              p->level = GLOBAL;
                            else if (((int)(yyvsp[-3].rec).sto & (int)Stypedef))
                              ;
                            else if (sp->grow)
                              sp->offset += p->info.typ->width;
                            else if (p->info.typ->width > sp->offset)
                              sp->offset = p->info.typ->width;
                          }
                          sp->entry = p;
                        }
#line 2623 "soapcpp2_yacc.c"
    break;

  case 38: /* fdclr: ptrs name  */
#line 467 "soapcpp2_yacc.y"
                        {
                          if (((int)(yyvsp[-1].rec).sto & (int)Stypedef))
                          {
                            sprintf(errbuf, "invalid typedef qualifier for '%s'", (yyvsp[0].sym)->name);
                            semwarn(errbuf);
                          }
                          p = enter(sp->table, (yyvsp[0].sym));
                          p->info.typ = (yyvsp[-1].rec).typ;
                          p->info.sto = (yyvsp[-1].rec).sto;
                          p->info.hasval = False;
                          p->info.offset = sp->offset;
                          if (sp->grow)
                            sp->offset += p->info.typ->width;
                          else if (p->info.typ->width > sp->offset)
                            sp->offset = p->info.typ->width;
                          sp->entry = p;
                        }
#line 2645 "soapcpp2_yacc.c"
    break;

  case 39: /* id: ID  */
#line 485 "soapcpp2_yacc.y"
                        { (yyval.sym) = (yyvsp[0].sym); }
#line 2651 "soapcpp2_yacc.c"
    break;

  case 40: /* id: TYPE  */
#line 486 "soapcpp2_yacc.y"
                        { (yyval.sym) = (yyvsp[0].sym); }
#line 2657 "soapcpp2_yacc.c"
    break;

  case 41: /* name: id  */
#line 488 "soapcpp2_yacc.y"
                        { (yyval.sym) = (yyvsp[0].sym); }
#line 2663 "soapcpp2_yacc.c"
    break;

  case 42: /* name: OPERATOR '!'  */
#line 489 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator!"); }
#line 2669 "soapcpp2_yacc.c"
    break;

  case 43: /* name: OPERATOR '~'  */
#line 490 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator~"); }
#line 2675 "soapcpp2_yacc.c"
    break;

  case 44: /* name: OPERATOR '='  */
#line 491 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator="); }
#line 2681 "soapcpp2_yacc.c"
    break;

  case 45: /* name: OPERATOR PA  */
#line 492 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator+="); }
#line 2687 "soapcpp2_yacc.c"
    break;

  case 46: /* name: OPERATOR NA  */
#line 493 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator-="); }
#line 2693 "soapcpp2_yacc.c"
    break;

  case 47: /* name: OPERATOR TA  */
#line 494 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator*="); }
#line 2699 "soapcpp2_yacc.c"
    break;

  case 48: /* name: OPERATOR DA  */
#line 495 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator/="); }
#line 2705 "soapcpp2_yacc.c"
    break;

  case 49: /* name: OPERATOR MA  */
#line 496 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator%="); }
#line 2711 "soapcpp2_yacc.c"
    break;

  case 50: /* name: OPERATOR AA  */
#line 497 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator&="); }
#line 2717 "soapcpp2_yacc.c"
    break;

  case 51: /* name: OPERATOR XA  */
#line 498 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator^="); }
#line 2723 "soapcpp2_yacc.c"
    break;

  case 52: /* name: OPERATOR OA  */
#line 499 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator|="); }
#line 2729 "soapcpp2_yacc.c"
    break;

  case 53: /* name: OPERATOR LA  */
#line 500 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator<<="); }
#line 2735 "soapcpp2_yacc.c"
    break;

  case 54: /* name: OPERATOR RA  */
#line 501 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator>>="); }
#line 2741 "soapcpp2_yacc.c"
    break;

  case 55: /* name: OPERATOR OR  */
#line 502 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator||"); }
#line 2747 "soapcpp2_yacc.c"
    break;

  case 56: /* name: OPERATOR AN  */
#line 503 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator&&"); }
#line 2753 "soapcpp2_yacc.c"
    break;

  case 57: /* name: OPERATOR '|'  */
#line 504 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator|"); }
#line 2759 "soapcpp2_yacc.c"
    break;

  case 58: /* name: OPERATOR '^'  */
#line 505 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator^"); }
#line 2765 "soapcpp2_yacc.c"
    break;

  case 59: /* name: OPERATOR '&'  */
#line 506 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator&"); }
#line 2771 "soapcpp2_yacc.c"
    break;

  case 60: /* name: OPERATOR EQ  */
#line 507 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator=="); }
#line 2777 "soapcpp2_yacc.c"
    break;

  case 61: /* name: OPERATOR NE  */
#line 508 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator!="); }
#line 2783 "soapcpp2_yacc.c"
    break;

  case 62: /* name: OPERATOR '<'  */
#line 509 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator<"); }
#line 2789 "soapcpp2_yacc.c"
    break;

  case 63: /* name: OPERATOR LE  */
#line 510 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator<="); }
#line 2795 "soapcpp2_yacc.c"
    break;

  case 64: /* name: OPERATOR '>'  */
#line 511 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator>"); }
#line 2801 "soapcpp2_yacc.c"
    break;

  case 65: /* name: OPERATOR GE  */
#line 512 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator>="); }
#line 2807 "soapcpp2_yacc.c"
    break;

  case 66: /* name: OPERATOR LS  */
#line 513 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator<<"); }
#line 2813 "soapcpp2_yacc.c"
    break;

  case 67: /* name: OPERATOR RS  */
#line 514 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator>>"); }
#line 2819 "soapcpp2_yacc.c"
    break;

  case 68: /* name: OPERATOR '+'  */
#line 515 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator+"); }
#line 2825 "soapcpp2_yacc.c"
    break;

  case 69: /* name: OPERATOR '-'  */
#line 516 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator-"); }
#line 2831 "soapcpp2_yacc.c"
    break;

  case 70: /* name: OPERATOR '*'  */
#line 517 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator*"); }
#line 2837 "soapcpp2_yacc.c"
    break;

  case 71: /* name: OPERATOR '/'  */
#line 518 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator/"); }
#line 2843 "soapcpp2_yacc.c"
    break;

  case 72: /* name: OPERATOR '%'  */
#line 519 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator%"); }
#line 2849 "soapcpp2_yacc.c"
    break;

  case 73: /* name: OPERATOR PP  */
#line 520 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator++"); }
#line 2855 "soapcpp2_yacc.c"
    break;

  case 74: /* name: OPERATOR NN  */
#line 521 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator--"); }
#line 2861 "soapcpp2_yacc.c"
    break;

  case 75: /* name: OPERATOR AR  */
#line 522 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator->"); }
#line 2867 "soapcpp2_yacc.c"
    break;

  case 76: /* name: OPERATOR '[' ']'  */
#line 523 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator[]"); }
#line 2873 "soapcpp2_yacc.c"
    break;

  case 77: /* name: OPERATOR '(' ')'  */
#line 524 "soapcpp2_yacc.y"
                        { (yyval.sym) = lookup("operator()"); }
#line 2879 "soapcpp2_yacc.c"
    break;

  case 78: /* name: OPERATOR texp  */
#line 525 "soapcpp2_yacc.y"
                        {
                          s1 = c_storage((yyvsp[0].rec).sto);
                          s2 = c_type((yyvsp[0].rec).typ);
                          s = (char*)emalloc(strlen(s1) + strlen(s2) + 10);
                          strcpy(s, "operator ");
                          strcat(s, s1);
                          strcat(s, s2);
                          (yyval.sym) = lookup(s);
                          if (!(yyval.sym))
                            (yyval.sym) = install(s, ID);
                        }
#line 2895 "soapcpp2_yacc.c"
    break;

  case 79: /* ctor: name  */
#line 537 "soapcpp2_yacc.y"
                        {
                          sp->entry = enter(sp->table, (yyvsp[0].sym));
                          sp->entry->info.typ = mknone();
                          sp->entry->info.sto = permission;
                          sp->entry->info.offset = sp->offset;
                          sp->node.typ = mkvoid();
                          sp->node.sto = Snone;
                          if ((yyvsp[0].sym) != sp->table->sym)
                          {
                            if (sp->table->level == GLOBAL)
                            {
                              sp->entry->info.typ = mkint();
                              sp->node.typ = mkint();
                            }
                            else if (strncmp((yyvsp[0].sym)->name, "operator ", 9))
                            {
                              sprintf(errbuf, "invalid constructor function '%s' or missing return type", (yyvsp[0].sym)->name);
                              semerror(errbuf);
                            }
                          }
                        }
#line 2921 "soapcpp2_yacc.c"
    break;

  case 80: /* dtor: virtual '~' id  */
#line 560 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].sym) != sp->table->sym)
                          {
                            sprintf(errbuf, "invalid destructor function '%s'", (yyvsp[0].sym)->name);
                            semerror(errbuf);
                          }
                          else
                          {
                            s = (char*)emalloc(strlen((yyvsp[0].sym)->name) + 2);
                            s2 = strrchr((yyvsp[0].sym)->name, ':');
                            if (s2 && *(s2+1) && (s2 == (yyvsp[0].sym)->name || *(s2-1) != ':'))
                            {
                              strncpy(s, (yyvsp[0].sym)->name, s2 - (yyvsp[0].sym)->name + 1);
                              strcat(s, "~");
                              strcat(s, s2 + 1);
                            }
                            else
                            {
                              strcpy(s, "~");
                              strcat(s, (yyvsp[0].sym)->name);
                            }
                            sym = lookup(s);
                            if (!sym)
                              sym = install(s, ID);
                            sp->entry = enter(sp->table, sym);
                            sp->entry->info.typ = mknone();
                            sp->entry->info.sto = (yyvsp[-2].sto);
                            sp->entry->info.offset = sp->offset;
                          }
                          sp->node.typ = mkvoid();
                          sp->node.sto = Snone;
                        }
#line 2958 "soapcpp2_yacc.c"
    break;

  case 81: /* func: fname '(' s6 fargso ')' const abstract  */
#line 594 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[-6].e)->level == GLOBAL)
                          {
                            if (!((int)(yyvsp[-6].e)->info.sto & (int)Sextern) &&
                                sp->entry && sp->entry->info.typ->type == Tpointer &&
                                ((Tnode*)sp->entry->info.typ->ref)->type == Tchar)
                            {
                              sprintf(errbuf, "last output parameter of service operation function prototype '%s' is a pointer to a char which will only return one byte: use char** instead to return a string", (yyvsp[-6].e)->sym->name);
                              semwarn(errbuf);
                            }
                            if (((int)(yyvsp[-6].e)->info.sto & (int)Sextern))
                            {
                              (yyvsp[-6].e)->info.typ = mkmethod((yyvsp[-6].e)->info.typ, sp->table);
                            }
                            else if (sp->entry &&
                                (sp->entry->info.typ->type == Tpointer ||
                                 sp->entry->info.typ->type == Treference ||
                                 sp->entry->info.typ->type == Tarray ||
                                 is_transient(sp->entry->info.typ)))
                            {
                              if ((yyvsp[-6].e)->info.typ->type == Tint)
                              {
                                sp->entry->info.sto = (Storage)((int)sp->entry->info.sto | (int)Sreturn);
                                (yyvsp[-6].e)->info.typ = mkfun(sp->entry);
                                (yyvsp[-6].e)->info.typ->id = (yyvsp[-6].e)->sym;
                                if (!is_transient(sp->entry->info.typ))
                                {
                                  if (!is_response(sp->entry->info.typ))
                                  {
                                    if (!is_XML(sp->entry->info.typ) && !is_stdXML(sp->entry->info.typ))
                                      add_response((yyvsp[-6].e), sp->entry);
                                  }
                                  else
                                  {
                                    add_result(sp->entry->info.typ);
                                  }
                                }
                                add_request((yyvsp[-6].e)->sym, sp);
                              }
                              else
                              {
                                sprintf(errbuf, "return type of service operation function prototype '%s' must be integer", (yyvsp[-6].e)->sym->name);
                                semerror(errbuf);
                              }
                            }
                            else
                            {
                              sprintf(errbuf, "last output parameter of service operation function prototype '%s' is a return parameter and must be a pointer or reference, or use %s(..., void) for one-way sends", (yyvsp[-6].e)->sym->name, (yyvsp[-6].e)->sym->name);
                              semerror(errbuf);
                            }
                          }
                          else if ((yyvsp[-6].e)->level == INTERNAL)
                          {
                            (yyvsp[-6].e)->info.typ = mkmethod((yyvsp[-6].e)->info.typ, sp->table);
                            (yyvsp[-6].e)->info.sto = (Storage)((int)(yyvsp[-6].e)->info.sto | (int)(yyvsp[-1].sto) | (int)(yyvsp[0].sto));
                            transient &= ~1;
                          }
                          exitscope();
                        }
#line 3022 "soapcpp2_yacc.c"
    break;

  case 82: /* fname: %empty  */
#line 654 "soapcpp2_yacc.y"
                        { (yyval.e) = sp->entry; }
#line 3028 "soapcpp2_yacc.c"
    break;

  case 83: /* fargso: %empty  */
#line 656 "soapcpp2_yacc.y"
                        { }
#line 3034 "soapcpp2_yacc.c"
    break;

  case 84: /* fargso: fargs  */
#line 657 "soapcpp2_yacc.y"
                        { }
#line 3040 "soapcpp2_yacc.c"
    break;

  case 85: /* fargs: farg  */
#line 659 "soapcpp2_yacc.y"
                        { }
#line 3046 "soapcpp2_yacc.c"
    break;

  case 86: /* fargs: farg ',' fargs  */
#line 661 "soapcpp2_yacc.y"
                        { }
#line 3052 "soapcpp2_yacc.c"
    break;

  case 87: /* fargs: error ID  */
#line 662 "soapcpp2_yacc.y"
                        {
                          sprintf(errbuf, "undefined '%s'", (yyvsp[0].sym)->name);
                          synerror(errbuf);
                        }
#line 3061 "soapcpp2_yacc.c"
    break;

  case 88: /* fargs: error ','  */
#line 666 "soapcpp2_yacc.y"
                        {
                          synerror("formal argument expected");
                          yyerrok;
                        }
#line 3070 "soapcpp2_yacc.c"
    break;

  case 89: /* farg: tspec ptrs arg  */
#line 672 "soapcpp2_yacc.y"
                        { }
#line 3076 "soapcpp2_yacc.c"
    break;

  case 90: /* arg: arrayck init  */
#line 674 "soapcpp2_yacc.y"
                       {
                          if (sp->table->level != PARAM)
                            p = enter(sp->table, gensymidx("param", (int)++sp->val));
                          else if (eflag || zflag == 0 || zflag > 3)
                            p = enter(sp->table, gensymidx("_param", (int)++sp->val));
                          else
                            p = enter(sp->table, gensym("_param"));
                          if (((int)(yyvsp[-1].rec).sto & (int)Stypedef))
                            semwarn("typedef in function argument");
                          p->info.typ = (yyvsp[-1].rec).typ;
                          p->info.sto = (yyvsp[-1].rec).sto;
                          p->info.offset = sp->offset;
                          if ((yyvsp[0].rec).hasval)
                            set_value(p, (yyvsp[-1].rec).typ, &(yyvsp[0].rec));
                          if (((int)(yyvsp[-1].rec).sto & (int)Sextern))
                            p->level = GLOBAL;
                          else if (sp->grow)
                            sp->offset += p->info.typ->width;
                          else if (p->info.typ->width > sp->offset)
                            sp->offset = p->info.typ->width;
                          sp->entry = p;
                        }
#line 3103 "soapcpp2_yacc.c"
    break;

  case 91: /* arg: ID arrayck tag occurs init  */
#line 697 "soapcpp2_yacc.y"
                        {
                          if (soap_version == 2 && *(yyvsp[-4].sym)->name == '_' && sp->table->level == GLOBAL)
                          {
                            sprintf(errbuf, "SOAP 1.2 does not support anonymous parameters '%s'", (yyvsp[-4].sym)->name);
                            semwarn(errbuf);
                          }
                          if (((int)(yyvsp[-3].rec).sto & (int)Stypedef))
                            semwarn("typedef in function argument");
                          p = enter(sp->table, (yyvsp[-4].sym));
                          p->info.typ = (yyvsp[-3].rec).typ;
                          p->info.sto = (yyvsp[-3].rec).sto;
                          p->tag = (yyvsp[-2].s);
                          if ((yyvsp[-1].rec).minOccurs < 0)
                          {
                            if ((yyvsp[0].rec).hasval ||
                                ((int)(yyvsp[-3].rec).sto & (int)Sattribute) ||
                                ((int)(yyvsp[-3].rec).sto & (int)Sspecial) ||
                                (yyvsp[-3].rec).typ->type == Tpointer ||
                                (yyvsp[-3].rec).typ->type == Ttemplate ||
                                is_anyAttribute((yyvsp[-3].rec).typ) ||
                                !strncmp((yyvsp[-4].sym)->name, "__size", 6))
                              p->info.minOccurs = 0;
                            else
                              p->info.minOccurs = 1;
                          }
                          else
                          {
                            p->info.minOccurs = (yyvsp[-1].rec).minOccurs;
                          }
                          p->info.maxOccurs = (yyvsp[-1].rec).maxOccurs;
                          p->info.nillable = (yyvsp[-1].rec).nillable;
                          p->info.offset = sp->offset;
                          if ((yyvsp[0].rec).hasval)
                            set_value(p, (yyvsp[-3].rec).typ, &(yyvsp[0].rec));
                          if (((int)(yyvsp[-3].rec).sto & (int)Sextern))
                            p->level = GLOBAL;
                          else if (sp->grow)
                            sp->offset += p->info.typ->width;
                          else if (p->info.typ->width > sp->offset)
                            sp->offset = p->info.typ->width;
                          sp->entry = p;
                        }
#line 3150 "soapcpp2_yacc.c"
    break;

  case 92: /* sym: ID tag init  */
#line 740 "soapcpp2_yacc.y"
                        {
                          tmp = sp->node;
                          p = enter(sp->table, (yyvsp[-2].sym));
                          p->info.typ = mkint();
                          p->info.sto = permission;
                          p->tag = (yyvsp[-1].s);
                          p->info.hasval = True;
                          p->info.ptrval = False;
                          p->info.fixed = (yyvsp[0].rec).fixed;
                          p->info.val.i = sp->val;
                          if ((yyvsp[0].rec).hasval)
                          {
                            set_value(p, p->info.typ, &(yyvsp[0].rec));
                            sp->val = p->info.val.i;
                          }
                          if (sp->mask)
                            sp->val <<= 1;
                          else
                            sp->val++;
                          p->info.offset = sp->offset;
                          sp->entry = p;
                        }
#line 3177 "soapcpp2_yacc.c"
    break;

  case 93: /* texpf: texp  */
#line 772 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 3183 "soapcpp2_yacc.c"
    break;

  case 94: /* texpf: tspec ptrs '(' s6 fargso ')'  */
#line 774 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkmethod(tmp.typ, sp->table);
                          transient &= ~1;
                          exitscope();
                        }
#line 3193 "soapcpp2_yacc.c"
    break;

  case 95: /* texpfs: ',' texpf  */
#line 780 "soapcpp2_yacc.y"
                        {
                          semerror("template parameters are restricted to one only");
                        }
#line 3201 "soapcpp2_yacc.c"
    break;

  case 97: /* texp: tspec ptrs array  */
#line 786 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 3207 "soapcpp2_yacc.c"
    break;

  case 98: /* texp: tspec ptrs ID array  */
#line 788 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 3213 "soapcpp2_yacc.c"
    break;

  case 99: /* spec: type  */
#line 795 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = (yyvsp[0].typ);
                          (yyval.rec).sto = Snone;
                          sp->node = (yyval.rec);
                        }
#line 3223 "soapcpp2_yacc.c"
    break;

  case 100: /* spec: store spec  */
#line 800 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = (yyvsp[0].rec).typ;
                          (yyval.rec).sto = (Storage)((int)(yyvsp[-1].sto) | (int)(yyvsp[0].rec).sto);
                          if (((int)(yyval.rec).sto & (int)Sattribute))
                          {
                            if (is_smart((yyvsp[0].rec).typ))
                            {
                              if (!is_primitive_or_string((yyvsp[0].rec).typ->ref) &&
                                  !is_stdstr((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_binary((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_external((Tnode*)(yyvsp[0].rec).typ->ref))
                              {
                                semwarn("invalid attribute smart pointer @type");
                                (yyval.rec).sto = (Storage)((int)(yyval.rec).sto & ~(int)Sattribute);
                              }
                            }
                            else if ((yyvsp[0].rec).typ->type == Tpointer)
                            {
                              if (!is_primitive_or_string((yyvsp[0].rec).typ->ref) &&
                                  !is_stdstr((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_binary((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_external((Tnode*)(yyvsp[0].rec).typ->ref))
                              {
                                semwarn("invalid attribute pointer @type");
                                (yyval.rec).sto = (Storage)((int)(yyval.rec).sto & ~(int)Sattribute);
                              }
                            }
                            else if (
                                !is_primitive_or_string((yyvsp[0].rec).typ) &&
                                !is_stdstr((yyvsp[0].rec).typ) &&
                                !is_binary((yyvsp[0].rec).typ) &&
                                !is_external((yyvsp[0].rec).typ))
                            {
                              semwarn("invalid attribute @type");
                              (yyval.rec).sto = (Storage)((int)(yyval.rec).sto & ~(int)Sattribute);
                            }
                          }
                          sp->node = (yyval.rec);
                          if (((int)(yyvsp[-1].sto) & (int)Sextern))
                            transient = 0;
                        }
#line 3269 "soapcpp2_yacc.c"
    break;

  case 101: /* spec: type spec  */
#line 841 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[-1].typ)->type == Tint)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tchar:       (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              case Tshort:      (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              case Tllong:      (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              default:          semwarn("invalid int type specified");
                                                (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[-1].typ)->type == Tuint)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tchar:       (yyval.rec).typ = mkuchar(); break;
                              case Tshort:      (yyval.rec).typ = mkushort(); break;
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = mkulong(); break;
                              case Tllong:      (yyval.rec).typ = mkullong(); break;
                              default:          semwarn("invalid unsigned type specified");
                                                (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[-1].typ)->type == Tlong)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = mkllong(); break;
                              case Tuint:       (yyval.rec).typ = mkulong(); break;
                              case Tulong:      (yyval.rec).typ = mkullong(); break;
                              case Tdouble:     (yyval.rec).typ = mkldouble(); break;
                              default:          semwarn("invalid use of 'long'");
                                                (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[-1].typ)->type == Tulong)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = mkullong(); break;
                              case Tuint:       (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tulong:      (yyval.rec).typ = mkullong(); break;
                              default:          semwarn("invalid use of 'long'");
                                                (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[0].rec).typ->type == Tint)
                            (yyval.rec).typ = (yyvsp[-1].typ);
                          else
                            semwarn("invalid type specified (missing ';' or type name used as non-type identifier?)");
                          (yyval.rec).sto = (yyvsp[0].rec).sto;
                          sp->node = (yyval.rec);
                        }
#line 3325 "soapcpp2_yacc.c"
    break;

  case 102: /* tspec: store  */
#line 893 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkint();
                          (yyval.rec).sto = (yyvsp[0].sto);
                          sp->node = (yyval.rec);
                          if (((int)(yyvsp[0].sto) & (int)Sextern))
                            transient = 0;
                        }
#line 3337 "soapcpp2_yacc.c"
    break;

  case 103: /* tspec: type  */
#line 900 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = (yyvsp[0].typ);
                          (yyval.rec).sto = Snone;
                          sp->node = (yyval.rec);
                        }
#line 3347 "soapcpp2_yacc.c"
    break;

  case 104: /* tspec: store tspec  */
#line 905 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = (yyvsp[0].rec).typ;
                          (yyval.rec).sto = (Storage)((int)(yyvsp[-1].sto) | (int)(yyvsp[0].rec).sto);
                          if (((int)(yyval.rec).sto & (int)Sattribute))
                          {
                            if (is_smart((yyvsp[0].rec).typ))
                            {
                              if (!is_primitive_or_string((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_stdstr((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_binary((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_external((Tnode*)(yyvsp[0].rec).typ->ref))
                              {
                                semwarn("invalid attribute smart pointer @type");
                                (yyval.rec).sto = (Storage)((int)(yyval.rec).sto & ~(int)Sattribute);
                              }
                            }
                            else if ((yyvsp[0].rec).typ->type == Tpointer)
                            {
                              if (!is_primitive_or_string((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_stdstr((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_binary((Tnode*)(yyvsp[0].rec).typ->ref) &&
                                  !is_external((Tnode*)(yyvsp[0].rec).typ->ref))
                              {
                                semwarn("invalid attribute pointer @type");
                                (yyval.rec).sto = (Storage)((int)(yyval.rec).sto & ~(int)Sattribute);
                              }
                            }
                            else if (
                                !is_primitive_or_string((yyvsp[0].rec).typ) &&
                                !is_stdstr((yyvsp[0].rec).typ) &&
                                !is_binary((yyvsp[0].rec).typ) &&
                                !is_external((yyvsp[0].rec).typ))
                            {
                              semwarn("invalid attribute @type");
                              (yyval.rec).sto = (Storage)((int)(yyval.rec).sto & ~(int)Sattribute);
                            }
                          }
                          sp->node = (yyval.rec);
                          if (((int)(yyvsp[-1].sto) & (int)Sextern))
                            transient = 0;
                        }
#line 3393 "soapcpp2_yacc.c"
    break;

  case 105: /* tspec: type tspec  */
#line 946 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[-1].typ)->type == Tint)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tchar:       (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              case Tshort:      (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              case Tllong:      (yyval.rec).typ = (yyvsp[0].rec).typ; break;
                              default:  semwarn("invalid int type specified");
                                        (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[-1].typ)->type == Tuint)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tchar:       (yyval.rec).typ = mkuchar(); break;
                              case Tshort:      (yyval.rec).typ = mkushort(); break;
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = mkulong(); break;
                              case Tllong:      (yyval.rec).typ = mkullong(); break;
                              default:  semwarn("invalid unsigned type specified");
                                        (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[-1].typ)->type == Tlong)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = mkllong(); break;
                              case Tuint:       (yyval.rec).typ = mkulong(); break;
                              case Tulong:      (yyval.rec).typ = mkullong(); break;
                              case Tdouble:     (yyval.rec).typ = mkldouble(); break;
                              default:  semwarn("invalid use of 'long'");
                                        (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[-1].typ)->type == Tulong)
                            switch ((yyvsp[0].rec).typ->type)
                            {
                              case Tint:        (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tlong:       (yyval.rec).typ = mkullong(); break;
                              case Tuint:       (yyval.rec).typ = (yyvsp[-1].typ); break;
                              case Tulong:      (yyval.rec).typ = mkullong(); break;
                              default:  semwarn("invalid use of 'long'");
                                        (yyval.rec).typ = (yyvsp[0].rec).typ;
                            }
                          else if ((yyvsp[0].rec).typ->type == Tint)
                            (yyval.rec).typ = (yyvsp[-1].typ);
                          else
                            semwarn("invalid type specified (missing ';' or type name used as non-type identifier?)");
                          (yyval.rec).sto = (yyvsp[0].rec).sto;
                          sp->node = (yyval.rec);
                        }
#line 3449 "soapcpp2_yacc.c"
    break;

  case 106: /* type: VOID  */
#line 998 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkvoid(); }
#line 3455 "soapcpp2_yacc.c"
    break;

  case 107: /* type: BOOL  */
#line 999 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkbool(); }
#line 3461 "soapcpp2_yacc.c"
    break;

  case 108: /* type: CHAR  */
#line 1000 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkchar(); }
#line 3467 "soapcpp2_yacc.c"
    break;

  case 109: /* type: WCHAR  */
#line 1001 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkwchart(); }
#line 3473 "soapcpp2_yacc.c"
    break;

  case 110: /* type: SHORT  */
#line 1002 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkshort(); }
#line 3479 "soapcpp2_yacc.c"
    break;

  case 111: /* type: INT  */
#line 1003 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkint(); }
#line 3485 "soapcpp2_yacc.c"
    break;

  case 112: /* type: LONG  */
#line 1004 "soapcpp2_yacc.y"
                        { (yyval.typ) = mklong(); }
#line 3491 "soapcpp2_yacc.c"
    break;

  case 113: /* type: LLONG  */
#line 1005 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkllong(); }
#line 3497 "soapcpp2_yacc.c"
    break;

  case 114: /* type: ULLONG  */
#line 1006 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkullong(); }
#line 3503 "soapcpp2_yacc.c"
    break;

  case 115: /* type: SIZE  */
#line 1007 "soapcpp2_yacc.y"
                        { (yyval.typ) = mksize(); }
#line 3509 "soapcpp2_yacc.c"
    break;

  case 116: /* type: FLOAT  */
#line 1008 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkfloat(); }
#line 3515 "soapcpp2_yacc.c"
    break;

  case 117: /* type: DOUBLE  */
#line 1009 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkdouble(); }
#line 3521 "soapcpp2_yacc.c"
    break;

  case 118: /* type: SIGNED  */
#line 1010 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkint(); }
#line 3527 "soapcpp2_yacc.c"
    break;

  case 119: /* type: UNSIGNED  */
#line 1011 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkuint(); }
#line 3533 "soapcpp2_yacc.c"
    break;

  case 120: /* type: UCHAR  */
#line 1012 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkuchar(); }
#line 3539 "soapcpp2_yacc.c"
    break;

  case 121: /* type: USHORT  */
#line 1013 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkushort(); }
#line 3545 "soapcpp2_yacc.c"
    break;

  case 122: /* type: UINT  */
#line 1014 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkuint(); }
#line 3551 "soapcpp2_yacc.c"
    break;

  case 123: /* type: ULONG  */
#line 1015 "soapcpp2_yacc.y"
                        { (yyval.typ) = mkulong(); }
#line 3557 "soapcpp2_yacc.c"
    break;

  case 124: /* type: TIME  */
#line 1016 "soapcpp2_yacc.y"
                        { (yyval.typ) = mktimet(); }
#line 3563 "soapcpp2_yacc.c"
    break;

  case 125: /* type: TEMPLATE '<' tname id '>' CLASS id  */
#line 1018 "soapcpp2_yacc.y"
                        {
                          if (!(p = entry(templatetable, (yyvsp[0].sym))))
                          {
                            p = enter(templatetable, (yyvsp[0].sym));
                            p->info.typ = mktemplate(NULL, (yyvsp[0].sym));
                            (yyvsp[0].sym)->token = TYPE;
                          }
                          (yyval.typ) = p->info.typ;
                        }
#line 3577 "soapcpp2_yacc.c"
    break;

  case 126: /* type: CLASS '{' s2 decls '}'  */
#line 1028 "soapcpp2_yacc.y"
                        {
                          sym = gensym("_Struct");
                          sprintf(errbuf, "anonymous class will be named '%s'", sym->name);
                          semwarn(errbuf);
                          if ((p = entry(classtable, sym)))
                          {
                            if (p->info.typ->ref || p->info.typ->type != Tclass)
                            {
                              sprintf(errbuf, "class '%s' already declared at %s:%d", sym->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                          }
                          else
                          {
                            p = enter(classtable, sym);
                            p->info.typ = mkclass(NULL, 0);
                          }
                          sym->token = TYPE;
                          sp->table->sym = sym;
                          p->info.typ->ref = sp->table;
                          p->info.typ->width = sp->offset;
                          p->info.typ->id = sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3607 "soapcpp2_yacc.c"
    break;

  case 127: /* type: classid '{' decls '}'  */
#line 1054 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[-3].e)->sym)) && p->info.typ->ref)
                          {
                            if (is_mutable(p))
                            {
                              if (merge((Table*)p->info.typ->ref, sp->table))
                              {
                                sprintf(errbuf, "member name clash in class '%s' declared at %s:%d", (yyvsp[-3].e)->sym->name, p->filename, p->lineno);
                                semerror(errbuf);
                              }
                              p->info.typ->width += sp->offset;
                            }
                          }
                          else
                          {
                            p = reenter(classtable, (yyvsp[-3].e)->sym);
                            p->info.typ->ref = sp->table;
                            p->info.typ->width = sp->offset;
                            p->info.typ->id = p->sym;
                            if (p->info.typ->baseid)
                              sp->table->prev = (Table*)entry(classtable, p->info.typ->baseid)->info.typ->ref;
                          }
                          base_of_derived(p);
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3638 "soapcpp2_yacc.c"
    break;

  case 128: /* type: classid ':' base '{' decls '}'  */
#line 1081 "soapcpp2_yacc.y"
                        {
                          p = reenter(classtable, (yyvsp[-5].e)->sym);
                          if (!(yyvsp[-3].e))
                          {
                            semerror("invalid base class");
                          }
                          else
                          {
                            sp->table->prev = (Table*)(yyvsp[-3].e)->info.typ->ref;
                            if (!sp->table->prev && !(yyvsp[-3].e)->info.typ->transient)
                            {
                              sprintf(errbuf, "class '%s' has incomplete type (if this class is not serializable then declare 'extern class %s')'", (yyvsp[-3].e)->sym->name, (yyvsp[-3].e)->sym->name);
                              semerror(errbuf);
                            }
                            p->info.typ->baseid = (yyvsp[-3].e)->info.typ->id;
                          }
                          p->info.typ->ref = sp->table;
                          p->info.typ->width = sp->offset;
                          p->info.typ->id = p->sym;
                          base_of_derived(p);
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3666 "soapcpp2_yacc.c"
    break;

  case 129: /* type: class  */
#line 1104 "soapcpp2_yacc.y"
                        {
                          (yyvsp[0].e)->info.typ->id = (yyvsp[0].e)->sym;
                          (yyval.typ) = (yyvsp[0].e)->info.typ;
                        }
#line 3675 "soapcpp2_yacc.c"
    break;

  case 130: /* type: STRUCT '{' s2 decls '}'  */
#line 1109 "soapcpp2_yacc.y"
                        {
                          sym = gensym("_Struct");
                          sprintf(errbuf, "anonymous struct will be named '%s'", sym->name);
                          semwarn(errbuf);
                          if ((p = entry(classtable, sym)))
                          {
                            if (p->info.typ->ref || p->info.typ->type != Tstruct)
                            {
                              sprintf(errbuf, "struct '%s' already declared at %s:%d", sym->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                            else
                            {
                              p->info.typ->ref = sp->table;
                              p->info.typ->width = sp->offset;
                            }
                          }
                          else
                          {
                            p = enter(classtable, sym);
                            p->info.typ = mkstruct(sp->table, sp->offset);
                          }
                          sp->table->sym = sym;
                          p->info.typ->id = sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3707 "soapcpp2_yacc.c"
    break;

  case 131: /* type: structid '{' decls '}'  */
#line 1137 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[-3].e)->sym)) && p->info.typ->ref)
                          {
                            if (is_mutable(p))
                            {
                              if (merge((Table*)p->info.typ->ref, sp->table))
                              {
                                sprintf(errbuf, "member name clash in struct '%s' declared at %s:%d", (yyvsp[-3].e)->sym->name, p->filename, p->lineno);
                                semerror(errbuf);
                              }
                              p->info.typ->width += sp->offset;
                            }
                          }
                          else
                          {
                            p = reenter(classtable, (yyvsp[-3].e)->sym);
                            p->info.typ->ref = sp->table;
                            p->info.typ->width = sp->offset;
                            p->info.typ->id = p->sym;
                          }
                          base_of_derived(p);
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3736 "soapcpp2_yacc.c"
    break;

  case 132: /* type: STRUCT id  */
#line 1161 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->type == Tstruct)
                            {
                              (yyval.typ) = p->info.typ;
                            }
                            else
                            {
                              sprintf(errbuf, "'struct '%s' redeclaration (line %d)", (yyvsp[0].sym)->name, p->lineno);
                              semerror(errbuf);
                              (yyval.typ) = mkint();
                            }
                          }
                          else
                          {
                            p = enter(classtable, (yyvsp[0].sym));
                            (yyval.typ) = p->info.typ = mkstruct(NULL, 0);
                            p->info.typ->id = (yyvsp[0].sym);
                          }
                        }
#line 3762 "soapcpp2_yacc.c"
    break;

  case 133: /* type: UNION '{' s3 decls '}'  */
#line 1183 "soapcpp2_yacc.y"
                        {
                          sym = gensym("_Union");
                          sprintf(errbuf, "anonymous union will be named '%s'", sym->name);
                          semwarn(errbuf);
                          if ((p = entry(classtable, sym)))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "union or struct '%s' already declared at %s:%d", sym->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                            else
                            {
                              p->info.typ->ref = sp->table;
                              p->info.typ->width = sp->offset;
                            }
                          }
                          else
                          {
                            p = enter(classtable, sym);
                            p->info.typ = mkunion(sp->table, sp->offset);
                          }
                          sp->table->sym = sym;
                          p->info.typ->id = sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3794 "soapcpp2_yacc.c"
    break;

  case 134: /* type: unionid '{' decls '}'  */
#line 1211 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[-3].e)->sym)) && p->info.typ->ref)
                          {
                            if (is_mutable(p))
                            {
                              if (merge((Table*)p->info.typ->ref, sp->table))
                              {
                                sprintf(errbuf, "member name clash in union '%s' declared at line %d", (yyvsp[-3].e)->sym->name, p->lineno);
                                semerror(errbuf);
                              }
                              if (p->info.typ->width < sp->offset)
                                p->info.typ->width = sp->offset;
                            }
                          }
                          else
                          {
                            p = reenter(classtable, (yyvsp[-3].e)->sym);
                            p->info.typ->ref = sp->table;
                            p->info.typ->width = sp->offset;
                            p->info.typ->id = p->sym;
                          }
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3823 "soapcpp2_yacc.c"
    break;

  case 135: /* type: UNION id  */
#line 1235 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->type == Tunion)
                            {
                              (yyval.typ) = p->info.typ;
                            }
                            else
                            {
                              sprintf(errbuf, "'union %s' redeclaration (line %d)", (yyvsp[0].sym)->name, p->lineno);
                              semerror(errbuf);
                              (yyval.typ) = mkint();
                            }
                          }
                          else
                          {
                            p = enter(classtable, (yyvsp[0].sym));
                            (yyval.typ) = p->info.typ = mkunion(NULL, 0);
                            p->info.typ->id = (yyvsp[0].sym);
                          }
                        }
#line 3849 "soapcpp2_yacc.c"
    break;

  case 136: /* type: ENUM '{' s2 dclrs s5 '}'  */
#line 1257 "soapcpp2_yacc.y"
                        {
                          sym = gensym("_Enum");
                          sprintf(errbuf, "anonymous enum will be named '%s'", sym->name);
                          semwarn(errbuf);
                          if ((p = entry(enumtable, sym)))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "enum '%s' already declared at %s:%d", sym->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                            else
                            {
                              p->info.typ->ref = sp->table;
                              p->info.typ->width = 4; /* 4 = enum */
                            }
                          }
                          else
                          {
                            p = enter(enumtable, sym);
                            p->info.typ = mkenum(sp->table);
                          }
                          p->info.typ->id = sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3880 "soapcpp2_yacc.c"
    break;

  case 137: /* type: ENUM '*' '{' s4 dclrs s5 '}'  */
#line 1284 "soapcpp2_yacc.y"
                        {
                          sym = gensym("_Enum");
                          sprintf(errbuf, "anonymous enum will be named '%s'", sym->name);
                          semwarn(errbuf);
                          if ((p = entry(enumtable, sym)))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "enum '%s' already declared at %s:%d", sym->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                            else
                            {
                              p->info.typ->ref = sp->table;
                              p->info.typ->width = 9; /* 9 = mask */
                            }
                          }
                          else
                          {
                            p = enter(enumtable, sym);
                            p->info.typ = mkmask(sp->table);
                          }
                          p->info.typ->id = sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3911 "soapcpp2_yacc.c"
    break;

  case 138: /* type: enum '{' s2 dclrs s5 '}'  */
#line 1311 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-5].e)->sym)))
                            if (!p->info.typ->ref)
                              p->info.typ->ref = sp->table;
                          p->info.typ->id = (yyvsp[-5].e)->sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3924 "soapcpp2_yacc.c"
    break;

  case 139: /* type: enumsc '{' s2 dclrs s5 '}'  */
#line 1320 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-5].e)->sym)))
                            if (!p->info.typ->ref)
                              p->info.typ->ref = sp->table;
                          p->info.typ->id = (yyvsp[-5].e)->sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3937 "soapcpp2_yacc.c"
    break;

  case 140: /* type: mask '{' s4 dclrs s5 '}'  */
#line 1329 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-5].e)->sym)))
                          {
                            if (!p->info.typ->ref)
                            {
                              p->info.typ->ref = sp->table;
                              p->info.typ->width = 9; /* 9 = mask */
                            }
                          }
                          p->info.typ->id = (yyvsp[-5].e)->sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3955 "soapcpp2_yacc.c"
    break;

  case 141: /* type: masksc '{' s4 dclrs s5 '}'  */
#line 1343 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-5].e)->sym)))
                          {
                            if (!p->info.typ->ref)
                            {
                              p->info.typ->ref = sp->table;
                              p->info.typ->width = 9; /* 9 = mask */
                            }
                          }
                          p->info.typ->id = (yyvsp[-5].e)->sym;
                          (yyval.typ) = p->info.typ;
                          exitscope();
                        }
#line 3973 "soapcpp2_yacc.c"
    break;

  case 142: /* type: ENUM id  */
#line 1356 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->type != Tenum)
                            {
                              sprintf(errbuf, "'enum %s' used where enum class is expected", (yyvsp[0].sym)->name);
                              semwarn(errbuf);
                            }
                            (yyval.typ) = p->info.typ;
                          }
                          else
                          {
                            p = enter(enumtable, (yyvsp[0].sym));
                            (yyval.typ) = p->info.typ = mkenum(NULL);
                            p->info.typ->id = (yyvsp[0].sym);
                          }
                        }
#line 3995 "soapcpp2_yacc.c"
    break;

  case 143: /* type: ENUM sc  */
#line 1373 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->type != Tenumsc)
                            {
                              sprintf(errbuf, "'enum class %s' used where enum is expected", (yyvsp[0].sym)->name);
                              semwarn(errbuf);
                            }
                            (yyval.typ) = p->info.typ;
                          }
                          else
                          {
                            p = enter(enumtable, (yyvsp[0].sym));
                            (yyval.typ) = p->info.typ = mkenumsc(NULL);
                            p->info.typ->id = (yyvsp[0].sym);
                            (yyvsp[0].sym)->token = TYPE;
                          }
                        }
#line 4018 "soapcpp2_yacc.c"
    break;

  case 144: /* type: TYPE  */
#line 1391 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(typetable, (yyvsp[0].sym))))
                          {
                            (yyval.typ) = p->info.typ;
                          }
                          else if ((p = entry(classtable, (yyvsp[0].sym))))
                          {
                            (yyval.typ) = p->info.typ;
                          }
                          else if ((p = entry(enumtable, (yyvsp[0].sym))))
                          {
                            (yyval.typ) = p->info.typ;
                          }
                          else if ((yyvsp[0].sym) == lookup("std::string") || (yyvsp[0].sym) == lookup("std::wstring"))
                          {
                            p = enter(classtable, (yyvsp[0].sym));
                            (yyval.typ) = p->info.typ = mkclass(NULL, 8);
                            p->info.typ->id = (yyvsp[0].sym);
                            if (cflag)
                              p->info.typ->transient = 1;       /* make std::string transient in C */
                            else
                              p->info.typ->transient = -2;      /* otherwise volatile in C++ */
                          }
                          else if ((p = entry(templatetable, (yyvsp[0].sym))) ||
                              (yyvsp[0].sym) == lookup("std::deque") ||
                              (yyvsp[0].sym) == lookup("std::list") ||
                              (yyvsp[0].sym) == lookup("std::vector") ||
                              (yyvsp[0].sym) == lookup("std::set") ||
                              (yyvsp[0].sym) == lookup("std::queue") ||
                              (yyvsp[0].sym) == lookup("std::stack") ||
                              (yyvsp[0].sym) == lookup("std::shared_ptr") ||
                              (yyvsp[0].sym) == lookup("std::unique_ptr") ||
                              (yyvsp[0].sym) == lookup("std::auto_ptr") ||
                              (yyvsp[0].sym) == lookup("std::optional") ||
                              (yyvsp[0].sym) == lookup("std::weak_ptr") ||
                              (yyvsp[0].sym) == lookup("std::function"))
                          {
                            sprintf(errbuf, "at least one template type parameter T is required with %s<T>", (yyvsp[0].sym)->name);
                            semerror(errbuf);
                            (yyval.typ) = mkint();
                          }
                          else
                          {
                            sprintf(errbuf, "unknown type '%s'", (yyvsp[0].sym)->name);
                            semerror(errbuf);
                            (yyval.typ) = mkint();
                          }
                        }
#line 4071 "soapcpp2_yacc.c"
    break;

  case 145: /* type: TYPE '<' texpf texpfs '>'  */
#line 1440 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(templatetable, (yyvsp[-4].sym))))
                          {
                            (yyval.typ) = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                            if (p->info.typ->transient)
                              (yyval.typ)->transient = p->info.typ->transient;
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::deque"))
                          {
                            add_pragma("#include <deque>");
                            p = enter(templatetable, (yyvsp[-4].sym));
                            (yyval.typ) = p->info.typ = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::list"))
                          {
                            add_pragma("#include <list>");
                            p = enter(templatetable, (yyvsp[-4].sym));
                            (yyval.typ) = p->info.typ = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::vector"))
                          {
                            add_pragma("#include <vector>");
                            p = enter(templatetable, (yyvsp[-4].sym));
                            (yyval.typ) = p->info.typ = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::set"))
                          {
                            add_pragma("#include <set>");
                            p = enter(templatetable, (yyvsp[-4].sym));
                            (yyval.typ) = p->info.typ = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::queue"))
                          {
                            add_pragma("#include <queue>");
                            p = enter(templatetable, (yyvsp[-4].sym));
                            (yyval.typ) = p->info.typ = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                            (yyval.typ)->transient = 1; /* not serializable */
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::stack"))
                          {
                            add_pragma("#include <stack>");
                            p = enter(templatetable, (yyvsp[-4].sym));
                            (yyval.typ) = p->info.typ = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                            (yyval.typ)->transient = 1; /* not serializable */
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::shared_ptr") ||
                              (yyvsp[-4].sym) == lookup("std::unique_ptr") ||
                              (yyvsp[-4].sym) == lookup("std::auto_ptr"))
                          {
                            (yyval.typ) = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                            (yyval.typ)->transient = -2; /* volatile indicates smart pointer template */
                            if (!c11flag)
                              semwarn("To use smart pointers you should also use wsdl2h and soapcpp2 with option -c++11 or -c++14 or -c++17");
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::optional"))
                          {
                            (yyval.typ) = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                            (yyval.typ)->transient = -2; /* volatile indicates smart pointer or optional template */
                            if (!c11flag)
                              semwarn("To use std::optional you should also use wsdl2h and soapcpp2 with option -c++17");
                          }
                          else if ((yyvsp[-4].sym) == lookup("std::weak_ptr") ||
                              (yyvsp[-4].sym) == lookup("std::function"))
                          {
                            (yyval.typ) = mktemplate((yyvsp[-2].rec).typ, (yyvsp[-4].sym));
                            (yyval.typ)->transient = 1; /* not serializable */
                          }
                          else
                          {
                            semerror("undefined template type");
                            (yyval.typ) = mkint();
                          }
                        }
#line 4149 "soapcpp2_yacc.c"
    break;

  case 146: /* type: TYPE '<' '>'  */
#line 1513 "soapcpp2_yacc.y"
                        {
                          semerror("at least one template parameter is required");
                          (yyval.typ) = mkint();
                        }
#line 4158 "soapcpp2_yacc.c"
    break;

  case 147: /* type: error ID error  */
#line 1518 "soapcpp2_yacc.y"
                        {
                          sprintf(errbuf, "undeclared '%s'", (yyvsp[-1].sym)->name);
                          synerror(errbuf);
                          (yyval.typ) = mkint();
                        }
#line 4168 "soapcpp2_yacc.c"
    break;

  case 148: /* type: error ID '>'  */
#line 1523 "soapcpp2_yacc.y"
                        {
                          sprintf(errbuf, "perhaps trying to use a template with an undefined type parameter '%s'?", (yyvsp[-1].sym)->name);
                          synerror(errbuf);
                          (yyval.typ) = mkint();
                        }
#line 4178 "soapcpp2_yacc.c"
    break;

  case 149: /* type: error '>'  */
#line 1528 "soapcpp2_yacc.y"
                        {
                          synerror("perhaps trying to use an undefined template or template with a non-type template parameter? Declare 'template <typename T> class name'");
                          (yyval.typ) = mkint();
                        }
#line 4187 "soapcpp2_yacc.c"
    break;

  case 150: /* type: CLASS error '}'  */
#line 1533 "soapcpp2_yacc.y"
                        {
                          synerror("malformed class definition (use spacing around ':' to separate derived : base)");
                          yyerrok;
                          (yyval.typ) = mkint();
                        }
#line 4197 "soapcpp2_yacc.c"
    break;

  case 151: /* type: STRUCT error '}'  */
#line 1539 "soapcpp2_yacc.y"
                        {
                          synerror("malformed struct definition");
                          yyerrok;
                          (yyval.typ) = mkint();
                        }
#line 4207 "soapcpp2_yacc.c"
    break;

  case 152: /* type: UNION error '}'  */
#line 1545 "soapcpp2_yacc.y"
                        {
                          synerror("malformed union definition");
                          yyerrok;
                          (yyval.typ) = mkint();
                        }
#line 4217 "soapcpp2_yacc.c"
    break;

  case 153: /* type: ENUM error '}'  */
#line 1551 "soapcpp2_yacc.y"
                        {
                          synerror("malformed enum definition");
                          yyerrok;
                          (yyval.typ) = mkint();
                        }
#line 4227 "soapcpp2_yacc.c"
    break;

  case 154: /* structid: struct s2  */
#line 1557 "soapcpp2_yacc.y"
                        {
                          sp->table->sym = (yyvsp[-1].e)->sym;
                          (yyval.e) = (yyvsp[-1].e);
                        }
#line 4236 "soapcpp2_yacc.c"
    break;

  case 155: /* struct: STRUCT id  */
#line 1562 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              if (!is_mutable(p))
                              {
                                sprintf(errbuf, "struct '%s' already declared at %s:%d", (yyvsp[0].sym)->name, p->filename, p->lineno);
                                semerror(errbuf);
                              }
                            }
                            else
                            {
                              p = reenter(classtable, (yyvsp[0].sym));
                            }
                            p->info.typ->transient = transient;
                          }
                          else
                          {
                            p = enter(classtable, (yyvsp[0].sym));
                            p->info.typ = mkstruct(NULL, 0);
                          }
                          (yyval.e) = p;
                        }
#line 4265 "soapcpp2_yacc.c"
    break;

  case 156: /* classid: class s2  */
#line 1587 "soapcpp2_yacc.y"
                        {
                          sp->table->sym = (yyvsp[-1].e)->sym;
                          (yyval.e) = (yyvsp[-1].e);
                        }
#line 4274 "soapcpp2_yacc.c"
    break;

  case 157: /* class: CLASS id  */
#line 1592 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              if (!is_mutable(p))
                              {
                                sprintf(errbuf, "class '%s' already declared at %s:%d (redundant 'class' specifier here?)", (yyvsp[0].sym)->name, p->filename, p->lineno);
                                semerror(errbuf);
                              }
                            }
                            else
                            {
                              p = reenter(classtable, (yyvsp[0].sym));
                            }
                            p->info.typ->transient = transient;
                          }
                          else
                          {
                            p = enter(classtable, (yyvsp[0].sym));
                            p->info.typ = mkclass(NULL, 0);
                            p->info.typ->id = p->sym;
                          }
                          (yyvsp[0].sym)->token = TYPE;
                          (yyval.e) = p;
                        }
#line 4305 "soapcpp2_yacc.c"
    break;

  case 158: /* unionid: union s3  */
#line 1619 "soapcpp2_yacc.y"
                        {
                          sp->table->sym = (yyvsp[-1].e)->sym;
                          (yyval.e) = (yyvsp[-1].e);
                        }
#line 4314 "soapcpp2_yacc.c"
    break;

  case 159: /* union: UNION id  */
#line 1624 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(classtable, (yyvsp[0].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              if (!is_mutable(p))
                              {
                                sprintf(errbuf, "union '%s' already declared at %s:%d", (yyvsp[0].sym)->name, p->filename, p->lineno);
                                semerror(errbuf);
                              }
                            }
                            else
                            {
                              p = reenter(classtable, (yyvsp[0].sym));
                            }
                            p->info.typ->transient = transient;
                          }
                          else
                          {
                            p = enter(classtable, (yyvsp[0].sym));
                            p->info.typ = mkunion(NULL, 0);
                          }
                          (yyval.e) = p;
                        }
#line 4343 "soapcpp2_yacc.c"
    break;

  case 160: /* enum: ENUM id utype  */
#line 1649 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-1].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "enum '%s' already declared at %s:%d", (yyvsp[-1].sym)->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                          }
                          else
                          {
                            p = enter(enumtable, (yyvsp[-1].sym));
                            p->info.typ = mkenum(0);
                          }
                          p->info.typ->width = (int)(yyvsp[0].i);
                          (yyval.e) = p;
                        }
#line 4365 "soapcpp2_yacc.c"
    break;

  case 161: /* enumsc: ENUM sc utype  */
#line 1667 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-1].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "enum '%s' already declared at %s:%d", (yyvsp[-1].sym)->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                          }
                          else
                          {
                            p = enter(enumtable, (yyvsp[-1].sym));
                            p->info.typ = mkenumsc(0);
                          }
                          p->info.typ->width = (int)(yyvsp[0].i);
                          (yyvsp[-1].sym)->token = TYPE;
                          (yyval.e) = p;
                        }
#line 4388 "soapcpp2_yacc.c"
    break;

  case 162: /* mask: ENUM '*' id utype  */
#line 1687 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-1].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "enum '%s' already declared at %s:%d", (yyvsp[-1].sym)->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                            else
                            {
                              p->info.typ = mkmask(0);
                            }
                          }
                          else
                          {
                            p = enter(enumtable, (yyvsp[-1].sym));
                            p->info.typ = mkmask(0);
                          }
                          (yyval.e) = p;
                        }
#line 4413 "soapcpp2_yacc.c"
    break;

  case 163: /* masksc: ENUM '*' sc utype  */
#line 1709 "soapcpp2_yacc.y"
                        {
                          if ((p = entry(enumtable, (yyvsp[-1].sym))))
                          {
                            if (p->info.typ->ref)
                            {
                              sprintf(errbuf, "enum '%s' already declared at %s:%d", (yyvsp[-1].sym)->name, p->filename, p->lineno);
                              semerror(errbuf);
                            }
                            else
                            {
                              p->info.typ = mkmasksc(0);
                            }
                          }
                          else
                          {
                            p = enter(enumtable, (yyvsp[-1].sym));
                            p->info.typ = mkmasksc(0);
                          }
                          (yyvsp[-1].sym)->token = TYPE;
                          (yyval.e) = p;
                        }
#line 4439 "soapcpp2_yacc.c"
    break;

  case 164: /* sc: STRUCT id  */
#line 1731 "soapcpp2_yacc.y"
                        {
                          (yyval.sym) = (yyvsp[0].sym);
                          if (!c11flag)
                            semwarn("To use scoped enumerations (enum class) you should also use wsdl2h and soapcpp2 with option -c++11 or -c++14 or -c++17");
                        }
#line 4449 "soapcpp2_yacc.c"
    break;

  case 165: /* sc: CLASS id  */
#line 1736 "soapcpp2_yacc.y"
                        {
                          (yyval.sym) = (yyvsp[0].sym);
                          if (!c11flag)
                            semwarn("To use scoped enumerations (enum class) you must also use wsdl2h and soapcpp2 with option -c++11 or -c++14 or -c++17");
                        }
#line 4459 "soapcpp2_yacc.c"
    break;

  case 166: /* utype: ':' CHAR  */
#line 1742 "soapcpp2_yacc.y"
                        { (yyval.i) = 1; }
#line 4465 "soapcpp2_yacc.c"
    break;

  case 167: /* utype: ':' WCHAR  */
#line 1743 "soapcpp2_yacc.y"
                        { (yyval.i) = 4; }
#line 4471 "soapcpp2_yacc.c"
    break;

  case 168: /* utype: ':' SHORT  */
#line 1744 "soapcpp2_yacc.y"
                        { (yyval.i) = 2; }
#line 4477 "soapcpp2_yacc.c"
    break;

  case 169: /* utype: ':' INT  */
#line 1745 "soapcpp2_yacc.y"
                        { (yyval.i) = 4; }
#line 4483 "soapcpp2_yacc.c"
    break;

  case 170: /* utype: ':' LONG  */
#line 1746 "soapcpp2_yacc.y"
                        { (yyval.i) = 4; }
#line 4489 "soapcpp2_yacc.c"
    break;

  case 171: /* utype: ':' LLONG  */
#line 1747 "soapcpp2_yacc.y"
                        { (yyval.i) = 8; }
#line 4495 "soapcpp2_yacc.c"
    break;

  case 172: /* utype: ':' TYPE  */
#line 1748 "soapcpp2_yacc.y"
                        {
                          (yyval.i) = 4;
                          p = entry(typetable, (yyvsp[0].sym));
                          if (!p)
                            p = entry(enumtable, (yyvsp[0].sym));
                          if (!p)
                            semerror("enum underlying type must be one of int8_t, int16_t, int32_t, int64_t");
                          else
                            (yyval.i) = p->info.typ->width;
                        }
#line 4510 "soapcpp2_yacc.c"
    break;

  case 173: /* utype: ':'  */
#line 1758 "soapcpp2_yacc.y"
                        {
                          semerror("enum underlying type must be one of int8_t, int16_t, int32_t, int64_t");
                          (yyval.i) = 4;
                        }
#line 4519 "soapcpp2_yacc.c"
    break;

  case 174: /* utype: %empty  */
#line 1762 "soapcpp2_yacc.y"
                        { (yyval.i) = 4; /* 4 = enum */ }
#line 4525 "soapcpp2_yacc.c"
    break;

  case 175: /* tname: CLASS  */
#line 1764 "soapcpp2_yacc.y"
                        { }
#line 4531 "soapcpp2_yacc.c"
    break;

  case 176: /* tname: STRUCT  */
#line 1765 "soapcpp2_yacc.y"
                        { }
#line 4537 "soapcpp2_yacc.c"
    break;

  case 177: /* tname: TYPENAME  */
#line 1766 "soapcpp2_yacc.y"
                        { }
#line 4543 "soapcpp2_yacc.c"
    break;

  case 178: /* base: PROTECTED base  */
#line 1769 "soapcpp2_yacc.y"
                        { (yyval.e) = (yyvsp[0].e); }
#line 4549 "soapcpp2_yacc.c"
    break;

  case 179: /* base: PRIVATE base  */
#line 1770 "soapcpp2_yacc.y"
                        { (yyval.e) = (yyvsp[0].e); }
#line 4555 "soapcpp2_yacc.c"
    break;

  case 180: /* base: PUBLIC base  */
#line 1771 "soapcpp2_yacc.y"
                        { (yyval.e) = (yyvsp[0].e); }
#line 4561 "soapcpp2_yacc.c"
    break;

  case 181: /* base: TYPE  */
#line 1772 "soapcpp2_yacc.y"
                        {
                          (yyval.e) = entry(classtable, (yyvsp[0].sym));
                          if (!(yyval.e))
                          {
                            p = entry(typetable, (yyvsp[0].sym));
                            if (p && (p->info.typ->type == Tclass || p->info.typ->type == Tstruct))
                              (yyval.e) = p;
                          }
                        }
#line 4575 "soapcpp2_yacc.c"
    break;

  case 182: /* base: STRUCT id  */
#line 1781 "soapcpp2_yacc.y"
                        { (yyval.e) = entry(classtable, (yyvsp[0].sym));
                          if (!(yyval.e))
                          {
                            (yyval.e) = p = enter(classtable, (yyvsp[0].sym));
                            p->info.typ = mkstruct(NULL, 0);
                            p->info.typ->id = (yyvsp[0].sym);
                          }
                        }
#line 4588 "soapcpp2_yacc.c"
    break;

  case 183: /* base: CLASS id  */
#line 1789 "soapcpp2_yacc.y"
                        { (yyval.e) = entry(classtable, (yyvsp[0].sym));
                          if (!(yyval.e))
                          {
                            (yyval.e) = p = enter(classtable, (yyvsp[0].sym));
                            p->info.typ = mkclass(NULL, 0);
                            p->info.typ->id = p->sym;
                            (yyvsp[0].sym)->token = TYPE;
                          }
                        }
#line 4602 "soapcpp2_yacc.c"
    break;

  case 184: /* s2: %empty  */
#line 1799 "soapcpp2_yacc.y"
                        {
                          if (transient <= -2)
                            transient = 0;
                          permission = 0;
                          enterscope(mktable(NULL), 0);
                          sp->entry = NULL;
                        }
#line 4614 "soapcpp2_yacc.c"
    break;

  case 185: /* s3: %empty  */
#line 1807 "soapcpp2_yacc.y"
                        {
                          if (transient <= -2)
                            transient = 0;
                          permission = 0;
                          enterscope(mktable(NULL), 0);
                          sp->entry = NULL;
                          sp->grow = False;
                        }
#line 4627 "soapcpp2_yacc.c"
    break;

  case 186: /* s4: %empty  */
#line 1816 "soapcpp2_yacc.y"
                        {
                          enterscope(mktable(NULL), 0);
                          sp->entry = NULL;
                          sp->mask = True;
                          sp->val = 1;
                        }
#line 4638 "soapcpp2_yacc.c"
    break;

  case 187: /* s5: %empty  */
#line 1823 "soapcpp2_yacc.y"
                        { }
#line 4644 "soapcpp2_yacc.c"
    break;

  case 188: /* s5: ','  */
#line 1824 "soapcpp2_yacc.y"
                        { }
#line 4650 "soapcpp2_yacc.c"
    break;

  case 189: /* s6: %empty  */
#line 1826 "soapcpp2_yacc.y"
                        {
                          if (sp->table->level == INTERNAL)
                            transient |= 1;
                          permission = 0;
                          enterscope(mktable(NULL), 0);
                          sp->entry = NULL;
                          sp->table->level = PARAM;
                        }
#line 4663 "soapcpp2_yacc.c"
    break;

  case 190: /* store: AUTO  */
#line 1835 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sauto; }
#line 4669 "soapcpp2_yacc.c"
    break;

  case 191: /* store: REGISTER  */
#line 1836 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sregister; }
#line 4675 "soapcpp2_yacc.c"
    break;

  case 192: /* store: STATIC  */
#line 1837 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sstatic; }
#line 4681 "soapcpp2_yacc.c"
    break;

  case 193: /* store: EXPLICIT  */
#line 1838 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sexplicit; }
#line 4687 "soapcpp2_yacc.c"
    break;

  case 194: /* store: EXTERN  */
#line 1839 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sextern; transient = 1; }
#line 4693 "soapcpp2_yacc.c"
    break;

  case 195: /* store: TYPEDEF  */
#line 1840 "soapcpp2_yacc.y"
                        { (yyval.sto) = Stypedef; }
#line 4699 "soapcpp2_yacc.c"
    break;

  case 196: /* store: VIRTUAL  */
#line 1841 "soapcpp2_yacc.y"
                        { (yyval.sto) = Svirtual; }
#line 4705 "soapcpp2_yacc.c"
    break;

  case 197: /* store: CONST  */
#line 1842 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sconst; }
#line 4711 "soapcpp2_yacc.c"
    break;

  case 198: /* store: FINAL  */
#line 1843 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sfinal; }
#line 4717 "soapcpp2_yacc.c"
    break;

  case 199: /* store: OVERRIDE  */
#line 1844 "soapcpp2_yacc.y"
                        { (yyval.sto) = Soverride; }
#line 4723 "soapcpp2_yacc.c"
    break;

  case 200: /* store: FRIEND  */
#line 1845 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sfriend; }
#line 4729 "soapcpp2_yacc.c"
    break;

  case 201: /* store: INLINE  */
#line 1846 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sinline; }
#line 4735 "soapcpp2_yacc.c"
    break;

  case 202: /* store: MUSTUNDERSTAND  */
#line 1848 "soapcpp2_yacc.y"
                        { (yyval.sto) = SmustUnderstand; }
#line 4741 "soapcpp2_yacc.c"
    break;

  case 203: /* store: RETURN  */
#line 1849 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sreturn; }
#line 4747 "soapcpp2_yacc.c"
    break;

  case 204: /* store: '@'  */
#line 1850 "soapcpp2_yacc.y"
                        {
                          (yyval.sto) = Sattribute;
                          if (eflag)
                            semwarn("SOAP RPC encoding does not support XML attributes");
                        }
#line 4757 "soapcpp2_yacc.c"
    break;

  case 205: /* store: '$'  */
#line 1855 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sspecial; }
#line 4763 "soapcpp2_yacc.c"
    break;

  case 206: /* store: VOLATILE  */
#line 1856 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sextern; transient = -2; }
#line 4769 "soapcpp2_yacc.c"
    break;

  case 207: /* store: MUTABLE  */
#line 1857 "soapcpp2_yacc.y"
                        { (yyval.sto) = Smutable; transient = -4; }
#line 4775 "soapcpp2_yacc.c"
    break;

  case 208: /* const: %empty  */
#line 1859 "soapcpp2_yacc.y"
                        { (yyval.sto) = Snone; }
#line 4781 "soapcpp2_yacc.c"
    break;

  case 209: /* const: const CONST  */
#line 1860 "soapcpp2_yacc.y"
                        { (yyval.sto) = (Storage)((int)(yyvsp[-1].sto) | (int)Sconstobj); }
#line 4787 "soapcpp2_yacc.c"
    break;

  case 210: /* const: const FINAL  */
#line 1861 "soapcpp2_yacc.y"
                        { (yyval.sto) = (Storage)((int)(yyvsp[-1].sto) | (int)Sfinal); }
#line 4793 "soapcpp2_yacc.c"
    break;

  case 211: /* const: const OVERRIDE  */
#line 1863 "soapcpp2_yacc.y"
                        { (yyval.sto) = (Storage)((int)(yyvsp[-1].sto) | (int)Soverride); }
#line 4799 "soapcpp2_yacc.c"
    break;

  case 212: /* abstract: %empty  */
#line 1865 "soapcpp2_yacc.y"
                        { (yyval.sto) = Snone; }
#line 4805 "soapcpp2_yacc.c"
    break;

  case 213: /* abstract: '=' LNG  */
#line 1866 "soapcpp2_yacc.y"
                        { (yyval.sto) = Sabstract; }
#line 4811 "soapcpp2_yacc.c"
    break;

  case 214: /* virtual: %empty  */
#line 1868 "soapcpp2_yacc.y"
                        { (yyval.sto) = Snone; }
#line 4817 "soapcpp2_yacc.c"
    break;

  case 215: /* virtual: VIRTUAL  */
#line 1869 "soapcpp2_yacc.y"
                        { (yyval.sto) = Svirtual; }
#line 4823 "soapcpp2_yacc.c"
    break;

  case 216: /* ptrs: %empty  */
#line 1871 "soapcpp2_yacc.y"
                        { (yyval.rec) = tmp = sp->node; }
#line 4829 "soapcpp2_yacc.c"
    break;

  case 217: /* ptrs: ptrs '*'  */
#line 1872 "soapcpp2_yacc.y"
                        {
                          /* handle const pointers, such as const char* */
                          if (((int)tmp.sto & (int)Sconst))
                            tmp.sto = (Storage)(((int)tmp.sto & ~(int)Sconst) | (int)Sconstptr);
                          tmp.typ = mkpointer(tmp.typ);
                          tmp.typ->transient = transient;
                          (yyval.rec) = tmp;
                        }
#line 4842 "soapcpp2_yacc.c"
    break;

  case 218: /* ptrs: ptrs '&'  */
#line 1880 "soapcpp2_yacc.y"
                        {
                          tmp.typ = mkreference(tmp.typ);
                          tmp.typ->transient = transient;
                          (yyval.rec) = tmp;
                        }
#line 4852 "soapcpp2_yacc.c"
    break;

  case 219: /* ptrs: ptrs AN  */
#line 1885 "soapcpp2_yacc.y"
                        {
                          tmp.typ = mkrvalueref(tmp.typ);
                          tmp.typ->transient = transient;
                          (yyval.rec) = tmp;
                        }
#line 4862 "soapcpp2_yacc.c"
    break;

  case 220: /* array: %empty  */
#line 1891 "soapcpp2_yacc.y"
                        { (yyval.rec) = tmp; }
#line 4868 "soapcpp2_yacc.c"
    break;

  case 221: /* array: '[' cexp ']' array  */
#line 1893 "soapcpp2_yacc.y"
                        {
                          if (!bflag && (yyvsp[0].rec).typ->type == Tchar)
                          {
                            sprintf(errbuf, "char[" SOAP_LONG_FORMAT "] will be serialized as an array of " SOAP_LONG_FORMAT " bytes: use soapcpp2 option -b to enable char[] string serialization or use char* for strings", (yyvsp[-2].rec).val.i, (yyvsp[-2].rec).val.i);
                            semwarn(errbuf);
                          }
                          if ((yyvsp[-2].rec).hasval && (yyvsp[-2].rec).typ->type == Tint && (yyvsp[-2].rec).val.i > 0 && (yyvsp[0].rec).typ->width > 0)
                          {
                            (yyval.rec).typ = mkarray((yyvsp[0].rec).typ, (int) (yyvsp[-2].rec).val.i * (yyvsp[0].rec).typ->width);
                          }
                          else
                          {
                            (yyval.rec).typ = mkarray((yyvsp[0].rec).typ, 0);
                            semerror("undetermined array size");
                          }
                          (yyval.rec).sto = (yyvsp[0].rec).sto;
                        }
#line 4890 "soapcpp2_yacc.c"
    break;

  case 222: /* array: '[' ']' array  */
#line 1910 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkpointer((yyvsp[0].rec).typ); /* zero size array = pointer */
                          (yyval.rec).sto = (yyvsp[0].rec).sto;
                        }
#line 4899 "soapcpp2_yacc.c"
    break;

  case 223: /* arrayck: array  */
#line 1915 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).typ->type == Tstruct || (yyvsp[0].rec).typ->type == Tclass)
                          {
                            if (!(yyvsp[0].rec).typ->ref && !(yyvsp[0].rec).typ->transient && !((int)(yyvsp[0].rec).sto & (int)Stypedef))
                            {
                              if ((yyvsp[0].rec).typ->type == Tstruct)
                                sprintf(errbuf, "struct '%s' has incomplete type (if this struct is not serializable then declare 'extern struct %s')", (yyvsp[0].rec).typ->id->name, (yyvsp[0].rec).typ->id->name);
                              else
                                sprintf(errbuf, "class '%s' has incomplete type (if this class is not serializable then declare 'extern class %s')", (yyvsp[0].rec).typ->id->name, (yyvsp[0].rec).typ->id->name);
                              semerror(errbuf);
                            }
                          }
                          (yyval.rec) = (yyvsp[0].rec);
                        }
#line 4918 "soapcpp2_yacc.c"
    break;

  case 224: /* brinit: init  */
#line 1930 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 4924 "soapcpp2_yacc.c"
    break;

  case 225: /* brinit: '{' cexp '}'  */
#line 1931 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[-1].rec).hasval)
                          {
                            (yyval.rec).typ = (yyvsp[-1].rec).typ;
                            (yyval.rec).hasval = True;
                            (yyval.rec).fixed = False;
                            (yyval.rec).val = (yyvsp[-1].rec).val;
                          }
                          else
                          {
                            (yyval.rec).hasval = False;
                            semerror("initialization expression not constant");
                          }
                        }
#line 4943 "soapcpp2_yacc.c"
    break;

  case 226: /* init: %empty  */
#line 1946 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).hasval = False;
                          (yyval.rec).fixed = False;
                        }
#line 4952 "soapcpp2_yacc.c"
    break;

  case 227: /* init: '=' cexp  */
#line 1950 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).hasval)
                          {
                            (yyval.rec).typ = (yyvsp[0].rec).typ;
                            (yyval.rec).hasval = True;
                            (yyval.rec).fixed = False;
                            (yyval.rec).val = (yyvsp[0].rec).val;
                          }
                          else
                          {
                            (yyval.rec).hasval = False;
                            semerror("initialization expression not constant");
                          }
                        }
#line 4971 "soapcpp2_yacc.c"
    break;

  case 228: /* init: EQ cexp  */
#line 1964 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).hasval)
                          {
                            (yyval.rec).typ = (yyvsp[0].rec).typ;
                            (yyval.rec).hasval = True;
                            (yyval.rec).fixed = True;
                            (yyval.rec).val = (yyvsp[0].rec).val;
                          }
                          else
                          {
                            (yyval.rec).hasval = False;
                            semerror("initialization expression not constant");
                          }
                        }
#line 4990 "soapcpp2_yacc.c"
    break;

  case 229: /* tag: %empty  */
#line 1979 "soapcpp2_yacc.y"
                        { (yyval.s) = NULL; }
#line 4996 "soapcpp2_yacc.c"
    break;

  case 230: /* tag: TAG  */
#line 1980 "soapcpp2_yacc.y"
                        { (yyval.s) = (yyvsp[0].s); }
#line 5002 "soapcpp2_yacc.c"
    break;

  case 231: /* occurs: nullptr  */
#line 1982 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).minOccurs = -1;
                          (yyval.rec).maxOccurs = 1;
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).incmin = True;
                          (yyval.rec).incmax = True;
                          (yyval.rec).nillable = (yyvsp[0].i);
                          (yyval.rec).pattern = NULL;
                        }
#line 5021 "soapcpp2_yacc.c"
    break;

  case 232: /* occurs: nullptr LNG  */
#line 1996 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).minOccurs = (yyvsp[0].i);
                          (yyval.rec).maxOccurs = 1;
                          if ((yyval.rec).minOccurs < 0)
                            (yyval.rec).minOccurs = -1;
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).incmin = True;
                          (yyval.rec).incmax = True;
                          (yyval.rec).nillable = (yyvsp[-1].i);
                          (yyval.rec).pattern = NULL;
                        }
#line 5042 "soapcpp2_yacc.c"
    break;

  case 233: /* occurs: nullptr LNG ':'  */
#line 2013 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).minOccurs = (yyvsp[-1].i);
                          (yyval.rec).maxOccurs = 1;
                          if ((yyval.rec).minOccurs < 0)
                            (yyval.rec).minOccurs = -1;
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).incmin = True;
                          (yyval.rec).incmax = True;
                          (yyval.rec).nillable = (yyvsp[-2].i);
                          (yyval.rec).pattern = NULL;
                        }
#line 5063 "soapcpp2_yacc.c"
    break;

  case 234: /* occurs: nullptr LNG ':' LNG  */
#line 2030 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).minOccurs = (yyvsp[-2].i);
                          (yyval.rec).maxOccurs = (yyvsp[0].i);
                          if ((yyval.rec).minOccurs < 0 || (yyval.rec).maxOccurs < 0)
                          {
                            (yyval.rec).minOccurs = -1;
                            (yyval.rec).maxOccurs = 1;
                          }
                          else if ((yyval.rec).minOccurs > (yyval.rec).maxOccurs)
                          {
                            (yyval.rec).minOccurs = -1;
                            (yyval.rec).maxOccurs = 1;
                          }
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).incmin = True;
                          (yyval.rec).incmax = True;
                          (yyval.rec).nillable = (yyvsp[-3].i);
                          (yyval.rec).pattern = NULL;
                        }
#line 5092 "soapcpp2_yacc.c"
    break;

  case 235: /* occurs: nullptr ':' LNG  */
#line 2055 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).minOccurs = -1;
                          (yyval.rec).maxOccurs = (yyvsp[0].i);
                          if ((yyval.rec).maxOccurs < 0)
                          {
                            (yyval.rec).minOccurs = -1;
                            (yyval.rec).maxOccurs = 1;
                          }
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).incmin = True;
                          (yyval.rec).incmax = True;
                          (yyval.rec).nillable = (yyvsp[-2].i);
                          (yyval.rec).pattern = NULL;
                        }
#line 5116 "soapcpp2_yacc.c"
    break;

  case 236: /* bounds: nullptr patt  */
#line 2076 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).minOccurs = -1;
                          (yyval.rec).maxOccurs = 1;
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).incmin = True;
                          (yyval.rec).incmax = True;
                          (yyval.rec).nillable = (yyvsp[-1].i);
                          (yyval.rec).pattern = (yyvsp[0].s);
                        }
#line 5135 "soapcpp2_yacc.c"
    break;

  case 237: /* bounds: nullptr patt value min  */
#line 2091 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).hasmin = True;
                          (yyval.rec).hasmax = False;
                          (yyval.rec).incmin = (yyvsp[0].rec).incmin;
                          (yyval.rec).incmax = (yyvsp[0].rec).incmax;
                          (yyval.rec).minOccurs = (yyvsp[-1].ir).i;
                          (yyval.rec).maxOccurs = 1;
                          if ((yyval.rec).minOccurs < 0)
                            (yyval.rec).minOccurs = -1;
                          (yyval.rec).imin = (yyvsp[-1].ir).i;
                          (yyval.rec).imax = 0;
                          (yyval.rec).rmin = (yyvsp[-1].ir).r;
                          (yyval.rec).rmax = 0.0;
                          (yyval.rec).nillable = (yyvsp[-3].i);
                          (yyval.rec).pattern = (yyvsp[-2].s);
                        }
#line 5156 "soapcpp2_yacc.c"
    break;

  case 238: /* bounds: nullptr patt value minmax value  */
#line 2108 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).hasmin = True;
                          (yyval.rec).hasmax = True;
                          (yyval.rec).incmin = (yyvsp[-1].rec).incmin;
                          (yyval.rec).incmax = (yyvsp[-1].rec).incmax;
                          (yyval.rec).minOccurs = (yyvsp[-2].ir).i;
                          (yyval.rec).maxOccurs = (yyvsp[0].ir).i;
                          if ((yyval.rec).minOccurs < 0 || (yyval.rec).maxOccurs < 0)
                          {
                            (yyval.rec).minOccurs = -1;
                            (yyval.rec).maxOccurs = 1;
                          }
                          else if ((yyval.rec).minOccurs > (yyval.rec).maxOccurs)
                          {
                            (yyval.rec).minOccurs = -1;
                            (yyval.rec).maxOccurs = 1;
                          }
                          (yyval.rec).imin = (yyvsp[-2].ir).i;
                          (yyval.rec).imax = (yyvsp[0].ir).i;
                          (yyval.rec).rmin = (yyvsp[-2].ir).r;
                          (yyval.rec).rmax = (yyvsp[0].ir).r;
                          (yyval.rec).nillable = (yyvsp[-4].i);
                          (yyval.rec).pattern = (yyvsp[-3].s);
                        }
#line 5185 "soapcpp2_yacc.c"
    break;

  case 239: /* bounds: nullptr patt max value  */
#line 2132 "soapcpp2_yacc.y"
                                 {
                          (yyval.rec).hasmin = False;
                          (yyval.rec).hasmax = True;
                          (yyval.rec).incmin = (yyvsp[-1].rec).incmin;
                          (yyval.rec).incmax = (yyvsp[-1].rec).incmax;
                          (yyval.rec).minOccurs = -1;
                          (yyval.rec).maxOccurs = (yyvsp[0].ir).i;
                          if ((yyval.rec).maxOccurs < 0)
                          {
                            (yyval.rec).minOccurs = -1;
                            (yyval.rec).maxOccurs = 1;
                          }
                          (yyval.rec).imin = 0;
                          (yyval.rec).imax = (yyvsp[0].ir).i;
                          (yyval.rec).rmin = 0.0;
                          (yyval.rec).rmax = (yyvsp[0].ir).r;
                          (yyval.rec).nillable = (yyvsp[-3].i);
                          (yyval.rec).pattern = (yyvsp[-2].s);
                        }
#line 5209 "soapcpp2_yacc.c"
    break;

  case 240: /* nullptr: %empty  */
#line 2152 "soapcpp2_yacc.y"
                        { (yyval.i) = zflag >= 1 && zflag <= 3; /* False, unless version 2.8.30 or earlier */ }
#line 5215 "soapcpp2_yacc.c"
    break;

  case 241: /* nullptr: null  */
#line 2153 "soapcpp2_yacc.y"
                        { (yyval.i) = True; }
#line 5221 "soapcpp2_yacc.c"
    break;

  case 242: /* patt: %empty  */
#line 2155 "soapcpp2_yacc.y"
                        { (yyval.s) = NULL; }
#line 5227 "soapcpp2_yacc.c"
    break;

  case 243: /* patt: STR  */
#line 2156 "soapcpp2_yacc.y"
                        { (yyval.s) = (yyvsp[0].s); }
#line 5233 "soapcpp2_yacc.c"
    break;

  case 244: /* value: DBL  */
#line 2158 "soapcpp2_yacc.y"
                        { (yyval.ir).i = (LONG64)((yyval.ir).r = (yyvsp[0].r)); }
#line 5239 "soapcpp2_yacc.c"
    break;

  case 245: /* value: LNG  */
#line 2159 "soapcpp2_yacc.y"
                        { (yyval.ir).r = (double)((yyval.ir).i = (yyvsp[0].i)); }
#line 5245 "soapcpp2_yacc.c"
    break;

  case 246: /* value: CHR  */
#line 2160 "soapcpp2_yacc.y"
                        { (yyval.ir).r = (double)((yyval.ir).i = (yyvsp[0].c)); }
#line 5251 "soapcpp2_yacc.c"
    break;

  case 247: /* value: '+' value  */
#line 2161 "soapcpp2_yacc.y"
                        { (yyval.ir).i = +(yyvsp[0].ir).i; (yyval.ir).r = +(yyvsp[0].ir).r; }
#line 5257 "soapcpp2_yacc.c"
    break;

  case 248: /* value: '-' value  */
#line 2162 "soapcpp2_yacc.y"
                        { (yyval.ir).i = -(yyvsp[0].ir).i; (yyval.ir).r = -(yyvsp[0].ir).r; }
#line 5263 "soapcpp2_yacc.c"
    break;

  case 249: /* min: %empty  */
#line 2164 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = (yyval.rec).incmax = True; }
#line 5269 "soapcpp2_yacc.c"
    break;

  case 250: /* min: ':'  */
#line 2165 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = (yyval.rec).incmax = True; }
#line 5275 "soapcpp2_yacc.c"
    break;

  case 251: /* min: '<' ':'  */
#line 2166 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = False; (yyval.rec).incmax = True; }
#line 5281 "soapcpp2_yacc.c"
    break;

  case 252: /* min: '<'  */
#line 2167 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = False; (yyval.rec).incmax = True; }
#line 5287 "soapcpp2_yacc.c"
    break;

  case 253: /* minmax: ':'  */
#line 2169 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = (yyval.rec).incmax = True; }
#line 5293 "soapcpp2_yacc.c"
    break;

  case 254: /* minmax: '<' ':'  */
#line 2170 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = False; (yyval.rec).incmax = True; }
#line 5299 "soapcpp2_yacc.c"
    break;

  case 255: /* minmax: ':' '<'  */
#line 2171 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = True; (yyval.rec).incmax = False; }
#line 5305 "soapcpp2_yacc.c"
    break;

  case 256: /* minmax: '<' ':' '<'  */
#line 2172 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = False; (yyval.rec).incmax = False; }
#line 5311 "soapcpp2_yacc.c"
    break;

  case 257: /* minmax: '<'  */
#line 2173 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = False; (yyval.rec).incmax = False; }
#line 5317 "soapcpp2_yacc.c"
    break;

  case 258: /* max: ':'  */
#line 2175 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = (yyval.rec).incmax = True; }
#line 5323 "soapcpp2_yacc.c"
    break;

  case 259: /* max: ':' '<'  */
#line 2176 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = True; (yyval.rec).incmax = False; }
#line 5329 "soapcpp2_yacc.c"
    break;

  case 260: /* max: '<'  */
#line 2177 "soapcpp2_yacc.y"
                        { (yyval.rec).incmin = True; (yyval.rec).incmax = False; }
#line 5335 "soapcpp2_yacc.c"
    break;

  case 261: /* expr: expr ',' expr  */
#line 2186 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5341 "soapcpp2_yacc.c"
    break;

  case 262: /* expr: cexp  */
#line 2187 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5347 "soapcpp2_yacc.c"
    break;

  case 263: /* cexp: obex '?' qexp ':' cexp  */
#line 2191 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = (yyvsp[-2].rec).typ;
                          (yyval.rec).sto = Snone;
                          (yyval.rec).hasval = False;
                        }
#line 5357 "soapcpp2_yacc.c"
    break;

  case 265: /* qexp: expr  */
#line 2199 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5363 "soapcpp2_yacc.c"
    break;

  case 266: /* oexp: obex OR aexp  */
#line 2202 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).hasval = False;
                          (yyval.rec).typ = mkint();
                        }
#line 5372 "soapcpp2_yacc.c"
    break;

  case 267: /* oexp: aexp  */
#line 2206 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5378 "soapcpp2_yacc.c"
    break;

  case 268: /* obex: oexp  */
#line 2208 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5384 "soapcpp2_yacc.c"
    break;

  case 269: /* aexp: abex AN rexp  */
#line 2211 "soapcpp2_yacc.y"
                        { (yyval.rec).hasval = False;
                          (yyval.rec).typ = mkint();
                        }
#line 5392 "soapcpp2_yacc.c"
    break;

  case 270: /* aexp: rexp  */
#line 2214 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5398 "soapcpp2_yacc.c"
    break;

  case 271: /* abex: aexp  */
#line 2216 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5404 "soapcpp2_yacc.c"
    break;

  case 272: /* rexp: rexp '|' rexp  */
#line 2219 "soapcpp2_yacc.y"
                        { (yyval.rec) = iop("|", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5410 "soapcpp2_yacc.c"
    break;

  case 273: /* rexp: rexp '^' rexp  */
#line 2220 "soapcpp2_yacc.y"
                        { (yyval.rec) = iop("^", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5416 "soapcpp2_yacc.c"
    break;

  case 274: /* rexp: rexp '&' rexp  */
#line 2221 "soapcpp2_yacc.y"
                        { (yyval.rec) = iop("&", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5422 "soapcpp2_yacc.c"
    break;

  case 275: /* rexp: rexp EQ rexp  */
#line 2222 "soapcpp2_yacc.y"
                        { (yyval.rec) = relop("==", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5428 "soapcpp2_yacc.c"
    break;

  case 276: /* rexp: rexp NE rexp  */
#line 2223 "soapcpp2_yacc.y"
                        { (yyval.rec) = relop("!=", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5434 "soapcpp2_yacc.c"
    break;

  case 277: /* rexp: rexp '<' rexp  */
#line 2224 "soapcpp2_yacc.y"
                        { (yyval.rec) = relop("<", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5440 "soapcpp2_yacc.c"
    break;

  case 278: /* rexp: rexp LE rexp  */
#line 2225 "soapcpp2_yacc.y"
                        { (yyval.rec) = relop("<=", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5446 "soapcpp2_yacc.c"
    break;

  case 279: /* rexp: rexp '>' rexp  */
#line 2226 "soapcpp2_yacc.y"
                        { (yyval.rec) = relop(">", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5452 "soapcpp2_yacc.c"
    break;

  case 280: /* rexp: rexp GE rexp  */
#line 2227 "soapcpp2_yacc.y"
                        { (yyval.rec) = relop(">=", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5458 "soapcpp2_yacc.c"
    break;

  case 281: /* rexp: rexp LS rexp  */
#line 2228 "soapcpp2_yacc.y"
                        { (yyval.rec) = iop("<<", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5464 "soapcpp2_yacc.c"
    break;

  case 282: /* rexp: rexp RS rexp  */
#line 2229 "soapcpp2_yacc.y"
                        { (yyval.rec) = iop(">>", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5470 "soapcpp2_yacc.c"
    break;

  case 283: /* rexp: rexp '+' rexp  */
#line 2230 "soapcpp2_yacc.y"
                        { (yyval.rec) = op("+", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5476 "soapcpp2_yacc.c"
    break;

  case 284: /* rexp: rexp '-' rexp  */
#line 2231 "soapcpp2_yacc.y"
                        { (yyval.rec) = op("-", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5482 "soapcpp2_yacc.c"
    break;

  case 285: /* rexp: rexp '*' rexp  */
#line 2232 "soapcpp2_yacc.y"
                        { (yyval.rec) = op("*", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5488 "soapcpp2_yacc.c"
    break;

  case 286: /* rexp: rexp '/' rexp  */
#line 2233 "soapcpp2_yacc.y"
                        { (yyval.rec) = op("/", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5494 "soapcpp2_yacc.c"
    break;

  case 287: /* rexp: rexp '%' rexp  */
#line 2234 "soapcpp2_yacc.y"
                        { (yyval.rec) = iop("%", (yyvsp[-2].rec), (yyvsp[0].rec)); }
#line 5500 "soapcpp2_yacc.c"
    break;

  case 288: /* rexp: lexp  */
#line 2235 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5506 "soapcpp2_yacc.c"
    break;

  case 289: /* lexp: '!' lexp  */
#line 2238 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).hasval)
                            (yyval.rec).val.i = !(yyvsp[0].rec).val.i;
                          (yyval.rec).typ = (yyvsp[0].rec).typ;
                          (yyval.rec).hasval = (yyvsp[0].rec).hasval;
                        }
#line 5517 "soapcpp2_yacc.c"
    break;

  case 290: /* lexp: '~' lexp  */
#line 2244 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).hasval)
                            (yyval.rec).val.i = ~(yyvsp[0].rec).val.i;
                          (yyval.rec).typ = (yyvsp[0].rec).typ;
                          (yyval.rec).hasval = (yyvsp[0].rec).hasval;
                        }
#line 5528 "soapcpp2_yacc.c"
    break;

  case 291: /* lexp: '-' lexp  */
#line 2250 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).hasval)
                          {
                            if (integer((yyvsp[0].rec).typ))
                              (yyval.rec).val.i = -(yyvsp[0].rec).val.i;
                            else if (real((yyvsp[0].rec).typ))
                              (yyval.rec).val.r = -(yyvsp[0].rec).val.r;
                            else
                              typerror("string?");
                          }
                          (yyval.rec).typ = (yyvsp[0].rec).typ;
                          (yyval.rec).hasval = (yyvsp[0].rec).hasval;
                        }
#line 5546 "soapcpp2_yacc.c"
    break;

  case 292: /* lexp: '+' lexp  */
#line 2263 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5552 "soapcpp2_yacc.c"
    break;

  case 293: /* lexp: '*' lexp  */
#line 2264 "soapcpp2_yacc.y"
                        {
                          if ((yyvsp[0].rec).typ->type == Tpointer)
                            (yyval.rec).typ = (Tnode*)(yyvsp[0].rec).typ->ref;
                          else
                          {
                            typerror("dereference of non-pointer type");
                            (yyval.rec).typ = (yyvsp[0].rec).typ;
                          }
                          (yyval.rec).sto = Snone;
                          (yyval.rec).hasval = False;
                        }
#line 5568 "soapcpp2_yacc.c"
    break;

  case 294: /* lexp: '&' lexp  */
#line 2275 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkpointer((yyvsp[0].rec).typ);
                          (yyval.rec).sto = Snone;
                          (yyval.rec).hasval = False;
                        }
#line 5578 "soapcpp2_yacc.c"
    break;

  case 295: /* lexp: SIZEOF '(' texp ')'  */
#line 2281 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).typ = mkint();
                          (yyval.rec).val.i = (yyvsp[-1].rec).typ->width;
                        }
#line 5589 "soapcpp2_yacc.c"
    break;

  case 296: /* lexp: pexp  */
#line 2287 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[0].rec); }
#line 5595 "soapcpp2_yacc.c"
    break;

  case 297: /* pexp: '(' expr ')'  */
#line 2290 "soapcpp2_yacc.y"
                        { (yyval.rec) = (yyvsp[-1].rec); }
#line 5601 "soapcpp2_yacc.c"
    break;

  case 298: /* pexp: ID  */
#line 2291 "soapcpp2_yacc.y"
                        {
                          if (!(p = enumentry((yyvsp[0].sym))))
                            p = undefined((yyvsp[0].sym));
                          else
                            (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).typ = p->info.typ;
                          (yyval.rec).val = p->info.val;
                        }
#line 5615 "soapcpp2_yacc.c"
    break;

  case 299: /* pexp: LNG  */
#line 2300 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkint();
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).val.i = (yyvsp[0].i);
                        }
#line 5626 "soapcpp2_yacc.c"
    break;

  case 300: /* pexp: DBL  */
#line 2306 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkfloat();
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).val.r = (yyvsp[0].r);
                        }
#line 5637 "soapcpp2_yacc.c"
    break;

  case 301: /* pexp: CHR  */
#line 2312 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkchar();
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).val.i = (yyvsp[0].c);
                        }
#line 5648 "soapcpp2_yacc.c"
    break;

  case 302: /* pexp: STR  */
#line 2318 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkstring();
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).val.s = (yyvsp[0].s);
                        }
#line 5659 "soapcpp2_yacc.c"
    break;

  case 303: /* pexp: CFALSE  */
#line 2324 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkbool();
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).val.i = 0;
                        }
#line 5670 "soapcpp2_yacc.c"
    break;

  case 304: /* pexp: CTRUE  */
#line 2330 "soapcpp2_yacc.y"
                        {
                          (yyval.rec).typ = mkbool();
                          (yyval.rec).hasval = True;
                          (yyval.rec).fixed = False;
                          (yyval.rec).val.i = 1;
                        }
#line 5681 "soapcpp2_yacc.c"
    break;


#line 5685 "soapcpp2_yacc.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 2338 "soapcpp2_yacc.y"


int
yywrap(void)
{
  return 1;
}

/**************************************\

        Support routines

\**************************************/

static Node
op(const char *op, Node p, Node q)
{
  Node  r;
  r.typ = p.typ;
  r.sto = Snone;
  if (p.hasval && q.hasval)
  {
    if (integer(p.typ) && integer(q.typ))
      switch (op[0])
      {
        case '|': r.val.i = p.val.i |  q.val.i; break;
        case '^': r.val.i = p.val.i ^  q.val.i; break;
        case '&': r.val.i = p.val.i &  q.val.i; break;
        case '<': r.val.i = p.val.i << q.val.i; break;
        case '>': r.val.i = p.val.i >> q.val.i; break;
        case '+': r.val.i = p.val.i +  q.val.i; break;
        case '-': r.val.i = p.val.i -  q.val.i; break;
        case '*': r.val.i = p.val.i *  q.val.i; break;
        case '/': r.val.i = q.val.i != 0 ? p.val.i / q.val.i : 0; break;
        case '%': r.val.i = q.val.i != 0 ? p.val.i % q.val.i : 0; break;
        default:  typerror(op);
      }
    else if (real(p.typ) && real(q.typ))
      switch (op[0])
      {
        case '+': r.val.r = p.val.r + q.val.r; break;
        case '-': r.val.r = p.val.r - q.val.r; break;
        case '*': r.val.r = p.val.r * q.val.r; break;
        case '/': r.val.r = q.val.r != 0 ? p.val.r / q.val.r : 0.0; break;
        default:  typerror(op);
      }
    else
      semerror("invalid constant operation");
    r.hasval = True;
    r.fixed = False;
  }
  else
  {
    r.typ = mgtype(p.typ, q.typ);
    r.hasval = False;
  }
  return r;
}

static Node
iop(const char *iop, Node p, Node q)
{
  if (integer(p.typ) && integer(q.typ))
    return op(iop, p, q);
  typerror("integer operands only");
  return p;
}

static Node
relop(const char *op, Node p, Node q)
{
  Node  r;
  r.typ = mkint();
  r.sto = Snone;
  r.hasval = True;
  r.fixed = False;
  r.val.i = 1;
  sprintf(errbuf, "comparison '%s' not evaluated and considered true", op);
  semwarn(errbuf);
  if (p.typ->type != Tpointer || p.typ != q.typ)
    r.typ = mgtype(p.typ, q.typ);
  return r;
}

/**************************************\

        Scope management

\**************************************/

/*
mkscope - initialize scope stack with a new table and offset
*/
static void
mkscope(Table *table, int offset)
{
  sp = stack-1;
  enterscope(table, offset);
}

/*
enterscope - enter a new scope by pushing a new table and offset on the stack
*/
static void
enterscope(Table *table, int offset)
{
  if (++sp == stack + MAXNEST)
    execerror("maximum scope nesting depth exceeded");
  sp->table = table;
  sp->entry = NULL;
  sp->node.typ = mkint();
  sp->node.sto = Snone;
  sp->val = 0;
  sp->offset = offset;
  sp->grow = True;      /* by default, offset grows */
  sp->mask = False;
}

/*
exitscope - exit a scope by popping the table and offset from the stack
*/
static void
exitscope(void)
{
  check(sp-- != stack, "exitscope() has no matching enterscope()");
}

/**************************************\

        Undefined symbol

\**************************************/

static Entry*
undefined(Symbol *sym)
{
  Entry *p;
  sprintf(errbuf, "undefined identifier '%s'", sym->name);
  semwarn(errbuf);
  p = enter(sp->table, sym);
  p->level = GLOBAL;
  p->info.typ = mkint();
  p->info.sto = Sextern;
  p->info.hasval = False;
  return p;
}

/*
mgtype - return most general type among two numerical types
*/
Tnode*
mgtype(Tnode *typ1, Tnode *typ2)
{
  if (numeric(typ1) && numeric(typ2))
  {
    if (typ1->type < typ2->type)
      return typ2;
  }
  else
  {
    typerror("non-numeric type");
  }
  return typ1;
}

/**************************************\

        Type checks

\**************************************/

static int
integer(Tnode *typ)
{
  switch (typ->type)
  {
    case Tchar:
    case Tshort:
    case Tint:
    case Tlong: return True;
    default:    break;
  }
  return False;
}

static int
real(Tnode *typ)
{
  switch (typ->type)
  {
    case Tfloat:
    case Tdouble:
    case Tldouble: return True;
    default:       break;
  }
  return False;
}

static int
numeric(Tnode *typ)
{
  return integer(typ) || real(typ);
}

static void
set_value(Entry *p, Tnode *t, Node *n)
{
  p->info.hasval = True;
  p->info.ptrval = False;
  p->info.fixed = n->fixed;
  if (is_smart(t) || (t->type == Tpointer && !is_string(t) && !is_wstring(t)))
  {
    p->info.hasval = False;
    p->info.ptrval = True;
    t = t->ref;
  }
  switch (t->type)
  {
    case Tchar:
    case Tuchar:
    case Tshort:
    case Tushort:
    case Tint:
    case Tuint:
    case Tlong:
    case Tulong:
    case Tllong:
    case Tullong:
    case Tenum:
    case Tenumsc:
    case Ttime:
    case Tsize:
      if (n->typ->type == Tint ||
          n->typ->type == Tchar ||
          n->typ->type == Tenum ||
          n->typ->type == Tenumsc)
      {
        sp->val = p->info.val.i = n->val.i;
        if ((t->hasmin && t->imin > n->val.i) ||
            (t->hasmin && !t->incmin && t->imin == n->val.i) ||
            (t->hasmax && t->imax < n->val.i) ||
            (t->hasmax && !t->incmax && t->imax == n->val.i))
          semerror("initialization constant outside value range");
      }
      else
      {
        semerror("type error in initialization constant");
        p->info.hasval = False;
        p->info.ptrval = False;
      }
      break;
    case Tfloat:
    case Tdouble:
    case Tldouble:
      if (n->typ->type == Tfloat ||
          n->typ->type == Tdouble ||
          n->typ->type == Tldouble)
      {
        p->info.val.r = n->val.r;
        if ((t->hasmin && t->rmin > n->val.r) ||
            (t->hasmin && !t->incmin && t->rmin == n->val.r) ||
            (t->hasmax && t->rmax < n->val.r) ||
            (t->hasmax && !t->incmax && t->rmax == n->val.r))
          semerror("initialization constant outside value range");
      }
      else if (n->typ->type == Tint)
      {
        p->info.val.r = (double)n->val.i;
        if ((t->hasmin && t->imin > n->val.i) ||
            (t->hasmin && !t->incmin && t->imin == n->val.i) ||
            (t->hasmax && t->imax < n->val.i) ||
            (t->hasmax && !t->incmax && t->imax == n->val.i))
          semerror("initialization constant outside value range");
      }
      else
      {
        semerror("type error in initialization constant");
        p->info.hasval = False;
        p->info.ptrval = False;
      }
      break;
    default:
      if (t->type == Tpointer &&
          (((Tnode*)t->ref)->type == Tchar ||
           ((Tnode*)t->ref)->type == Twchar) &&
          n->typ->type == Tpointer &&
          ((Tnode*)n->typ->ref)->type == Tchar)
      {
        p->info.val.s = n->val.s;
      }
      else if (bflag &&
               t->type == Tarray &&
               ((Tnode*)t->ref)->type == Tchar &&
               n->typ->type == Tpointer &&
               ((Tnode*)n->typ->ref)->type == Tchar)
      {
        if (t->width / ((Tnode*)t->ref)->width - 1 < (int)strlen(n->val.s))
        {
          semerror("char[] initialization constant too long");
          p->info.val.s = "";
        }
        else
        {
          p->info.val.s = n->val.s;
        }
      }
      else if (t->id == lookup("std::string") ||
               t->id == lookup("std::wstring"))
      {
        p->info.val.s = n->val.s;
      }
      else
      {
        semerror("type error in initialization constant");
        p->info.hasval = False;
        p->info.ptrval = False;
      }
      break;
  }
}

/**************************************\

        Type additions

\**************************************/

static void
add_fault(void)
{
  Table *t;
  Entry *p1, *p2, *p3, *p4, *p5;
  Symbol *s1, *s2, *s3, *s4;
  imported = NULL;
  s1 = lookup("SOAP_ENV__Code");
  p1 = entry(classtable, s1);
  if (!p1 || !p1->info.typ->ref)
  {
    t = mktable(NULL);
    if (!p1)
    {
      p1 = enter(classtable, s1);
      p1->info.typ = mkstruct(t, 3*4);
      p1->info.typ->id = s1;
    }
    else
    {
      p1->info.typ->ref = t;
    }
    p2 = enter(t, lookup("SOAP_ENV__Value"));
    p2->info.typ = qname;
    p2->info.minOccurs = 0;
    p2 = enter(t, lookup("SOAP_ENV__Subcode"));
    p2->info.typ = mkpointer(p1->info.typ);
    p2->info.minOccurs = 0;
  }
  else
  {
    t = p1->info.typ->ref;
    p2 = entry(t, lookup("SOAP_ENV__Value"));
    if (!p2)
    {
      sprintf(errbuf, "SOAP_ENV__Value member missing in SOAP_ENV__Code declared at %s:%d", p1->filename, p1->lineno);
      semerror(errbuf);
    }
    else if (p2->info.typ != qname)
    {
      sprintf(errbuf, "SOAP_ENV__Value member of SOAP_ENV__Code is not a _QName type declared at %s:%d", p2->filename, p2->lineno);
      semerror(errbuf);
    }
    p2 = entry(t, lookup("SOAP_ENV__Subcode"));
    if (!p2)
    {
      sprintf(errbuf, "SOAP_ENV__Subcode member missing in SOAP_ENV__Code declared at %s:%d", p1->filename, p1->lineno);
      semerror(errbuf);
    }
    else if (p2->info.typ->type != Tpointer || (Tnode*)p2->info.typ->ref != p1->info.typ)
    {
      sprintf(errbuf, "SOAP_ENV__Subcode member of SOAP_ENV__Code is not a SOAP_ENV__Subcode * type declared at %s:%d", p2->filename, p2->lineno);
      semerror(errbuf);
    }
  }
  s2 = lookup("SOAP_ENV__Detail");
  p2 = entry(classtable, s2);
  if (!p2 || !p2->info.typ->ref)
  {
    t = mktable(NULL);
    if (!p2)
    {
      p2 = enter(classtable, s2);
      p2->info.typ = mkstruct(t, 3*4);
      p2->info.typ->id = s2;
    }
    else
    {
      p2->info.typ->ref = t;
    }
    p3 = enter(t, lookup("__any"));
    p3->info.typ = xml;
    p3->info.minOccurs = 0;
    p3 = enter(t, lookup("__type"));
    p3->info.typ = mkint();
    p3->info.minOccurs = 0;
    p3 = enter(t, lookup("fault"));
    p3->info.typ = mkpointer(mkvoid());
    p3->info.minOccurs = 0;
    custom_fault = 0;
  }
  s4 = lookup("SOAP_ENV__Reason");
  p4 = entry(classtable, s4);
  if (!p4 || !p4->info.typ->ref)
  {
    t = mktable(NULL);
    if (!p4)
    {
      p4 = enter(classtable, s4);
      p4->info.typ = mkstruct(t, 4);
      p4->info.typ->id = s4;
    }
    else
    {
      p4->info.typ->ref = t;
    }
    p3 = enter(t, lookup("SOAP_ENV__Text"));
    p3->info.typ = mkstring();
    p3->info.minOccurs = 0;
  }
  else
  {
    t = p4->info.typ->ref;
    p3 = entry(t, lookup("SOAP_ENV__Text"));
    if (!p3)
    {
      sprintf(errbuf, "SOAP_ENV__Text member missing in SOAP_ENV__Reason declared at %s:%d", p4->filename, p4->lineno);
      semerror(errbuf);
    }
    else if (!is_string(p3->info.typ))
    {
      sprintf(errbuf, "SOAP_ENV__Text member of SOAP_ENV__Reason is not a char * type declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
  }
  s3 = lookup("SOAP_ENV__Fault");
  p3 = entry(classtable, s3);
  if (!p3 || !p3->info.typ->ref)
  {
    t = mktable(NULL);
    if (!p3)
    {
      p3 = enter(classtable, s3);
      p3->info.typ = mkstruct(t, 9*4);
      p3->info.typ->id = s3;
    }
    else
    {
      p3->info.typ->ref = t;
    }
    p5 = enter(t, lookup("faultcode"));
    p5->info.typ = qname;
    p5->info.minOccurs = 0;
    p5 = enter(t, lookup("faultstring"));
    p5->info.typ = mkstring();
    p5->info.minOccurs = 0;
    p5 = enter(t, lookup("faultactor"));
    p5->info.typ = mkstring();
    p5->info.minOccurs = 0;
    p5 = enter(t, lookup("detail"));
    p5->info.typ = mkpointer(p2->info.typ);
    p5->info.minOccurs = 0;
    p5 = enter(t, s1);
    p5->info.typ = mkpointer(p1->info.typ);
    p5->info.minOccurs = 0;
    p5 = enter(t, s4);
    p5->info.typ = mkpointer(p4->info.typ);
    p5->info.minOccurs = 0;
    p5 = enter(t, lookup("SOAP_ENV__Node"));
    p5->info.typ = mkstring();
    p5->info.minOccurs = 0;
    p5 = enter(t, lookup("SOAP_ENV__Role"));
    p5->info.typ = mkstring();
    p5->info.minOccurs = 0;
    p5 = enter(t, lookup("SOAP_ENV__Detail"));
    p5->info.typ = mkpointer(p2->info.typ);
    p5->info.minOccurs = 0;
  }
  else
  {
    t = p3->info.typ->ref;
    p5 = entry(t, lookup("faultcode"));
    if (!p5)
    {
      sprintf(errbuf, "faultcode member missing in SOAP_ENV__Fault declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
    else if (p5->info.typ != qname)
    {
      sprintf(errbuf, "faultcode member of SOAP_ENV__Fault is not a _QName type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, lookup("faultstring"));
    if (!p5)
    {
      sprintf(errbuf, "faultstring member missing in SOAP_ENV__Fault declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
    else if (!is_string(p5->info.typ))
    {
      sprintf(errbuf, "faultstring member of SOAP_ENV__Fault is not a char * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, lookup("faultdetail"));
    if (p5 && (p5->info.typ->type != Tpointer || (Tnode*)p5->info.typ->ref != p2->info.typ))
    {
      sprintf(errbuf, "faultdetail member of SOAP_ENV__Fault is not a SOAP_ENV__Detail * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, s1);
    if (!p5)
    {
      sprintf(errbuf, "SOAP_ENV__Code member missing in SOAP_ENV__Fault declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
    else if (p5->info.typ->type != Tpointer || (Tnode*)p5->info.typ->ref != p1->info.typ)
    {
      sprintf(errbuf, "SOAP_ENV__Code member of SOAP_ENV__Fault is not a SOAP_ENV__Code * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, s4);
    if (!p5)
    {
      sprintf(errbuf, "SOAP_ENV__Reason member missing in SOAP_ENV__Fault declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
    else if (p5->info.typ->type != Tpointer || (Tnode*)p5->info.typ->ref != p4->info.typ)
    {
      sprintf(errbuf, "SOAP_ENV__Reason member of SOAP_ENV__Fault is not a SOAP_ENV__Reason * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, lookup("SOAP_ENV__Node"));
    if (!p5)
    {
      sprintf(errbuf, "SOAP_ENV__Node member missing in SOAP_ENV__Fault declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
    else if (!is_string(p5->info.typ))
    {
      sprintf(errbuf, "SOAP_ENV__Node member of SOAP_ENV__Fault is not a char * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, lookup("SOAP_ENV__Role"));
    if (!p5)
    {
      sprintf(errbuf, "SOAP_ENV__Role member missing in SOAP_ENV__Fault declared at %s:%d", p3->filename, p3->lineno);
      semerror(errbuf);
    }
    else if (!is_string(p5->info.typ))
    {
      sprintf(errbuf, "SOAP_ENV__Role member of SOAP_ENV__Fault is not a char * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
    p5 = entry(t, lookup("SOAP_ENV__Detail"));
    if (p5 && (p5->info.typ->type != Tpointer || (Tnode*)p5->info.typ->ref != p2->info.typ))
    {
      sprintf(errbuf, "SOAP_ENV__Detail member of SOAP_ENV__Fault is not a SOAP_ENV__Detail * type declared at %s:%d", p5->filename, p5->lineno);
      semerror(errbuf);
    }
  }
}

static void
add_soap(void)
{
  Symbol *s = lookup("soap");
  p = enter(classtable, s);
  p->info.typ = mkstruct(NULL, 0);
  p->info.typ->transient = -2;
  p->info.typ->id = s;
  p->filename = "(built-in)";
  p->lineno = 0;
}

static void
add_XML(void)
{
  Symbol *s = lookup("_XML");
  s->token = TYPE;
  p = enter(typetable, s);
  xml = p->info.typ = mksymtype(mkstring(), s);
  p->info.sto = Stypedef;
  p->filename = "(built-in)";
  p->lineno = 0;
}

static void
add_qname(void)
{
  Symbol *s = lookup("_QName");
  s->token = TYPE;
  p = enter(typetable, s);
  qname = p->info.typ = mksymtype(mkstring(), s);
  p->info.sto = Stypedef;
  p->filename = "(built-in)";
  p->lineno = 0;
}

static void
add_header(void)
{
  Table *t;
  Entry *p;
  Symbol *s = lookup("SOAP_ENV__Header");
  imported = NULL;
  p = entry(classtable, s);
  if (!p || !p->info.typ->ref)
  {
    t = mktable(NULL);
    if (!p)
      p = enter(classtable, s);
    p->info.typ = mkstruct(t, 0);
    p->info.typ->id = s;
    custom_header = 0;
  }
}

static void
add_response(Entry *fun, Entry *ret)
{
  Table *t;
  Entry *p, *q;
  Symbol *s;
  size_t i = 0, j, n = strlen(fun->sym->name);
  char *r = (char*)emalloc(n+100);
  strcpy(r, fun->sym->name);
  strcat(r, "Response");
  do
  {
    for (j = 0; j < i; j++)
      r[n+j+8] = '_';
    r[n+i+8] = '\0';
    if (!(s = lookup(r)))
      s = install(r, ID);
    i++;
  }
  while (entry(classtable, s));
  free(r);
  t = mktable(NULL);
  q = enter(t, ret->sym);
  q->info = ret->info;
  if (q->info.typ->type == Treference)
    q->info.typ = (Tnode*)q->info.typ->ref;
  p = enter(classtable, s);
  p->info.typ = mkstruct(t, 4);
  p->info.typ->id = s;
  fun->info.typ->response = p;
}

static void
add_result(Tnode *typ)
{
  Entry *p;
  if (!typ->ref || !((Tnode*)typ->ref)->ref)
  {
    semwarn("response struct/class must be declared before used in function prototype");
    return;
  }
  for (p = ((Table*)((Tnode*)typ->ref)->ref)->list; p; p = p->next)
    if (((int)p->info.sto & (int)Sreturn))
      return;
  for (p = ((Table*)((Tnode*)typ->ref)->ref)->list; p; p = p->next)
  {
    if (p->info.typ->type != Tfun &&
        !((int)p->info.sto & (int)Sattribute) &&
        !is_transient(p->info.typ) &&
        !((int)p->info.sto & ((int)Sprivate | (int)Sprotected)))
      p->info.sto = (Storage)((int)p->info.sto | (int)Sreturn);
    return;
  }
}

static void
add_request(Symbol *sym, Scope *sp)
{
  Entry *p;
  unlinklast(sp->table);
  if ((p = entry(classtable, sym)))
  {
    if (p->info.typ->ref)
    {
      sprintf(errbuf, "service operation name clash: struct/class '%s' already declared at %s:%d", sym->name, p->filename, p->lineno);
      semerror(errbuf);
    }
    else
    {
      p->info.typ->ref = sp->table;
      p->info.typ->width = sp->offset;
    }
  }
  else
  {
    p = enter(classtable, sym);
    p->info.typ = mkstruct(sp->table, sp->offset);
    p->info.typ->id = sym;
  }
  if (p->info.typ->ref)
  {
    for (q = ((Table*)p->info.typ->ref)->list; q; q = q->next)
    {
      if (q->info.typ->type == Treference || q->info.typ->type == Trvalueref)
      {
        sprintf(errbuf, "parameter '%s' of service operation function '%s()' in %s:%d cannot be passed by reference: use a pointer instead", q->sym->name, sym->name, q->filename, q->lineno);
        semwarn(errbuf);
      }
      else if (((int)q->info.sto & ((int)Sconst | (int)Sconstptr)))
      {
        if (!is_string(q->info.typ) && !is_wstring(q->info.typ))
        {
          sprintf(errbuf, "parameter '%s' of service operation function '%s()' in %s:%d cannot be declared const", q->sym->name, sym->name, q->filename, q->lineno);
          semwarn(errbuf);
        }
      }
      else if (((int)q->info.sto & ~((int)Sattribute | (int)Sextern | (int)Sspecial)))
      {
        sprintf(errbuf, "invalid parameter '%s' of service operation function '%s()' in %s:%d", q->sym->name, sym->name, q->filename, q->lineno);
        semwarn(errbuf);
      }
    }
  }
}

/**************************************\

        Add pragma

\**************************************/

static void
add_pragma(const char *s)
{
  Pragma **pp;
  for (pp = &pragmas; *pp; pp = &(*pp)->next)
    ;
  *pp = (Pragma*)emalloc(sizeof(Pragma));
  (*pp)->pragma = s;
  (*pp)->next = NULL;
}
