
/*  A Bison parser, made from parser.y
 by  GNU Bison version 1.25
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	ID	258
#define	HBLOCK	259
#define	POUND	260
#define	STRING	261
#define	INCLUDE	262
#define	IMPORT	263
#define	INSERT	264
#define	CHARCONST	265
#define	NUM_INT	266
#define	NUM_FLOAT	267
#define	NUM_UNSIGNED	268
#define	NUM_LONG	269
#define	NUM_ULONG	270
#define	NUM_LONGLONG	271
#define	NUM_ULONGLONG	272
#define	TYPEDEF	273
#define	TYPE_INT	274
#define	TYPE_UNSIGNED	275
#define	TYPE_SHORT	276
#define	TYPE_LONG	277
#define	TYPE_FLOAT	278
#define	TYPE_DOUBLE	279
#define	TYPE_CHAR	280
#define	TYPE_VOID	281
#define	TYPE_SIGNED	282
#define	TYPE_BOOL	283
#define	TYPE_TYPEDEF	284
#define	TYPE_RAW	285
#define	LPAREN	286
#define	RPAREN	287
#define	COMMA	288
#define	SEMI	289
#define	EXTERN	290
#define	INIT	291
#define	LBRACE	292
#define	RBRACE	293
#define	PERIOD	294
#define	CONST	295
#define	VOLATILE	296
#define	STRUCT	297
#define	UNION	298
#define	EQUAL	299
#define	SIZEOF	300
#define	MODULE	301
#define	LBRACKET	302
#define	RBRACKET	303
#define	ILLEGAL	304
#define	CONSTANT	305
#define	NAME	306
#define	RENAME	307
#define	NAMEWARN	308
#define	EXTEND	309
#define	PRAGMA	310
#define	FEATURE	311
#define	VARARGS	312
#define	ENUM	313
#define	CLASS	314
#define	TYPENAME	315
#define	PRIVATE	316
#define	PUBLIC	317
#define	PROTECTED	318
#define	COLON	319
#define	STATIC	320
#define	VIRTUAL	321
#define	FRIEND	322
#define	THROW	323
#define	CATCH	324
#define	USING	325
#define	NAMESPACE	326
#define	NATIVE	327
#define	INLINE	328
#define	TYPEMAP	329
#define	EXCEPT	330
#define	ECHO	331
#define	APPLY	332
#define	CLEAR	333
#define	SWIGTEMPLATE	334
#define	FRAGMENT	335
#define	WARN	336
#define	LESSTHAN	337
#define	GREATERTHAN	338
#define	MODULO	339
#define	DELETE	340
#define	TYPES	341
#define	PARMS	342
#define	NONID	343
#define	DSTAR	344
#define	DCNOT	345
#define	TEMPLATE	346
#define	OPERATOR	347
#define	COPERATOR	348
#define	PARSETYPE	349
#define	CAST	350
#define	LOR	351
#define	LAND	352
#define	OR	353
#define	XOR	354
#define	AND	355
#define	LSHIFT	356
#define	RSHIFT	357
#define	PLUS	358
#define	MINUS	359
#define	STAR	360
#define	SLASH	361
#define	UMINUS	362
#define	NOT	363
#define	LNOT	364
#define	DCOLON	365

#line 1 "parser.y"

/* -----------------------------------------------------------------------------
 * parser.y
 *
 *     YACC parser for SWIG.   The grammar is a somewhat broken subset of C/C++.
 *     This file is a bit of a mess and probably needs to be rewritten at
 *     some point.  Beware.
 *
 * Author(s) : David Beazley (beazley@cs.uchicago.edu)
 *
 * Copyright (C) 1998-2001.  The University of Chicago
 * Copyright (C) 1995-1998.  The University of Utah and The Regents of the
 *                           University of California.
 *
 * See the file LICENSE for information on usage and redistribution.
 * ----------------------------------------------------------------------------- */

#define yylex yylex

char cvsroot_parser_y[] = "$Header: /cvs/projects/SWIG/Source/CParse/parser.y,v 1.22 2003/03/27 22:58:40 beazley Exp $";

#include "cparse.h"
#include "preprocessor.h"
#include <ctype.h>

/* We do this for portability */
#undef alloca
#define alloca malloc

/* -----------------------------------------------------------------------------
 *                               Externals
 * ----------------------------------------------------------------------------- */

extern int   yylex();
extern void  yyerror (const char *e);

/* scanner.cxx */

extern int  cparse_line;
extern int  cparse_start_line;
extern void skip_balanced(int startchar, int endchar);
extern void skip_decl(void);
extern void scanner_check_typedef(void);
extern void scanner_ignore_typedef(void);
extern void scanner_last_id(int);
extern void scanner_clear_rename(void);
extern void start_inline(char *, int);
extern String *scanner_ccode;
extern int Swig_cparse_template_expand(Node *n, String *rname, ParmList *tparms);
extern Node *Swig_cparse_template_locate(String *name, ParmList *tparms);

/* NEW Variables */

extern void generate_all(Node *);

static Node    *top = 0;      /* Top of the generated parse tree */
static int      unnamed = 0;  /* Unnamed datatype counter */
static Hash    *extendhash = 0;     /* Hash table of added methods */
static Hash    *classes = 0;        /* Hash table of classes */
static Symtab  *prev_symtab = 0;
static Node    *current_class = 0;
       String  *ModuleName = 0;
static Node    *module_node = 0;
static String  *Classprefix = 0;  
static String  *Namespaceprefix = 0;
static int      inclass = 0;
static char    *last_cpptype = 0;
static int      inherit_list = 0;
static Parm    *template_parameters = 0;
static int      extendmode   = 0;

/* -----------------------------------------------------------------------------
 *                            Assist Functions
 * ----------------------------------------------------------------------------- */

static Node *new_node(const String_or_char *tag) {
  Node *n = NewHash();
  set_nodeType(n,tag);
  Setfile(n,cparse_file);
  Setline(n,cparse_line);
  return n;
}

/* Copies a node.  Does not copy tree links or symbol table data (except for
   sym:name) */

static Node *copy_node(Node *n) {
  Node *nn;
  String *key;
  nn = NewHash();
  Setfile(nn,Getfile(n));
  Setline(nn,Getline(n));
  for (key = Firstkey(n); key; key = Nextkey(n)) {
    if ((Strcmp(key,"nextSibling") == 0) ||
	(Strcmp(key,"previousSibling") == 0) ||
	(Strcmp(key,"parentNode") == 0) ||
	(Strcmp(key,"lastChild") == 0)) {
      continue;
    }
    if (Strncmp(key,"csym:",5) == 0) continue;
    /* We do copy sym:name.  For templates */
    if ((Strcmp(key,"sym:name") == 0) || 
	(Strcmp(key,"sym:weak") == 0) ||
	(Strcmp(key,"sym:typename") == 0)) {
      Setattr(nn,key, Copy(Getattr(n,key)));
      continue;
    }
    if (Strcmp(key,"sym:symtab") == 0) {
      Setattr(nn,"sym:needs_symtab", "1");
    }
    /* We don't copy any other symbol table attributes */
    if (Strncmp(key,"sym:",4) == 0) {
      continue;
    }
    /* If children.  We copy them recursively using this function */
    if (Strcmp(key,"firstChild") == 0) {
      /* Copy children */
      Node *cn = Getattr(n,key);
      while (cn) {
	appendChild(nn,copy_node(cn));
	cn = nextSibling(cn);
      }
      continue;
    }
    /* We don't copy the symbol table.  But we drop an attribute 
       requires_symtab so that functions know it needs to be built */

    if (Strcmp(key,"symtab") == 0) {
      /* Node defined a symbol table. */
      Setattr(nn,"requires_symtab","1");
      continue;
    }
    /* Can't copy nodes */
    if (Strcmp(key,"node") == 0) {
      continue;
    }
    if ((Strcmp(key,"parms") == 0) || (Strcmp(key,"pattern") == 0) || (Strcmp(key,"throws") == 0))  {
      Setattr(nn,key,CopyParmList(Getattr(n,key)));
      continue;
    }
    /* Looks okay.  Just copy the data using Copy */
    Setattr(nn, key, Copy(Getattr(n,key)));
  }
  return nn;
}

/* -----------------------------------------------------------------------------
 *                              Variables
 * ----------------------------------------------------------------------------- */

      char  *typemap_lang = 0;    /* Current language setting */

static int cplus_mode  = 0;
static String  *class_rename = 0;

/* C++ modes */

#define  CPLUS_PUBLIC    1
#define  CPLUS_PRIVATE   2
#define  CPLUS_PROTECTED 3

void SWIG_typemap_lang(const char *tm_lang) {
  typemap_lang = Swig_copy_string(tm_lang);
}

/* -----------------------------------------------------------------------------
 *                           Assist functions
 * ----------------------------------------------------------------------------- */

/* Perform type-promotion for binary operators */
static int promote(int t1, int t2) {
  return t1 > t2 ? t1 : t2;
}

static String *yyrename = 0;

/* Forward renaming operator */
static Hash   *rename_hash = 0;
static Hash   *namewarn_hash = 0;
static Hash   *features_hash = 0;

static String *feature_identifier_fix(String *s) {
  if (SwigType_istemplate(s)) {
    String *tp, *ts, *ta, *tq;
    tp = SwigType_templateprefix(s);
    ts = SwigType_templatesuffix(s);
    ta = SwigType_templateargs(s);
    tq = Swig_symbol_type_qualify(ta,0);
    Append(tp,tq);
    Append(tp,ts);
    Delete(ts);
    Delete(ta);
    Delete(tq);
    return tp;
  } else {
    return NewString(s);
  }
}

static void
rename_add(char *name, SwigType *decl, char *newname) {
  String *nname;
  if (!rename_hash) rename_hash = NewHash();
  if (Namespaceprefix) {
    nname = NewStringf("%s::%s",Namespaceprefix, name);
  } else {
    nname = NewString(name);
  }
  Swig_name_object_set(rename_hash,nname,decl,NewString(newname));
  Delete(nname);
}

static void
namewarn_add(char *name, SwigType *decl, char *warning) {
  String *nname;
  if (!namewarn_hash) namewarn_hash = NewHash();
  if (Namespaceprefix) {
    nname = NewStringf("%s::%s",Namespaceprefix, name);
  } else {
    nname = NewString(name);
  }

  Swig_name_object_set(namewarn_hash,nname,decl,NewString(warning));
  Delete(nname);
}

static void
rename_inherit(String *base, String *derived) {
  /*  Printf(stdout,"base = '%s', derived = '%s'\n", base, derived); */
  Swig_name_object_inherit(rename_hash,base,derived);
  Swig_name_object_inherit(namewarn_hash,base,derived);
  Swig_name_object_inherit(features_hash,base,derived);
}

/* Generate the symbol table name for an object */
/* This is a bit of a mess. Need to clean up */
static String *add_oldname = 0;

static String *make_name(String *name,SwigType *decl) {
  String *rn = 0;
  String *origname = name;
  int     destructor = 0;

  if (name && (*(Char(name)) == '~')) {
    destructor = 1;
  }
  if (yyrename) {
    String *s = yyrename;
    yyrename = 0;
    if (destructor) {
      Insert(s,0,"~");
    }
    return s;
  }
  if (!name) return 0;
  /* Check to see if the name is in the hash */
  if (!rename_hash) {
    if (add_oldname) return Copy(add_oldname);
    return origname;
  }
  rn = Swig_name_object_get(rename_hash, Namespaceprefix, name, decl);
  if (!rn) {
    if (add_oldname) return Copy(add_oldname);
    return name;
  }
  if (destructor) {
    if (Strcmp(rn,"$ignore") != 0) {
      String *s = NewStringf("~%s", rn);
      return s;
    }
  }
  return Copy(rn);
}

/* Generate an unnamed identifier */
static String *make_unnamed() {
  unnamed++;
  return NewStringf("$unnamed%d$",unnamed);
}

/* Generate the symbol table name for an object */
static String *name_warning(String *name,SwigType *decl) {
  String *rn = 0;
  if (!name) return 0;

  /* Check to see if the name is in the hash */
  if (!namewarn_hash) return 0;
  rn = Swig_name_object_get(namewarn_hash, Namespaceprefix,name,decl);
  if (!rn) return 0;
  return rn;
}

/* Add declaration list to symbol table */
static int  add_only_one = 0;


static void add_symbols(Node *n) {
  String *decl;
  String *wrn = 0;

  /* Don't add symbols for private/protected members */
  if (inclass && (cplus_mode != CPLUS_PUBLIC)) {
    while (n) {
      Swig_symbol_add(0, n);       /* Add to C symbol table */
      if (cplus_mode == CPLUS_PRIVATE) {
	Setattr(n,"access", "private");
      } else {
	Setattr(n,"access", "protected");
      }
      if (add_only_one) break;
      n = nextSibling(n);
    }
    return;
  }
  while (n) {
    String *symname;
    if (Getattr(n,"sym:name")) {
      n = nextSibling(n);
      continue;
    }
    decl = Getattr(n,"decl");
    if (!SwigType_isfunction(decl)) {
      symname = make_name(Getattr(n,"name"),0);
      if (!symname) {
	symname = Getattr(n,"unnamed");
      }
      if (symname) {
	wrn = name_warning(symname,0);
	Swig_features_get(features_hash, Namespaceprefix, Getattr(n,"name"), 0, n);
      }
    } else {
      SwigType *fdecl = Copy(decl);
      SwigType *fun = SwigType_pop_function(fdecl);
      symname = make_name(Getattr(n,"name"),fun);
      wrn = name_warning(symname,fun);
      
      Swig_features_get(features_hash,Namespaceprefix,Getattr(n,"name"),fun,n);
      Delete(fdecl);
      Delete(fun);
    }
    if (!symname) {
      n = nextSibling(n);
      continue;
    }
    if (strncmp(Char(symname),"$ignore",7) == 0) {
      char *c = Char(symname)+7;
      Setattr(n,"feature:ignore","1");
      if (strlen(c)) {
	Swig_warning(0,Getfile(n), Getline(n), "%s\n",c+1);
      }
      Swig_symbol_add(0, n);
    } else {
      Node *c;
      if ((wrn) && (Len(wrn))) {
	Swig_warning(0,Getfile(n),Getline(n), "%s\n", wrn);
      }
      if (Strcmp(nodeType(n),"enum") != 0) {
	c = Swig_symbol_add(symname,n);
	if (c != n) {
	  if (Getattr(n,"sym:weak")) {
	    Setattr(n,"sym:name",symname);
	  } else if ((Strcmp(nodeType(n),"template") == 0) && (Strcmp(Getattr(n,"templatetype"),"cdecl") == 0)) {
	    Setattr(n,"sym:name",symname);
	  } else {
	    String *e = NewString("");
	    Printf(e,"Identifier '%s' redeclared (ignored).", symname);
	    if (Cmp(symname,Getattr(n,"name"))) {
	      Printf(e," (Renamed from '%s')", SwigType_namestr(Getattr(n,"name")));
	    }
	    Printf(e,"\n%s:%d: Previous declaration of '%s'", Getfile(c),Getline(c),symname);
	    if (Cmp(symname,Getattr(c,"name"))) {
	      Printf(e," (Renamed from '%s')", SwigType_namestr(Getattr(c,"name")));
	    }
	    Swig_warning(WARN_PARSE_REDEFINED,Getfile(n), Getline(n),"%s\n", e);
	    Setattr(n,"error",e);
	  }
	}
      } else {
	Setattr(n,"sym:name", symname);
      }
    }
    if (add_only_one) return;
    n = nextSibling(n);
  }
}


/* add symbols a parse tree node copy */

void add_symbols_copy(Node *n) {
  String *name;
  int    emode = 0;

  while (n) {

    if (Strcmp(nodeType(n),"access") == 0) {
      String *kind = Getattr(n,"kind");
      if (Strcmp(kind,"public") == 0) {
	cplus_mode = CPLUS_PUBLIC;
      } else if (Strcmp(kind,"private") == 0) {
	cplus_mode = CPLUS_PRIVATE;
      } else if (Strcmp(kind,"protected") == 0) {
	cplus_mode = CPLUS_PROTECTED;
      }
      n = nextSibling(n);
      continue;
    }

    add_oldname = Getattr(n,"sym:name");
    if ((add_oldname) || (Getattr(n,"sym:needs_symtab"))) {
      if (add_oldname) {
	DohIncref(add_oldname);
	/* If already renamed, we used that name */
	if (Strcmp(add_oldname, Getattr(n,"name")) != 0) {
	  yyrename = add_oldname;
	}
      }
      Delattr(n,"sym:needs_symtab");
      Delattr(n,"sym:name");

      add_only_one = 1;
      add_symbols(n);

      if (Getattr(n,"partialargs")) {
	Swig_symbol_cadd(Getattr(n,"partialargs"),n);
      }
      add_only_one = 0;
      name = Getattr(n,"name");
      if (Getattr(n,"requires_symtab")) {
	Swig_symbol_newscope();
	Swig_symbol_setscopename(name);
	Namespaceprefix = Swig_symbol_qualifiedscopename(0);
      }
      if (Strcmp(nodeType(n),"class") == 0) {
	inclass = 1;
	if (Strcmp(Getattr(n,"kind"),"class") == 0) {
	  cplus_mode = CPLUS_PRIVATE;
	} else {
	  cplus_mode = CPLUS_PUBLIC;
	}
      }
      if (Strcmp(nodeType(n),"extend") == 0) {
	emode = cplus_mode;
	cplus_mode = CPLUS_PUBLIC;
      }
      add_symbols_copy(firstChild(n));
      if (Strcmp(nodeType(n),"extend") == 0) {
	cplus_mode = emode;
      }
      if (Getattr(n,"requires_symtab")) {
	Setattr(n,"symtab", Swig_symbol_popscope());
	Delattr(n,"requires_symtab");
	Namespaceprefix = Swig_symbol_qualifiedscopename(0);
      }
      if (add_oldname) {
	Delete(add_oldname);
      }
      if (Strcmp(nodeType(n),"class") == 0) {
	inclass = 0;
      }
      add_oldname = 0;
    } else {
      if (Strcmp(nodeType(n),"extend") == 0) {
	emode = cplus_mode;
	cplus_mode = CPLUS_PUBLIC;
      }
      add_symbols_copy(firstChild(n));
      if (Strcmp(nodeType(n),"extend") == 0) {
	cplus_mode = emode;
      }
    }
    n = nextSibling(n);
  }
}

/* Extension merge.  This function is used to handle the %extend directive
   when it appears before a class definition.   To handle this, the %extend
   actually needs to take precedence.  Therefore, we will selectively nuke symbols
   from the current symbol table, replacing them with the added methods */

static void merge_extensions(Node *cls, Node *am) {
  Node *n;
  Node *csym;

  n = firstChild(am);
  while (n) {
    String *symname;
    if (Strcmp(nodeType(n),"constructor") == 0) {
      symname = Getattr(n,"sym:name");
      if (symname) {
	if (Strcmp(symname,Getattr(n,"name")) == 0) {
	  /* If the name and the sym:name of a constructor are the same,
             then it hasn't been renamed.  However---the name of the class
             itself might have been renamed so we need to do a consistency
             check here */
	  if (Getattr(cls,"sym:name")) {
	    Setattr(n,"sym:name", Getattr(cls,"sym:name"));
	  }
	}
      } 
    }

    symname = Getattr(n,"sym:name");
    DohIncref(symname);
    if ((symname) && (!Getattr(n,"error"))) {
      /* Remove node from its symbol table */
      Swig_symbol_remove(n);
      csym = Swig_symbol_add(symname,n);
      if (csym != n) {
	/* Conflict with previous definition.  Nuke previous definition */
	String *e = NewString("");
	Printf(e,"Identifier '%s' redeclared (ignored).\n", symname);
	Printf(e,"%s:%d: Previous definition of tag '%s'", Getfile(n),Getline(n), symname);
	Swig_warning(WARN_PARSE_REDEFINED,Getfile(csym), Getline(csym), "%s\n", e);
	Setattr(csym,"error",e);
	Swig_symbol_remove(csym);              /* Remove class definition */
	Swig_symbol_add(symname,n);            /* Insert extend definition */
      }
    }
    n = nextSibling(n);
  }
}

/* Check for unused %extend.  Special case, don't report unused
   extensions for templates */
 
 static void check_extensions() {
   String *key;
   if (!extendhash) return;
   for (key = Firstkey(extendhash); key; key = Nextkey(extendhash)) {
     Node *n = Getattr(extendhash,key);
     if (!Strstr(key,"<")) {
       Swig_warning(WARN_PARSE_EXTEND_UNDEF,Getfile(n), Getline(n), "%%extend defined for an undeclared class %s.\n", key);
     }
   }
 }

/* Check a set of declarations to see if any are pure-abstract */

 static List *pure_abstract(Node *n) {
   List *abs = 0;
   while (n) {
     if (Cmp(nodeType(n),"cdecl") == 0) {
       String *decl = Getattr(n,"decl");
       if (SwigType_isfunction(decl)) {
	 String *init = Getattr(n,"value");
	 if (Cmp(init,"0") == 0) {
	   if (!abs) {
	     abs = NewList();
	   }
	   Append(abs,n);
	   Setattr(n,"abstract","1");
	 }
       }
     } else if (Cmp(nodeType(n),"destructor") == 0) {
       if (Cmp(Getattr(n,"value"),"0") == 0) {
	 if (!abs) {
	   abs = NewList();
	 }
	 Append(abs,n);
	 Setattr(n,"abstract","1");
       }
     }
     n = nextSibling(n);
   }
   return abs;
 }

 /* Make a classname */

 static String *make_class_name(String *name) {
   String *nname = 0;
   if (Namespaceprefix) {
     nname= NewStringf("%s::%s", Namespaceprefix, name);
   } else {
     nname = NewString(name);
   }
   if (SwigType_istemplate(nname)) {
     String *prefix, *args, *qargs;
     prefix = SwigType_templateprefix(nname);
     args   = SwigType_templateargs(nname);
     qargs  = Swig_symbol_type_qualify(args,0);
     Append(prefix,qargs);
     Delete(nname);
     nname = prefix;
   }
   return nname;
 }

 static List *make_inherit_list(String *clsname, List *names) {
   int i;
   String *derived;
   List *bases = NewList();

   if (Namespaceprefix) derived = NewStringf("%s::%s", Namespaceprefix,clsname);
   else derived = NewString(clsname);

   for (i = 0; i < Len(names); i++) {
     Node *s;
     String *base;
     String *n = Getitem(names,i);
     /* Try to figure out where this symbol is */
     s = Swig_symbol_clookup(n,0);
     if (s) {
       while (s && (Strcmp(nodeType(s),"class") != 0)) {
	 /* Not a class.  Could be a typedef though. */
	 String *storage = Getattr(s,"storage");
	 if (storage && (Strcmp(storage,"typedef") == 0)) {
	   String *nn = Getattr(s,"type");
	   s = Swig_symbol_clookup(nn,Getattr(s,"sym:symtab"));
	 } else {
	   break;
	 }
       }
       if (s && ((Strcmp(nodeType(s),"class") == 0) || (Strcmp(nodeType(s),"template") == 0))) {
	 String *q = Swig_symbol_qualified(s);
	 Append(bases,s);
	 if (q) {
	   base = NewStringf("%s::%s", q, Getattr(s,"name"));
	 } else {
	   base = NewString(Getattr(s,"name"));
	 }
       } else {
	 base = NewString(n);
       }
     } else {
       base = NewString(n);
     }
     if (base) {
       rename_inherit(base,derived);
       Delete(base);
     }
   }
   return bases;
 }

/* Structures for handling code fragments built for nested classes */

typedef struct Nested {
  String   *code;        /* Associated code fragment */
  int      line;         /* line number where it starts */
  char     *name;        /* Name associated with this nested class */
  char     *kind;        /* Kind of class */
  SwigType *type;        /* Datatype associated with the name */
  struct Nested   *next;        /* Next code fragment in list */
} Nested;

/* Some internal variables for saving nested class information */

static Nested      *nested_list = 0;

/* Add a function to the nested list */

static void add_nested(Nested *n) {
  Nested *n1;
  if (!nested_list) nested_list = n;
  else {
    n1 = nested_list;
    while (n1->next) n1 = n1->next;
    n1->next = n;
  }
}

/* Dump all of the nested class declarations to the inline processor
 * However.  We need to do a few name replacements and other munging
 * first.  This function must be called before closing a class! */

static Node *dump_nested(char *parent) {
  Nested *n,*n1;
  Node *ret = 0;
  n = nested_list;
  if (!parent) {
    nested_list = 0;
    return 0;
  }
  while (n) {
    char temp[256];
    Node *retx;
    /* Token replace the name of the parent class */
    Replace(n->code, "$classname", parent, DOH_REPLACE_ANY);
    /* Fix up the name of the datatype (for building typedefs and other stuff) */
    sprintf(temp,"%s_%s", parent,n->name);

    Append(n->type,parent);
    Append(n->type,"_");
    Append(n->type,n->name);

    /* Add the appropriate declaration to the C++ processor */
    retx = new_node("cdecl");
    Setattr(retx,"name",n->name);
    Setattr(retx,"type",Copy(n->type));
    Setattr(retx,"nested",parent);
    add_symbols(retx);
    if (ret) {
      set_nextSibling(retx,ret);
    }
    ret = retx;

    /* Insert a forward class declaration */
    /* Disabled: [ 597599 ] union in class: incorrect scope 
    retx = new_node("classforward");
    Setattr(retx,"kind",n->kind);
    Setattr(retx,"name",Copy(n->type));
    Setattr(retx,"sym:name", make_name(n->type,0));
    set_nextSibling(retx,ret);
    ret = retx; 
    */

    /* Make all SWIG created typedef structs/unions/classes unnamed else 
       redefinition errors occur - nasty hack alert.*/

    {
      const char* types_array[3] = {"struct", "union", "class"};
      int i;
      for (i=0; i<3; i++) {
	char* code_ptr = Char(n->code);
      while (code_ptr) {
        /* Replace struct name (as in 'struct name {' ) with whitespace
           name will be between struct and { */
	
        code_ptr = strstr(code_ptr, types_array[i]);
        if (code_ptr) {
	  char *open_bracket_pos;
          code_ptr += strlen(types_array[i]);
          open_bracket_pos = strstr(code_ptr, "{");
          if (open_bracket_pos) { 
            /* Make sure we don't have something like struct A a; */
            char* semi_colon_pos = strstr(code_ptr, ";");
            if (!(semi_colon_pos && (semi_colon_pos < open_bracket_pos)))
              while (code_ptr < open_bracket_pos)
                *code_ptr++ = ' ';
          }
        }
      }
      }
    }
    
    {
      /* Remove SWIG directive %constant which may be left in the SWIG created typedefs */
      char* code_ptr = Char(n->code);
      while (code_ptr) {
	code_ptr = strstr(code_ptr, "%constant");
	if (code_ptr) {
	  char* directive_end_pos = strstr(code_ptr, ";");
	  if (directive_end_pos) { 
            while (code_ptr <= directive_end_pos)
              *code_ptr++ = ' ';
	  }
	}
      }
    }
    {
      Node *head;
      head = new_node("insert");
      Setattr(head,"code",NewStringf("\n%s\n",n->code));
      set_nextSibling(head,ret);
      ret = head;
    }
      
    /* Dump the code to the scanner */
    start_inline(Char(n->code),n->line);

    n1 = n->next;
    Delete(n->code);
    free(n);
    n = n1;
  }
  nested_list = 0;
  return ret;
}

Node *Swig_cparse(File *f) {
  extern void scanner_file(File *);
  extern int yyparse();
  scanner_file(f);
  top = 0;
  yyparse();
  return top;
}


#line 783 "parser.y"
typedef union {
  char  *id;
  List  *bases;
  struct Define {
    String *val;
    String *rawval;
    int     type;
    String *qualifier;
    String *bitfield;
    Parm   *throws;
  } dtype;
  struct {
    char *type;
    char *filename;
    int   line;
  } loc;
  struct {
    char      *id;
    SwigType  *type;
    String    *defarg;
    ParmList  *parms;
    short      have_parms;
    ParmList  *throws;
  } decl;
  Parm         *tparms;
  struct {
    String     *op;
    Hash       *kwargs;
  } tmap;
  struct {
    String     *type;
    String     *us;
  } ptype;
  SwigType     *type;
  String       *str;
  Parm         *p;
  ParmList     *pl;
  int           ivalue;
  Node         *node;
} YYSTYPE;
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		810
#define	YYFLAG		-32768
#define	YYNTBASE	111

#define YYTRANSLATE(x) ((unsigned)(x) <= 365 ? yytranslate[x] : 247)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     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,
    76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
    86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
    96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
   106,   107,   108,   109,   110
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     6,     9,    12,    14,    16,    18,    20,    22,
    24,    26,    29,    31,    33,    35,    37,    39,    41,    43,
    45,    47,    49,    51,    53,    55,    57,    59,    61,    63,
    65,    67,    69,    71,    72,    80,    86,    90,    96,   102,
   106,   109,   112,   118,   121,   127,   130,   138,   146,   147,
   155,   157,   159,   162,   164,   170,   176,   182,   186,   191,
   195,   203,   212,   218,   222,   224,   226,   230,   232,   237,
   245,   252,   254,   256,   264,   274,   280,   288,   290,   292,
   298,   306,   308,   312,   319,   326,   335,   337,   340,   344,
   346,   349,   353,   360,   366,   376,   379,   381,   383,   389,
   395,   397,   402,   404,   406,   409,   415,   422,   430,   439,
   446,   448,   450,   452,   454,   456,   458,   459,   469,   470,
   479,   481,   484,   489,   490,   497,   501,   503,   505,   507,
   509,   511,   513,   517,   522,   523,   530,   531,   537,   543,
   546,   547,   554,   556,   557,   561,   563,   565,   567,   569,
   571,   573,   575,   577,   581,   583,   585,   587,   589,   591,
   593,   595,   602,   609,   617,   626,   635,   643,   649,   652,
   655,   658,   659,   667,   668,   675,   677,   679,   681,   683,
   685,   687,   689,   691,   693,   695,   697,   699,   701,   704,
   707,   710,   715,   718,   724,   726,   729,   731,   733,   735,
   737,   739,   741,   744,   746,   750,   752,   755,   762,   766,
   768,   771,   773,   777,   779,   781,   783,   785,   788,   792,
   795,   798,   800,   803,   806,   808,   810,   812,   814,   817,
   821,   823,   826,   830,   835,   841,   846,   848,   851,   855,
   860,   866,   870,   875,   880,   882,   885,   890,   895,   901,
   905,   910,   915,   917,   920,   923,   927,   929,   932,   934,
   937,   941,   946,   950,   955,   958,   962,   966,   971,   975,
   979,   982,   985,   987,   989,   992,   994,   996,   998,  1001,
  1003,  1005,  1007,  1009,  1012,  1015,  1017,  1020,  1022,  1025,
  1027,  1029,  1032,  1034,  1036,  1038,  1040,  1042,  1044,  1046,
  1048,  1049,  1052,  1054,  1056,  1058,  1060,  1064,  1066,  1068,
  1072,  1074,  1076,  1078,  1080,  1086,  1088,  1090,  1094,  1099,
  1105,  1111,  1118,  1120,  1122,  1124,  1126,  1128,  1130,  1132,
  1136,  1140,  1144,  1148,  1152,  1156,  1160,  1164,  1168,  1172,
  1176,  1179,  1182,  1185,  1188,  1191,  1193,  1194,  1198,  1200,
  1202,  1206,  1209,  1214,  1216,  1218,  1220,  1222,  1224,  1226,
  1228,  1230,  1232,  1234,  1239,  1245,  1247,  1251,  1255,  1260,
  1265,  1269,  1272,  1274,  1276,  1280,  1283,  1287,  1289,  1291,
  1293,  1295,  1297,  1300,  1305,  1307,  1311,  1313,  1317,  1321,
  1324,  1327,  1330,  1333,  1336,  1341,  1343,  1347,  1349,  1353,
  1357,  1360,  1363,  1366,  1369,  1371,  1373,  1375,  1377,  1381,
  1383,  1387,  1393,  1395,  1399,  1401,  1403
};

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

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   925,   937,   940,   945,   949,   954,   955,   956,   957,   958,
   970,   986,   996,   997,   998,   999,  1000,  1001,  1002,  1003,
  1004,  1005,  1006,  1007,  1008,  1009,  1010,  1011,  1012,  1013,
  1014,  1015,  1016,  1023,  1051,  1095,  1105,  1116,  1134,  1155,
  1166,  1175,  1194,  1200,  1206,  1211,  1221,  1227,  1243,  1248,
  1270,  1271,  1278,  1307,  1311,  1321,  1326,  1341,  1355,  1359,
  1371,  1377,  1403,  1409,  1416,  1417,  1420,  1421,  1429,  1440,
  1484,  1495,  1498,  1511,  1558,  1610,  1621,  1634,  1635,  1636,
  1641,  1677,  1678,  1707,  1719,  1727,  1740,  1762,  1768,  1772,
  1775,  1783,  1788,  1800,  1810,  2045,  2055,  2061,  2065,  2081,
  2134,  2138,  2157,  2163,  2168,  2173,  2178,  2190,  2198,  2246,
  2293,  2294,  2295,  2296,  2297,  2298,  2301,  2359,  2438,  2450,
  2536,  2537,  2549,  2567,  2567,  2780,  2786,  2789,  2792,  2795,
  2798,  2803,  2835,  2841,  2868,  2885,  2895,  2906,  2915,  2942,
  2956,  2960,  2966,  2967,  2976,  2987,  2988,  3002,  3003,  3004,
  3005,  3006,  3007,  3008,  3009,  3010,  3011,  3012,  3013,  3014,
  3015,  3024,  3045,  3061,  3094,  3108,  3125,  3143,  3150,  3157,
  3165,  3188,  3189,  3217,  3218,  3244,  3245,  3251,  3254,  3258,
  3261,  3262,  3263,  3264,  3265,  3266,  3267,  3268,  3271,  3274,
  3277,  3284,  3291,  3301,  3307,  3308,  3316,  3317,  3318,  3319,
  3320,  3327,  3338,  3346,  3349,  3353,  3357,  3367,  3372,  3380,
  3393,  3401,  3404,  3408,  3412,  3438,  3444,  3452,  3462,  3488,
  3496,  3503,  3512,  3516,  3520,  3527,  3544,  3561,  3569,  3577,
  3586,  3590,  3599,  3610,  3622,  3632,  3645,  3652,  3660,  3676,
  3684,  3695,  3706,  3717,  3736,  3744,  3761,  3769,  3776,  3787,
  3798,  3809,  3828,  3834,  3840,  3847,  3856,  3859,  3868,  3875,
  3882,  3892,  3903,  3914,  3925,  3932,  3939,  3942,  3959,  3969,
  3976,  3982,  3987,  3993,  3997,  4003,  4004,  4010,  4016,  4020,
  4023,  4026,  4027,  4028,  4029,  4030,  4031,  4036,  4039,  4044,
  4069,  4072,  4114,  4118,  4122,  4126,  4130,  4134,  4138,  4142,
  4148,  4148,  4155,  4162,  4179,  4180,  4185,  4198,  4207,  4213,
  4226,  4229,  4238,  4249,  4250,  4255,  4256,  4274,  4281,  4285,
  4290,  4295,  4303,  4304,  4305,  4306,  4307,  4308,  4309,  4312,
  4316,  4320,  4324,  4328,  4332,  4336,  4340,  4344,  4348,  4352,
  4356,  4360,  4364,  4368,  4372,  4383,  4388,  4388,  4389,  4392,
  4397,  4403,  4413,  4425,  4426,  4427,  4431,  4435,  4439,  4443,
  4449,  4450,  4453,  4457,  4461,  4465,  4471,  4477,  4483,  4490,
  4497,  4504,  4505,  4508,  4509,  4512,  4518,  4524,  4527,  4528,
  4531,  4532,  4535,  4540,  4544,  4547,  4550,  4553,  4558,  4562,
  4565,  4572,  4578,  4587,  4592,  4596,  4599,  4602,  4605,  4610,
  4614,  4617,  4620,  4626,  4631,  4634,  4637,  4641,  4646,  4659,
  4663,  4668,  4674,  4678,  4685,  4688,  4693
};
#endif


#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)

static const char * const yytname[] = {   "$","error","$undefined.","ID","HBLOCK",
"POUND","STRING","INCLUDE","IMPORT","INSERT","CHARCONST","NUM_INT","NUM_FLOAT",
"NUM_UNSIGNED","NUM_LONG","NUM_ULONG","NUM_LONGLONG","NUM_ULONGLONG","TYPEDEF",
"TYPE_INT","TYPE_UNSIGNED","TYPE_SHORT","TYPE_LONG","TYPE_FLOAT","TYPE_DOUBLE",
"TYPE_CHAR","TYPE_VOID","TYPE_SIGNED","TYPE_BOOL","TYPE_TYPEDEF","TYPE_RAW",
"LPAREN","RPAREN","COMMA","SEMI","EXTERN","INIT","LBRACE","RBRACE","PERIOD",
"CONST","VOLATILE","STRUCT","UNION","EQUAL","SIZEOF","MODULE","LBRACKET","RBRACKET",
"ILLEGAL","CONSTANT","NAME","RENAME","NAMEWARN","EXTEND","PRAGMA","FEATURE",
"VARARGS","ENUM","CLASS","TYPENAME","PRIVATE","PUBLIC","PROTECTED","COLON","STATIC",
"VIRTUAL","FRIEND","THROW","CATCH","USING","NAMESPACE","NATIVE","INLINE","TYPEMAP",
"EXCEPT","ECHO","APPLY","CLEAR","SWIGTEMPLATE","FRAGMENT","WARN","LESSTHAN",
"GREATERTHAN","MODULO","DELETE","TYPES","PARMS","NONID","DSTAR","DCNOT","TEMPLATE",
"OPERATOR","COPERATOR","PARSETYPE","CAST","LOR","LAND","OR","XOR","AND","LSHIFT",
"RSHIFT","PLUS","MINUS","STAR","SLASH","UMINUS","NOT","LNOT","DCOLON","program",
"interface","declaration","swig_directive","extend_directive","@1","apply_directive",
"clear_directive","constant_directive","echo_directive","except_directive","fragment_directive",
"include_directive","@2","includetype","inline_directive","insert_directive",
"module_directive","name_directive","native_directive","pragma_directive","pragma_arg",
"pragma_lang","rename_directive","rename_namewarn","feature_directive","stringbracesemi",
"varargs_directive","varargs_parms","typemap_directive","typemap_type","tm_list",
"tm_tail","typemap_parm","types_directive","template_directive","warn_directive",
"c_declaration","c_decl","c_decl_tail","initializer","c_enum_decl","c_constructor_decl",
"cpp_declaration","cpp_class_decl","@3","@4","cpp_opt_declarators","cpp_forward_class_decl",
"cpp_template_decl","@5","cpp_temp_possible","template_parms","cpp_using_decl",
"cpp_namespace_decl","@6","@7","cpp_members","@8","@9","cpp_member","cpp_constructor_decl",
"cpp_destructor_decl","cpp_conversion_operator","cpp_catch_decl","cpp_protection_decl",
"cpp_nested","@10","@11","nested_decl","cpp_swig_directive","cpp_end","cpp_vend",
"anonymous_bitfield","storage_class","parms","rawparms","ptail","parm","valparms",
"rawvalparms","valptail","valparm","def_args","parameter_declarator","typemap_parameter_declarator",
"declarator","notso_direct_declarator","direct_declarator","abstract_declarator",
"direct_abstract_declarator","pointer","type_qualifier","type_qualifier_raw",
"type","rawtype","type_right","primitive_type","primitive_type_list","type_specifier",
"definetype","@12","ename","enumlist","edecl","etype","expr","exprnum","exprcompound",
"inherit","raw_inherit","@13","base_list","base_specifier","access_specifier",
"cpptype","opt_virtual","cpp_const","ctor_end","ctor_initializer","mem_initializer_list",
"mem_initializer","template_decl","idstring","idstringopt","idcolon","idcolontail",
"idtemplate","idcolonnt","idcolontailnt","string","stringbrace","options","kwargs",
"stringnum","empty", NULL
};
#endif

static const short yyr1[] = {     0,
   111,   111,   111,   112,   112,   113,   113,   113,   113,   113,
   113,   113,   114,   114,   114,   114,   114,   114,   114,   114,
   114,   114,   114,   114,   114,   114,   114,   114,   114,   114,
   114,   114,   114,   116,   115,   117,   118,   119,   119,   119,
   120,   120,   121,   121,   121,   121,   122,   122,   124,   123,
   125,   125,   126,   127,   127,   127,   127,   128,   129,   129,
   130,   130,   131,   131,   132,   132,   133,   133,   134,   134,
   134,   135,   135,   136,   136,   136,   136,   137,   137,   137,
   138,   139,   139,   140,   140,   140,   141,   142,   143,   143,
   144,   144,   144,   145,   146,   147,   148,   148,   148,   149,
   150,   150,   150,   151,   151,   151,   151,   152,   152,   153,
   154,   154,   154,   154,   154,   154,   156,   155,   157,   155,
   158,   158,   159,   161,   160,   160,   162,   162,   162,   162,
   162,   163,   164,   164,   166,   165,   167,   165,   165,   168,
   169,   168,   168,   170,   168,   171,   171,   171,   171,   171,
   171,   171,   171,   171,   171,   171,   171,   171,   171,   171,
   171,   172,   173,   173,   174,   174,   174,   175,   176,   176,
   176,   178,   177,   179,   177,   180,   180,   181,   181,   181,
   181,   181,   181,   181,   181,   181,   181,   181,   182,   182,
   183,   183,   183,   184,   185,   185,   185,   185,   185,   185,
   185,   186,   187,   187,   188,   188,   189,   189,   189,   190,
   191,   191,   192,   192,   193,   193,   193,   194,   194,   194,
   194,   194,   195,   195,   195,   196,   196,   196,   197,   197,
   197,   197,   197,   197,   197,   197,   198,   198,   198,   198,
   198,   198,   198,   198,   199,   199,   199,   199,   199,   199,
   199,   199,   200,   200,   200,   200,   200,   200,   200,   200,
   200,   200,   201,   201,   201,   201,   201,   201,   201,   202,
   202,   202,   202,   203,   203,   204,   204,   205,   206,   206,
   207,   207,   207,   207,   207,   207,   207,   207,   207,   208,
   209,   209,   210,   210,   210,   210,   210,   210,   210,   210,
   212,   211,   211,   211,   213,   213,   214,   214,   215,   215,
   215,   216,   216,   217,   217,   217,   217,   217,   217,   217,
   217,   217,   218,   218,   218,   218,   218,   218,   218,   219,
   219,   219,   219,   219,   219,   219,   219,   219,   219,   219,
   219,   219,   219,   219,   219,   220,   222,   221,   221,   223,
   223,   224,   224,   225,   225,   225,   226,   226,   226,   226,
   227,   227,   228,   228,   228,   228,   229,   229,   229,   229,
   229,   230,   230,   231,   231,   232,   233,   233,   234,   234,
   235,   235,   236,   236,   236,   236,   236,   236,   237,   237,
   237,   237,   238,   239,   239,   239,   239,   239,   239,   240,
   240,   240,   240,   241,   241,   242,   242,   242,   243,   243,
   244,   244,   244,   244,   245,   245,   246
};

static const short yyr2[] = {     0,
     1,     3,     2,     2,     1,     1,     1,     1,     1,     1,
     1,     2,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     0,     7,     5,     3,     5,     5,     3,
     2,     2,     5,     2,     5,     2,     7,     7,     0,     7,
     1,     1,     2,     1,     5,     5,     5,     3,     4,     3,
     7,     8,     5,     3,     1,     1,     3,     1,     4,     7,
     6,     1,     1,     7,     9,     5,     7,     1,     1,     5,
     7,     1,     3,     6,     6,     8,     1,     2,     3,     1,
     2,     3,     6,     5,     9,     2,     1,     1,     5,     5,
     1,     4,     1,     1,     2,     5,     6,     7,     8,     6,
     1,     1,     1,     1,     1,     1,     0,     9,     0,     8,
     1,     2,     4,     0,     6,     3,     1,     1,     1,     1,
     1,     1,     3,     4,     0,     6,     0,     5,     5,     2,
     0,     6,     1,     0,     3,     1,     1,     1,     1,     1,
     1,     1,     1,     3,     1,     1,     1,     1,     1,     1,
     1,     6,     6,     7,     8,     8,     7,     5,     2,     2,
     2,     0,     7,     0,     6,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
     2,     4,     2,     5,     1,     2,     1,     1,     1,     1,
     1,     1,     2,     1,     3,     1,     2,     6,     3,     1,
     2,     1,     3,     1,     1,     1,     1,     2,     3,     2,
     2,     1,     2,     2,     1,     1,     1,     1,     2,     3,
     1,     2,     3,     4,     5,     4,     1,     2,     3,     4,
     5,     3,     4,     4,     1,     2,     4,     4,     5,     3,
     4,     4,     1,     2,     2,     3,     1,     2,     1,     2,
     3,     4,     3,     4,     2,     3,     3,     4,     3,     3,
     2,     2,     1,     1,     2,     1,     1,     1,     2,     1,
     1,     1,     1,     2,     2,     1,     2,     1,     2,     1,
     1,     2,     1,     1,     1,     1,     1,     1,     1,     1,
     0,     2,     1,     1,     1,     1,     3,     1,     1,     3,
     1,     1,     1,     1,     5,     1,     1,     3,     4,     5,
     5,     6,     1,     1,     1,     1,     1,     1,     1,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     2,     2,     2,     2,     2,     1,     0,     3,     1,     1,
     3,     2,     4,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     4,     5,     1,     3,     3,     4,     4,
     3,     2,     1,     1,     3,     2,     3,     1,     1,     1,
     1,     1,     2,     4,     1,     3,     1,     3,     3,     2,
     2,     2,     2,     2,     4,     1,     3,     1,     3,     3,
     2,     2,     2,     2,     1,     1,     1,     1,     3,     1,
     3,     5,     1,     3,     1,     1,     0
};

static const short yydefact[] = {   417,
     0,     0,     5,     3,   417,   293,   300,   294,   295,   297,
   298,   296,   283,   299,   282,   417,   286,     0,   276,   277,
   358,   359,     0,   357,   360,     0,     0,   387,     0,     0,
   274,   417,   280,   281,   290,   291,     0,   288,   385,    10,
    54,    51,    52,     0,   198,     9,   195,   417,     0,     0,
    72,    73,   417,   417,     0,     0,   197,   199,   200,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     4,     6,    13,    14,    15,    16,
    17,    18,    19,    20,   417,    21,    22,    23,    24,    25,
    26,    27,     0,    28,    29,    30,    31,    32,    33,     7,
    97,    98,    11,     8,   111,   112,   113,   114,   115,   116,
     0,   201,   417,   393,   378,   284,     0,   285,     0,     0,
     2,   279,   275,   417,   301,     0,     0,   259,   273,     0,
   225,   207,   417,   231,   417,   257,   253,   245,   222,   287,
   292,   289,     0,     0,   383,    12,     0,   405,   196,     0,
     0,   410,     0,   417,     0,   278,     0,     0,     0,     0,
    68,     0,   417,   417,     0,     0,   417,   137,     0,     0,
    53,     0,     0,    46,    44,    41,    42,   417,     0,   417,
     0,   417,   417,     0,    96,   417,   417,     0,     0,     0,
     0,     0,     0,   245,   417,     0,     0,   217,   323,   324,
   325,   326,   327,   328,   329,   215,     0,   210,   417,   216,
   212,   209,   388,   386,     0,   417,   259,     0,   202,   417,
     0,   253,   288,   204,   304,   220,     0,   218,     0,   303,
     0,     0,   265,     0,     0,     0,     0,   317,     0,   314,
   316,   221,   417,     0,   232,   258,   237,   271,   272,   246,
   223,   417,     0,   224,   417,     0,   255,   229,   254,   237,
   260,   392,   391,   390,   379,     0,   380,   404,   417,   413,
     0,    58,    40,   301,     0,   417,    60,     0,     0,     0,
    64,     0,     0,     0,    82,     0,     0,   133,     0,   417,
   135,     0,     0,    87,     0,     0,     0,    91,   226,   227,
   228,    37,     0,    88,    90,   381,     0,   382,     0,     0,
     0,   132,   126,     0,   417,     0,     0,     0,     0,     0,
     0,     0,   237,     0,   417,     0,   306,   417,   417,   119,
   289,   377,     0,   211,   214,   384,     0,   259,   253,   288,
     0,   245,   269,     0,   203,   206,   267,   255,     0,   245,
   260,   219,   302,     0,     0,   342,   341,   343,   344,   345,
   266,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,   253,   288,   238,   417,     0,   270,     0,   250,
     0,     0,   263,     0,   230,   256,   261,     0,   233,   389,
     0,     0,     0,     0,   409,     0,     0,    59,    34,    67,
     0,     0,     0,     0,     0,     0,   134,     0,     0,   417,
   417,     0,     0,    92,     0,   417,     0,     0,     0,   124,
    49,     0,     0,     0,     0,    69,     0,   417,     0,   288,
     0,     0,   104,   417,     0,   123,   347,     0,   346,   349,
   417,     0,     0,   260,   248,   417,   247,   261,     0,   318,
     0,   273,     0,   417,   340,   339,   335,   336,   334,   337,
   338,   330,   331,   332,   333,     0,   237,   239,   260,     0,
   242,     0,   252,   251,   268,   264,     0,   234,   262,   236,
    56,    57,    55,    99,   414,   416,   415,   411,    38,    39,
     0,    66,    63,    65,   408,    79,   407,     0,    76,   417,
   406,    78,     0,    83,   417,   168,   139,   138,     0,   195,
     0,     0,    45,    43,   417,    36,    89,   396,     0,   398,
     0,     0,    94,   417,   417,   417,     0,     0,   309,     0,
   308,   311,   417,   417,     0,   101,   103,   100,     0,   105,
   144,   161,     0,     0,     0,     0,   199,     0,   186,   187,
   179,   188,   184,   180,   178,   181,   182,   183,   185,   158,
   159,   146,   152,   156,   155,     0,     0,   147,   148,   151,
   157,   149,   153,   150,   160,     0,   201,   417,   117,   213,
   208,   205,   249,   319,     0,   272,     0,     0,     0,   240,
     0,   244,   243,   235,     0,     0,   417,     0,   363,     0,
   366,     0,     0,   136,   196,   417,     0,    85,     0,    84,
     0,     0,     0,   394,     0,   417,     0,   127,   128,   131,
   130,   125,   129,     0,     0,     0,    71,     0,   417,     0,
   417,   301,   417,   110,     0,   417,   417,     0,   141,   170,
   169,   171,     0,     0,     0,   140,     0,     0,     0,   288,
   361,   348,   350,     0,   362,     0,   321,   320,     0,   315,
   241,   412,    35,     0,   417,     0,    74,    77,   417,    81,
    61,     0,     0,    93,   403,   401,   402,   397,   399,     0,
    47,    48,     0,    50,    70,   313,   310,   312,   307,   108,
     0,     0,     0,     0,     0,   373,   417,     0,     0,   145,
     0,     0,   417,     0,     0,   417,     0,   417,   174,   289,
   154,   417,   355,   354,   356,   417,   352,     0,   322,     0,
     0,   417,     0,    62,    86,   400,   395,     0,   109,     0,
   371,   372,   374,     0,   367,   368,   106,   102,   417,     0,
   417,     0,   120,   417,     0,     0,     0,     0,   172,   417,
   351,     0,     0,    80,   364,     0,    75,    95,   369,   370,
     0,   376,   107,     0,     0,   417,     0,   417,   417,   417,
   194,   417,     0,   176,   177,   353,   121,   118,     0,   365,
   375,   142,   417,   163,     0,   417,     0,     0,   162,     0,
   175,   122,   164,     0,   189,   190,   167,   417,   417,   173,
   191,   193,   301,   166,   165,     0,   192,     0,     0,     0
};

static const short yydefgoto[] = {   808,
     2,    75,    76,    77,   491,   549,   550,   551,   552,    82,
    83,    84,   525,    85,    86,   553,    88,   554,    90,   555,
   493,   160,   556,    93,   557,   499,   558,   284,   559,   293,
   181,   304,   182,    97,   560,   561,   562,   101,   538,   432,
   102,   103,   104,   105,   656,   435,   778,   563,   564,   524,
   622,   311,   565,   109,   410,   290,   566,   701,   638,   567,
   568,   569,   570,   571,   572,   573,   772,   750,   773,   574,
   784,   793,   575,   576,   218,   219,   345,   220,   207,   208,
   334,   209,   131,   132,   298,   329,   245,   134,   221,   136,
   193,    30,    31,   238,   156,    33,    34,    35,    36,   228,
   229,   326,   530,   531,   687,   459,   240,   241,   438,   439,
   578,   652,   653,   716,    37,   654,   794,   634,   695,   732,
   733,   114,   270,   307,    38,   145,    39,   521,   614,   267,
   502,   151,   271,   488,   224
};

static const short yypact[] = {   -10,
  2427,  2002,-32768,-32768,    -5,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,    -5,-32768,    72,-32768,-32768,
-32768,-32768,    17,-32768,-32768,   -16,    44,-32768,   102,  2890,
   218,   219,   218,-32768,-32768,  1079,    17,-32768,    91,    52,
-32768,-32768,-32768,   236,-32768,-32768,   293,   260,  2470,   282,
-32768,-32768,   260,   314,   325,   332,-32768,-32768,-32768,   339,
    36,    42,   347,   390,   369,   458,   324,  2722,  2722,   426,
   428,   293,   430,   572,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,   260,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,   817,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  2764,-32768,  2596,-32768,-32768,-32768,   424,-32768,    31,   868,
-32768,   218,-32768,  1256,    25,  1351,   485,    85,   157,    17,
-32768,-32768,    74,    24,    74,   153,   307,   408,-32768,-32768,
-32768,-32768,   501,    65,-32768,-32768,   442,-32768,   235,   442,
   442,-32768,   472,   104,   861,-32768,   359,    17,   510,   518,
-32768,   442,  2638,  2680,    17,   481,   167,-32768,   490,   529,
-32768,   442,   537,-32768,-32768,-32768,   542,  2680,   526,   285,
   531,   551,   442,   442,   542,  2680,  2680,    17,   293,   573,
   163,   442,   138,   494,    22,   863,   141,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,   492,-32768,   552,-32768,
-32768,-32768,-32768,    91,   503,  1825,   140,   575,-32768,   577,
   587,   901,   528,-32768,-32768,-32768,    17,-32768,  1771,   542,
  1771,   590,-32768,  1771,  1771,  1771,  1771,   592,  1226,-32768,
-32768,-32768,  1825,    17,   176,   153,-32768,-32768,   522,-32768,
-32768,  2680,  1450,-32768,  2680,  1503,    85,   176,   153,   539,
   386,-32768,-32768,    91,-32768,   607,   542,-32768,-32768,   155,
   608,-32768,-32768,   434,   724,    74,-32768,   616,   612,   628,
   619,   420,   635,   639,-32768,   645,   651,-32768,    17,-32768,
-32768,   655,   657,-32768,   670,   675,  2722,-32768,-32768,-32768,
-32768,-32768,  2722,-32768,-32768,-32768,   678,-32768,   661,   681,
   634,-32768,-32768,    54,    14,   214,   214,   687,   633,   114,
   692,   163,   646,   386,     5,   691,-32768,  1868,   762,-32768,
   283,-32768,  2596,-32768,-32768,-32768,   868,   290,   411,   653,
   249,-32768,-32768,  2680,-32768,-32768,-32768,   290,   550,   654,
   214,-32768,  1237,  1126,  2806,-32768,-32768,-32768,-32768,-32768,
-32768,  1771,  1771,  1771,  1771,  1771,  1771,  1771,  1771,  1771,
  1771,  1771,   911,    40,-32768,  2680,  1557,-32768,   708,-32768,
  1881,   712,-32768,  2478,   176,   153,   961,   163,   176,-32768,
   297,  2088,   442,  1029,-32768,   718,   723,-32768,-32768,-32768,
   382,   717,   442,  2680,   861,   709,-32768,   729,  2174,-32768,
   315,  2722,   486,   738,   739,   551,    87,   442,   745,-32768,
-32768,   116,   214,   163,   136,-32768,   667,   777,   749,   633,
   751,   371,-32768,   241,  1127,-32768,-32768,   747,-32768,-32768,
   552,    17,   654,-32768,-32768,   577,-32768,   290,   610,  1771,
  1610,  1664,    12,   219,  1328,  1152,  1284,  1140,  1070,   448,
   448,   378,   378,-32768,-32768,   700,   654,-32768,   163,   753,
-32768,  2855,-32768,-32768,-32768,-32768,   163,   176,   153,   176,
-32768,-32768,   542,-32768,-32768,-32768,   542,   756,-32768,-32768,
  1127,-32768,-32768,   542,-32768,-32768,-32768,   759,-32768,   300,
   542,-32768,   760,-32768,   300,-32768,-32768,-32768,  2260,   293,
  2848,   840,-32768,-32768,  2680,-32768,-32768,   208,   684,-32768,
   715,   775,-32768,   585,-32768,   300,    32,   163,   764,   319,
-32768,-32768,   216,  2680,   861,-32768,-32768,-32768,   780,-32768,
-32768,-32768,   778,   750,   769,   771,   730,   501,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   799,  1127,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,  2513,   802,   779,-32768,-32768,
-32768,-32768,-32768,  1237,  1771,  1912,  1771,   815,   818,-32768,
   706,-32768,-32768,   176,   442,   814,  2680,   824,   789,   338,
-32768,   261,   827,-32768,   542,     7,   861,-32768,  2722,-32768,
   830,   860,    66,-32768,    97,  2596,   231,-32768,-32768,-32768,
-32768,-32768,-32768,  2806,  2346,   831,-32768,  1717,   777,   504,
  2680,   434,   803,-32768,   837,   762,  2680,  1127,-32768,-32768,
-32768,-32768,   501,   839,   861,-32768,  2806,   591,   173,   841,
-32768,   838,-32768,   538,-32768,  1127,  1237,  1237,  1771,-32768,
-32768,-32768,-32768,   844,  2680,   842,-32768,-32768,   300,-32768,
-32768,   848,   849,-32768,-32768,   208,-32768,   208,-32768,   805,
-32768,-32768,   974,-32768,-32768,-32768,-32768,  1237,-32768,-32768,
   371,   854,   855,    17,   512,-32768,    74,   371,   869,-32768,
  1127,   864,  2680,   371,   134,  1868,   889,    26,-32768,   874,
-32768,   779,-32768,-32768,-32768,   779,-32768,   865,  1237,   878,
   870,  2680,   879,-32768,-32768,-32768,-32768,   882,-32768,   525,
-32768,   886,-32768,   890,-32768,-32768,-32768,-32768,    74,   888,
  2680,   897,-32768,  2680,   899,   902,   903,   900,-32768,   861,
-32768,    17,   731,-32768,-32768,   904,-32768,-32768,-32768,-32768,
    17,-32768,-32768,  1127,   905,   300,   907,  2680,  2680,   216,
-32768,   861,   906,-32768,-32768,-32768,-32768,-32768,   371,-32768,
-32768,-32768,   300,-32768,   536,   300,   909,   912,-32768,   913,
-32768,-32768,-32768,   330,-32768,-32768,-32768,   300,   300,-32768,
-32768,-32768,   434,-32768,-32768,   920,-32768,   943,   945,-32768
};

static const short yypgoto[] = {-32768,
  -250,-32768,-32768,-32768,-32768,     9,    28,    34,    41,-32768,
-32768,-32768,-32768,-32768,-32768,    47,-32768,    55,-32768,    57,
-32768,-32768,    59,-32768,    63,   346,    68,-32768,    78,-32768,
  -260,   540,   -51,-32768,    79,    81,    84,   433,  -640,   323,
-32768,-32768,-32768,   436,-32768,-32768,-32768,    10,    20,-32768,
-32768,-32768,    89,-32768,-32768,-32768,  -464,-32768,-32768,-32768,
   438,-32768,-32768,    93,-32768,-32768,-32768,-32768,   193,-32768,
-32768,  -402,-32768,    21,   353,   783,   521,     2,   356,-32768,
   532,   641,  -126,   524,-32768,    60,   454,  -196,   -18,   -61,
   -31,   -25,-32768,   225,    27,   -17,-32768,   939,-32768,  -256,
-32768,-32768,-32768,   352,-32768,   662,   -80,-32768,-32768,-32768,
-32768,-32768,   264,-32768,   -64,   270,  -427,   224,-32768,-32768,
   227,   979,   -20,-32768,   663,  -162,   -69,-32768,  -254,   -43,
   484,   201,  -157,-32768,     0
};


#define	YYLAST		2982


static const short yytable[] = {     3,
   137,   112,    29,   149,   115,   123,   251,   140,   254,   188,
    78,   106,   122,   135,   294,   115,   179,   396,   392,     5,
   341,   107,   111,   177,   325,   349,   596,    32,   185,    79,
   148,   139,   210,     5,   225,    80,   415,   268,     5,   409,
   671,  -305,    81,   587,   167,  -379,   197,   152,    87,   214,
   729,   336,   152,   161,   252,   215,    89,   738,    91,   268,
    92,   226,   749,   743,    94,   627,   246,     5,   676,    95,
   253,   468,   600,   262,   264,   259,   113,   603,   168,    96,
    98,   230,    99,     1,   152,   100,   113,     5,   113,   518,
   108,   133,   222,   119,   110,   113,   140,   248,   626,   678,
   421,   390,   646,   249,    26,   633,   165,   113,    28,    26,
   117,   588,   211,    28,   206,   243,     5,   125,     5,   341,
   349,   148,   213,    26,   227,   120,   266,    28,   469,    26,
   272,   126,   139,    28,   139,   121,   278,   127,   792,    32,
     5,   282,     5,     5,   146,   314,   275,   274,   137,   397,
    32,   512,   192,   115,   449,   246,   263,   677,   317,   509,
   259,   300,   306,   309,   744,     5,   115,   468,   320,   318,
   124,   321,    26,   700,   519,   708,    28,   330,   520,   301,
   143,   305,   308,   255,   339,   113,   126,   393,   679,    32,
    32,   718,   244,   320,   327,   386,    19,    20,   394,   256,
   144,    26,   433,    26,    32,    28,   376,    28,   335,   709,
   289,   373,    32,    32,   276,   191,     5,   378,   129,   346,
   129,     5,   377,   130,   528,    26,   449,    26,    26,    28,
   230,    28,    28,   745,   681,   485,   740,   322,   129,   299,
   268,   723,    32,   317,   275,   244,   631,   130,   113,   124,
    26,   416,   210,   158,    28,    19,    20,    19,    20,   632,
    26,   129,   125,     5,    28,   126,   147,   682,     3,    32,
   244,   269,   442,   155,   625,   139,   246,   259,    32,   252,
   445,    32,   127,   598,   125,   189,   386,     5,   424,     3,
   150,   275,   180,   180,   668,   253,   317,   612,   148,   782,
   481,    26,   148,   434,   127,    28,    26,   540,   539,     5,
    28,   259,   157,   486,   115,   124,   436,   613,   128,  -417,
   216,   130,   453,   129,   115,   479,   130,   176,   139,   148,
   440,   126,    45,   482,   206,   196,   126,   243,   785,    19,
    20,   495,   633,   148,   159,   446,   437,   483,    26,   510,
   487,   629,    28,   126,    32,   162,   630,   494,   501,    32,
   191,   265,   163,   801,   148,   129,   802,   598,   130,   164,
    32,   496,    26,   803,   497,   693,    28,   170,   527,    57,
    58,    59,   503,   797,   128,   492,   479,   148,     5,   129,
   277,   112,   130,   171,    26,   804,   805,   522,    28,   172,
    78,   106,    32,   535,   536,   504,   257,   537,   112,     3,
   112,   107,   111,     5,   244,   305,   320,    78,   106,    79,
   248,   726,   137,   727,   498,    80,   586,   532,   107,   111,
    32,   511,    81,   139,   577,   135,    79,   662,    87,   148,
   335,   216,    80,   225,   265,   346,    89,   148,    91,    81,
    92,   402,   403,   139,    94,    87,   183,   126,   184,    95,
   186,   500,   212,    89,   505,    91,   605,    92,   501,    96,
    98,    94,    99,    26,   599,   100,    95,    28,   644,   599,
   108,   526,   371,   372,   110,   388,    96,    98,   173,    99,
   577,   174,   100,   244,   175,   242,   261,   108,    26,   601,
   599,   110,    28,     5,   601,   273,     5,   599,   112,   433,
   348,   649,   280,   133,   288,   285,   286,    78,   106,   513,
   281,   180,   514,   112,     3,   601,   291,   180,   107,   111,
   296,   292,   601,   620,   275,   210,    79,   690,   310,   295,
     5,    32,    80,   621,   624,   735,   806,   268,   736,    81,
   369,   370,   371,   372,   378,    87,   501,   673,   759,   197,
    32,   760,   297,    89,   302,    91,   577,    92,   122,   795,
   737,    94,   796,   702,   332,   315,    95,   655,   148,   454,
   252,   447,   324,   303,   333,   337,    96,    98,   230,    99,
   258,    26,   100,     5,   636,    28,   253,   108,   713,   714,
   715,   110,    45,   191,   379,   115,   343,   382,   129,   344,
   434,   130,   763,    21,    22,   211,   351,   206,   347,   510,
   355,   706,   360,    32,   112,    26,   129,   387,   532,    28,
    24,    25,   696,    78,   106,   139,   180,   577,   391,   395,
   252,   583,    32,   599,   107,   111,   258,   398,   399,    57,
    58,    59,    79,   187,   707,   577,   253,    32,    80,   400,
    26,   669,   401,    32,    28,    81,   672,   404,   601,     5,
   405,    87,   316,   746,   317,    74,   406,   129,    26,    89,
   429,    91,    28,    92,   407,   118,   411,    94,   412,   691,
   191,    32,    95,   418,   138,   129,   139,   320,   130,   142,
   577,   413,    96,    98,   704,    99,   414,   115,   100,   417,
   385,   655,   419,   108,   389,   655,   420,   110,   422,     5,
   495,   423,   148,   166,   169,   426,     5,   428,   470,    32,
   376,   590,    32,     5,   427,   607,   376,   661,   139,   473,
   599,   444,   448,   475,   599,   506,   377,   275,    32,   775,
   496,   489,   377,   497,    26,   194,   490,   599,    28,   230,
   599,   275,   507,   577,   777,   601,   477,    32,   515,   601,
    32,   775,   599,   599,   244,   385,   516,   389,   523,   529,
   533,   534,   601,   579,   592,   601,   223,   239,   595,   597,
   247,   602,   250,   615,    32,    32,   616,   601,   601,   260,
   648,    19,    20,   498,    26,   125,   617,   628,    28,   774,
   637,    26,   779,   640,   639,    28,   191,   194,    26,     5,
   279,   129,    28,   316,   130,   127,   466,   287,   129,   431,
   191,   774,   641,   180,   642,   129,   645,   643,   130,  -143,
   478,   480,   138,   495,   651,   148,   659,   190,   683,   660,
   313,   663,   319,   247,   665,   323,   666,   118,   194,   331,
   670,   674,   675,     5,   685,     5,   694,   611,   697,   703,
   712,   705,   722,   608,   711,   720,   497,   466,   340,   342,
   478,   724,   725,   609,   350,   730,   635,   728,   731,   352,
   353,   275,   354,   328,   741,   356,   357,   358,   359,   748,
   739,   755,   753,     5,    26,   374,   375,   436,    28,    21,
    22,   754,   757,     5,   381,   758,   191,   384,   761,   247,
   762,   129,   591,   247,   130,   764,    24,    25,   766,   768,
   594,   124,   769,   771,   770,   780,   783,   319,   786,   791,
   798,   243,   809,   799,   810,   667,   800,   126,    26,   664,
    26,   408,    28,   807,    28,   517,   618,   126,   698,   619,
   191,   623,   191,     5,   790,   129,   582,   129,   130,   312,
   130,   680,   580,   441,   141,   751,     5,   589,   342,   342,
   689,   591,   425,   692,   247,   752,   247,   781,    26,   699,
   430,   243,    28,   789,   116,   610,     0,     0,    26,     0,
   348,   443,    28,     0,   706,     0,     0,   126,   130,     0,
   348,     0,     0,   342,     0,     0,     0,   721,   244,     0,
     0,     0,     0,   455,   456,   457,   458,     0,   460,   461,
   462,   463,   464,   465,   148,   467,     0,     0,   472,   199,
   200,   201,   202,   203,   204,   205,     0,     0,    26,   247,
   247,     0,    28,     0,     0,   742,     0,     0,   747,     0,
   477,    26,     0,     0,   194,    28,     0,   194,   244,     0,
     0,     0,     0,   191,   756,     0,     0,     0,   129,     0,
     0,   130,     0,     0,   194,   342,   247,     0,     0,   247,
     0,     0,     0,   765,     0,     0,   767,     6,     7,     8,
     9,    10,    11,    12,   581,    14,     0,     0,     0,     0,
     0,   584,     0,   464,     0,     0,   138,     0,     0,     0,
   787,   788,     0,     0,     0,     0,     0,   541,     0,  -417,
    41,   247,     0,     0,     0,    44,     0,     0,     0,   247,
     0,     0,     0,     0,    45,  -417,  -417,  -417,  -417,  -417,
  -417,  -417,  -417,  -417,  -417,  -417,  -417,   450,     0,     0,
   542,    47,     0,     0,  -417,     0,  -417,  -417,  -417,  -417,
   367,   368,   369,   370,   371,   372,    49,    50,    51,    52,
   543,    54,    55,    56,  -417,  -417,  -417,   544,   545,   546,
   247,    57,   547,    59,     0,    60,    61,   194,     0,     0,
    65,     0,    67,    68,    69,    70,     0,    72,     0,     0,
     0,     0,     0,     0,  -417,     0,     0,    74,  -417,  -417,
     0,   362,   363,   364,   365,   451,   367,   368,   369,   370,
   452,   372,     0,     0,   548,     0,     0,     0,   650,   366,
   367,   368,   369,   370,   371,   372,   657,     0,   658,   364,
   365,   366,   367,   368,   369,   370,   371,   372,     5,     0,
     0,     0,     0,     0,   194,     0,     0,     0,     0,   194,
     0,     0,     0,   361,     6,     7,     8,     9,    10,    11,
    12,    13,    14,    15,    16,    17,   216,     0,     0,   688,
     0,     0,   194,     0,    18,    19,    20,    21,    22,     0,
     0,     0,   126,     0,     0,     0,     0,   194,     0,     0,
   194,   710,     0,    23,    24,    25,   717,     0,     0,     0,
   719,   362,   363,   364,   365,   366,   367,   368,   369,   370,
   371,   372,   362,   363,   364,   365,   366,   367,   368,   369,
   370,   371,   372,    26,     0,   194,    27,    28,     0,     0,
     0,     0,     0,     5,     0,   217,   734,     0,     0,     0,
   129,   199,   200,   201,   202,   203,   204,   205,   430,     6,
     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
    17,   231,   365,   366,   367,   368,   369,   370,   371,   372,
    19,    20,    21,    22,     0,   232,     0,     0,   233,     0,
     0,     0,     0,     0,     0,     0,     0,     0,    23,    24,
    25,     0,   194,     0,   776,   194,     0,     0,     0,     0,
     0,     0,     0,   734,   363,   364,   365,   366,   367,   368,
   369,   370,   371,   372,   194,     0,     0,     0,    26,     0,
     0,     0,    28,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     5,   234,   235,     0,     0,     0,   236,   237,
   199,   200,   201,   202,   203,   204,   205,     0,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
   231,     0,     0,     0,     0,     0,     0,     0,     0,    19,
    20,    21,    22,     0,   232,     0,     0,   380,     0,     0,
     0,     0,     0,     0,     0,     5,     0,    23,    24,    25,
     0,     0,     0,   199,   200,   201,   202,   203,   204,   205,
     0,     6,     7,     8,     9,    10,    11,    12,    13,    14,
    15,    16,    17,   231,     0,     0,     0,    26,     0,     0,
     0,    28,    19,    20,    21,    22,     0,   232,     0,     0,
   383,     0,   234,   235,     0,     0,     0,   236,   237,     5,
    23,    24,    25,     0,     0,     0,     0,   199,   200,   201,
   202,   203,   204,   205,     0,     6,     7,     8,     9,    10,
    11,    12,    13,    14,    15,    16,    17,   231,     0,     0,
    26,     0,     0,     0,    28,     0,    19,    20,    21,    22,
     0,   232,     0,     0,   471,   234,   235,     0,     0,     0,
   236,   237,     5,     0,    23,    24,    25,     0,     0,     0,
   199,   200,   201,   202,   203,   204,   205,     0,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
   231,   585,     0,     0,    26,     0,     0,     0,    28,    19,
    20,    21,    22,     0,   232,     0,     0,     0,     0,   234,
   235,     0,     0,     0,   236,   237,     5,    23,    24,    25,
     0,     0,     0,     0,   199,   200,   201,   202,   203,   204,
   205,     0,     6,     7,     8,     9,    10,    11,    12,    13,
    14,    15,    16,    17,   231,     0,     0,    26,     0,     0,
     0,    28,     0,    19,    20,    21,    22,     0,   232,     0,
     0,     0,   234,   235,     0,     0,     0,   236,   237,     5,
     0,    23,    24,    25,     0,     0,   686,   199,   200,   201,
   202,   203,   204,   205,     0,     6,     7,     8,     9,    10,
    11,    12,    13,    14,    15,    16,    17,   231,     0,     0,
     0,    26,     0,     0,     0,    28,    19,    20,    21,    22,
     0,   232,     0,     0,     0,     0,   234,   235,   129,     0,
     0,   236,   237,     5,    23,    24,    25,     0,     0,     0,
     0,   199,   200,   201,   202,   203,   204,   205,     0,     6,
     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
    17,   231,     0,     0,    26,     0,     0,     0,    28,     0,
    19,    20,    21,    22,     0,   232,     0,     0,     0,   234,
   235,     0,     0,     0,   236,   237,     0,     5,    23,    24,
    25,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     6,     7,     8,     9,    10,    11,    12,
    13,    14,    15,    16,    17,   216,     0,     0,    26,     0,
     0,     0,    28,    18,    19,    20,    21,    22,     0,     0,
     5,   126,     0,   234,   235,     0,     0,     0,   236,   237,
     0,     0,    23,    24,    25,     0,     6,     7,     8,     9,
    10,    11,    12,    13,    14,    15,    16,    17,     0,     0,
     0,     0,     0,     0,     0,     0,    18,    19,    20,    21,
    22,     0,    26,     0,     5,    27,    28,     0,     0,     0,
     0,     0,     0,     0,   338,    23,    24,    25,   474,   129,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,    21,    22,    26,     0,     0,    27,    28,
     0,     0,     0,     0,     0,     0,     0,   316,     0,    23,
    24,    25,   129,     0,     0,     0,   362,   363,   364,   365,
   366,   367,   368,   369,   370,   371,   372,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,    26,
     0,    -1,    40,    28,  -417,    41,     0,     0,    42,    43,
    44,     0,     0,     0,     0,     0,   129,     0,     0,    45,
  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
  -417,  -417,     0,     0,     0,    46,    47,     0,     0,     0,
     0,  -417,  -417,  -417,  -417,     0,     0,    48,     0,     0,
     0,    49,    50,    51,    52,    53,    54,    55,    56,  -417,
  -417,  -417,     0,     0,     0,     0,    57,    58,    59,     0,
    60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
    70,    71,    72,     0,     0,     0,     0,    73,    40,  -417,
  -417,    41,    74,  -417,    42,    43,    44,     0,     0,     0,
     0,     0,     0,     0,     0,    45,  -417,  -417,  -417,  -417,
  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,     0,     0,
     0,    46,    47,     0,     0,   484,     0,  -417,  -417,  -417,
  -417,     0,     0,    48,     0,     0,     0,    49,    50,    51,
    52,    53,    54,    55,    56,  -417,  -417,  -417,     0,     0,
     0,     0,    57,    58,    59,     0,    60,    61,    62,    63,
    64,    65,    66,    67,    68,    69,    70,    71,    72,     0,
     0,     0,     0,    73,    40,  -417,  -417,    41,    74,  -417,
    42,    43,    44,     0,     0,     0,     0,     0,     0,     0,
     0,    45,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
  -417,  -417,  -417,  -417,     0,     0,     0,    46,    47,     0,
     0,   508,     0,  -417,  -417,  -417,  -417,     0,     0,    48,
     0,     0,     0,    49,    50,    51,    52,    53,    54,    55,
    56,  -417,  -417,  -417,     0,     0,     0,     0,    57,    58,
    59,     0,    60,    61,    62,    63,    64,    65,    66,    67,
    68,    69,    70,    71,    72,     0,     0,     0,     0,    73,
    40,  -417,  -417,    41,    74,  -417,    42,    43,    44,     0,
     0,     0,     0,     0,     0,     0,     0,    45,  -417,  -417,
  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
     0,     0,     0,    46,    47,     0,     0,   604,     0,  -417,
  -417,  -417,  -417,     0,     0,    48,     0,     0,     0,    49,
    50,    51,    52,    53,    54,    55,    56,  -417,  -417,  -417,
     0,     0,     0,     0,    57,    58,    59,     0,    60,    61,
    62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
    72,     0,     0,     0,     0,    73,    40,  -417,  -417,    41,
    74,  -417,    42,    43,    44,     0,     0,     0,     0,     0,
     0,     0,     0,    45,  -417,  -417,  -417,  -417,  -417,  -417,
  -417,  -417,  -417,  -417,  -417,  -417,     0,     0,     0,    46,
    47,     0,     0,     0,     0,  -417,  -417,  -417,  -417,     0,
     0,    48,     0,   684,     0,    49,    50,    51,    52,    53,
    54,    55,    56,  -417,  -417,  -417,     0,     0,     0,     0,
    57,    58,    59,     0,    60,    61,    62,    63,    64,    65,
    66,    67,    68,    69,    70,    71,    72,     4,     0,     5,
     0,    73,     0,  -417,     0,     0,    74,  -417,     0,     0,
     0,     0,     0,     0,     0,     6,     7,     8,     9,    10,
    11,    12,    13,    14,    15,    16,    17,     0,     0,     0,
     0,     0,     0,     0,     0,    18,    19,    20,    21,    22,
   153,     0,   154,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,    23,    24,    25,     0,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
     0,     0,     0,     0,     0,     0,     0,     0,     0,    19,
    20,    21,    22,     0,    26,     5,     0,    27,    28,     0,
     0,     0,     0,     0,     0,   476,     0,    23,    24,    25,
     0,     6,     7,     8,     9,    10,    11,    12,    13,    14,
    15,    16,    17,     0,     0,     0,     0,     0,     0,     0,
     0,     0,    19,    20,    21,    22,     0,    26,     0,     0,
     0,    28,     0,     0,     0,     0,     0,     0,     0,     0,
   195,    24,    25,   362,   363,   364,   365,   366,   367,   368,
   369,   370,   371,   372,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     5,     0,
    26,   198,     0,     0,    28,   647,   199,   200,   201,   202,
   203,   204,   205,     0,     6,     7,     8,     9,    10,    11,
    12,    13,    14,    15,    16,    17,     0,     0,     0,     0,
     0,     0,     0,     0,    18,    19,    20,    21,    22,     0,
     5,     0,     0,     0,     0,     0,     0,     0,   283,     0,
     0,     0,     0,    23,    24,    25,     6,     7,     8,     9,
    10,    11,    12,    13,    14,    15,    16,    17,     0,     0,
     0,     0,     0,     0,     0,     0,    18,    19,    20,    21,
    22,     0,     5,    26,     0,     0,    27,    28,     0,     0,
     0,     0,     0,     0,     0,    23,    24,    25,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
     0,     0,     0,     0,     0,     0,     0,     0,    18,    19,
    20,    21,    22,     0,     5,    26,     0,     0,    27,    28,
     0,     0,     0,     0,     0,     0,     0,    23,    24,    25,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,   178,     0,     0,     0,     0,     0,     0,     0,
     0,    19,    20,    21,    22,     0,     5,    26,     0,     0,
    27,    28,     0,     0,     0,     0,     0,     0,     0,    23,
    24,    25,     6,     7,     8,     9,    10,    11,    12,    13,
    14,    15,    16,    17,     0,     0,     0,     0,     0,     0,
     0,     0,     0,    19,    20,    21,    22,     0,     5,    26,
     0,     0,     0,    28,     0,     0,     0,     0,     0,     0,
     0,   195,    24,    25,     6,     7,     8,     9,    10,    11,
    12,    13,    14,    15,    16,    17,     0,     0,     0,     0,
     0,     0,     0,     0,     0,    19,    20,    21,    22,     0,
   606,    26,     0,     0,     0,    28,     0,     0,     0,     0,
     0,     0,     0,    23,    24,    25,     6,     7,     8,     9,
    10,    11,    12,    13,    14,    15,    16,    17,     0,     0,
     0,     0,     0,     0,     0,     0,     0,    19,    20,    21,
    22,     0,     5,    26,     0,     0,     0,    28,     0,     0,
     0,     0,   593,     0,     0,    23,    24,    25,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,    21,    22,     0,     0,    26,     0,     0,     0,    28,
     0,     0,     0,     0,     0,     0,     0,    23,    24,    25,
   362,   363,   364,   365,   366,   367,   368,   369,   370,   371,
   372,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,    26,     0,     0,
     0,    28
};

static const short yycheck[] = {     0,
    32,     2,     1,    47,     5,    31,   133,    33,   135,    74,
     2,     2,    30,    32,   172,    16,    68,   274,   269,     3,
   217,     2,     2,    67,     3,   222,   491,     1,    72,     2,
     6,    32,   113,     3,    10,     2,   297,     6,     3,   290,
    34,    37,     2,    32,     3,    32,   111,    48,     2,   119,
   691,   214,    53,    54,    31,   120,     2,   698,     2,     6,
     2,    37,    37,   704,     2,    34,   128,     3,     3,     2,
    47,    32,   500,   143,   144,   137,    82,   505,    37,     2,
     2,   125,     2,    94,    85,     2,    82,     3,    82,     3,
     2,    32,   124,   110,     2,    82,   122,   129,   526,     3,
    47,   264,   567,   129,    88,   533,    71,    82,    92,    88,
    39,   100,   113,    92,   113,    31,     3,    44,     3,   316,
   317,     6,    92,    88,   100,    82,   147,    92,    89,    88,
   151,    47,   133,    92,   135,    34,   157,    64,   779,   113,
     3,   162,     3,     3,    93,   189,    31,    44,   180,   276,
   124,   412,    93,   154,   351,   217,    92,    92,   190,   410,
   222,   180,   183,   184,    31,     3,   167,    32,    31,   190,
    31,   192,    88,   638,    88,     3,    92,    37,    92,   180,
    90,   182,   183,    31,   216,    82,    47,    33,    92,   163,
   164,   656,   108,    31,   195,   257,    40,    41,    44,    47,
   110,    88,   329,    88,   178,    92,    31,    92,   209,    37,
    44,   243,   186,   187,   155,   100,     3,   249,   105,   220,
   105,     3,    47,   108,    89,    88,   423,    88,    88,    92,
   274,    92,    92,   100,     4,   393,   701,   100,   105,   180,
     6,   669,   216,   275,    31,   108,    31,   108,    82,    31,
    88,   303,   333,    53,    92,    40,    41,    40,    41,    44,
    88,   105,    44,     3,    92,    47,    31,    37,   269,   243,
   108,    37,   337,    49,   525,   276,   338,   339,   252,    31,
    32,   255,    64,    68,    44,    85,   348,     3,   320,   290,
    31,    31,    68,    69,    34,    47,   328,    90,     6,   764,
     4,    88,     6,   329,    64,    92,    88,   434,    68,     3,
    92,   373,    31,   394,   315,    31,    34,   110,   100,    37,
    31,   108,   354,   105,   325,   387,   108,     4,   329,     6,
   331,    47,    18,    37,   333,   111,    47,    31,   766,    40,
    41,     4,   770,     6,    31,   344,    64,   391,    88,    35,
   394,    33,    92,    47,   328,    31,    38,   401,   402,   333,
   100,     3,    31,    34,     6,   105,    37,    68,   108,    31,
   344,    34,    88,    44,    37,   632,    92,    31,   422,    65,
    66,    67,   403,   786,   100,     4,   448,     6,     3,   105,
    32,   392,   108,     4,    88,   798,   799,   418,    92,    31,
   392,   392,   376,    33,    34,   404,   100,    37,   409,   410,
   411,   392,   392,     3,   108,   416,    31,   409,   409,   392,
   452,   676,   454,   678,    87,   392,   452,   428,   409,   409,
   404,   411,   392,   434,   435,   454,   409,   595,   392,     6,
   441,    31,   409,    10,     3,   446,   392,     6,   392,   409,
   392,    32,    33,   454,   392,   409,    31,    47,    31,   392,
    31,   402,    39,   409,   405,   409,   510,   409,   512,   392,
   392,   409,   392,    88,   500,   392,   409,    92,   548,   505,
   392,   422,   105,   106,   392,   100,   409,   409,    31,   409,
   491,    34,   409,   108,    37,    11,    89,   409,    88,   500,
   526,   409,    92,     3,   505,    34,     3,   533,   509,   636,
   100,   576,     3,   454,    34,   163,   164,   509,   509,    34,
     3,   297,    37,   524,   525,   526,    37,   303,   509,   509,
   178,     3,   533,   524,    31,   616,   509,    34,   186,     3,
     3,   515,   509,   524,   524,    34,   803,     6,    37,   509,
   103,   104,   105,   106,   586,   509,   600,   609,    34,   624,
   534,    37,    37,   509,    34,   509,   567,   509,   586,    34,
   697,   509,    37,   643,    83,     3,   509,   578,     6,   355,
    31,    32,    89,    33,    33,    83,   509,   509,   632,   509,
   137,    88,   509,     3,   535,    92,    47,   509,    61,    62,
    63,   509,    18,   100,   252,   606,    32,   255,   105,    33,
   636,   108,   739,    42,    43,   616,    89,   616,    32,    35,
    31,    31,    31,   597,   625,    88,   105,    89,   629,    92,
    59,    60,   633,   625,   625,   636,   412,   638,    32,    32,
    31,    32,   616,   669,   625,   625,   193,    32,    37,    65,
    66,    67,   625,    82,    64,   656,    47,   631,   625,    32,
    88,   602,    44,   637,    92,   625,   607,    33,   669,     3,
    32,   625,   100,   705,   706,    91,    32,   105,    88,   625,
   328,   625,    92,   625,    34,    23,    32,   625,    32,   630,
   100,   665,   625,    33,    32,   105,   697,    31,   108,    37,
   701,    32,   625,   625,   645,   625,    32,   708,   625,    32,
   257,   712,    32,   625,   261,   716,    83,   625,    32,     3,
     4,    89,     6,    61,    62,    34,     3,    37,   376,   703,
    31,    32,   706,     3,    89,   511,    31,    32,   739,    32,
   766,    89,    89,    32,   770,    37,    47,    31,   722,   750,
    34,    34,    47,    37,    88,    93,    34,   783,    92,   803,
   786,    31,    34,   764,    34,   766,   100,   741,    31,   770,
   744,   772,   798,   799,   108,   322,    38,   324,    34,     3,
    32,    31,   783,    37,    32,   786,   124,   126,    33,    31,
   128,    32,   130,   110,   768,   769,    82,   798,   799,   137,
   576,    40,    41,    87,    88,    44,    32,    44,    92,   750,
    31,    88,   753,    64,    37,    92,   100,   155,    88,     3,
   158,   105,    92,   100,   108,    64,   373,   165,   105,    68,
   100,   772,    64,   609,    64,   105,    38,   108,   108,    38,
   387,   388,   180,     4,    66,     6,    32,    31,   624,    32,
   188,    38,   190,   191,    31,   193,    68,   195,   196,   197,
    34,    32,     3,     3,    34,     3,    64,   515,    32,    31,
    33,   647,    31,    34,    34,    32,    37,   424,   216,   217,
   427,    34,    34,    44,   222,    32,   534,    83,    34,   227,
   229,    31,   231,    31,    31,   234,   235,   236,   237,    11,
    32,    32,    38,     3,    88,   243,   244,    34,    92,    42,
    43,    34,    34,     3,   253,    34,   100,   256,    33,   257,
    31,   105,   469,   261,   108,    38,    59,    60,    32,    31,
   477,    31,    31,    34,    32,    32,    32,   275,    32,    34,
    32,    31,     0,    32,     0,   600,    34,    47,    88,   597,
    88,   289,    92,    34,    92,   416,   524,    47,   636,   524,
   100,   524,   100,     3,   772,   105,   446,   105,   108,   187,
   108,   616,   441,   333,    36,   712,     3,   454,   316,   317,
   629,   528,   320,   631,   322,   716,   324,   761,    88,   637,
   328,    31,    92,   770,    16,   512,    -1,    -1,    88,    -1,
   100,   339,    92,    -1,    31,    -1,    -1,    47,   108,    -1,
   100,    -1,    -1,   351,    -1,    -1,    -1,   665,   108,    -1,
    -1,    -1,    -1,   362,   363,   364,   365,    -1,   367,   368,
   369,   370,   371,   372,     6,   373,    -1,    -1,   377,    11,
    12,    13,    14,    15,    16,    17,    -1,    -1,    88,   387,
   388,    -1,    92,    -1,    -1,   703,    -1,    -1,   706,    -1,
   100,    88,    -1,    -1,   402,    92,    -1,   405,   108,    -1,
    -1,    -1,    -1,   100,   722,    -1,    -1,    -1,   105,    -1,
    -1,   108,    -1,    -1,   422,   423,   424,    -1,    -1,   427,
    -1,    -1,    -1,   741,    -1,    -1,   744,    19,    20,    21,
    22,    23,    24,    25,   442,    27,    -1,    -1,    -1,    -1,
    -1,   450,    -1,   452,    -1,    -1,   454,    -1,    -1,    -1,
   768,   769,    -1,    -1,    -1,    -1,    -1,     1,    -1,     3,
     4,   469,    -1,    -1,    -1,     9,    -1,    -1,    -1,   477,
    -1,    -1,    -1,    -1,    18,    19,    20,    21,    22,    23,
    24,    25,    26,    27,    28,    29,    30,    32,    -1,    -1,
    34,    35,    -1,    -1,    38,    -1,    40,    41,    42,    43,
   101,   102,   103,   104,   105,   106,    50,    51,    52,    53,
    54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
   528,    65,    66,    67,    -1,    69,    70,   535,    -1,    -1,
    74,    -1,    76,    77,    78,    79,    -1,    81,    -1,    -1,
    -1,    -1,    -1,    -1,    88,    -1,    -1,    91,    92,    93,
    -1,    96,    97,    98,    99,   100,   101,   102,   103,   104,
   105,   106,    -1,    -1,   108,    -1,    -1,    -1,   576,   100,
   101,   102,   103,   104,   105,   106,   585,    -1,   587,    98,
    99,   100,   101,   102,   103,   104,   105,   106,     3,    -1,
    -1,    -1,    -1,    -1,   602,    -1,    -1,    -1,    -1,   607,
    -1,    -1,    -1,    48,    19,    20,    21,    22,    23,    24,
    25,    26,    27,    28,    29,    30,    31,    -1,    -1,   628,
    -1,    -1,   630,    -1,    39,    40,    41,    42,    43,    -1,
    -1,    -1,    47,    -1,    -1,    -1,    -1,   645,    -1,    -1,
   648,   649,    -1,    58,    59,    60,   654,    -1,    -1,    -1,
   659,    96,    97,    98,    99,   100,   101,   102,   103,   104,
   105,   106,    96,    97,    98,    99,   100,   101,   102,   103,
   104,   105,   106,    88,    -1,   683,    91,    92,    -1,    -1,
    -1,    -1,    -1,     3,    -1,   100,   694,    -1,    -1,    -1,
   105,    11,    12,    13,    14,    15,    16,    17,   706,    19,
    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
    30,    31,    99,   100,   101,   102,   103,   104,   105,   106,
    40,    41,    42,    43,    -1,    45,    -1,    -1,    48,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
    60,    -1,   750,    -1,   752,   753,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,   761,    97,    98,    99,   100,   101,   102,
   103,   104,   105,   106,   772,    -1,    -1,    -1,    88,    -1,
    -1,    -1,    92,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,     3,   103,   104,    -1,    -1,    -1,   108,   109,
    11,    12,    13,    14,    15,    16,    17,    -1,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
    41,    42,    43,    -1,    45,    -1,    -1,    48,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,     3,    -1,    58,    59,    60,
    -1,    -1,    -1,    11,    12,    13,    14,    15,    16,    17,
    -1,    19,    20,    21,    22,    23,    24,    25,    26,    27,
    28,    29,    30,    31,    -1,    -1,    -1,    88,    -1,    -1,
    -1,    92,    40,    41,    42,    43,    -1,    45,    -1,    -1,
    48,    -1,   103,   104,    -1,    -1,    -1,   108,   109,     3,
    58,    59,    60,    -1,    -1,    -1,    -1,    11,    12,    13,
    14,    15,    16,    17,    -1,    19,    20,    21,    22,    23,
    24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
    88,    -1,    -1,    -1,    92,    -1,    40,    41,    42,    43,
    -1,    45,    -1,    -1,    48,   103,   104,    -1,    -1,    -1,
   108,   109,     3,    -1,    58,    59,    60,    -1,    -1,    -1,
    11,    12,    13,    14,    15,    16,    17,    -1,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    31,    32,    -1,    -1,    88,    -1,    -1,    -1,    92,    40,
    41,    42,    43,    -1,    45,    -1,    -1,    -1,    -1,   103,
   104,    -1,    -1,    -1,   108,   109,     3,    58,    59,    60,
    -1,    -1,    -1,    -1,    11,    12,    13,    14,    15,    16,
    17,    -1,    19,    20,    21,    22,    23,    24,    25,    26,
    27,    28,    29,    30,    31,    -1,    -1,    88,    -1,    -1,
    -1,    92,    -1,    40,    41,    42,    43,    -1,    45,    -1,
    -1,    -1,   103,   104,    -1,    -1,    -1,   108,   109,     3,
    -1,    58,    59,    60,    -1,    -1,    10,    11,    12,    13,
    14,    15,    16,    17,    -1,    19,    20,    21,    22,    23,
    24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
    -1,    88,    -1,    -1,    -1,    92,    40,    41,    42,    43,
    -1,    45,    -1,    -1,    -1,    -1,   103,   104,   105,    -1,
    -1,   108,   109,     3,    58,    59,    60,    -1,    -1,    -1,
    -1,    11,    12,    13,    14,    15,    16,    17,    -1,    19,
    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
    30,    31,    -1,    -1,    88,    -1,    -1,    -1,    92,    -1,
    40,    41,    42,    43,    -1,    45,    -1,    -1,    -1,   103,
   104,    -1,    -1,    -1,   108,   109,    -1,     3,    58,    59,
    60,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    -1,    -1,    88,    -1,
    -1,    -1,    92,    39,    40,    41,    42,    43,    -1,    -1,
     3,    47,    -1,   103,   104,    -1,    -1,    -1,   108,   109,
    -1,    -1,    58,    59,    60,    -1,    19,    20,    21,    22,
    23,    24,    25,    26,    27,    28,    29,    30,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    39,    40,    41,    42,
    43,    -1,    88,    -1,     3,    91,    92,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,   100,    58,    59,    60,    48,   105,
    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
    29,    30,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    42,    43,    88,    -1,    -1,    91,    92,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,   100,    -1,    58,
    59,    60,   105,    -1,    -1,    -1,    96,    97,    98,    99,
   100,   101,   102,   103,   104,   105,   106,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,
    -1,     0,     1,    92,     3,     4,    -1,    -1,     7,     8,
     9,    -1,    -1,    -1,    -1,    -1,   105,    -1,    -1,    18,
    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
    29,    30,    -1,    -1,    -1,    34,    35,    -1,    -1,    -1,
    -1,    40,    41,    42,    43,    -1,    -1,    46,    -1,    -1,
    -1,    50,    51,    52,    53,    54,    55,    56,    57,    58,
    59,    60,    -1,    -1,    -1,    -1,    65,    66,    67,    -1,
    69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
    79,    80,    81,    -1,    -1,    -1,    -1,    86,     1,    88,
     3,     4,    91,    92,     7,     8,     9,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    18,    19,    20,    21,    22,
    23,    24,    25,    26,    27,    28,    29,    30,    -1,    -1,
    -1,    34,    35,    -1,    -1,    38,    -1,    40,    41,    42,
    43,    -1,    -1,    46,    -1,    -1,    -1,    50,    51,    52,
    53,    54,    55,    56,    57,    58,    59,    60,    -1,    -1,
    -1,    -1,    65,    66,    67,    -1,    69,    70,    71,    72,
    73,    74,    75,    76,    77,    78,    79,    80,    81,    -1,
    -1,    -1,    -1,    86,     1,    88,     3,     4,    91,    92,
     7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    18,    19,    20,    21,    22,    23,    24,    25,    26,
    27,    28,    29,    30,    -1,    -1,    -1,    34,    35,    -1,
    -1,    38,    -1,    40,    41,    42,    43,    -1,    -1,    46,
    -1,    -1,    -1,    50,    51,    52,    53,    54,    55,    56,
    57,    58,    59,    60,    -1,    -1,    -1,    -1,    65,    66,
    67,    -1,    69,    70,    71,    72,    73,    74,    75,    76,
    77,    78,    79,    80,    81,    -1,    -1,    -1,    -1,    86,
     1,    88,     3,     4,    91,    92,     7,     8,     9,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    -1,    -1,    -1,    34,    35,    -1,    -1,    38,    -1,    40,
    41,    42,    43,    -1,    -1,    46,    -1,    -1,    -1,    50,
    51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
    -1,    -1,    -1,    -1,    65,    66,    67,    -1,    69,    70,
    71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
    81,    -1,    -1,    -1,    -1,    86,     1,    88,     3,     4,
    91,    92,     7,     8,     9,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    18,    19,    20,    21,    22,    23,    24,
    25,    26,    27,    28,    29,    30,    -1,    -1,    -1,    34,
    35,    -1,    -1,    -1,    -1,    40,    41,    42,    43,    -1,
    -1,    46,    -1,    48,    -1,    50,    51,    52,    53,    54,
    55,    56,    57,    58,    59,    60,    -1,    -1,    -1,    -1,
    65,    66,    67,    -1,    69,    70,    71,    72,    73,    74,
    75,    76,    77,    78,    79,    80,    81,     1,    -1,     3,
    -1,    86,    -1,    88,    -1,    -1,    91,    92,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    19,    20,    21,    22,    23,
    24,    25,    26,    27,    28,    29,    30,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    39,    40,    41,    42,    43,
     1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    58,    59,    60,    -1,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
    41,    42,    43,    -1,    88,     3,    -1,    91,    92,    -1,
    -1,    -1,    -1,    -1,    -1,    48,    -1,    58,    59,    60,
    -1,    19,    20,    21,    22,    23,    24,    25,    26,    27,
    28,    29,    30,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    40,    41,    42,    43,    -1,    88,    -1,    -1,
    -1,    92,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    58,    59,    60,    96,    97,    98,    99,   100,   101,   102,
   103,   104,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
    88,     6,    -1,    -1,    92,    93,    11,    12,    13,    14,
    15,    16,    17,    -1,    19,    20,    21,    22,    23,    24,
    25,    26,    27,    28,    29,    30,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    39,    40,    41,    42,    43,    -1,
     3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    11,    -1,
    -1,    -1,    -1,    58,    59,    60,    19,    20,    21,    22,
    23,    24,    25,    26,    27,    28,    29,    30,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    39,    40,    41,    42,
    43,    -1,     3,    88,    -1,    -1,    91,    92,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    58,    59,    60,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    39,    40,
    41,    42,    43,    -1,     3,    88,    -1,    -1,    91,    92,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
    29,    30,    31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    40,    41,    42,    43,    -1,     3,    88,    -1,    -1,
    91,    92,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
    59,    60,    19,    20,    21,    22,    23,    24,    25,    26,
    27,    28,    29,    30,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    40,    41,    42,    43,    -1,     3,    88,
    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    58,    59,    60,    19,    20,    21,    22,    23,    24,
    25,    26,    27,    28,    29,    30,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    40,    41,    42,    43,    -1,
     3,    88,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    58,    59,    60,    19,    20,    21,    22,
    23,    24,    25,    26,    27,    28,    29,    30,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,    41,    42,
    43,    -1,     3,    88,    -1,    -1,    -1,    92,    -1,    -1,
    -1,    -1,    48,    -1,    -1,    58,    59,    60,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    42,    43,    -1,    -1,    88,    -1,    -1,    -1,    92,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
    96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,    -1,    -1,
    -1,    92
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/local/share/bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 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 2, 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, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

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

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (to, from, count)
     char *to;
     char *from;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *to, char *from, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 196 "/usr/local/share/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */

int
yyparse(YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

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

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

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

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

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

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 925 "parser.y"
{
		   Setattr(yyvsp[0].node,"classes",classes); 
		   Setattr(yyvsp[0].node,"name",ModuleName);
		   
		   if ((!module_node) && ModuleName) {
		     module_node = new_node("module");
		     Setattr(module_node,"name",ModuleName);
		   }
		   Setattr(yyvsp[0].node,"module",module_node);
		   check_extensions();
	           top = yyvsp[0].node;
               ;
    break;}
case 2:
#line 937 "parser.y"
{
                 top = Getattr(yyvsp[-1].p,"type");
               ;
    break;}
case 3:
#line 940 "parser.y"
{
                 top = 0;
               ;
    break;}
case 4:
#line 945 "parser.y"
{  
                   appendChild(yyvsp[-1].node,yyvsp[0].node);
                   yyval.node = yyvsp[-1].node;
               ;
    break;}
case 5:
#line 949 "parser.y"
{
                   yyval.node = new_node("top");
               ;
    break;}
case 6:
#line 954 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 7:
#line 955 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 8:
#line 956 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 9:
#line 957 "parser.y"
{ yyval.node = 0; ;
    break;}
case 10:
#line 958 "parser.y"
{
                  yyval.node = 0;
		  if (!Swig_error_count()) {
		    static int last_error_line = -1;
		    if (last_error_line != cparse_line) {
		      Swig_error(cparse_file, cparse_line,"Syntax error in input.\n");
		      last_error_line = cparse_line;
		      skip_decl();
		    }
		  }
               ;
    break;}
case 11:
#line 970 "parser.y"
{ 
                  if (yyval.node) {
   		      add_symbols(yyval.node);
                  }
                  yyval.node = yyvsp[0].node; 
	       ;
    break;}
case 12:
#line 986 "parser.y"
{
                  yyval.node = 0;
                  skip_decl();
               ;
    break;}
case 13:
#line 996 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 14:
#line 997 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 15:
#line 998 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 16:
#line 999 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 17:
#line 1000 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 18:
#line 1001 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 19:
#line 1002 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 20:
#line 1003 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 21:
#line 1004 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 22:
#line 1005 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 23:
#line 1006 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 24:
#line 1007 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 25:
#line 1008 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 26:
#line 1009 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 27:
#line 1010 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 28:
#line 1011 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 29:
#line 1012 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 30:
#line 1013 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 31:
#line 1014 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 32:
#line 1015 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 33:
#line 1016 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 34:
#line 1023 "parser.y"
{
               Node *cls;
	       String *clsname;
	       cplus_mode = CPLUS_PUBLIC;
	       if (!classes) classes = NewHash();
	       if (!extendhash) extendhash = NewHash();
	       clsname = make_class_name(yyvsp[-1].str);
	       cls = Getattr(classes,clsname);
	       if (!cls) {
		 /* No previous definition. Create a new scope */
		 Node *am = Getattr(extendhash,clsname);
		 if (!am) {
		   Swig_symbol_newscope();
		   Swig_symbol_setscopename(yyvsp[-1].str);
		   prev_symtab = 0;
		 } else {
		   prev_symtab = Swig_symbol_setscope(Getattr(am,"symtab"));
		 }
		 current_class = 0;
	       } else {
		 /* Previous class definition.  Use its symbol table */
		 prev_symtab = Swig_symbol_setscope(Getattr(cls,"symtab"));
		 current_class = cls;
		 extendmode = 1;
	       }
	       Classprefix = NewString(yyvsp[-1].str);
	       Namespaceprefix= Swig_symbol_qualifiedscopename(0);
	       Delete(clsname);
	     ;
    break;}
case 35:
#line 1051 "parser.y"
{
               String *clsname;
	       extendmode = 0;
               yyval.node = new_node("extend");
	       Setattr(yyval.node,"symtab",Swig_symbol_popscope());
	       if (prev_symtab) {
		 Swig_symbol_setscope(prev_symtab);
	       }
	       Namespaceprefix = Swig_symbol_qualifiedscopename(0);
               clsname = make_class_name(yyvsp[-4].str);
	       Setattr(yyval.node,"name",clsname);

	       /* Mark members as extend */

	       Swig_tag_nodes(yyvsp[-1].node,"feature:extend",(char*) "1");
	       if (current_class) {
		 /* We add the extension to the previously defined class */
		 appendChild(yyval.node,yyvsp[-1].node);
		 appendChild(current_class,yyval.node);
	       } else {
		 /* We store the extensions in the extensions hash */
		 Node *am = Getattr(extendhash,clsname);
		 if (am) {
		   /* Append the members to the previous extend methods */
		   appendChild(am,yyvsp[-1].node);
		 } else {
		   appendChild(yyval.node,yyvsp[-1].node);
		   Setattr(extendhash,clsname,yyval.node);
		 }
	       }
	       current_class = 0;
	       Delete(Classprefix);
	       Delete(clsname);
	       Classprefix = 0;
	       prev_symtab = 0;
	       yyval.node = 0;

	     ;
    break;}
case 36:
#line 1095 "parser.y"
{
                    yyval.node = new_node("apply");
                    Setattr(yyval.node,"pattern",Getattr(yyvsp[-3].p,"pattern"));
		    appendChild(yyval.node,yyvsp[-1].p);
               ;
    break;}
case 37:
#line 1105 "parser.y"
{
		 yyval.node = new_node("clear");
		 appendChild(yyval.node,yyvsp[-1].p);
               ;
    break;}
case 38:
#line 1116 "parser.y"
{
		   if ((yyvsp[-1].dtype.type != T_ERROR) && (yyvsp[-1].dtype.type != T_SYMBOL)) {
		     yyval.node = new_node("constant");
		     Setattr(yyval.node,"name",yyvsp[-3].id);
		     Setattr(yyval.node,"type",NewSwigType(yyvsp[-1].dtype.type));
		     Setattr(yyval.node,"value",yyvsp[-1].dtype.val);
		     Setattr(yyval.node,"storage","%constant");
		     Setattr(yyval.node,"feature:immutable","1");
		     add_symbols(yyval.node);
		   } else {
		     if (yyvsp[-1].dtype.type == T_ERROR) {
		       Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line,"Unsupported constant value (ignored)\n");
		     }
		     yyval.node = 0;
		   }

	       ;
    break;}
case 39:
#line 1134 "parser.y"
{
		 if ((yyvsp[-1].dtype.type != T_ERROR) && (yyvsp[-1].dtype.type != T_SYMBOL)) {
		   SwigType_push(yyvsp[-3].type,yyvsp[-2].decl.type);
		   /* Sneaky callback function trick */
		   if (SwigType_isfunction(yyvsp[-3].type)) {
		     SwigType_add_pointer(yyvsp[-3].type);
		   }
		   yyval.node = new_node("constant");
		   Setattr(yyval.node,"name",yyvsp[-2].decl.id);
		   Setattr(yyval.node,"type",yyvsp[-3].type);
		   Setattr(yyval.node,"value",yyvsp[-1].dtype.val);
		   Setattr(yyval.node,"storage","%constant");
		   Setattr(yyval.node,"feature:immutable","1");
		   add_symbols(yyval.node);
		 } else {
		     if (yyvsp[-1].dtype.type == T_ERROR) {
		       Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line,"Unsupported constant value\n");
		     }
		   yyval.node = 0;
		 }
               ;
    break;}
case 40:
#line 1155 "parser.y"
{
		 Swig_warning(WARN_PARSE_BAD_VALUE,cparse_file,cparse_line,"Bad constant value (ignored).\n");
		 yyval.node = 0;
	       ;
    break;}
case 41:
#line 1166 "parser.y"
{
		 char temp[64];
		 Replace(yyvsp[0].str,"$file",cparse_file, DOH_REPLACE_ANY);
		 sprintf(temp,"%d", cparse_line);
		 Replace(yyvsp[0].str,"$line",temp,DOH_REPLACE_ANY);
		 Printf(stderr,"%s\n", yyvsp[0].str);
		 Delete(yyvsp[0].str);
                 yyval.node = 0;
	       ;
    break;}
case 42:
#line 1175 "parser.y"
{
		 char temp[64];
		 String *s = NewString(yyvsp[0].id);
		 Replace(s,"$file",cparse_file, DOH_REPLACE_ANY);
		 sprintf(temp,"%d", cparse_line);
		 Replace(s,"$line",temp,DOH_REPLACE_ANY);
		 Printf(stderr,"%s\n", s);
		 Delete(s);
                 yyval.node = 0;
               ;
    break;}
case 43:
#line 1194 "parser.y"
{
                    skip_balanced('{','}');
		    yyval.node = 0;
		    Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated.  Use %%exception instead.\n");
	       ;
    break;}
case 44:
#line 1200 "parser.y"
{
                    skip_balanced('{','}');
		    yyval.node = 0;
		    Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated.  Use %%exception instead.\n");
               ;
    break;}
case 45:
#line 1206 "parser.y"
{
		 yyval.node = 0;
		 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated.  Use %%exception instead.\n");
               ;
    break;}
case 46:
#line 1211 "parser.y"
{
		 yyval.node = 0;
		 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated.  Use %%exception instead.\n");
	       ;
    break;}
case 47:
#line 1221 "parser.y"
{
                 yyval.node = new_node("fragment");
                 Setattr(yyval.node,"section", yyvsp[-2].id);
                 Setattr(yyval.node,"name",yyvsp[-4].id);
                 Setattr(yyval.node,"code",yyvsp[0].str);
                 ;
    break;}
case 48:
#line 1227 "parser.y"
{
                   skip_balanced('{','}');
		   yyval.node = new_node("fragment");
		   Setattr(yyval.node,"section",yyvsp[-2].id);
		   Setattr(yyval.node,"name",yyvsp[-4].id);
		   Delitem(scanner_ccode,0);
		   Delitem(scanner_ccode,DOH_END);
		   Setattr(yyval.node,"code",Copy(scanner_ccode));
		 ;
    break;}
case 49:
#line 1243 "parser.y"
{
                     yyvsp[-3].loc.filename = Swig_copy_string(cparse_file);
		     yyvsp[-3].loc.line = cparse_line;
		     cparse_file = Swig_copy_string(yyvsp[-1].id);
		     cparse_line = 0;
               ;
    break;}
case 50:
#line 1248 "parser.y"
{
                     yyval.node = yyvsp[-1].node;
		     cparse_file = yyvsp[-6].loc.filename;
		     cparse_line = yyvsp[-6].loc.line;
		     if (strcmp(yyvsp[-6].loc.type,"include") == 0) set_nodeType(yyval.node,"include");
		     if (strcmp(yyvsp[-6].loc.type,"import") == 0) set_nodeType(yyval.node,"import");
		     Setattr(yyval.node,"name",yyvsp[-4].id);
		     /* Search for the module (if any) */
		     {
			 Node *n = firstChild(yyval.node);
			 while (n) {
			     if (Strcmp(nodeType(n),"module") == 0) {
				 Setattr(yyval.node,"module",Getattr(n,"name"));
				 break;
			     }
			     n = nextSibling(n);
			 }
		     }
		     Setattr(yyval.node,"options",yyvsp[-5].node);
               ;
    break;}
case 51:
#line 1270 "parser.y"
{ yyval.loc.type = (char *) "include"; ;
    break;}
case 52:
#line 1271 "parser.y"
{ yyval.loc.type = (char *) "import"; ;
    break;}
case 53:
#line 1278 "parser.y"
{
                 String *cpps;
		 if (Namespaceprefix) {
		   Swig_error(cparse_file, cparse_start_line, "Error. %%inline directive inside a namespace is disallowed.\n");

		   yyval.node = 0;
		 } else {
		   yyval.node = new_node("insert");
		   Setattr(yyval.node,"code",yyvsp[0].str);
		   /* Need to run through the preprocessor */
		   Setline(yyvsp[0].str,cparse_start_line);
		   Setfile(yyvsp[0].str,cparse_file);
		   Seek(yyvsp[0].str,0,SEEK_SET);
		   cpps = Preprocessor_parse(yyvsp[0].str);
		   start_inline(Char(cpps), cparse_start_line);
		   Delete(yyvsp[0].str);
		   Delete(cpps);
		 }
	       ;
    break;}
case 54:
#line 1307 "parser.y"
{
                 yyval.node = new_node("insert");
		 Setattr(yyval.node,"code",yyvsp[0].str);
	       ;
    break;}
case 55:
#line 1311 "parser.y"
{
		 String *code = NewString("");
		 yyval.node = new_node("insert");
		 Setattr(yyval.node,"section",yyvsp[-2].id);
		 Setattr(yyval.node,"code",code);
		 if (Swig_insert_file(yyvsp[0].id,code) < 0) {
		   Swig_error(cparse_file, cparse_line, "Couldn't find '%s'.\n", yyvsp[0].id);
		   yyval.node = 0;
		 } 
               ;
    break;}
case 56:
#line 1321 "parser.y"
{
		 yyval.node = new_node("insert");
		 Setattr(yyval.node,"section",yyvsp[-2].id);
		 Setattr(yyval.node,"code",yyvsp[0].str);
               ;
    break;}
case 57:
#line 1326 "parser.y"
{
                 skip_balanced('{','}');
		 yyval.node = new_node("insert");
		 Setattr(yyval.node,"section",yyvsp[-2].id);
		 Delitem(scanner_ccode,0);
		 Delitem(scanner_ccode,DOH_END);
		 Setattr(yyval.node,"code", Copy(scanner_ccode));
	       ;
    break;}
case 58:
#line 1341 "parser.y"
{
                 yyval.node = new_node("module");
		 Setattr(yyval.node,"name",yyvsp[0].id);
		 if (yyvsp[-1].node) Setattr(yyval.node,"options",yyvsp[-1].node);
		 if (!ModuleName) ModuleName = NewString(yyvsp[0].id);
		 if (!module_node) module_node = yyval.node;
	       ;
    break;}
case 59:
#line 1355 "parser.y"
{
                 yyrename = NewString(yyvsp[-1].id);
		 yyval.node = 0;
               ;
    break;}
case 60:
#line 1359 "parser.y"
{
                   yyval.node = 0;
		   Swig_error(cparse_file,cparse_line,"Missing argument to %%name directive.\n");
	       ;
    break;}
case 61:
#line 1371 "parser.y"
{
                 yyval.node = new_node("native");
		 Setattr(yyval.node,"name",yyvsp[-4].id);
		 Setattr(yyval.node,"wrap:name",yyvsp[-1].id);
	         add_symbols(yyval.node);
	       ;
    break;}
case 62:
#line 1377 "parser.y"
{
		 if (!SwigType_isfunction(yyvsp[-1].decl.type)) {
		   Swig_error(cparse_file,cparse_line,"%%native declaration '%s' is not a function.\n", yyvsp[-1].decl.id);
		   yyval.node = 0;
		 } else {
		     Delete(SwigType_pop_function(yyvsp[-1].decl.type));
		     /* Need check for function here */
		     SwigType_push(yyvsp[-2].type,yyvsp[-1].decl.type);
		     yyval.node = new_node("native");
	             Setattr(yyval.node,"name",yyvsp[-5].id);
		     Setattr(yyval.node,"wrap:name",yyvsp[-1].decl.id);
		     Setattr(yyval.node,"type",yyvsp[-2].type);
		     Setattr(yyval.node,"parms",yyvsp[-1].decl.parms);
		     Setattr(yyval.node,"decl",yyvsp[-1].decl.type);
		 }
	         add_symbols(yyval.node);
	       ;
    break;}
case 63:
#line 1403 "parser.y"
{
                 yyval.node = new_node("pragma");
		 Setattr(yyval.node,"lang",yyvsp[-3].id);
		 Setattr(yyval.node,"name",yyvsp[-2].id);
		 Setattr(yyval.node,"value",yyvsp[0].str);
	       ;
    break;}
case 64:
#line 1409 "parser.y"
{
		yyval.node = new_node("pragma");
		Setattr(yyval.node,"lang",yyvsp[-1].id);
		Setattr(yyval.node,"name",yyvsp[0].id);
	      ;
    break;}
case 65:
#line 1416 "parser.y"
{ yyval.str = NewString(yyvsp[0].id); ;
    break;}
case 66:
#line 1417 "parser.y"
{ yyval.str = yyvsp[0].str; ;
    break;}
case 67:
#line 1420 "parser.y"
{ yyval.id = yyvsp[-1].id; ;
    break;}
case 68:
#line 1421 "parser.y"
{ yyval.id = (char *) "swig"; ;
    break;}
case 69:
#line 1429 "parser.y"
{
                    SwigType *t = yyvsp[-2].decl.type;
		    if (!Len(t)) t = 0;
		    if (yyvsp[-3].ivalue) {
		      rename_add(yyvsp[-2].decl.id,t,yyvsp[-1].id);
		    } else {
		      namewarn_add(yyvsp[-2].decl.id,t,yyvsp[-1].id);
		    }
		    yyval.node = 0;
		    scanner_clear_rename();
              ;
    break;}
case 70:
#line 1440 "parser.y"
{
		String *fixname;
		SwigType *t = yyvsp[-2].decl.type;
		fixname = feature_identifier_fix(yyvsp[-2].decl.id);
		if (!Len(t)) t = 0;
		/* Special declarator check */
		if (t) {
		  if (yyvsp[-1].dtype.qualifier) SwigType_push(t,yyvsp[-1].dtype.qualifier);
		  if (SwigType_isfunction(t)) {
		    SwigType *decl = SwigType_pop_function(t);
		    if (SwigType_ispointer(t)) {
		      String *nname = NewStringf("*%s",fixname);
		      if (yyvsp[-6].ivalue) {
			rename_add(Char(nname),decl,yyvsp[-4].id);
		      } else {
			namewarn_add(Char(nname),decl,yyvsp[-4].id);
		      }
		      Delete(nname);
		    } else {
		      if (yyvsp[-6].ivalue) {
			rename_add(Char(fixname),decl,yyvsp[-4].id);
		      } else {
			namewarn_add(Char(fixname),decl,yyvsp[-4].id);
		      }
		    }
		  } else if (SwigType_ispointer(t)) {
		    String *nname = NewStringf("*%s",fixname);
		    if (yyvsp[-6].ivalue) {
		      rename_add(Char(nname),0,yyvsp[-4].id);
		    } else {
		      namewarn_add(Char(nname),0,yyvsp[-4].id);
		    }
		    Delete(nname);
		  }
		} else {
		  if (yyvsp[-6].ivalue) {
		    rename_add(Char(fixname),0,yyvsp[-4].id);
		  } else {
		    namewarn_add(Char(fixname),0,yyvsp[-4].id);
		  }
		}
                yyval.node = 0;
		scanner_clear_rename();
              ;
    break;}
case 71:
#line 1484 "parser.y"
{
		if (yyvsp[-5].ivalue) {
		  rename_add(yyvsp[-1].id,0,yyvsp[-3].id);
		} else {
		  namewarn_add(yyvsp[-1].id,0,yyvsp[-3].id);
		}
		yyval.node = 0;
		scanner_clear_rename();
              ;
    break;}
case 72:
#line 1495 "parser.y"
{
		    yyval.ivalue = 1;
                ;
    break;}
case 73:
#line 1498 "parser.y"
{
                    yyval.ivalue = 0;
                ;
    break;}
case 74:
#line 1511 "parser.y"
{
                 String *fname;
                 String *val;
		 String *name;
		 String *fixname;
		 SwigType *t;
                 if (!features_hash) features_hash = NewHash();
		 fname = NewStringf("feature:%s",yyvsp[-4].id);
		 fixname = feature_identifier_fix(yyvsp[-2].decl.id);
		 if (Namespaceprefix) {
		   name = NewStringf("%s::%s",Namespaceprefix, fixname);
		 } else {
		   name = fixname;
		 }
		 val = yyvsp[0].str ? NewString(yyvsp[0].str) : NewString("1");
		 if (yyvsp[-2].decl.parms) {
		   Setmeta(val,"parms",yyvsp[-2].decl.parms);
		 }
		 t = yyvsp[-2].decl.type;
		 if (yyvsp[-2].decl.parms) Setmeta(val,"parms",yyvsp[-2].decl.parms);
		 if (!Len(t)) t = 0;
		 if (t) {
		   if (yyvsp[-1].dtype.qualifier) SwigType_push(t,yyvsp[-1].dtype.qualifier);
		   if (SwigType_isfunction(t)) {
		     SwigType *decl = SwigType_pop_function(t);
		     if (SwigType_ispointer(t)) {
		       String *nname = NewStringf("*%s",name);
		       Swig_feature_set(features_hash, nname, decl, fname, val);
		       Delete(nname);
		     } else {
		       Swig_feature_set(features_hash, name, decl, fname, val);
		     }
		   } else if (SwigType_ispointer(t)) {
		     String *nname = NewStringf("*%s",name);
		     Swig_feature_set(features_hash,nname,0,fname,val);
		     Delete(nname);
		   }
		 } else {
		   Swig_feature_set(features_hash,name,0,fname,val);
		 }
		 Delete(fname);
		 Delete(name);
		 yyval.node = 0;
              ;
    break;}
case 75:
#line 1558 "parser.y"
{
                 String *fname;
                 String *val;
		 String *name;
		 String *fixname;
		 SwigType *t;

                 if (!features_hash) features_hash = NewHash();
		 fname = NewStringf("feature:%s",yyvsp[-6].id);
		 fixname = feature_identifier_fix(yyvsp[-2].decl.id);
		 if (Namespaceprefix) {
		   name = NewStringf("%s::%s",Namespaceprefix, fixname);
		 } else {
		   name = fixname;
		 }
		 if (Len(yyvsp[-4].id)) {
		   val = NewString(yyvsp[-4].id);
		 } else {
		   val = 0;
		 }
		 if (yyvsp[-2].decl.parms) {
		   Setmeta(val,"parms",yyvsp[-2].decl.parms);
		 }
		 t = yyvsp[-2].decl.type;
		 if (yyvsp[-2].decl.parms) Setmeta(val,"parms",yyvsp[-2].decl.parms);
		 if (!Len(t)) t = 0;
		 if (t) {
		   if (yyvsp[-1].dtype.qualifier) SwigType_push(t,yyvsp[-1].dtype.qualifier);
		   if (SwigType_isfunction(t)) {
		     SwigType *decl = SwigType_pop_function(t);
		     if (SwigType_ispointer(t)) {
		       String *nname = NewStringf("*%s",name);
		       Swig_feature_set(features_hash, nname, decl, fname, val);
		       Delete(nname);
		     } else {
		       Swig_feature_set(features_hash, name, decl, fname, val);
		     }
		   } else if (SwigType_ispointer(t)) {
		     String *nname = NewStringf("*%s",name);
		     Swig_feature_set(features_hash,nname,0,fname,val);
		     Delete(nname);
		   }
		 } else {
		   Swig_feature_set(features_hash,name,0,fname,val);
		 }
		 Delete(fname);
		 Delete(name);
		 yyval.node = 0;
              ;
    break;}
case 76:
#line 1610 "parser.y"
{
		String *name;
		String *fname = NewStringf("feature:%s",yyvsp[-2].id);
		if (!features_hash) features_hash = NewHash();
		if (Namespaceprefix) name = NewStringf("%s::", Namespaceprefix);
		else name = NewString("");
		Swig_feature_set(features_hash,name,0,fname,(yyvsp[0].str ? NewString(yyvsp[0].str) : NewString("1")));
		Delete(name);
		Delete(fname);
		yyval.node = 0;
              ;
    break;}
case 77:
#line 1621 "parser.y"
{
		String *name;
		String *fname = NewStringf("feature:%s",yyvsp[-4].id);
		if (!features_hash) features_hash = NewHash();
		if (Namespaceprefix) name = NewStringf("%s::", Namespaceprefix);
		else name = NewString("");
		Swig_feature_set(features_hash,name,0,fname,(Len(yyvsp[-2].id) ? NewString(yyvsp[-2].id) : 0));
		Delete(name);
		Delete(fname);
		yyval.node = 0;
              ;
    break;}
case 78:
#line 1634 "parser.y"
{ yyval.str = yyvsp[0].str; ;
    break;}
case 79:
#line 1635 "parser.y"
{ yyval.str = 0; ;
    break;}
case 80:
#line 1636 "parser.y"
{ yyval.str = yyvsp[-2].pl; ;
    break;}
case 81:
#line 1641 "parser.y"
{
                 Parm *val;
		 String *name;
		 SwigType *t;
                 if (!features_hash) features_hash = NewHash();
		 if (Namespaceprefix) name = NewStringf("%s::%s", Namespaceprefix, yyvsp[-2].decl.id);
		 else name = NewString(yyvsp[-2].decl.id);
		 val = yyvsp[-4].pl;
		 if (yyvsp[-2].decl.parms) {
		   Setmeta(val,"parms",yyvsp[-2].decl.parms);
		 }
		 t = yyvsp[-2].decl.type;
		 if (!Len(t)) t = 0;
		 if (t) {
		   if (yyvsp[-1].dtype.qualifier) SwigType_push(t,yyvsp[-1].dtype.qualifier);
		   if (SwigType_isfunction(t)) {
		     SwigType *decl = SwigType_pop_function(t);
		     if (SwigType_ispointer(t)) {
		       String *nname = NewStringf("*%s",name);
		       Swig_feature_set(features_hash, nname, decl, "feature:varargs", val);
		       Delete(nname);
		     } else {
		       Swig_feature_set(features_hash, name, decl, "feature:varargs", val);
		     }
		   } else if (SwigType_ispointer(t)) {
		     String *nname = NewStringf("*%s",name);
		     Swig_feature_set(features_hash,nname,0,"feature:varargs",val);
		     Delete(nname);
		   }
		 } else {
		   Swig_feature_set(features_hash,name,0,"feature:varargs",val);
		 }
		 Delete(name);
		 yyval.node = 0;
              ;
    break;}
case 82:
#line 1677 "parser.y"
{ yyval.pl = yyvsp[0].pl; ;
    break;}
case 83:
#line 1678 "parser.y"
{ 
		  int i;
		  int n;
		  Parm *p;
		  n = atoi(Char(yyvsp[-2].dtype.val));
		  if (n <= 0) {
		    Swig_error(cparse_file, cparse_line,"Argument count in %%varargs must be positive.\n");
		    yyval.pl = 0;
		  } else {
		    yyval.pl = Copy(yyvsp[0].p);
		    Setattr(yyval.pl,"name","VARARGS_SENTINEL");
		    for (i = 0; i < n; i++) {
		      p = Copy(yyvsp[0].p);
		      set_nextSibling(p,yyval.pl);
		      yyval.pl = p;
		    }
		  }
                ;
    break;}
case 84:
#line 1707 "parser.y"
{
		   yyval.node = 0;
		   if (yyvsp[-3].tmap.op) {
		     yyval.node = new_node("typemap");
		     Setattr(yyval.node,"method",yyvsp[-3].tmap.op);
		     Setattr(yyval.node,"code",NewString(yyvsp[0].str));
		     if (yyvsp[-3].tmap.kwargs) {
		       Setattr(yyval.node,"kwargs", yyvsp[-3].tmap.kwargs);
		     }
		     appendChild(yyval.node,yyvsp[-1].p);
		   }
	       ;
    break;}
case 85:
#line 1719 "parser.y"
{
		 yyval.node = 0;
		 if (yyvsp[-3].tmap.op) {
		   yyval.node = new_node("typemap");
		   Setattr(yyval.node,"method",yyvsp[-3].tmap.op);
		   appendChild(yyval.node,yyvsp[-1].p);
		 }
	       ;
    break;}
case 86:
#line 1727 "parser.y"
{
		   yyval.node = 0;
		   if (yyvsp[-5].tmap.op) {
		     yyval.node = new_node("typemapcopy");
		     Setattr(yyval.node,"method",yyvsp[-5].tmap.op);
		     Setattr(yyval.node,"pattern", Getattr(yyvsp[-1].p,"pattern"));
		     appendChild(yyval.node,yyvsp[-3].p);
		   }
	       ;
    break;}
case 87:
#line 1740 "parser.y"
{
		 Hash *p;
		 String *name;
		 p = nextSibling(yyvsp[0].node);
		 if (p && (!Getattr(p,"value"))) {
		   /* two argument typemap form */
		   name = Getattr(yyvsp[0].node,"name");
		   if (!name || (Strcmp(name,typemap_lang))) {
		     yyval.tmap.op = 0;
		     yyval.tmap.kwargs = 0;
		   } else {
		     yyval.tmap.op = Getattr(p,"name");
		     yyval.tmap.kwargs = nextSibling(p);
		   }
		 } else {
		   /* one-argument typemap-form */
		   yyval.tmap.op = Getattr(yyvsp[0].node,"name");
		   yyval.tmap.kwargs = p;
		 }
                ;
    break;}
case 88:
#line 1762 "parser.y"
{
                 yyval.p = yyvsp[-1].p;
		 set_nextSibling(yyval.p,yyvsp[0].p);
		;
    break;}
case 89:
#line 1768 "parser.y"
{
                 yyval.p = yyvsp[-1].p;
		 set_nextSibling(yyval.p,yyvsp[0].p);
                ;
    break;}
case 90:
#line 1772 "parser.y"
{ yyval.p = 0;;
    break;}
case 91:
#line 1775 "parser.y"
{
		  SwigType_push(yyvsp[-1].type,yyvsp[0].decl.type);
		  yyval.p = new_node("typemapitem");
		  Setattr(yyval.p,"pattern",NewParm(yyvsp[-1].type,yyvsp[0].decl.id));
		  Setattr(yyval.p,"parms", yyvsp[0].decl.parms);
		  /*		  $$ = NewParm($1,$2.id);
				  Setattr($$,"parms",$2.parms); */
                ;
    break;}
case 92:
#line 1783 "parser.y"
{
                  yyval.p = new_node("typemapitem");
		  Setattr(yyval.p,"pattern",yyvsp[-1].pl);
		  /*		  Setattr($$,"multitype",$2); */
               ;
    break;}
case 93:
#line 1788 "parser.y"
{
		 yyval.p = new_node("typemapitem");
		 Setattr(yyval.p,"pattern", yyvsp[-4].pl);
		 /*                 Setattr($$,"multitype",$2); */
		 Setattr(yyval.p,"parms",yyvsp[-1].pl);
               ;
    break;}
case 94:
#line 1800 "parser.y"
{
                   yyval.node = new_node("types");
		   Setattr(yyval.node,"parms",yyvsp[-2].pl);
               ;
    break;}
case 95:
#line 1810 "parser.y"
{
                  Parm *p, *tp;
		  Node *n;
		  Node *nspace = 0, *nspace_inner = 0;
		  Node *tnode = 0;
		  Symtab *tscope = 0;
		  int     specialized = 0;
		  yyval.node = 0;

		  tscope = Swig_symbol_current();          /* Get the current scope */

		  /* If the template name is qualified.  We need to create or lookup namespace entries */
		  if (Swig_scopename_check(yyvsp[-4].str)) {
		    String *prefix, *base;
		    Node   *ns;
		    prefix = Swig_scopename_prefix(yyvsp[-4].str);
		    base = Swig_scopename_last(yyvsp[-4].str);
		    
		    /* Try to locate the scope */
		    ns = Swig_symbol_clookup(prefix,0);
		    if (!ns) {
		      Swig_error(cparse_file,cparse_line,"Undefined scope '%s'\n", prefix);
		    } else {
		      if (Strcmp(nodeType(ns),"namespace") != 0) {
			Swig_error(cparse_file,cparse_line,"'%s' is not defined as namespace.\n", prefix);
			ns = 0;
		      } else {
			/*			Swig_symbol_setscope(Getattr(ns,"symtab"));
						Namespaceprefix = Swig_symbol_qualifiedscopename(0); */
		      }
		    }

		    /* Create namespace nodes to enclose the template declaration */
		    if (ns) {
		      List *scopes;
		      String *sname;
		      String *name = NewString(prefix);
		      scopes = NewList();
		      while (name) {
			String *tprefix;
			String *base = Swig_scopename_last(name);
			Insert(scopes,0,base);
			tprefix = Swig_scopename_prefix(name);
			Delete(name);
			name = tprefix;
		      }
		      for (sname = Firstitem(scopes); sname; sname = Nextitem(scopes)) {
			Node *ns1,*ns2;

			ns1 = Swig_symbol_clookup(sname,0);
			assert(ns1);
			if (Strcmp(nodeType(ns1),"namespace") == 0) {
			  if (Getattr(ns1,"alias")) {
			    ns1 = Getattr(ns1,"namespace");
			  }
			} else {
			  assert(0);
			}
			ns2 = new_node("namespace");
			Setattr(ns2,"name",sname);
			Setattr(ns2,"symtab", Getattr(ns1,"symtab"));
			add_symbols(ns2);
			Swig_symbol_setscope(Getattr(ns1,"symtab"));
			Namespaceprefix = Swig_symbol_qualifiedscopename(0);
			if (nspace_inner) {
			  appendChild(nspace_inner,ns2);
			}
			nspace_inner = ns2;
			if (!nspace) nspace = ns2;
		      }
		      yyvsp[-4].str = base;
		    }
		  }

		  n = Swig_cparse_template_locate(yyvsp[-4].str,yyvsp[-2].p);

		  /* Patch the argument types to respect namespaces */
		  p = yyvsp[-2].p;
		  while (p) {
		    if (!Getattr(p,"value")) {
		      SwigType *ty = Getattr(p,"type");
		      if (ty) {
			ty = Swig_symbol_type_qualify(ty,0);
			/*			ty = Swig_symbol_typedef_reduce(ty,0); */
			Setattr(p,"type",ty);
		      }
		    }
		    p = nextSibling(p);
		  }
		  /* Look for the template */

		  if (n && (Strcmp(nodeType(n),"template") == 0)) {
		    Parm *tparms = Getattr(n,"templateparms");
		    if (!tparms) specialized = 1;
		    if (!specialized && ((ParmList_len(yyvsp[-2].p) > ParmList_len(tparms)))) {
		      Swig_error(cparse_file, cparse_line, "Too many template parameters. Maximum of %d.\n", ParmList_len(tparms));
		    } else if (!specialized && ((ParmList_len(yyvsp[-2].p) < ParmList_numrequired(tparms)))) {
		      Swig_error(cparse_file, cparse_line, "Not enough template parameters specified. %d required.\n", ParmList_numrequired(tparms));
		    } else {
		      int  def_supplied = 0;
		      /* Expand the template */
		      ParmList *temparms;
		      if (specialized) temparms = CopyParmList(yyvsp[-2].p);
		      else temparms = CopyParmList(tparms);

		      /* Create typedef's and arguments */
		      p = yyvsp[-2].p;
		      tp = temparms;
		      while (p) {
			String *value = Getattr(p,"value");
			if (def_supplied) {
			  Setattr(p,"default","1");
			}
			if (value) {
			  Setattr(tp,"value",value);
			} else {
			  SwigType *ty = Getattr(p,"type");
			  if (ty) {
			    Setattr(tp,"type",ty);
			  }
			  Delattr(tp,"value");
			}
			p = nextSibling(p);
			tp = nextSibling(tp);
			if (!p && tp) {
			  p = tp;
			  def_supplied = 1;
			}
		      }

		      yyval.node = copy_node(n);
		      /* We need to set the node name based on name used to instantiate */
		      Setattr(yyval.node,"name",Copy(yyvsp[-4].str));
		      if (!specialized) {
			Delattr(yyval.node,"sym:typename");
		      } else {
			Setattr(yyval.node,"sym:typename","1");
		      }
		      if (yyvsp[-6].id) {
			Swig_cparse_template_expand(yyval.node,yyvsp[-6].id,temparms);
			Setattr(yyval.node,"sym:name",yyvsp[-6].id);
		      } else {
			static int cnt = 0;
			String *nname = NewStringf("__dummy_%d__", cnt++);
			Swig_cparse_template_expand(yyval.node,nname,temparms);
			Setattr(yyval.node,"sym:name",nname);
			Setattr(yyval.node,"feature:ignore","1");
		      }
		      Delattr(yyval.node,"templatetype");
		      Setattr(yyval.node,"template",n);
		      tnode = yyval.node;
		      Setfile(yyval.node,cparse_file);
		      Setline(yyval.node,cparse_line);
		      Delete(temparms);
		      
		      add_symbols_copy(yyval.node);
		      if (Strcmp(nodeType(yyval.node),"class") == 0) {

			/* Identify pure abstract methods */
			Setattr(yyval.node,"abstract", pure_abstract(firstChild(yyval.node)));
			
                        /* Set up inheritance in symbol table */
			{
			  Symtab  *csyms;
			  List *baselist = Getattr(yyval.node,"baselist");
			  csyms = Swig_symbol_current();
			  Swig_symbol_setscope(Getattr(yyval.node,"symtab"));
			  if (baselist) {
			    List *bases = make_inherit_list(Getattr(yyval.node,"name"),baselist);
			    if (bases) {
			      Node *s;
			      for (s = Firstitem(bases); s; s = Nextitem(bases)) {
				Symtab *st = Getattr(s,"symtab");
				if (st) {
				  Swig_symbol_inherit(st);
				}
			      }
			    }
			  }
			  Swig_symbol_setscope(csyms);
			}

			/* Merge in addmethods for this class */
			
			/* !!! This may be broken.  We may have to  add the addmethods at the beginning of
			   the class */
			
			if (extendhash) {
			  String *clsname;
			  Node *am;
			  if (Namespaceprefix) {
			    clsname = NewStringf("%s::%s", Namespaceprefix, Getattr(yyval.node,"name"));
			  } else {
			    clsname = Getattr(yyval.node,"name");
			  }
			  am = Getattr(extendhash,clsname);
			  if (am) {
			    Symtab *st = Swig_symbol_current();
			    Swig_symbol_setscope(Getattr(yyval.node,"symtab"));
			    /*			    Printf(stdout,"%s: %s %x %x\n", Getattr($$,"name"), clsname, Swig_symbol_current(), Getattr($$,"symtab")); */
			    merge_extensions(yyval.node,am);
			    Swig_symbol_setscope(st);
			    appendChild(yyval.node,am);
			    Delattr(extendhash,clsname);
			  }
			}
			/* Add to classes hash */
			if (!classes) classes = NewHash();

			{
			  if (Namespaceprefix) {
			    String *temp = NewStringf("%s::%s", Namespaceprefix, Getattr(yyval.node,"name"));
			    Setattr(classes,temp,yyval.node);
			  } else {
			    Setattr(classes,Swig_symbol_qualifiedscopename(yyval.node),yyval.node);
			  }
			}
		      }
		    }
		    if (yyval.node && nspace) {
		      appendChild(nspace_inner,yyval.node);
		      yyval.node = nspace;
		    }
		  }
   	          Swig_symbol_setscope(tscope);
		  Namespaceprefix = Swig_symbol_qualifiedscopename(0);

                ;
    break;}
case 96:
#line 2045 "parser.y"
{
		  Swig_warning(0,cparse_file, cparse_line,"%s\n", yyvsp[0].id);
		  yyval.node = 0;
               ;
    break;}
case 97:
#line 2055 "parser.y"
{
                    yyval.node = yyvsp[0].node; 
                    if (yyval.node) {
   		      add_symbols(yyval.node);
   	            }
                ;
    break;}
case 98:
#line 2061 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 99:
#line 2065 "parser.y"
{ 
		  if (Strcmp(yyvsp[-3].id,"C") == 0) {
		    yyval.node = new_node("extern");
		    Setattr(yyval.node,"name",yyvsp[-3].id);
		    appendChild(yyval.node,firstChild(yyvsp[-1].node));
		  } else {
		     Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\" (ignored).\n", yyvsp[-3].id);
		     yyval.node = 0;
		  }
                ;
    break;}
case 100:
#line 2081 "parser.y"
{
              yyval.node = new_node("cdecl");
	      if (yyvsp[-1].dtype.qualifier) SwigType_push(yyvsp[-2].decl.type,yyvsp[-1].dtype.qualifier);
	      Setattr(yyval.node,"type",yyvsp[-3].type);
	      Setattr(yyval.node,"storage",yyvsp[-4].id);
	      Setattr(yyval.node,"name",yyvsp[-2].decl.id);
	      Setattr(yyval.node,"decl",yyvsp[-2].decl.type);
	      Setattr(yyval.node,"parms",yyvsp[-2].decl.parms);
	      Setattr(yyval.node,"value",yyvsp[-1].dtype.val);
	      Setattr(yyval.node,"throws",yyvsp[-1].dtype.throws);
	      if (!yyvsp[0].node) {
		if (Len(scanner_ccode)) {
		  Setattr(yyval.node,"code",Copy(scanner_ccode));
		}
	      } else {
		Node *n = yyvsp[0].node;
		/* Inherit attributes */
		while (n) {
		  Setattr(n,"type",Copy(yyvsp[-3].type));
		  Setattr(n,"storage",yyvsp[-4].id);
		  n = nextSibling(n);
		}
	      }
	      if (yyvsp[-1].dtype.bitfield) {
		Setattr(yyval.node,"bitfield", yyvsp[-1].dtype.bitfield);
	      }

	      /* Look for "::" declarations (ignored) */
	      if (Strstr(yyvsp[-2].decl.id,"::")) {
		if (Namespaceprefix) {
		  /* This is a special case. If the scope name of the declaration exactly
                     matches that of the declaration, then we will allow it. Otherwise, delete. */
		  String *p = Swig_scopename_prefix(yyvsp[-2].decl.id);
		  if (Strcmp(p,Namespaceprefix) == 0) {
		    Setattr(yyval.node,"name",Swig_scopename_last(yyvsp[-2].decl.id));
		    set_nextSibling(yyval.node,yyvsp[0].node);
		  } else {
		    Delete(yyval.node);
		    yyval.node = yyvsp[0].node;
		  }
		  Delete(p);
		} else {
		  Delete(yyval.node);
		  yyval.node = yyvsp[0].node;
		}
	      } else {
		set_nextSibling(yyval.node,yyvsp[0].node);
	      }
           ;
    break;}
case 101:
#line 2134 "parser.y"
{ 
                   yyval.node = 0;
                   Clear(scanner_ccode); 
               ;
    break;}
case 102:
#line 2138 "parser.y"
{
		 yyval.node = new_node("cdecl");
		 if (yyvsp[-1].dtype.qualifier) SwigType_push(yyvsp[-2].decl.type,yyvsp[-1].dtype.qualifier);
		 Setattr(yyval.node,"name",yyvsp[-2].decl.id);
		 Setattr(yyval.node,"decl",yyvsp[-2].decl.type);
		 Setattr(yyval.node,"parms",yyvsp[-2].decl.parms);
		 Setattr(yyval.node,"value",yyvsp[-1].dtype.val);
		 Setattr(yyval.node,"throws",yyvsp[-1].dtype.throws);
		 if (yyvsp[-1].dtype.bitfield) {
		   Setattr(yyval.node,"bitfield", yyvsp[-1].dtype.bitfield);
		 }
		 if (!yyvsp[0].node) {
		   if (Len(scanner_ccode)) {
		     Setattr(yyval.node,"code",Copy(scanner_ccode));
		   }
		 } else {
		   set_nextSibling(yyval.node,yyvsp[0].node);
		 }
	       ;
    break;}
case 103:
#line 2157 "parser.y"
{ 
                   skip_balanced('{','}');
                   yyval.node = 0;
               ;
    break;}
case 104:
#line 2163 "parser.y"
{ 
                   yyval.dtype = yyvsp[0].dtype; 
                   yyval.dtype.qualifier = 0;
		   yyval.dtype.throws = 0;
              ;
    break;}
case 105:
#line 2168 "parser.y"
{ 
                   yyval.dtype = yyvsp[0].dtype; 
		   yyval.dtype.qualifier = yyvsp[-1].str;
		   yyval.dtype.throws = 0;
	      ;
    break;}
case 106:
#line 2173 "parser.y"
{ 
		   yyval.dtype = yyvsp[0].dtype; 
                   yyval.dtype.qualifier = 0;
		   yyval.dtype.throws = yyvsp[-2].pl;
              ;
    break;}
case 107:
#line 2178 "parser.y"
{ 
                   yyval.dtype = yyvsp[0].dtype; 
                   yyval.dtype.qualifier = yyvsp[-5].str;
		   yyval.dtype.throws = yyvsp[-2].pl;
              ;
    break;}
case 108:
#line 2190 "parser.y"
{
                  yyval.node = new_node("enum");
		  Setattr(yyval.node,"name",yyvsp[-4].id);
		  appendChild(yyval.node,yyvsp[-2].node);
		  add_symbols(yyval.node);           /* Add to tag space */
		  add_symbols(yyvsp[-2].node);       /* Add enum values to id space */
	       ;
    break;}
case 109:
#line 2198 "parser.y"
{
		 Node *n;
		 SwigType *ty = 0;
		 String   *unnamed = 0;

		 yyval.node = new_node("enum");
		 if (yyvsp[-5].id) {
		   Setattr(yyval.node,"name",yyvsp[-5].id);
		   ty = NewStringf("enum %s", yyvsp[-5].id);
		 } else if (yyvsp[-1].decl.id){
		   unnamed = make_unnamed();
		   ty = NewStringf("enum %s", unnamed);
		   Setattr(yyval.node,"unnamed",unnamed);
		   /* WF 20/12/2001: Cannot get sym:name and symtab set without setting name - fix!
		      // I don't think sym:name should be set. */
		   Setattr(yyval.node,"name",yyvsp[-1].decl.id);
		   Setattr(yyval.node,"tdname",yyvsp[-1].decl.id);
		   Setattr(yyval.node,"storage",yyvsp[-7].id);
		 }
		 appendChild(yyval.node,yyvsp[-3].node);
		 n = new_node("cdecl");
		 Setattr(n,"type",ty);
		 Setattr(n,"name",yyvsp[-1].decl.id);
		 Setattr(n,"storage",yyvsp[-7].id);
		 Setattr(n,"decl",yyvsp[-1].decl.type);
		 Setattr(n,"parms",yyvsp[-1].decl.parms);
		 Setattr(n,"unnamed",unnamed);
		 if (yyvsp[0].node) {
		   Node *p = yyvsp[0].node;
		   set_nextSibling(n,p);
		   while (p) {
		     Setattr(p,"type",Copy(ty));
		     Setattr(p,"unnamed",unnamed);
		     Setattr(p,"storage",yyvsp[-7].id);
		     p = nextSibling(p);
		   }
		 } else {
		   if (Len(scanner_ccode)) {
		     Setattr(n,"code",Copy(scanner_ccode));
		   }
		 }
		 add_symbols(yyval.node);        /* Add enum to tag space */
		 set_nextSibling(yyval.node,n);
		 add_symbols(yyvsp[-3].node);       /* Add to id space */
	         add_symbols(n);
	       ;
    break;}
case 110:
#line 2246 "parser.y"
{
                   /* This is a sick hack.  If the ctor_end has parameters,
                      and the parms paremeter only has 1 parameter, this
                      could be a declaration of the form:

                         type (id)(parms)

			 Otherwise it's an error. */
                    int err = 0;
                    yyval.node = 0;

		    if ((ParmList_len(yyvsp[-2].pl) == 1) && (!Swig_scopename_check(yyvsp[-4].type))) {
		      SwigType *ty = Getattr(yyvsp[-2].pl,"type");
		      String *name = Getattr(yyvsp[-2].pl,"name");
		      err = 1;
		      if (!name) {
			yyval.node = new_node("cdecl");
			Setattr(yyval.node,"type",yyvsp[-4].type);
			Setattr(yyval.node,"storage",yyvsp[-5].id);
			Setattr(yyval.node,"name",ty);

			if (yyvsp[0].decl.have_parms) {
			  SwigType *decl = NewString("");
			  SwigType_add_function(decl,yyvsp[0].decl.parms);
			  Setattr(yyval.node,"decl",decl);
			  Setattr(yyval.node,"parms",yyvsp[0].decl.parms);
			  if (Len(scanner_ccode)) {
			    Setattr(yyval.node,"code",Copy(scanner_ccode));
			  }
			}
			if (yyvsp[0].decl.defarg) {
			  Setattr(yyval.node,"value",yyvsp[0].decl.defarg);
			}
			Setattr(yyval.node,"throws",yyvsp[0].decl.throws);
			err = 0;
		      }
		    }
		    if (err) {
		      Swig_error(cparse_file,cparse_line,"Syntax error in input.\n");
		    }
                ;
    break;}
case 111:
#line 2293 "parser.y"
{  yyval.node = yyvsp[0].node; ;
    break;}
case 112:
#line 2294 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 113:
#line 2295 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 114:
#line 2296 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 115:
#line 2297 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 116:
#line 2298 "parser.y"
{ yyval.node = 0; ;
    break;}
case 117:
#line 2304 "parser.y"
{
                   List *bases = 0;
                   class_rename = make_name(yyvsp[-2].str,0);
		   Classprefix = NewString(yyvsp[-2].str);
		   /* Deal with inheritance  */
		   if (yyvsp[-1].bases) {
		     bases = make_inherit_list(yyvsp[-2].str,yyvsp[-1].bases);
		   }
		   if (SwigType_istemplate(yyvsp[-2].str)) {
		     String *fbase, *tbase, *prefix;
		     prefix = SwigType_templateprefix(yyvsp[-2].str);
		     if (Namespaceprefix) {
		       fbase = NewStringf("%s::%s", Namespaceprefix,yyvsp[-2].str);
		       tbase = NewStringf("%s::%s", Namespaceprefix, prefix);
		     } else {
		       fbase = Copy(yyvsp[-2].str);
		       tbase = Copy(prefix);
		     }
		     rename_inherit(tbase,fbase);
		     Delete(fbase);
		     Delete(tbase);
		     Delete(prefix);
		   }
                   if (strcmp(yyvsp[-3].id,"class") == 0) {
		     cplus_mode = CPLUS_PRIVATE;
		   } else {
		     cplus_mode = CPLUS_PUBLIC;
		   }
		   Swig_symbol_newscope();
		   Swig_symbol_setscopename(yyvsp[-2].str);
		   if (bases) {
		     Node *s;
		     for (s = Firstitem(bases); s; s = Nextitem(bases)) {
		       Symtab *st = Getattr(s,"symtab");
		       if (st) {
			 Swig_symbol_inherit(st); 
		       }
		     }
		   }
		   Namespaceprefix = Swig_symbol_qualifiedscopename(0);
		   cparse_start_line = cparse_line;

		   /* If there are active template parameters, we need to make sure they are
                      placed in the class symbol table so we can catch shadows */

		   if (template_parameters) {
		     Parm *tp = template_parameters;
		     while(tp) {
		       Node *tn = new_node("templateparm");
		       Setattr(tn,"name",Getattr(tp,"name"));
		       Swig_symbol_cadd(Copy(Getattr(tp,"name")),tn);
		       tp = nextSibling(tp);
		     }
		   }
		   inclass = 1;
               ;
    break;}
case 118:
#line 2359 "parser.y"
{
		 Node *p;
		 SwigType *ty;
		 inclass = 0;
		 yyval.node = new_node("class");
		 Setline(yyval.node,cparse_start_line);
		 Setattr(yyval.node,"name",yyvsp[-6].str);
		 Setattr(yyval.node,"kind",yyvsp[-7].id);
		 Setattr(yyval.node,"baselist",yyvsp[-5].bases);
		 Setattr(yyval.node,"allows_typedef","1");
		 /* Check for pure-abstract class */
		 Setattr(yyval.node,"abstract", pure_abstract(yyvsp[-2].node));
		 
		 /* This bit of code merges in a previously defined %extend directive (if any) */
		 if (extendhash) {
		   String *clsname = Swig_symbol_qualifiedscopename(0);
		   Node *am = Getattr(extendhash,clsname);
		   if (am) {
		     merge_extensions(yyval.node,am);
		     appendChild(yyval.node,am);
		     Delattr(extendhash,clsname);
		   }
		   Delete(clsname);
		 }
		 if (!classes) classes = NewHash();
		 Setattr(classes,Swig_symbol_qualifiedscopename(0),yyval.node);

		 appendChild(yyval.node,yyvsp[-2].node);
		 p = yyvsp[0].node;
		 if (p) {
		   set_nextSibling(yyval.node,p);
		 }
		 
		 if (cparse_cplusplus) {
		   ty = NewString(yyvsp[-6].str);
		 } else {
		   ty = NewStringf("%s %s", yyvsp[-7].id,yyvsp[-6].str);
		 }
		 while (p) {
		   Setattr(p,"storage",yyvsp[-8].id);
		   Setattr(p,"type",ty);
		   p = nextSibling(p);
		 }
		 /* Dump nested classes */
		 {
		   String *name = yyvsp[-6].str;
		   if (yyvsp[0].node) {
		     SwigType *decltype = Getattr(yyvsp[0].node,"decl");
		     if (Cmp(yyvsp[-8].id,"typedef") == 0) {
		       if (!decltype || !Len(decltype)) {
			 name = Getattr(yyvsp[0].node,"name");
			 Setattr(yyval.node,"tdname",Copy(name));

			 /* Use typedef name as class name */
			 if (class_rename && (Strcmp(class_rename,yyvsp[-6].str) == 0)) {
			   class_rename = NewString(name);
			 }
			 if (!Getattr(classes,name)) {
			   Setattr(classes,name,yyval.node);
			 }
			 Setattr(yyval.node,"decl",decltype);
		       }
		     }
		   }
		   appendChild(yyval.node,dump_nested(Char(name)));
		 }
		 Setattr(yyval.node,"symtab",Swig_symbol_popscope());

		 yyrename = NewString(class_rename);
		 Classprefix = 0;
		 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
		 add_symbols(yyval.node);
		 if (yyvsp[0].node)
		   add_symbols(yyvsp[0].node);

	       ;
    break;}
case 119:
#line 2438 "parser.y"
{
	       class_rename = make_name(0,0);
	       if (strcmp(yyvsp[-1].id,"class") == 0) {
		 cplus_mode = CPLUS_PRIVATE;
	       } else {
		 cplus_mode = CPLUS_PUBLIC;
	       }
	       Swig_symbol_newscope();
	       cparse_start_line = cparse_line;
	       inclass = 1;
	       Classprefix = NewString("");
	       Namespaceprefix = Swig_symbol_qualifiedscopename(0);
             ;
    break;}
case 120:
#line 2450 "parser.y"
{
	       String *unnamed;
	       Node *n, *p, *pp = 0;
	       Classprefix = 0;
	       inclass = 0;
	       unnamed = make_unnamed();
	       yyval.node = new_node("class");
	       Setline(yyval.node,cparse_start_line);
	       Setattr(yyval.node,"kind",yyvsp[-6].id);
	       Setattr(yyval.node,"storage",yyvsp[-7].id);
	       Setattr(yyval.node,"unnamed",unnamed);
	       Setattr(yyval.node,"allows_typedef","1");

	       /* Check for pure-abstract class */
	       Setattr(yyval.node,"abstract", pure_abstract(yyvsp[-3].node));

	       n = new_node("cdecl");
	       Setattr(n,"name",yyvsp[-1].decl.id);
	       Setattr(n,"unnamed",unnamed);
	       Setattr(n,"type",unnamed);
	       Setattr(n,"decl",yyvsp[-1].decl.type);
	       Setattr(n,"parms",yyvsp[-1].decl.parms);
	       Setattr(n,"storage",yyvsp[-7].id);
	       pp = n;
	       if (yyvsp[0].node) {
		 set_nextSibling(n,yyvsp[0].node);
		 p = yyvsp[0].node;
		 while (p) {
		   pp = p;
		   Setattr(p,"unnamed",unnamed);
		   Setattr(p,"type",Copy(unnamed));
		   Setattr(p,"storage",yyvsp[-7].id);
		   p = nextSibling(p);
		 }
	       }
	       set_nextSibling(yyval.node,n);
	       {
		 /* If a proper typedef name was given, we'll use it to set the scope name */
		 String *name = 0;
		 if (yyvsp[-7].id && (strcmp(yyvsp[-7].id,"typedef") == 0)) {
		   if (!Len(yyvsp[-1].decl.type)) {	
		     name = yyvsp[-1].decl.id;
		     Setattr(yyval.node,"tdname",name);
		     Setattr(yyval.node,"name",name);
		     if (!class_rename) class_rename = NewString(name);
		     Swig_symbol_setscopename(name);

		     /* If a proper name given, we use that as the typedef, not unnamed */
		     Clear(unnamed);
		     Append(unnamed, name);
		     
		     n = nextSibling(n);
		     set_nextSibling(yyval.node,n);

		     /* Check for previous extensions */
		     if (extendhash) {
		       String *clsname = Swig_symbol_qualifiedscopename(0);
		       Node *am = Getattr(extendhash,clsname);
		       if (am) {
			 /* Merge the extension into the symbol table */
			 merge_extensions(yyval.node,am);
			 appendChild(yyval.node,am);
			 Delattr(extendhash,clsname);
		       }
		       Delete(clsname);
		     }
		     if (!classes) classes = NewHash();
		     Setattr(classes,Swig_symbol_qualifiedscopename(0),yyval.node);
		   } else {
		     Swig_symbol_setscopename((char*)"<unnamed>");
		   }
		 }
		 appendChild(yyval.node,yyvsp[-3].node);
		 appendChild(yyval.node,dump_nested(Char(name)));
	       }
	       /* Pop the scope */
	       Setattr(yyval.node,"symtab",Swig_symbol_popscope());
	       if (class_rename) {
		 yyrename = NewString(class_rename);
	       }
	       Namespaceprefix = Swig_symbol_qualifiedscopename(0);
	       add_symbols(yyval.node);
	       add_symbols(n);
              ;
    break;}
case 121:
#line 2536 "parser.y"
{ yyval.node = 0; ;
    break;}
case 122:
#line 2537 "parser.y"
{
                        yyval.node = new_node("cdecl");
                        Setattr(yyval.node,"name",yyvsp[-1].decl.id);
                        Setattr(yyval.node,"decl",yyvsp[-1].decl.type);
                        Setattr(yyval.node,"parms",yyvsp[-1].decl.parms);
			set_nextSibling(yyval.node,yyvsp[0].node);
                    ;
    break;}
case 123:
#line 2549 "parser.y"
{
              if (yyvsp[-3].id && (Strcmp(yyvsp[-3].id,"friend") == 0)) {
		/* Ignore */
                yyval.node = 0; 
	      } else {
		yyval.node = new_node("classforward");
		Setattr(yyval.node,"kind",yyvsp[-2].id);
		Setattr(yyval.node,"name",yyvsp[-1].str);
		Setattr(yyval.node,"sym:weak", "1");
		add_symbols(yyval.node);
	      }
             ;
    break;}
case 124:
#line 2567 "parser.y"
{ template_parameters = yyvsp[-1].tparms; ;
    break;}
case 125:
#line 2567 "parser.y"
{
		      String *tname = 0;
		      int     error = 0;

                      template_parameters = 0;
                      yyval.node = yyvsp[0].node;
		      if (yyval.node) tname = Getattr(yyval.node,"name");
		      
		      /* Check if the class is a template specialization */
		      if ((yyval.node) && (Strstr(tname,"<")) && (Strncmp(tname,"operator ",9) != 0)) {
			/* If a specialization.  Check if defined. */
			Node *tempn = 0;
			{
			  String *tbase = SwigType_templateprefix(tname);
			  tempn = Swig_symbol_clookup_local(tbase,0);
			  if (!tempn || (Strcmp(nodeType(tempn),"template") != 0)) {
			    Swig_warning(WARN_PARSE_TEMPLATE_SP_UNDEF, Getfile(yyval.node),Getline(yyval.node),"Specialization of non-template '%s'.\n", tbase);
			    tempn = 0;
			    error = 1;
			  }
			  Delete(tbase);
			}
			Setattr(yyval.node,"specialization","1");
			Setattr(yyval.node,"templatetype",nodeType(yyval.node));
			set_nodeType(yyval.node,"template");
			/* Template partial specialization */
			if (tempn && (yyvsp[-3].tparms) && (yyvsp[0].node)) {
			  List   *tlist;
			  String *targs = SwigType_templateargs(tname);
			  tlist = SwigType_parmlist(targs);
			  /*			  Printf(stdout,"targs = '%s' %s\n", targs, tlist); */
			  if (!Getattr(yyval.node,"sym:weak")) {
			    Setattr(yyval.node,"sym:typename","1");
			  }
			  
			  if (Len(tlist) != ParmList_len(Getattr(tempn,"templateparms"))) {
			    Swig_error(Getfile(yyval.node),Getline(yyval.node),"Inconsistent argument count in template partial specialization. %d %d\n", Len(tlist), ParmList_len(Getattr(tempn,"templateparms")));
			    
			  } else {

			  /* This code builds the argument list for the partial template
                             specialization.  This is a little hairy, but the idea is as
                             follows:

                             $3 contains a list of arguments supplied for the template.
                             For example template<class T>.

                             tlist is a list of the specialization arguments--which may be
                             different.  For example class<int,T>.

                             tp is a copy of the arguments in the original template definition.
     
                             The patching algorithm walks through the list of supplied
                             arguments ($3), finds the position in the specialization arguments
                             (tlist), and then patches the name in the argument list of the
                             original template.
			  */

			  {
			    String *pn;
			    Parm *p, *p1;
			    int i, nargs;
			    Parm *tp = CopyParmList(Getattr(tempn,"templateparms"));
			    nargs = Len(tlist);
			    p = yyvsp[-3].tparms;
			    while (p) {
			      for (i = 0; i < nargs; i++){
				pn = Getattr(p,"name");
				if (Strcmp(pn,Getitem(tlist,i)) == 0) {
				  int j;
				  Parm *p1 = tp;
				  for (j = 0; j < i; j++) {
				    p1 = nextSibling(p1);
				  }
				  Setattr(p1,"name",pn);
				  Setattr(p1,"partialarg","1");
				}
			      }
			      p = nextSibling(p);
			    }
			    p1 = tp;
			    i = 0;
			    while (p1) {
			      if (!Getattr(p1,"partialarg")) {
				Delattr(p1,"name");
				Setattr(p1,"type", Getitem(tlist,i));
			      } 
			      i++;
			      p1 = nextSibling(p1);
			    }
			    Setattr(yyval.node,"templateparms",tp);
			  }
#if 0
			  /* Patch the parameter list */
			  if (tempn) {
			    Parm *p,*p1;
			    ParmList *tp = CopyParmList(Getattr(tempn,"templateparms"));
			    p = yyvsp[-3].tparms;
			    p1 = tp;
			    while (p && p1) {
			      String *pn = Getattr(p,"name");
			      Printf(stdout,"pn = '%s'\n", pn);
			      if (pn) Setattr(p1,"name",pn);
			      else Delattr(p1,"name");
			      pn = Getattr(p,"type");
			      if (pn) Setattr(p1,"type",pn);
			      p = nextSibling(p);
			      p1 = nextSibling(p1);
			    }
			    Setattr(yyval.node,"templateparms",tp);
			  } else {
			    Setattr(yyval.node,"templateparms",yyvsp[-3].tparms);
			  }
#endif
			  Delattr(yyval.node,"specialization");
			  Setattr(yyval.node,"partialspecialization","1");
			  /* Create a specialized name for matching */
			  {
			    Parm *p = yyvsp[-3].tparms;
			    String *fname = NewString(Getattr(yyval.node,"name"));
			    String *ffname = 0;

			    char   tmp[32];
			    int    i;
			    while (p) {
			      String *n = Getattr(p,"name");
			      if (!n) {
				p = nextSibling(p);
				continue;
			      }
			      for (i = 0; i < Len(tlist); i++) {
				if (Strstr(Getitem(tlist,i),n)) {
				  sprintf(tmp,"$%d",i+1);
				  Replaceid(fname,n,tmp);
				}
			      }
			      p = nextSibling(p);
			    }
			    /* Patch argument names with typedef */
			    {
			      SwigType *tt;
			      List *tparms = SwigType_parmlist(fname);
			      ffname = SwigType_templateprefix(fname);
			      Append(ffname,"<(");
			      for (tt = Firstitem(tparms); tt; ) {
				SwigType *ttr = Swig_symbol_typedef_reduce(tt,0);
				ttr = Swig_symbol_type_qualify(ttr,0);
				Append(ffname,ttr);
				tt = Nextitem(tparms);
				if (tt) Putc(',',ffname);
			      }
			      Append(ffname,")>");
			    }
			    {
			      String *partials = Getattr(tempn,"partials");
			      if (!partials) {
				partials = NewList();
				Setattr(tempn,"partials",partials);
			      }
			      /*			      Printf(stdout,"partial: fname = '%s', '%s'\n", fname, Swig_symbol_typedef_reduce(fname,0)); */
			      Append(partials,ffname);
			    }
			    Setattr(yyval.node,"partialargs",ffname);
			    Swig_symbol_cadd(ffname,yyval.node);
			  }
			  }
			  Delete(tlist);
			  Delete(targs);
			} else {
			  /* Need to resolve exact specialization name */
			  /* This needs to be rewritten */
			  List *tparms;
			  String *fname;
			  SwigType *tt;
			  fname = SwigType_templateprefix(tname);
			  tparms = SwigType_parmlist(tname);
			  Append(fname,"<(");
			  for (tt = Firstitem(tparms); tt; ) {
			    SwigType *ttr = Swig_symbol_typedef_reduce(tt,0);
			    ttr = Swig_symbol_type_qualify(ttr,0);
			    Append(fname,ttr);
			    tt = Nextitem(tparms);
			    if (tt) Putc(',',fname);
			  }
			  Append(fname,")>");
			  Swig_symbol_cadd(fname,yyval.node);
			}
		      }  else if (yyval.node) {
			Setattr(yyval.node,"templatetype",nodeType(yyvsp[0].node));
			set_nodeType(yyval.node,"template");
			Setattr(yyval.node,"templateparms", yyvsp[-3].tparms);
			if (!Getattr(yyval.node,"sym:weak")) {
			  Setattr(yyval.node,"sym:typename","1");
			}
			add_symbols(yyval.node);
			/* We also place a fully parameterized version in the symbol table */
			{
			  Parm *p;
			  String *fname = NewStringf("%s<(",Getattr(yyval.node,"name"));
			  p = yyvsp[-3].tparms;
			  while (p) {
			    String *n = Getattr(p,"name");
			    if (!n) n = Getattr(p,"type");
			    Printf(fname,"%s", n);
			    p = nextSibling(p);
			    if (p) Putc(',',fname);
			  }
			  Printf(fname,")>");
			  Swig_symbol_cadd(fname,yyval.node);
			}
		      }
		      if (error) yyval.node = 0;
                  ;
    break;}
case 126:
#line 2780 "parser.y"
{
		  Swig_warning(WARN_PARSE_EXPLICIT_TEMPLATE, cparse_file, cparse_line, "Explicit template instantiation ignored.\n");
                   yyval.node = 0; 
                ;
    break;}
case 127:
#line 2786 "parser.y"
{
		  yyval.node = yyvsp[0].node;
                ;
    break;}
case 128:
#line 2789 "parser.y"
{
                   yyval.node = yyvsp[0].node;
                ;
    break;}
case 129:
#line 2792 "parser.y"
{
                   yyval.node = yyvsp[0].node;
                ;
    break;}
case 130:
#line 2795 "parser.y"
{
		  yyval.node = 0;
                ;
    break;}
case 131:
#line 2798 "parser.y"
{
                  yyval.node = yyvsp[0].node;
                ;
    break;}
case 132:
#line 2803 "parser.y"
{
		   /* Rip out the parameter names */
		  Parm *p = yyvsp[0].pl;
		  yyval.tparms = yyvsp[0].pl;

		  while (p) {
		    String *name = Getattr(p,"name");
		    if (!name) {
		      /* Hmmm. Maybe it's a 'class T' parameter */
		      char *type = Char(Getattr(p,"type"));
		      /* Template template parameter */
		      if (strncmp(type,"template<class> ",16) == 0) {
			type += 16;
		      }
		      if ((strncmp(type,"class ",6) == 0) || (strncmp(type,"typename ", 9) == 0)) {
			char *t = strchr(type,' ');
			Setattr(p,"name", t+1);
		      } else {
			/*
			 Swig_error(cparse_file, cparse_line, "Missing template parameter name\n");
			 $$.rparms = 0;
			 $$.parms = 0;
			 break; */
		      }
		    }
		    p = nextSibling(p);
		  }
                 ;
    break;}
case 133:
#line 2835 "parser.y"
{
                  yyval.node = new_node("using");
		  Setattr(yyval.node,"uname",yyvsp[-1].str);
		  Setattr(yyval.node,"name", Swig_scopename_last(yyvsp[-1].str));
		  add_symbols(yyval.node);
             ;
    break;}
case 134:
#line 2841 "parser.y"
{
	       Node *n = Swig_symbol_clookup(yyvsp[-1].str,0);
	       if (!n) {
		 Swig_error(cparse_file, cparse_line, "Nothing known about namespace '%s'\n", yyvsp[-1].str);
		 yyval.node = 0;
	       } else {

		 while (Strcmp(nodeType(n),"using") == 0) {
		   n = Getattr(n,"node");
		 }
		 if (n) {
		   if (Strcmp(nodeType(n),"namespace") == 0) {
		     yyval.node = new_node("using");
		     Setattr(yyval.node,"node",n);
		     Setattr(yyval.node,"namespace", yyvsp[-1].str);
		     Swig_symbol_inherit(Getattr(n,"symtab"));
		   } else {
		     Swig_error(cparse_file, cparse_line, "'%s' is not a namespace.\n", yyvsp[-1].str);
		     yyval.node = 0;
		   }
		 } else {
		   yyval.node = 0;
		 }
	       }
             ;
    break;}
case 135:
#line 2868 "parser.y"
{ 
                Hash *h;
                yyvsp[-2].node = Swig_symbol_current();
		h = Swig_symbol_clookup(yyvsp[-1].str,0);
		if (h && (Strcmp(nodeType(h),"namespace") == 0)) {
		  if (Getattr(h,"alias")) {
		    h = Getattr(h,"namespace");
		    Swig_warning(WARN_PARSE_NAMESPACE_ALIAS, cparse_file, cparse_line, "Namespace alias '%s' not allowed here. Assuming '%s'\n",
				 yyvsp[-1].str, Getattr(h,"name"));
		    yyvsp[-1].str = Getattr(h,"name");
		  }
		  Swig_symbol_setscope(Getattr(h,"symtab"));
		} else {
		  Swig_symbol_newscope();
		  Swig_symbol_setscopename(yyvsp[-1].str);
		}
		Namespaceprefix = Swig_symbol_qualifiedscopename(0);
             ;
    break;}
case 136:
#line 2885 "parser.y"
{
                Node *n = yyvsp[-1].node;
		set_nodeType(n,"namespace");
		Setattr(n,"name",yyvsp[-4].str);
                Setattr(n,"symtab", Swig_symbol_popscope());
		Swig_symbol_setscope(yyvsp[-5].node);
		yyval.node = n;
		Namespaceprefix = Swig_symbol_qualifiedscopename(0);
		add_symbols(yyval.node);
             ;
    break;}
case 137:
#line 2895 "parser.y"
{
	       Hash *h;
	       yyvsp[-1].node = Swig_symbol_current();
	       h = Swig_symbol_clookup("",0);
	       if (h && (Strcmp(nodeType(h),"namespace") == 0)) {
		 Swig_symbol_setscope(Getattr(h,"symtab"));
	       } else {
		 Swig_symbol_newscope();
		 Swig_symbol_setscopename("__unnamed__");
	       }
	       Namespaceprefix = Swig_symbol_qualifiedscopename(0);
             ;
    break;}
case 138:
#line 2906 "parser.y"
{
	       yyval.node = yyvsp[-1].node;
	       set_nodeType(yyval.node,"namespace");
	       Setattr(yyval.node,"unnamed","1");
	       Setattr(yyval.node,"symtab", Swig_symbol_popscope());
	       Swig_symbol_setscope(yyvsp[-4].node);
	       Namespaceprefix = Swig_symbol_qualifiedscopename(0);
	       add_symbols(yyval.node);
             ;
    break;}
case 139:
#line 2915 "parser.y"
{
	       /* Namespace alias */
	       Node *n;
	       yyval.node = new_node("namespace");
	       Setattr(yyval.node,"name",yyvsp[-3].id);
	       Setattr(yyval.node,"alias",yyvsp[-1].str);
	       n = Swig_symbol_clookup(yyvsp[-1].str,0);
	       if (!n) {
		 Swig_error(cparse_file, cparse_line, "Unknown namespace '%s'\n", yyvsp[-1].str);
		 yyval.node = 0;
	       } else {
		 if (Strcmp(nodeType(n),"namespace") != 0) {
		   Swig_error(cparse_file, cparse_line, "'%s' is not a namespace\n",yyvsp[-1].str);
		   yyval.node = 0;
		 } else {
		   while (Getattr(n,"alias")) {
		     n = Getattr(n,"namespace");
		   }
		   Setattr(yyval.node,"namespace",n);
		   add_symbols(yyval.node);
		   /* Set up a scope alias */
		   Swig_symbol_alias(yyvsp[-3].id,Getattr(n,"symtab"));
		 }
	       }
             ;
    break;}
case 140:
#line 2942 "parser.y"
{
                   yyval.node = yyvsp[-1].node;
		   if (yyval.node) {
		     Node *p = yyval.node;
		     Node *pp =0;
		     while (p) {
		       pp = p;
		       p = nextSibling(p);
		     }
		     set_nextSibling(pp,yyvsp[0].node);
		   } else {
		     yyval.node = yyvsp[0].node;
		   }
             ;
    break;}
case 141:
#line 2956 "parser.y"
{ 
                  if (cplus_mode != CPLUS_PUBLIC) {
		     Swig_error(cparse_file,cparse_line,"%%extend can only be used in a public section\n");
		  }
             ;
    break;}
case 142:
#line 2960 "parser.y"
{
	       yyval.node = new_node("extend");
	       Swig_tag_nodes(yyvsp[-2].node,"feature:extend",(char*) "1");
	       appendChild(yyval.node,yyvsp[-2].node);
	       set_nextSibling(yyval.node,yyvsp[0].node);
	     ;
    break;}
case 143:
#line 2966 "parser.y"
{ yyval.node = 0;;
    break;}
case 144:
#line 2967 "parser.y"
{
	       skip_decl();
		   {
		     static int last_error_line = -1;
		     if (last_error_line != cparse_line) {
		       Swig_error(cparse_file, cparse_line,"Syntax error in input.\n");
		       last_error_line = cparse_line;
		     }
		   }
	     ;
    break;}
case 145:
#line 2976 "parser.y"
{ 
                yyval.node = yyvsp[0].node;
             ;
    break;}
case 146:
#line 2987 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 147:
#line 2988 "parser.y"
{ 
                 yyval.node = yyvsp[0].node; 
		 if (extendmode) {
		   String *symname;
		   symname= make_name(Getattr(yyval.node,"name"), Getattr(yyval.node,"decl"));
		   if (Strcmp(symname,Getattr(yyval.node,"name")) == 0) {
		     /* No renaming operation.  Set name to class name */
		     yyrename = NewString(Getattr(current_class,"sym:name"));
		   } else {
		     yyrename = symname;
		   }
		 }
		 add_symbols(yyval.node);
             ;
    break;}
case 148:
#line 3002 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 149:
#line 3003 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 150:
#line 3004 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 151:
#line 3005 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 152:
#line 3006 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 153:
#line 3007 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 154:
#line 3008 "parser.y"
{ yyval.node = 0; ;
    break;}
case 155:
#line 3009 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 156:
#line 3010 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 157:
#line 3011 "parser.y"
{ yyval.node = 0; ;
    break;}
case 158:
#line 3012 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 159:
#line 3013 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 160:
#line 3014 "parser.y"
{ yyval.node = 0; ;
    break;}
case 161:
#line 3015 "parser.y"
{ yyval.node = 0; ;
    break;}
case 162:
#line 3024 "parser.y"
{
              if (Classprefix) {
		 SwigType *decl = NewString("");
		 yyval.node = new_node("constructor");
		 Setattr(yyval.node,"name",yyvsp[-4].type);
		 Setattr(yyval.node,"parms",yyvsp[-2].pl);
		 SwigType_add_function(decl,yyvsp[-2].pl);
		 Setattr(yyval.node,"decl",decl);
		 Setattr(yyval.node,"throws",yyvsp[0].decl.throws);
		 if (Len(scanner_ccode)) {
		   Setattr(yyval.node,"code",Copy(scanner_ccode));
		 }
		 Setattr(yyval.node,"feature:new","1");
	      } else {
		yyval.node = 0;
              }
              ;
    break;}
case 163:
#line 3045 "parser.y"
{
               yyval.node = new_node("destructor");
	       Setattr(yyval.node,"name",NewStringf("~%s",yyvsp[-4].str));
	       if (Len(scanner_ccode)) {
		 Setattr(yyval.node,"code",Copy(scanner_ccode));
	       }
	       {
		 String *decl = NewString("");
		 SwigType_add_function(decl,yyvsp[-2].pl);
		 Setattr(yyval.node,"decl",decl);
	       }
	       add_symbols(yyval.node);
	      ;
    break;}
case 164:
#line 3061 "parser.y"
{
		yyval.node = new_node("destructor");
	       /* Check for template names.  If the class is a template
		  and the constructor is missing the template part, we
		  add it */
	       {
		 char *c = Strstr(Classprefix,"<");
		 if (c) {
		   if (!Strstr(yyvsp[-4].str,"<")) {
		     yyvsp[-4].str = NewStringf("%s%s",yyvsp[-4].str,c);
		   }
		 }
	       }
		Setattr(yyval.node,"storage","virtual");
		Setattr(yyval.node,"name",NewStringf("~%s",yyvsp[-4].str));
		if (yyvsp[0].dtype.val) {
		  Setattr(yyval.node,"value","0");
		}
		if (Len(scanner_ccode)) {
		  Setattr(yyval.node,"code",Copy(scanner_ccode));
		}
		{
		  String *decl = NewString("");
		  SwigType_add_function(decl,yyvsp[-2].pl);
		  Setattr(yyval.node,"decl",decl);
		}

		add_symbols(yyval.node);
	      ;
    break;}
case 165:
#line 3094 "parser.y"
{
                 yyval.node = new_node("cdecl");
                 Setattr(yyval.node,"type",yyvsp[-5].type);
		 Setattr(yyval.node,"name",yyvsp[-6].str);

		 SwigType_add_function(yyvsp[-4].type,yyvsp[-2].pl);
		 if (yyvsp[0].dtype.qualifier) {
		   SwigType_push(yyvsp[-4].type,yyvsp[0].dtype.qualifier);
		 }
		 Setattr(yyval.node,"decl",yyvsp[-4].type);
		 Setattr(yyval.node,"parms",yyvsp[-2].pl);
		 Setattr(yyval.node,"conversion_operator","1");
		 add_symbols(yyval.node);
              ;
    break;}
case 166:
#line 3108 "parser.y"
{
		 SwigType *decl;
                 yyval.node = new_node("cdecl");
                 Setattr(yyval.node,"type",yyvsp[-5].type);
		 Setattr(yyval.node,"name",yyvsp[-6].str);
		 decl = NewString("");
		 SwigType_add_reference(decl);
		 SwigType_add_function(decl,yyvsp[-2].pl);
		 if (yyvsp[0].dtype.qualifier) {
		   SwigType_push(decl,yyvsp[0].dtype.qualifier);
		 }
		 Setattr(yyval.node,"decl",decl);
		 Setattr(yyval.node,"parms",yyvsp[-2].pl);
		 Setattr(yyval.node,"conversion_operator","1");
		 add_symbols(yyval.node);
	       ;
    break;}
case 167:
#line 3125 "parser.y"
{
		String *t = NewString("");
		yyval.node = new_node("cdecl");
		Setattr(yyval.node,"type",yyvsp[-4].type);
		Setattr(yyval.node,"name",yyvsp[-5].str);
		SwigType_add_function(t,yyvsp[-2].pl);
		if (yyvsp[0].dtype.qualifier) {
		  SwigType_push(t,yyvsp[0].dtype.qualifier);
		}
		Setattr(yyval.node,"decl",t);
		Setattr(yyval.node,"parms",yyvsp[-2].pl);
		Setattr(yyval.node,"conversion_operator","1");
		add_symbols(yyval.node);
              ;
    break;}
case 168:
#line 3143 "parser.y"
{
                 skip_balanced('{','}');
                 yyval.node = 0;
               ;
    break;}
case 169:
#line 3150 "parser.y"
{ 
                yyval.node = new_node("access");
		Setattr(yyval.node,"kind","public");
                cplus_mode = CPLUS_PUBLIC;
              ;
    break;}
case 170:
#line 3157 "parser.y"
{ 
                yyval.node = new_node("access");
                Setattr(yyval.node,"kind","private");
		cplus_mode = CPLUS_PRIVATE;
	      ;
    break;}
case 171:
#line 3165 "parser.y"
{ 
		yyval.node = new_node("access");
		Setattr(yyval.node,"kind","protected");
		cplus_mode = CPLUS_PROTECTED;
	      ;
    break;}
case 172:
#line 3188 "parser.y"
{ cparse_start_line = cparse_line; skip_balanced('{','}');
	      ;
    break;}
case 173:
#line 3189 "parser.y"
{
	        yyval.node = 0;
		if (cplus_mode == CPLUS_PUBLIC) {
		  if (yyvsp[-1].decl.id) {
		    if (strcmp(yyvsp[-5].id,"class") == 0) {
		      Swig_warning(WARN_PARSE_NESTED_CLASS, cparse_file, cparse_line, "Nested classes not currently supported (ignored).\n");
		      /* Generate some code for a new class */
		    } else {
		      Nested *n = (Nested *) malloc(sizeof(Nested));
		      n->code = NewString("");
		      Printv(n->code, "typedef ", yyvsp[-5].id, " ",
			     Char(scanner_ccode), " $classname_", yyvsp[-1].decl.id, ";\n", NIL);

		      n->name = Swig_copy_string(yyvsp[-1].decl.id);
		      n->line = cparse_start_line;
		      n->type = NewString("");
		      n->kind = yyvsp[-5].id;
		      SwigType_push(n->type, yyvsp[-1].decl.type);
		      n->next = 0;
		      add_nested(n);
		    }
		  } else {
		    Swig_warning(WARN_PARSE_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", yyvsp[-5].id);
		  }
		}
	      ;
    break;}
case 174:
#line 3217 "parser.y"
{ cparse_start_line = cparse_line; skip_balanced('{','}');
              ;
    break;}
case 175:
#line 3218 "parser.y"
{
	        yyval.node = 0;
		if (cplus_mode == CPLUS_PUBLIC) {
		  if (strcmp(yyvsp[-4].id,"class") == 0) {
		    Swig_warning(WARN_PARSE_NESTED_CLASS,cparse_file, cparse_line,"Nested class not currently supported (ignored)\n");
		    /* Generate some code for a new class */
		  } else if (yyvsp[-1].decl.id) {
		    /* Generate some code for a new class */
		    Nested *n = (Nested *) malloc(sizeof(Nested));
		    n->code = NewString("");
		    Printv(n->code, "typedef ", yyvsp[-4].id, " " ,
			    Char(scanner_ccode), " $classname_", yyvsp[-1].decl.id, ";\n",NIL);
		    n->name = Swig_copy_string(yyvsp[-1].decl.id);
		    n->line = cparse_start_line;
		    n->type = NewString("");
		    n->kind = yyvsp[-4].id;
		    SwigType_push(n->type,yyvsp[-1].decl.type);
		    n->next = 0;
		    add_nested(n);
		  } else {
		    Swig_warning(WARN_PARSE_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", yyvsp[-4].id);
		  }
		}
	      ;
    break;}
case 176:
#line 3244 "parser.y"
{ yyval.decl = yyvsp[0].decl;;
    break;}
case 177:
#line 3245 "parser.y"
{ yyval.decl.id = 0; ;
    break;}
case 178:
#line 3251 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 179:
#line 3254 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 180:
#line 3258 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 181:
#line 3261 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 182:
#line 3262 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 183:
#line 3263 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 184:
#line 3264 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 185:
#line 3265 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 186:
#line 3266 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 187:
#line 3267 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 188:
#line 3268 "parser.y"
{ yyval.node = yyvsp[0].node; ;
    break;}
case 189:
#line 3271 "parser.y"
{
	            Clear(scanner_ccode);
               ;
    break;}
case 190:
#line 3274 "parser.y"
{ skip_balanced('{','}'); ;
    break;}
case 191:
#line 3277 "parser.y"
{ 
                     Clear(scanner_ccode);
                     yyval.dtype.val = 0;
                     yyval.dtype.qualifier = yyvsp[-1].dtype.qualifier;
                     yyval.dtype.bitfield = 0;
                     yyval.dtype.throws = yyvsp[-1].dtype.throws;
                ;
    break;}
case 192:
#line 3284 "parser.y"
{ 
                     Clear(scanner_ccode);
                     yyval.dtype.val = yyvsp[-1].dtype.val;
                     yyval.dtype.qualifier = yyvsp[-3].dtype.qualifier;
                     yyval.dtype.bitfield = 0;
                     yyval.dtype.throws = yyvsp[-3].dtype.throws; 
               ;
    break;}
case 193:
#line 3291 "parser.y"
{ 
                     skip_balanced('{','}');
                     yyval.dtype.val = 0;
                     yyval.dtype.qualifier = yyvsp[-1].dtype.qualifier;
                     yyval.dtype.bitfield = 0;
                     yyval.dtype.throws = yyvsp[-1].dtype.throws; 
               ;
    break;}
case 194:
#line 3301 "parser.y"
{ ;
    break;}
case 195:
#line 3307 "parser.y"
{ yyval.id = "extern"; ;
    break;}
case 196:
#line 3308 "parser.y"
{ 
                   if (strcmp(yyvsp[0].id,"C") == 0) {
		     yyval.id = "externc";
		   } else {
		     Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\" (ignored).\n", yyvsp[0].id);
		     yyval.id = 0;
		   }
               ;
    break;}
case 197:
#line 3316 "parser.y"
{ yyval.id = "static"; ;
    break;}
case 198:
#line 3317 "parser.y"
{ yyval.id = "typedef"; ;
    break;}
case 199:
#line 3318 "parser.y"
{ yyval.id = "virtual"; ;
    break;}
case 200:
#line 3319 "parser.y"
{ yyval.id = "friend"; ;
    break;}
case 201:
#line 3320 "parser.y"
{ yyval.id = 0; ;
    break;}
case 202:
#line 3327 "parser.y"
{
                 Parm *p;
		 yyval.pl = yyvsp[0].pl;
		 p = yyvsp[0].pl;
                 while (p) {
		   Replace(Getattr(p,"type"),"typename ", "", DOH_REPLACE_ANY);
		   p = nextSibling(p);
                 }
               ;
    break;}
case 203:
#line 3338 "parser.y"
{
		  if (1) { 
		    set_nextSibling(yyvsp[-1].p,yyvsp[0].pl);
		    yyval.pl = yyvsp[-1].p;
		  } else {
		    yyval.pl = yyvsp[0].pl;
		  }
		;
    break;}
case 204:
#line 3346 "parser.y"
{ yyval.pl = 0; ;
    break;}
case 205:
#line 3349 "parser.y"
{
                 set_nextSibling(yyvsp[-1].p,yyvsp[0].pl);
		 yyval.pl = yyvsp[-1].p;
                ;
    break;}
case 206:
#line 3353 "parser.y"
{ yyval.pl = 0; ;
    break;}
case 207:
#line 3357 "parser.y"
{
                   SwigType_push(yyvsp[-1].type,yyvsp[0].decl.type);
		   yyval.p = NewParm(yyvsp[-1].type,yyvsp[0].decl.id);
		   Setfile(yyval.p,cparse_file);
		   Setline(yyval.p,cparse_line);
		   if (yyvsp[0].decl.defarg) {
		     Setattr(yyval.p,"value",yyvsp[0].decl.defarg);
		   }
		;
    break;}
case 208:
#line 3367 "parser.y"
{
                  yyval.p = NewParm(NewStringf("template<class> %s %s", yyvsp[-1].id,yyvsp[0].str), 0);
		  Setfile(yyval.p,cparse_file);
		  Setline(yyval.p,cparse_line);
                ;
    break;}
case 209:
#line 3372 "parser.y"
{
		  SwigType *t = NewString("v(...)");
		  yyval.p = NewParm(t, 0);
		  Setfile(yyval.p,cparse_file);
		  Setline(yyval.p,cparse_line);
		;
    break;}
case 210:
#line 3380 "parser.y"
{
                 Parm *p;
		 yyval.p = yyvsp[0].p;
		 p = yyvsp[0].p;
                 while (p) {
		   if (Getattr(p,"type")) {
		     Replace(Getattr(p,"type"),"typename ", "", DOH_REPLACE_ANY);
		   }
		   p = nextSibling(p);
                 }
               ;
    break;}
case 211:
#line 3393 "parser.y"
{
		  if (1) { 
		    set_nextSibling(yyvsp[-1].p,yyvsp[0].p);
		    yyval.p = yyvsp[-1].p;
		  } else {
		    yyval.p = yyvsp[0].p;
		  }
		;
    break;}
case 212:
#line 3401 "parser.y"
{ yyval.p = 0; ;
    break;}
case 213:
#line 3404 "parser.y"
{
                 set_nextSibling(yyvsp[-1].p,yyvsp[0].p);
		 yyval.p = yyvsp[-1].p;
                ;
    break;}
case 214:
#line 3408 "parser.y"
{ yyval.p = 0; ;
    break;}
case 215:
#line 3412 "parser.y"
{
		  yyval.p = yyvsp[0].p;
		  {
		    /* We need to make a possible adjustment for integer parameters. */
		    SwigType *type;
		    Node     *n = 0;

		    while (!n) {
		      type = Getattr(yyvsp[0].p,"type");
		      n = Swig_symbol_clookup(type,0);     /* See if we can find a node that matches the typename */
		      if ((n) && (Strcmp(nodeType(n),"cdecl") == 0)) {
			SwigType *decl = Getattr(n,"decl");
			if (!SwigType_isfunction(decl)) {
			  String *value = Getattr(n,"value");
			  if (value) {
			    Setattr(yyvsp[0].p,"type",Copy(value));
			    n = 0;
			  }
			}
		      } else {
			break;
		      }
		    }
		  }
		  
               ;
    break;}
case 216:
#line 3438 "parser.y"
{
                  yyval.p = NewParm(0,0);
                  Setfile(yyval.p,cparse_file);
		  Setline(yyval.p,cparse_line);
		  Setattr(yyval.p,"value",yyvsp[0].dtype.val);
               ;
    break;}
case 217:
#line 3444 "parser.y"
{
                  yyval.p = NewParm(0,0);
                  Setfile(yyval.p,cparse_file);
		  Setline(yyval.p,cparse_line);
		  Setattr(yyval.p,"value",NewString(yyvsp[0].id));
               ;
    break;}
case 218:
#line 3452 "parser.y"
{ 
                  yyval.dtype = yyvsp[0].dtype; 
		  if (yyvsp[0].dtype.type == T_ERROR) {
		    Swig_warning(WARN_PARSE_BAD_DEFAULT,cparse_file, cparse_line, "Can't set default argument (ignored)\n");
		    yyval.dtype.val = 0;
		    yyval.dtype.rawval = 0;
		    yyval.dtype.bitfield = 0;
		    yyval.dtype.throws = 0;
		  }
               ;
    break;}
case 219:
#line 3462 "parser.y"
{
		 Node *n = Swig_symbol_clookup(yyvsp[0].str,0);
		 if (n) {
		   String *q = Swig_symbol_qualified(n);
		   if (Getattr(n,"access")) {
		     if (cplus_mode == CPLUS_PUBLIC) {
		       Swig_warning(WARN_PARSE_PRIVATE, cparse_file, cparse_line,"'%s' is private in this context.\n", yyvsp[0].str);
		       Swig_warning(WARN_PARSE_BAD_DEFAULT, cparse_file, cparse_line,"Can't set default argument value (ignored)\n");
		     }
		     yyval.dtype.val = 0;
		   } else {
		     if (q) {
		       yyval.dtype.val = NewStringf("&%s::%s", q,Getattr(n,"name"));
		       Delete(q);
		     } else {
		       yyval.dtype.val = NewStringf("&%s", yyvsp[0].str);
		     }
		   }
		 } else {
		   yyval.dtype.val = NewStringf("&%s",yyvsp[0].str);
		 }
		 yyval.dtype.rawval = 0;
		 yyval.dtype.type = T_USER;
		 yyval.dtype.bitfield = 0;
		 yyval.dtype.throws = 0;
	       ;
    break;}
case 220:
#line 3488 "parser.y"
{
		 skip_balanced('{','}');
		 yyval.dtype.val = 0;
		 yyval.dtype.rawval = 0;
                 yyval.dtype.type = T_INT;
		 yyval.dtype.bitfield = 0;
		 yyval.dtype.throws = 0;
	       ;
    break;}
case 221:
#line 3496 "parser.y"
{ 
		 yyval.dtype.val = 0;
		 yyval.dtype.rawval = 0;
		 yyval.dtype.type = 0;
		 yyval.dtype.bitfield = yyvsp[0].dtype.val;
		 yyval.dtype.throws = 0;
	       ;
    break;}
case 222:
#line 3503 "parser.y"
{
                 yyval.dtype.val = 0;
                 yyval.dtype.rawval = 0;
                 yyval.dtype.type = T_INT;
		 yyval.dtype.bitfield = 0;
		 yyval.dtype.throws = 0;
               ;
    break;}
case 223:
#line 3512 "parser.y"
{
                 yyval.decl = yyvsp[-1].decl;
		 yyval.decl.defarg = yyvsp[0].dtype.rawval ? yyvsp[0].dtype.rawval : yyvsp[0].dtype.val;
            ;
    break;}
case 224:
#line 3516 "parser.y"
{
              yyval.decl = yyvsp[-1].decl;
	      yyval.decl.defarg = yyvsp[0].dtype.rawval ? yyvsp[0].dtype.rawval : yyvsp[0].dtype.val;
            ;
    break;}
case 225:
#line 3520 "parser.y"
{
   	      yyval.decl.type = 0;
              yyval.decl.id = 0;
	      yyval.decl.defarg = yyvsp[0].dtype.rawval ? yyvsp[0].dtype.rawval : yyvsp[0].dtype.val;
            ;
    break;}
case 226:
#line 3527 "parser.y"
{
                 yyval.decl = yyvsp[0].decl;
		 if (SwigType_isfunction(yyvsp[0].decl.type)) {
		   Delete(SwigType_pop_function(yyvsp[0].decl.type));
		 } else if (SwigType_isarray(yyvsp[0].decl.type)) {
		   SwigType *ta = SwigType_pop_arrays(yyvsp[0].decl.type);
		   if (SwigType_isfunction(yyvsp[0].decl.type)) {
		     Delete(SwigType_pop_function(yyvsp[0].decl.type));
		   } else {
		     yyval.decl.parms = 0;
		   }
		   SwigType_push(yyvsp[0].decl.type,ta);
		   Delete(ta);
		 } else {
		   yyval.decl.parms = 0;
		 }
            ;
    break;}
case 227:
#line 3544 "parser.y"
{
              yyval.decl = yyvsp[0].decl;
	      if (SwigType_isfunction(yyvsp[0].decl.type)) {
		Delete(SwigType_pop_function(yyvsp[0].decl.type));
	      } else if (SwigType_isarray(yyvsp[0].decl.type)) {
		SwigType *ta = SwigType_pop_arrays(yyvsp[0].decl.type);
		if (SwigType_isfunction(yyvsp[0].decl.type)) {
		  Delete(SwigType_pop_function(yyvsp[0].decl.type));
		} else {
		  yyval.decl.parms = 0;
		}
		SwigType_push(yyvsp[0].decl.type,ta);
		Delete(ta);
	      } else {
		yyval.decl.parms = 0;
	      }
            ;
    break;}
case 228:
#line 3561 "parser.y"
{
   	      yyval.decl.type = 0;
              yyval.decl.id = 0;
	      yyval.decl.parms = 0;
	      ;
    break;}
case 229:
#line 3569 "parser.y"
{
              yyval.decl = yyvsp[0].decl;
	      if (yyval.decl.type) {
		SwigType_push(yyvsp[-1].type,yyval.decl.type);
		Delete(yyval.decl.type);
	      }
	      yyval.decl.type = yyvsp[-1].type;
           ;
    break;}
case 230:
#line 3577 "parser.y"
{
              yyval.decl = yyvsp[0].decl;
	      SwigType_add_reference(yyvsp[-2].type);
              if (yyval.decl.type) {
		SwigType_push(yyvsp[-2].type,yyval.decl.type);
		Delete(yyval.decl.type);
	      }
	      yyval.decl.type = yyvsp[-2].type;
           ;
    break;}
case 231:
#line 3586 "parser.y"
{
              yyval.decl = yyvsp[0].decl;
	      if (!yyval.decl.type) yyval.decl.type = NewString("");
           ;
    break;}
case 232:
#line 3590 "parser.y"
{ 
	     yyval.decl = yyvsp[0].decl;
	     yyval.decl.type = NewString("");
	     SwigType_add_reference(yyval.decl.type);
	     if (yyvsp[0].decl.type) {
	       SwigType_push(yyval.decl.type,yyvsp[0].decl.type);
	       Delete(yyvsp[0].decl.type);
	     }
           ;
    break;}
case 233:
#line 3599 "parser.y"
{ 
	     SwigType *t = NewString("");

	     yyval.decl = yyvsp[0].decl;
	     SwigType_add_memberpointer(t,yyvsp[-2].str);
	     if (yyval.decl.type) {
	       SwigType_push(t,yyval.decl.type);
	       Delete(yyval.decl.type);
	     }
	     yyval.decl.type = t;
	     ;
    break;}
case 234:
#line 3610 "parser.y"
{ 
	     SwigType *t = NewString("");
	     yyval.decl = yyvsp[0].decl;
	     SwigType_add_memberpointer(t,yyvsp[-2].str);
	     SwigType_push(yyvsp[-3].type,t);
	     if (yyval.decl.type) {
	       SwigType_push(yyvsp[-3].type,yyval.decl.type);
	       Delete(yyval.decl.type);
	     }
	     yyval.decl.type = yyvsp[-3].type;
	     Delete(t);
	   ;
    break;}
case 235:
#line 3622 "parser.y"
{ 
	     yyval.decl = yyvsp[0].decl;
	     SwigType_add_memberpointer(yyvsp[-4].type,yyvsp[-3].str);
	     SwigType_add_reference(yyvsp[-4].type);
	     if (yyval.decl.type) {
	       SwigType_push(yyvsp[-4].type,yyval.decl.type);
	       Delete(yyval.decl.type);
	     }
	     yyval.decl.type = yyvsp[-4].type;
	   ;
    break;}
case 236:
#line 3632 "parser.y"
{ 
	     SwigType *t = NewString("");
	     yyval.decl = yyvsp[0].decl;
	     SwigType_add_memberpointer(t,yyvsp[-3].str);
	     SwigType_add_reference(t);
	     if (yyval.decl.type) {
	       SwigType_push(t,yyval.decl.type);
	       Delete(yyval.decl.type);
	     } 
	     yyval.decl.type = t;
	   ;
    break;}
case 237:
#line 3645 "parser.y"
{
                /* Note: This is non-standard C.  Template declarator is allowed to follow an identifier */
                 yyval.decl.id = Char(yyvsp[0].str);
		 yyval.decl.type = 0;
		 yyval.decl.parms = 0;
		 yyval.decl.have_parms = 0;
                  ;
    break;}
case 238:
#line 3652 "parser.y"
{
                  yyval.decl.id = Char(NewStringf("~%s",yyvsp[0].str));
                  yyval.decl.type = 0;
                  yyval.decl.parms = 0;
                  yyval.decl.have_parms = 0;
                  ;
    break;}
case 239:
#line 3660 "parser.y"
{
                  yyval.decl.id = Char(yyvsp[-1].str);
                  yyval.decl.type = 0;
                  yyval.decl.parms = 0;
                  yyval.decl.have_parms = 0;
                  ;
    break;}
case 240:
#line 3676 "parser.y"
{
		    yyval.decl = yyvsp[-1].decl;
		    if (yyval.decl.type) {
		      SwigType_push(yyvsp[-2].type,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = yyvsp[-2].type;
                  ;
    break;}
case 241:
#line 3684 "parser.y"
{
		    SwigType *t;
		    yyval.decl = yyvsp[-1].decl;
		    t = NewString("");
		    SwigType_add_memberpointer(t,yyvsp[-3].str);
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
		    ;
    break;}
case 242:
#line 3695 "parser.y"
{ 
		    SwigType *t;
		    yyval.decl = yyvsp[-2].decl;
		    t = NewString("");
		    SwigType_add_array(t,(char*)"");
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
                  ;
    break;}
case 243:
#line 3706 "parser.y"
{ 
		    SwigType *t;
		    yyval.decl = yyvsp[-3].decl;
		    t = NewString("");
		    SwigType_add_array(t,yyvsp[-1].dtype.val);
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
                  ;
    break;}
case 244:
#line 3717 "parser.y"
{
		    SwigType *t;
                    yyval.decl = yyvsp[-3].decl;
		    t = NewString("");
		    SwigType_add_function(t,yyvsp[-1].pl);
		    if (!yyval.decl.have_parms) {
		      yyval.decl.parms = yyvsp[-1].pl;
		      yyval.decl.have_parms = 1;
		    }
		    if (!yyval.decl.type) {
		      yyval.decl.type = t;
		    } else {
		      SwigType_push(t, yyval.decl.type);
		      Delete(yyval.decl.type);
		      yyval.decl.type = t;
		    }
		  ;
    break;}
case 245:
#line 3736 "parser.y"
{
                /* Note: This is non-standard C.  Template declarator is allowed to follow an identifier */
                 yyval.decl.id = Char(yyvsp[0].str);
		 yyval.decl.type = 0;
		 yyval.decl.parms = 0;
		 yyval.decl.have_parms = 0;
                  ;
    break;}
case 246:
#line 3744 "parser.y"
{
                  yyval.decl.id = Char(NewStringf("~%s",yyvsp[0].str));
                  yyval.decl.type = 0;
                  yyval.decl.parms = 0;
                  yyval.decl.have_parms = 0;
                  ;
    break;}
case 247:
#line 3761 "parser.y"
{
		    yyval.decl = yyvsp[-1].decl;
		    if (yyval.decl.type) {
		      SwigType_push(yyvsp[-2].type,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = yyvsp[-2].type;
                  ;
    break;}
case 248:
#line 3769 "parser.y"
{
                    yyval.decl = yyvsp[-1].decl;
		    if (!yyval.decl.type) {
		      yyval.decl.type = NewString("");
		    }
		    SwigType_add_reference(yyval.decl.type);
                  ;
    break;}
case 249:
#line 3776 "parser.y"
{
		    SwigType *t;
		    yyval.decl = yyvsp[-1].decl;
		    t = NewString("");
		    SwigType_add_memberpointer(t,yyvsp[-3].str);
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
		    ;
    break;}
case 250:
#line 3787 "parser.y"
{ 
		    SwigType *t;
		    yyval.decl = yyvsp[-2].decl;
		    t = NewString("");
		    SwigType_add_array(t,(char*)"");
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
                  ;
    break;}
case 251:
#line 3798 "parser.y"
{ 
		    SwigType *t;
		    yyval.decl = yyvsp[-3].decl;
		    t = NewString("");
		    SwigType_add_array(t,yyvsp[-1].dtype.val);
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
                  ;
    break;}
case 252:
#line 3809 "parser.y"
{
		    SwigType *t;
                    yyval.decl = yyvsp[-3].decl;
		    t = NewString("");
		    SwigType_add_function(t,yyvsp[-1].pl);
		    if (!yyval.decl.have_parms) {
		      yyval.decl.parms = yyvsp[-1].pl;
		      yyval.decl.have_parms = 1;
		    }
		    if (!yyval.decl.type) {
		      yyval.decl.type = t;
		    } else {
		      SwigType_push(t, yyval.decl.type);
		      Delete(yyval.decl.type);
		      yyval.decl.type = t;
		    }
		  ;
    break;}
case 253:
#line 3828 "parser.y"
{
		    yyval.decl.type = yyvsp[0].type;
                    yyval.decl.id = 0;
		    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
                  ;
    break;}
case 254:
#line 3834 "parser.y"
{ 
                     yyval.decl = yyvsp[0].decl;
                     SwigType_push(yyvsp[-1].type,yyvsp[0].decl.type);
		     yyval.decl.type = yyvsp[-1].type;
		     Delete(yyvsp[0].decl.type);
                  ;
    break;}
case 255:
#line 3840 "parser.y"
{
		    yyval.decl.type = yyvsp[-1].type;
		    SwigType_add_reference(yyval.decl.type);
		    yyval.decl.id = 0;
		    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
		  ;
    break;}
case 256:
#line 3847 "parser.y"
{
		    yyval.decl = yyvsp[0].decl;
		    SwigType_add_reference(yyvsp[-2].type);
		    if (yyval.decl.type) {
		      SwigType_push(yyvsp[-2].type,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = yyvsp[-2].type;
                  ;
    break;}
case 257:
#line 3856 "parser.y"
{
		    yyval.decl = yyvsp[0].decl;
                  ;
    break;}
case 258:
#line 3859 "parser.y"
{
		    yyval.decl = yyvsp[0].decl;
		    yyval.decl.type = NewString("");
		    SwigType_add_reference(yyval.decl.type);
		    if (yyvsp[0].decl.type) {
		      SwigType_push(yyval.decl.type,yyvsp[0].decl.type);
		      Delete(yyvsp[0].decl.type);
		    }
                  ;
    break;}
case 259:
#line 3868 "parser.y"
{ 
                    yyval.decl.id = 0;
                    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
                    yyval.decl.type = NewString("");
		    SwigType_add_reference(yyval.decl.type);
                  ;
    break;}
case 260:
#line 3875 "parser.y"
{ 
		    yyval.decl.type = NewString("");
                    SwigType_add_memberpointer(yyval.decl.type,yyvsp[-1].str);
                    yyval.decl.id = 0;
                    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
      	          ;
    break;}
case 261:
#line 3882 "parser.y"
{ 
		    SwigType *t = NewString("");
                    yyval.decl.type = yyvsp[-2].type;
		    yyval.decl.id = 0;
		    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
		    SwigType_add_memberpointer(t,yyvsp[-1].str);
		    SwigType_push(yyval.decl.type,t);
		    Delete(t);
                  ;
    break;}
case 262:
#line 3892 "parser.y"
{ 
		    yyval.decl = yyvsp[0].decl;
		    SwigType_add_memberpointer(yyvsp[-3].type,yyvsp[-2].str);
		    if (yyval.decl.type) {
		      SwigType_push(yyvsp[-3].type,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = yyvsp[-3].type;
                  ;
    break;}
case 263:
#line 3903 "parser.y"
{ 
		    SwigType *t;
		    yyval.decl = yyvsp[-2].decl;
		    t = NewString("");
		    SwigType_add_array(t,(char*)"");
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
                  ;
    break;}
case 264:
#line 3914 "parser.y"
{ 
		    SwigType *t;
		    yyval.decl = yyvsp[-3].decl;
		    t = NewString("");
		    SwigType_add_array(t,yyvsp[-1].dtype.val);
		    if (yyval.decl.type) {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		    }
		    yyval.decl.type = t;
                  ;
    break;}
case 265:
#line 3925 "parser.y"
{ 
		    yyval.decl.type = NewString("");
		    yyval.decl.id = 0;
		    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
		    SwigType_add_array(yyval.decl.type,(char*)"");
                  ;
    break;}
case 266:
#line 3932 "parser.y"
{ 
		    yyval.decl.type = NewString("");
		    yyval.decl.id = 0;
		    yyval.decl.parms = 0;
		    yyval.decl.have_parms = 0;
		    SwigType_add_array(yyval.decl.type,yyvsp[-1].dtype.val);
		  ;
    break;}
case 267:
#line 3939 "parser.y"
{
                    yyval.decl = yyvsp[-1].decl;
		  ;
    break;}
case 268:
#line 3942 "parser.y"
{
		    SwigType *t;
                    yyval.decl = yyvsp[-3].decl;
		    t = NewString("");
                    SwigType_add_function(t,yyvsp[-1].pl);
		    if (!yyval.decl.type) {
		      yyval.decl.type = t;
		    } else {
		      SwigType_push(t,yyval.decl.type);
		      Delete(yyval.decl.type);
		      yyval.decl.type = t;
		    }
		    if (!yyval.decl.have_parms) {
		      yyval.decl.parms = yyvsp[-1].pl;
		      yyval.decl.have_parms = 1;
		    }
		  ;
    break;}
case 269:
#line 3959 "parser.y"
{
                    yyval.decl.type = NewString("");
                    SwigType_add_function(yyval.decl.type,yyvsp[-1].pl);
		    yyval.decl.parms = yyvsp[-1].pl;
		    yyval.decl.have_parms = 1;
		    yyval.decl.id = 0;
                  ;
    break;}
case 270:
#line 3969 "parser.y"
{ 
               yyval.type = NewString("");
               SwigType_add_pointer(yyval.type);
	       SwigType_push(yyval.type,yyvsp[-1].str);
	       SwigType_push(yyval.type,yyvsp[0].type);
	       Delete(yyvsp[0].type);
           ;
    break;}
case 271:
#line 3976 "parser.y"
{
	     yyval.type = NewString("");
	     SwigType_add_pointer(yyval.type);
	     SwigType_push(yyval.type,yyvsp[0].type);
	     Delete(yyvsp[0].type);
	     ;
    break;}
case 272:
#line 3982 "parser.y"
{ 
	     	yyval.type = NewString("");	
		SwigType_add_pointer(yyval.type);
	        SwigType_push(yyval.type,yyvsp[0].str);
           ;
    break;}
case 273:
#line 3987 "parser.y"
{
	      yyval.type = NewString("");
	      SwigType_add_pointer(yyval.type);
           ;
    break;}
case 274:
#line 3993 "parser.y"
{ 
                  yyval.str = NewString("");
	          SwigType_add_qualifier(yyval.str,yyvsp[0].id);
               ;
    break;}
case 275:
#line 3997 "parser.y"
{ 
                  yyval.str = yyvsp[0].str; 
                  SwigType_add_qualifier(yyval.str,yyvsp[-1].id);
               ;
    break;}
case 276:
#line 4003 "parser.y"
{ yyval.id = "const"; ;
    break;}
case 277:
#line 4004 "parser.y"
{ yyval.id = "volatile"; ;
    break;}
case 278:
#line 4010 "parser.y"
{
                   yyval.type = yyvsp[0].type;
                   Replace(yyval.type,"typename ","", DOH_REPLACE_ANY);
                ;
    break;}
case 279:
#line 4016 "parser.y"
{
                   yyval.type = yyvsp[0].type;
	           SwigType_push(yyval.type,yyvsp[-1].str);
               ;
    break;}
case 280:
#line 4020 "parser.y"
{ yyval.type = yyvsp[0].type; ;
    break;}
case 281:
#line 4023 "parser.y"
{ yyval.type = yyvsp[0].type;
                  /* Printf(stdout,"primitive = '%s'\n", $$);*/
                ;
    break;}
case 282:
#line 4026 "parser.y"
{ yyval.type = yyvsp[0].type; ;
    break;}
case 283:
#line 4027 "parser.y"
{ yyval.type = yyvsp[0].type; ;
    break;}
case 284:
#line 4028 "parser.y"
{ yyval.type = NewStringf("%s%s",yyvsp[-1].type,yyvsp[0].id); ;
    break;}
case 285:
#line 4029 "parser.y"
{ yyval.type = NewStringf("enum %s", yyvsp[0].str); ;
    break;}
case 286:
#line 4030 "parser.y"
{ yyval.type = yyvsp[0].type; ;
    break;}
case 287:
#line 4031 "parser.y"
{
		  yyval.type = yyvsp[-1].type;
	          SwigType_push(yyval.type,yyvsp[0].str);
     	       ;
    break;}
case 288:
#line 4036 "parser.y"
{
		  yyval.type = yyvsp[0].str;
               ;
    break;}
case 289:
#line 4039 "parser.y"
{ 
		 yyval.type = NewStringf("%s %s", yyvsp[-1].id, yyvsp[0].str);
               ;
    break;}
case 290:
#line 4044 "parser.y"
{
		 if (!yyvsp[0].ptype.type) yyvsp[0].ptype.type = NewString("int");
		 if (yyvsp[0].ptype.us) {
		   yyval.type = NewStringf("%s %s", yyvsp[0].ptype.us, yyvsp[0].ptype.type);
		   Delete(yyvsp[0].ptype.us);
                   Delete(yyvsp[0].ptype.type);
		 } else {
                   yyval.type = yyvsp[0].ptype.type;
		 }
		 if (Cmp(yyval.type,"signed int") == 0) {
		   Delete(yyval.type);
		   yyval.type = NewString("int");
                 } else if (Cmp(yyval.type,"signed long") == 0) {
		   Delete(yyval.type);
                   yyval.type = NewString("long");
                 } else if (Cmp(yyval.type,"signed short") == 0) {
		   Delete(yyval.type);
		   yyval.type = NewString("short");
		 } else if (Cmp(yyval.type,"signed long long") == 0) {
		   Delete(yyval.type);
		   yyval.type = NewString("long long");
		 }
               ;
    break;}
case 291:
#line 4069 "parser.y"
{ 
                 yyval.ptype = yyvsp[0].ptype;
               ;
    break;}
case 292:
#line 4072 "parser.y"
{
                    if (yyvsp[-1].ptype.us && yyvsp[0].ptype.us) {
		      Swig_error(cparse_file, cparse_line, "Extra %s specifier.\n", yyvsp[0].ptype.us);
		    }
                    yyval.ptype = yyvsp[0].ptype;
                    if (yyvsp[-1].ptype.us) yyval.ptype.us = yyvsp[-1].ptype.us;
		    if (yyvsp[-1].ptype.type) {
		      if (!yyvsp[0].ptype.type) yyval.ptype.type = yyvsp[-1].ptype.type;
		      else {
			int err = 0;
			if ((Cmp(yyvsp[-1].ptype.type,"long") == 0)) {
			  if ((Cmp(yyvsp[0].ptype.type,"long") == 0) || (Cmp(yyvsp[0].ptype.type,"double") == 0)) {
			    yyval.ptype.type = NewStringf("long %s", yyvsp[0].ptype.type);
			  } else if (Cmp(yyvsp[0].ptype.type,"int") == 0) {
			    yyval.ptype.type = yyvsp[-1].ptype.type;
			  } else {
			    err = 1;
			  }
			} else if ((Cmp(yyvsp[-1].ptype.type,"short")) == 0) {
			  if (Cmp(yyvsp[0].ptype.type,"int") == 0) {
			    yyval.ptype.type = yyvsp[-1].ptype.type;
			  } else {
			    err = 1;
			  }
			} else if (Cmp(yyvsp[-1].ptype.type,"int") == 0) {
			  yyval.ptype.type = yyvsp[0].ptype.type;
			} else if (Cmp(yyvsp[-1].ptype.type,"double") == 0) {
			  if (Cmp(yyvsp[0].ptype.type,"long") == 0) {
			    yyval.ptype.type = NewString("long double");
			  } else {
			    err = 1;
			  }
			}
			if (err) {
			  Swig_error(cparse_file, cparse_line, "Extra %s specifier.\n", yyvsp[-1].ptype.type);
			}
		      }
		    }
               ;
    break;}
case 293:
#line 4114 "parser.y"
{ 
		    yyval.ptype.type = NewString("int");
                    yyval.ptype.us = 0;
               ;
    break;}
case 294:
#line 4118 "parser.y"
{ 
                    yyval.ptype.type = NewString("short");
                    yyval.ptype.us = 0;
                ;
    break;}
case 295:
#line 4122 "parser.y"
{ 
                    yyval.ptype.type = NewString("long");
                    yyval.ptype.us = 0;
                ;
    break;}
case 296:
#line 4126 "parser.y"
{ 
                    yyval.ptype.type = NewString("char");
                    yyval.ptype.us = 0;
                ;
    break;}
case 297:
#line 4130 "parser.y"
{ 
                    yyval.ptype.type = NewString("float");
                    yyval.ptype.us = 0;
                ;
    break;}
case 298:
#line 4134 "parser.y"
{ 
                    yyval.ptype.type = NewString("double");
                    yyval.ptype.us = 0;
                ;
    break;}
case 299:
#line 4138 "parser.y"
{ 
                    yyval.ptype.us = NewString("signed");
                    yyval.ptype.type = 0;
                ;
    break;}
case 300:
#line 4142 "parser.y"
{ 
                    yyval.ptype.us = NewString("unsigned");
                    yyval.ptype.type = 0;
                ;
    break;}
case 301:
#line 4148 "parser.y"
{ /* scanner_check_typedef(); */ ;
    break;}
case 302:
#line 4148 "parser.y"
{
                   yyval.dtype = yyvsp[0].dtype;
		   yyval.dtype.rawval = 0;
		   yyval.dtype.bitfield = 0;
		   yyval.dtype.throws = 0;
		   scanner_ignore_typedef();
                ;
    break;}
case 303:
#line 4155 "parser.y"
{
                   yyval.dtype.val = NewString(yyvsp[0].id);
		   yyval.dtype.rawval = NewStringf("\"%(escape)s\"",yyval.dtype.val);
                   yyval.dtype.type = T_STRING;
		   yyval.dtype.bitfield = 0;
		   yyval.dtype.throws = 0;
		;
    break;}
case 304:
#line 4162 "parser.y"
{
                   yyval.dtype.val = NewString(yyvsp[0].str);
		   /*		   $$.rawval = NewStringf("\'%(escape)s\'",$$.val); */
		   /*		   Printf(stdout,"rawval = '%s'\n", $$.rawval); */
		   if (Len(yyval.dtype.val)) {
		     yyval.dtype.rawval = NewStringf("\'%(escape)s\'", yyval.dtype.val);
		   } else {
		     yyval.dtype.rawval = NewString("\'\\0'");
		   }
		   yyval.dtype.type = T_CHAR;
		   yyval.dtype.bitfield = 0;
		   yyval.dtype.throws = 0;
		 ;
    break;}
case 305:
#line 4179 "parser.y"
{ yyval.id = yyvsp[0].id; ;
    break;}
case 306:
#line 4180 "parser.y"
{ yyval.id = (char *) 0;;
    break;}
case 307:
#line 4185 "parser.y"
{ 
                   Node *leftSibling = Getattr(yyvsp[-2].node,"_last");
		   if (!leftSibling) {
                     leftSibling=yyvsp[-2].node;
		   }
                   set_nextSibling(leftSibling,yyvsp[0].node);
                   Setattr(yyvsp[-2].node,"_last",yyvsp[0].node);
                   if (yyvsp[0].node && !Getattr(yyvsp[0].node, "enumvalue")) {
                     /* There is no explicit enum value given, so make one. */
                     Setattr(yyvsp[0].node,"enumvalue", NewStringf("%s+1", Getattr(leftSibling,"name")));
                   }
		   yyval.node = yyvsp[-2].node;
               ;
    break;}
case 308:
#line 4198 "parser.y"
{ 
                   yyval.node = yyvsp[0].node; 
                   if (!Getattr(yyvsp[0].node, "enumvalue")) {
                     /* first enum item value defaults to 0 */
                     Setattr(yyvsp[0].node,"enumvalue", "0");
                   }
               ;
    break;}
case 309:
#line 4207 "parser.y"
{
		   yyval.node = new_node("enumitem");
		   Setattr(yyval.node,"name",yyvsp[0].id);
		   Setattr(yyval.node,"type",NewSwigType(T_INT));
		   Setattr(yyval.node,"feature:immutable","1");
		 ;
    break;}
case 310:
#line 4213 "parser.y"
{
		   yyval.node = new_node("enumitem");
		   Setattr(yyval.node,"name",yyvsp[-2].id);
		   Setattr(yyval.node,"enumvalue", yyvsp[0].dtype.val);
	           if (yyvsp[0].dtype.type == T_CHAR) {
		     Setattr(yyval.node,"value",yyvsp[0].dtype.val);
		     Setattr(yyval.node,"type",NewSwigType(T_CHAR));
		   } else {
		     Setattr(yyval.node,"value",yyvsp[-2].id);
		     Setattr(yyval.node,"type",NewSwigType(T_INT));
		   }
		   Setattr(yyval.node,"feature:immutable","1");
                 ;
    break;}
case 311:
#line 4226 "parser.y"
{ yyval.node = 0; ;
    break;}
case 312:
#line 4229 "parser.y"
{
                   yyval.dtype = yyvsp[0].dtype;
		   if ((yyval.dtype.type != T_INT) && (yyval.dtype.type != T_UINT) &&
		       (yyval.dtype.type != T_LONG) && (yyval.dtype.type != T_ULONG) &&
		       (yyval.dtype.type != T_SHORT) && (yyval.dtype.type != T_USHORT) &&
		       (yyval.dtype.type != T_SCHAR) && (yyval.dtype.type != T_UCHAR)) {
		     Swig_error(cparse_file,cparse_line,"Type error. Expecting an int\n");
		   }
                ;
    break;}
case 313:
#line 4238 "parser.y"
{
                   yyval.dtype.val  = NewString(yyvsp[0].str);
		   yyval.dtype.type = T_INT;
		 ;
    break;}
case 314:
#line 4249 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 315:
#line 4250 "parser.y"
{
  		  SwigType_push(yyvsp[-2].type,yyvsp[-1].decl.type);
		  yyval.dtype.val = NewStringf("sizeof(%s)",SwigType_str(yyvsp[-2].type,0));
		  yyval.dtype.type = T_INT;
               ;
    break;}
case 316:
#line 4255 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 317:
#line 4256 "parser.y"
{
		 Node *n;
		 yyval.dtype.val = yyvsp[0].type;
		 yyval.dtype.type = T_INT;
		 /* Check if value is in scope */
		 n = Swig_symbol_clookup(yyvsp[0].type,0);
		 if (n) {
		   if (Getattr(n,"access")) {
		     if (cplus_mode == CPLUS_PUBLIC) {
		       Swig_warning(WARN_PARSE_PRIVATE,cparse_file, cparse_line, "'%s' is private in this context.\n", yyvsp[0].type);
		       yyval.dtype.type = T_ERROR;
		     }

		   }
		 }
               ;
    break;}
case 318:
#line 4274 "parser.y"
{
   	            yyval.dtype.val = NewStringf("(%s)",yyvsp[-1].dtype.val);
		    yyval.dtype.type = yyvsp[-1].dtype.type;
   	       ;
    break;}
case 319:
#line 4281 "parser.y"
{
                 yyval.dtype = yyvsp[0].dtype;
		 yyval.dtype.val = NewStringf("(%s) %s", SwigType_str(yyvsp[-2].dtype.val,0), yyvsp[0].dtype.val);
 	       ;
    break;}
case 320:
#line 4285 "parser.y"
{
                 yyval.dtype = yyvsp[0].dtype;
		 SwigType_push(yyvsp[-3].dtype.val,yyvsp[-2].type);
		 yyval.dtype.val = NewStringf("(%s) %s", SwigType_str(yyvsp[-3].dtype.val,0), yyvsp[0].dtype.val);
 	       ;
    break;}
case 321:
#line 4290 "parser.y"
{
                 yyval.dtype = yyvsp[0].dtype;
		 SwigType_add_reference(yyvsp[-3].dtype.val);
		 yyval.dtype.val = NewStringf("(%s) %s", SwigType_str(yyvsp[-3].dtype.val,0), yyvsp[0].dtype.val);
 	       ;
    break;}
case 322:
#line 4295 "parser.y"
{
                 yyval.dtype = yyvsp[0].dtype;
		 SwigType_push(yyvsp[-4].dtype.val,yyvsp[-3].type);
		 SwigType_add_reference(yyvsp[-4].dtype.val);
		 yyval.dtype.val = NewStringf("(%s) %s", SwigType_str(yyvsp[-4].dtype.val,0), yyvsp[0].dtype.val);
 	       ;
    break;}
case 323:
#line 4303 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 324:
#line 4304 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 325:
#line 4305 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 326:
#line 4306 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 327:
#line 4307 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 328:
#line 4308 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 329:
#line 4309 "parser.y"
{ yyval.dtype = yyvsp[0].dtype; ;
    break;}
case 330:
#line 4312 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s+%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 331:
#line 4316 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s-%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 332:
#line 4320 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s*%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 333:
#line 4324 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s/%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 334:
#line 4328 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s&%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 335:
#line 4332 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s|%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 336:
#line 4336 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s^%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 337:
#line 4340 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s<<%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 338:
#line 4344 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s>>%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
	       ;
    break;}
case 339:
#line 4348 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s&&%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = T_INT;
	       ;
    break;}
case 340:
#line 4352 "parser.y"
{
		 yyval.dtype.val = NewStringf("%s||%s",yyvsp[-2].dtype.val,yyvsp[0].dtype.val);
		 yyval.dtype.type = T_INT;
	       ;
    break;}
case 341:
#line 4356 "parser.y"
{
		 yyval.dtype.val = NewStringf("-%s",yyvsp[0].dtype.val);
		 yyval.dtype.type = yyvsp[0].dtype.type;
	       ;
    break;}
case 342:
#line 4360 "parser.y"
{
                 yyval.dtype.val = NewStringf("+%s",yyvsp[0].dtype.val);
		 yyval.dtype.type = yyvsp[0].dtype.type;
  	       ;
    break;}
case 343:
#line 4364 "parser.y"
{
		 yyval.dtype.val = NewStringf("~%s",yyvsp[0].dtype.val);
		 yyval.dtype.type = yyvsp[0].dtype.type;
	       ;
    break;}
case 344:
#line 4368 "parser.y"
{
                 yyval.dtype.val = NewStringf("!%s",yyvsp[0].dtype.val);
		 yyval.dtype.type = T_INT;
	       ;
    break;}
case 345:
#line 4372 "parser.y"
{
                 skip_balanced('(',')');
		 if (SwigType_istemplate(yyvsp[-1].type)) {
		   yyvsp[-1].type = SwigType_namestr(yyvsp[-1].type);
		 }
		 yyval.dtype.val = NewStringf("%s%s",yyvsp[-1].type,scanner_ccode);
		 Clear(scanner_ccode);
		 yyval.dtype.type = T_INT;
               ;
    break;}
case 346:
#line 4383 "parser.y"
{
		 yyval.bases = yyvsp[0].bases;
               ;
    break;}
case 347:
#line 4388 "parser.y"
{ inherit_list = 1; ;
    break;}
case 348:
#line 4388 "parser.y"
{ yyval.bases = yyvsp[0].bases; inherit_list = 0; ;
    break;}
case 349:
#line 4389 "parser.y"
{ yyval.bases = 0; ;
    break;}
case 350:
#line 4392 "parser.y"
{
	           yyval.bases = NewList();
	           if (yyvsp[0].node) Append(yyval.bases,yyvsp[0].node);
               ;
    break;}
case 351:
#line 4397 "parser.y"
{
                   yyval.bases = yyvsp[-2].bases;
                   if (yyvsp[0].node) Append(yyval.bases,yyvsp[0].node);
               ;
    break;}
case 352:
#line 4403 "parser.y"
{
                 if (last_cpptype && (Strcmp(last_cpptype,"struct") != 0)) {
                     Swig_warning(WARN_PARSE_NO_ACCESS,cparse_file, cparse_line,"No access specifier given for base class %s (ignored).\n",yyvsp[0].str);
   		     yyval.node = (char *) 0;
                 } else {
		   yyval.node = yyvsp[0].str;
		   Setfile(yyval.node,cparse_file);
		   Setline(yyval.node,cparse_line);
		 }
               ;
    break;}
case 353:
#line 4413 "parser.y"
{
		 yyval.node = 0;
	         if (strcmp(yyvsp[-2].id,"public") == 0) {
		   yyval.node = yyvsp[0].str;
		   Setfile(yyval.node, cparse_file);
		   Setline(yyval.node, cparse_line);
		 } else {
		   Swig_warning(WARN_PARSE_PRIVATE_INHERIT, cparse_file, cparse_line, "%s inheritance ignored.\n", yyvsp[-2].id);
		 }
               ;
    break;}
case 354:
#line 4425 "parser.y"
{ yyval.id = (char*)"public"; ;
    break;}
case 355:
#line 4426 "parser.y"
{ yyval.id = (char*)"private"; ;
    break;}
case 356:
#line 4427 "parser.y"
{ yyval.id = (char*)"protected"; ;
    break;}
case 357:
#line 4431 "parser.y"
{ 
                   yyval.id = (char*)"class"; 
		   if (!inherit_list) last_cpptype = yyval.id;
               ;
    break;}
case 358:
#line 4435 "parser.y"
{ 
                   yyval.id = (char*)"struct"; 
		   if (!inherit_list) last_cpptype = yyval.id;
               ;
    break;}
case 359:
#line 4439 "parser.y"
{
                   yyval.id = (char*)"union"; 
		   if (!inherit_list) last_cpptype = yyval.id;
               ;
    break;}
case 360:
#line 4443 "parser.y"
{ 
                   yyval.id = (char *)"typename"; 
		   if (!inherit_list) last_cpptype = yyval.id;
               ;
    break;}
case 363:
#line 4453 "parser.y"
{
                    yyval.dtype.qualifier = yyvsp[0].str;
                    yyval.dtype.throws = 0;
               ;
    break;}
case 364:
#line 4457 "parser.y"
{
                    yyval.dtype.qualifier = 0;
                    yyval.dtype.throws = yyvsp[-1].pl;
               ;
    break;}
case 365:
#line 4461 "parser.y"
{
                    yyval.dtype.qualifier = yyvsp[-4].str;
                    yyval.dtype.throws = yyvsp[-1].pl;
               ;
    break;}
case 366:
#line 4465 "parser.y"
{ 
                    yyval.dtype.qualifier = 0; 
                    yyval.dtype.throws = 0;
               ;
    break;}
case 367:
#line 4471 "parser.y"
{ 
                    Clear(scanner_ccode); 
                    yyval.decl.have_parms = 0; 
                    yyval.decl.defarg = 0; 
		    yyval.decl.throws = yyvsp[-2].dtype.throws;
               ;
    break;}
case 368:
#line 4477 "parser.y"
{ 
                    skip_balanced('{','}'); 
                    yyval.decl.have_parms = 0; 
                    yyval.decl.defarg = 0; 
                    yyval.decl.throws = yyvsp[-2].dtype.throws;
               ;
    break;}
case 369:
#line 4483 "parser.y"
{ 
                    Clear(scanner_ccode); 
                    yyval.decl.parms = yyvsp[-2].pl; 
                    yyval.decl.have_parms = 1; 
                    yyval.decl.defarg = 0; 
		    yyval.decl.throws = 0;
               ;
    break;}
case 370:
#line 4490 "parser.y"
{
                    skip_balanced('{','}'); 
                    yyval.decl.parms = yyvsp[-2].pl; 
                    yyval.decl.have_parms = 1; 
                    yyval.decl.defarg = 0; 
                    yyval.decl.throws = 0;
               ;
    break;}
case 371:
#line 4497 "parser.y"
{ 
                    yyval.decl.have_parms = 0; 
                    yyval.decl.defarg = yyvsp[-1].dtype.val; 
                    yyval.decl.throws = 0;
               ;
    break;}
case 376:
#line 4512 "parser.y"
{
	            skip_balanced('(',')');
                    Clear(scanner_ccode);
            	;
    break;}
case 377:
#line 4518 "parser.y"
{ 
                     String *s = NewString("");
                     SwigType_add_template(s,yyvsp[-1].p);
                     yyval.id = Char(s);
		     scanner_last_id(1);
                 ;
    break;}
case 378:
#line 4524 "parser.y"
{ yyval.id = (char*)"";  ;
    break;}
case 379:
#line 4527 "parser.y"
{ yyval.id = yyvsp[0].id; ;
    break;}
case 380:
#line 4528 "parser.y"
{ yyval.id = yyvsp[0].id; ;
    break;}
case 381:
#line 4531 "parser.y"
{ yyval.id = yyvsp[0].id; ;
    break;}
case 382:
#line 4532 "parser.y"
{ yyval.id = 0; ;
    break;}
case 383:
#line 4535 "parser.y"
{ 
                  yyval.str = 0;
		  if (!yyval.str) yyval.str = NewStringf("%s%s", yyvsp[-1].str,yyvsp[0].str);
      	          Delete(yyvsp[0].str);
               ;
    break;}
case 384:
#line 4540 "parser.y"
{ 
		 yyval.str = NewStringf("::%s%s",yyvsp[-1].str,yyvsp[0].str);
                 Delete(yyvsp[0].str);
               ;
    break;}
case 385:
#line 4544 "parser.y"
{
		 yyval.str = NewString(yyvsp[0].str);
   	       ;
    break;}
case 386:
#line 4547 "parser.y"
{
		 yyval.str = NewStringf("::%s",yyvsp[0].str);
               ;
    break;}
case 387:
#line 4550 "parser.y"
{
                 yyval.str = NewString(yyvsp[0].str);
	       ;
    break;}
case 388:
#line 4553 "parser.y"
{
                 yyval.str = NewStringf("::%s",yyvsp[0].str);
               ;
    break;}
case 389:
#line 4558 "parser.y"
{
                   yyval.str = NewStringf("::%s%s",yyvsp[-1].str,yyvsp[0].str);
		   Delete(yyvsp[0].str);
               ;
    break;}
case 390:
#line 4562 "parser.y"
{
                   yyval.str = NewStringf("::%s",yyvsp[0].str);
               ;
    break;}
case 391:
#line 4565 "parser.y"
{
                   yyval.str = NewStringf("::%s",yyvsp[0].str);
               ;
    break;}
case 392:
#line 4572 "parser.y"
{
		 yyval.str = NewStringf("::~%s",yyvsp[0].str);
               ;
    break;}
case 393:
#line 4578 "parser.y"
{
                  yyval.str = NewStringf("%s%s",yyvsp[-1].id,yyvsp[0].id);
		  /*		  if (Len($2)) {
		    scanner_last_id(1);
		    } */
              ;
    break;}
case 394:
#line 4587 "parser.y"
{ 
                  yyval.str = 0;
		  if (!yyval.str) yyval.str = NewStringf("%s%s", yyvsp[-1].id,yyvsp[0].str);
      	          Delete(yyvsp[0].str);
               ;
    break;}
case 395:
#line 4592 "parser.y"
{ 
		 yyval.str = NewStringf("::%s%s",yyvsp[-1].id,yyvsp[0].str);
                 Delete(yyvsp[0].str);
               ;
    break;}
case 396:
#line 4596 "parser.y"
{
		 yyval.str = NewString(yyvsp[0].id);
   	       ;
    break;}
case 397:
#line 4599 "parser.y"
{
		 yyval.str = NewStringf("::%s",yyvsp[0].id);
               ;
    break;}
case 398:
#line 4602 "parser.y"
{
                 yyval.str = NewString(yyvsp[0].str);
	       ;
    break;}
case 399:
#line 4605 "parser.y"
{
                 yyval.str = NewStringf("::%s",yyvsp[0].str);
               ;
    break;}
case 400:
#line 4610 "parser.y"
{
                   yyval.str = NewStringf("::%s%s",yyvsp[-1].id,yyvsp[0].str);
		   Delete(yyvsp[0].str);
               ;
    break;}
case 401:
#line 4614 "parser.y"
{
                   yyval.str = NewStringf("::%s",yyvsp[0].id);
               ;
    break;}
case 402:
#line 4617 "parser.y"
{
                   yyval.str = NewStringf("::%s",yyvsp[0].str);
               ;
    break;}
case 403:
#line 4620 "parser.y"
{
		 yyval.str = NewStringf("::~%s",yyvsp[0].id);
               ;
    break;}
case 404:
#line 4626 "parser.y"
{ 
                   yyval.id = (char *) malloc(strlen(yyvsp[-1].id)+strlen(yyvsp[0].id)+1);
                   strcpy(yyval.id,yyvsp[-1].id);
                   strcat(yyval.id,yyvsp[0].id);
               ;
    break;}
case 405:
#line 4631 "parser.y"
{ yyval.id = yyvsp[0].id;;
    break;}
case 406:
#line 4634 "parser.y"
{
		 yyval.str = NewString(yyvsp[0].id);
               ;
    break;}
case 407:
#line 4637 "parser.y"
{
                  skip_balanced('{','}');
		  yyval.str = NewString(scanner_ccode);
               ;
    break;}
case 408:
#line 4641 "parser.y"
{
		 yyval.str = yyvsp[0].str;
              ;
    break;}
case 409:
#line 4646 "parser.y"
{
                  Hash *n;
                  yyval.node = NewHash();
                  n = yyvsp[-1].node;
                  while(n) {
                     String *name, *value;
                     name = Getattr(n,"name");
                     value = Getattr(n,"value");
		     if (!value) value = (String *) "1";
                     Setattr(yyval.node,name, value);
		     n = nextSibling(n);
		  }
               ;
    break;}
case 410:
#line 4659 "parser.y"
{ yyval.node = 0; ;
    break;}
case 411:
#line 4663 "parser.y"
{
		 yyval.node = NewHash();
		 Setattr(yyval.node,"name",yyvsp[-2].id);
		 Setattr(yyval.node,"value",yyvsp[0].id);
               ;
    break;}
case 412:
#line 4668 "parser.y"
{
		 yyval.node = NewHash();
		 Setattr(yyval.node,"name",yyvsp[-4].id);
		 Setattr(yyval.node,"value",yyvsp[-2].id);
		 set_nextSibling(yyval.node,yyvsp[0].node);
               ;
    break;}
case 413:
#line 4674 "parser.y"
{
                 yyval.node = NewHash();
                 Setattr(yyval.node,"name",yyvsp[0].id);
	       ;
    break;}
case 414:
#line 4678 "parser.y"
{
                 yyval.node = NewHash();
                 Setattr(yyval.node,"name",yyvsp[-2].id);
                 set_nextSibling(yyval.node,yyvsp[0].node);
               ;
    break;}
case 415:
#line 4685 "parser.y"
{
		 yyval.id = yyvsp[0].id;
               ;
    break;}
case 416:
#line 4688 "parser.y"
{
                 yyval.id = yyvsp[0].dtype.val;
               ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 498 "/usr/local/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

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

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

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

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

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

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 4695 "parser.y"


/* Called by the parser (yyparse) when an error is found.*/
void yyerror (const char *e) {
}

SwigType *Swig_cparse_type(String *s) {
   String *ns;
   extern void scanner_file(File *);
   extern int yyparse();
   extern void scanner_next_token(int);
   ns = NewStringf("%s;",s);
   Seek(ns,0,SEEK_SET);
   scanner_file(ns);
   top = 0;
   scanner_next_token(PARSETYPE);
   yyparse();
   /*   Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */
   return top;
}









