
/*  A Bison parser, made from input.y with Bison version GNU Bison version 1.22
  */

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

#define	UCL	258
#define	GEN	259
#define	DIGIT	260
#define	LCW	261
#define	DUMMY	262

#line 1 "input.y"

/* Bison input for the module enumerator input parser */ 
/* This program is Copyright (C) Stephen Linton 1991 and 1992 */
/*   See the file copying for details */
/*   $Header: C:\C\ME\RCS\inputtab.y 1.8 92/08/10 12:43:38 ROOT_DOS Exp $ */
/*   $Log:	inputtab.y $
 * Revision 1.8  92/08/10  12:43:38  ROOT_DOS
 * Bug fix in generator list handling
 * 
 * Revision 1.7  92/06/22  17:16:22  ROOT_DOS
 * Changed start of index in sparse submod generators
 * 
 * Revision 1.6  92/06/22  15:02:26  ROOT_DOS
 * Long generator names, sparse module gens, etc.
 *  */
#include <string.h>
#include "me.h"
#include "input.h"

#line 21 "input.y"
typedef union{
  int snum;			/* small number */
#ifdef GFP
  int num;
  int rat;
#endif
#ifdef RATIONAL
  MP_INT num;
  MP_RAT rat;
#endif
#ifdef INTEGRAL
  MP_INT num;
  MP_INT rat;
#endif
  gpgen gen;			/* gp generator */
  gpgen *genlist;		/* list of such */
  gaw word;			/* group algebra word */
  fldelt fld;			/* field element */
  gpwd grp;			/* group word */
  rell rell;			/* list of relators */
  smgl smgl;			/* list of sunmodule gens */
  smg smg;			/* labelled union of smgl and rell */
  wordl wordl;			/* array of words */
  char *string;			/* lower case identifier name */
} YYSTYPE;

#ifndef YYLTYPE
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#define YYLTYPE yyltype
#endif

#include <stdio.h>

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



#define	YYFINAL		181
#define	YYFLAG		-32768
#define	YYNTBASE	27

#define YYTRANSLATE(x) ((unsigned)(x) <= 262 ? yytranslate[x] : 63)

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,    20,
    21,    10,     8,    18,     9,    12,    13,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    22,    26,    23,
    16,    24,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    17,     2,    19,    11,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    14,     2,    15,    25,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     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
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     1,     9,    12,    15,    17,    20,    22,    25,    28,
    31,    33,    37,    39,    41,    44,    47,    49,    52,    56,
    59,    63,    64,    66,    69,    73,    77,    79,    83,    88,
    93,    97,    99,   101,   102,   105,   108,   112,   116,   119,
   123,   125,   131,   139,   143,   147,   151,   155,   157,   161,
   162,   166,   172,   175,   179,   180,   184,   189,   194,   198,
   200,   202,   203,   206,   209,   213,   217,   220,   222,   227,
   234,   239,   241,   243,   244,   247,   250,   254,   258,   261,
   263,   268,   275,   280,   282,   286,   288,   290,   294,   298,
   302,   306,   308,   311,   315,   317,   320,   323,   327,   331,
   337,   339,   341
};

static const short yyrhs[] = {    -1,
    29,    34,    36,    36,    28,    38,    47,     0,    30,    12,
     0,     1,    12,     0,     5,     0,    30,     5,     0,     5,
     0,    31,     5,     0,     8,    31,     0,     9,    31,     0,
    31,     0,    31,    13,    31,     0,     3,     0,     6,     0,
    35,    12,     0,     1,    12,     0,    33,     0,    35,    33,
     0,    35,    62,    33,     0,    37,    12,     0,    37,     1,
    12,     0,     0,    10,     0,    37,     4,     0,    37,    62,
     4,     0,    37,     1,    62,     0,    47,     0,    39,    40,
    12,     0,    39,    42,     1,    12,     0,    39,    41,     1,
    12,     0,    14,    30,    15,     0,    42,     0,    41,     0,
     0,    42,    62,     0,    41,    62,     0,    42,     1,    62,
     0,    41,     1,    62,     0,    41,    43,     0,    44,    16,
    44,     0,    44,     0,    17,    10,    18,    58,    19,     0,
    17,    30,     9,    30,    18,    58,    19,     0,    20,    45,
    21,     0,    20,     1,    21,     0,    17,    46,    19,     0,
    17,     1,    19,     0,    58,     0,    45,    62,    58,     0,
     0,    30,    62,    58,     0,    46,    62,    30,    62,    58,
     0,    48,    12,     0,    48,     1,    12,     0,     0,    49,
    22,    53,     0,    50,     1,    22,    53,     0,    51,     1,
    22,    53,     0,     1,    22,    53,     0,    51,     0,    50,
     0,     0,    51,    62,     0,    50,    62,     0,    50,     1,
    62,     0,    51,     1,    62,     0,    50,    52,     0,    59,
     0,    59,    23,    30,    24,     0,    59,    23,    30,    18,
    30,    24,     0,    59,    23,     1,    24,     0,    55,     0,
    54,     0,     0,    55,    62,     0,    54,    62,     0,    54,
     1,    62,     0,    55,     1,    62,     0,    54,    56,     0,
    57,     0,    57,    23,    30,    24,     0,    57,    23,    30,
    18,    30,    24,     0,    57,    23,     1,    24,     0,    58,
     0,    58,    16,    58,     0,    61,     0,    59,     0,    20,
    58,    21,     0,    58,     8,    58,     0,    58,     9,    58,
     0,    58,    10,    58,     0,    60,     0,    59,    60,     0,
    59,    10,    60,     0,     4,     0,    60,    25,     0,    60,
    30,     0,    60,    11,    60,     0,    20,    59,    21,     0,
    17,    59,    18,    59,    19,     0,    32,     0,    18,     0,
    26,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
    72,    76,    79,    80,    82,    83,    85,    86,    87,    88,
    90,    91,    93,    94,    96,    97,    99,   100,   101,   103,
   104,   106,   107,   108,   109,   110,   112,   113,   114,   115,
   117,   119,   119,   121,   122,   123,   124,   125,   127,   131,
   132,   133,   134,   136,   140,   141,   142,   146,   147,   150,
   152,   161,   170,   171,   173,   174,   175,   177,   180,   182,
   183,   185,   186,   187,   188,   189,   191,   193,   194,   197,
   201,   204,   205,   207,   208,   209,   210,   211,   213,   217,
   219,   222,   226,   228,   229,   231,   234,   237,   238,   242,
   253,   258,   259,   260,   262,   264,   265,   266,   267,   268,
   270,   272,   272
};

static const char * const yytname[] = {   "$","error","$illegal.","UCL","GEN",
"DIGIT","LCW","DUMMY","'+'","'-'","'*'","'^'","'.'","'/'","'{'","'}'","'='",
"'['","','","']'","'('","')'","':'","'<'","'>'","'~'","';'","presentation","@1",
"characteristic","unumber","integer","number","dgen","dgpart","dgenlist","glpart",
"genlist","smgpart","nvecs","smglu","smglp","smgl","smgen","halfsmgen","wordl",
"sparsel","rellpart","rell","gppartu","gpparts","gppart","gpwdw","algpartu",
"algparts","algpart","eqw","eq","word","gpwd","term","fldelt","listsep",""
};
#endif

static const short yyr1[] = {     0,
    28,    27,    29,    29,    30,    30,    31,    31,    31,    31,
    32,    32,    33,    33,    34,    34,    35,    35,    35,    36,
    36,    37,    37,    37,    37,    37,    38,    38,    38,    38,
    39,    40,    40,    41,    41,    41,    41,    41,    42,    43,
    43,    43,    43,    44,    44,    44,    44,    45,    45,    46,
    46,    46,    47,    47,    48,    48,    48,    48,    48,    49,
    49,    50,    50,    50,    50,    50,    51,    52,    52,    52,
    52,    53,    53,    54,    54,    54,    54,    54,    55,    56,
    56,    56,    56,    57,    57,    58,    58,    58,    58,    58,
    58,    59,    59,    59,    60,    60,    60,    60,    60,    60,
    61,    62,    62
};

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

static const short yydefact[] = {     0,
     0,     5,     0,     0,     4,     0,    13,    14,    17,    22,
     0,     6,     3,    16,    23,    22,     0,    15,   102,   103,
    18,     0,     1,     0,    24,    20,     0,    19,     0,    21,
    26,    25,     0,     0,     0,    34,    27,     0,     0,     0,
     0,    74,     0,     2,     0,     0,     0,     0,    53,    74,
     0,    95,     0,     0,    67,    68,    92,    64,     0,    63,
    59,     0,     0,    31,    28,     0,     0,     0,    39,    41,
    36,     0,    35,    54,    56,    74,    65,     0,     0,     0,
     0,    93,     0,    96,    97,    74,    66,     0,     7,     0,
     0,     0,    11,   101,    79,    80,    84,    87,    86,    76,
     0,    75,    30,    38,     0,     0,     0,     0,     0,     0,
    48,     0,    29,    37,    57,     0,    99,    94,     0,     0,
    98,    58,    77,     9,    10,     0,    87,     8,     0,     0,
     0,     0,     0,     0,    78,    47,     0,     0,     0,    46,
     0,    45,    44,     0,     0,    40,     0,    71,     0,    69,
    88,    12,     0,     0,    89,    90,    91,    85,     0,     0,
    51,     0,    49,     0,   100,     0,    83,     0,    81,    42,
     0,     0,    70,     0,     0,    52,    82,    43,     0,     0,
     0
};

static const short yydefgoto[] = {   179,
    29,     3,    85,    93,    94,     9,    10,    11,    16,    17,
    35,    36,    45,    46,    47,    69,    70,   110,   108,    37,
    38,    39,    40,    41,    55,    61,    62,    63,    95,    96,
    97,    98,    57,    99,   139
};

static const short yypact[] = {   178,
     3,-32768,   267,   151,-32768,    12,-32768,-32768,-32768,    38,
    -1,-32768,-32768,-32768,-32768,    38,   176,-32768,-32768,-32768,
-32768,   159,-32768,    -6,-32768,-32768,    53,-32768,   122,-32768,
-32768,-32768,    58,    99,   149,-32768,-32768,   116,   162,   156,
    64,-32768,   120,-32768,   191,     9,   146,   213,-32768,-32768,
   133,-32768,    46,    46,-32768,   181,     8,-32768,   239,-32768,
-32768,   101,   169,-32768,-32768,   224,    50,   188,-32768,   225,
-32768,   227,-32768,-32768,-32768,-32768,-32768,   214,   196,    46,
   185,     8,    46,-32768,   244,-32768,-32768,   128,-32768,   124,
   124,   206,   194,-32768,-32768,   221,   246,   223,-32768,-32768,
   128,-32768,-32768,-32768,   210,   233,    90,   245,   231,   248,
   269,   192,-32768,-32768,-32768,    46,-32768,     8,   234,    65,
     8,-32768,-32768,   255,   255,   238,   196,-32768,   124,   271,
   206,   206,   206,   206,-32768,-32768,   206,    99,   206,-32768,
    99,-32768,-32768,   206,    96,-32768,   218,-32768,    99,-32768,
-32768,   255,   243,   119,   265,   265,-32768,   269,    84,    41,
   269,    70,   269,    70,-32768,    23,-32768,    99,-32768,-32768,
   206,   206,-32768,    40,   211,   269,-32768,-32768,   280,   281,
-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,     0,   -87,-32768,   109,-32768,-32768,   266,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,   171,-32768,-32768,   249,
-32768,-32768,-32768,-32768,-32768,   -32,-32768,-32768,-32768,-32768,
   -60,   -31,   -40,-32768,   -10
};


#define	YYLAST		284


static const short yytable[] = {     4,
    22,     7,   124,   125,     8,    30,    27,   111,    56,    66,
    18,    19,     2,    31,     5,    82,    19,    75,    83,    20,
   -33,    78,    79,    14,    20,    67,    19,    12,    68,    58,
    60,   126,    84,    43,    20,    71,    73,    82,    82,   118,
    77,   152,   121,   115,    12,    12,   173,    15,    87,    52,
   105,   100,   102,   122,     2,   104,    32,    82,   171,   106,
   127,   114,    53,   177,    59,    54,   107,   -50,   -50,    12,
   155,   156,   157,   158,    12,   -50,   159,   123,   161,    42,
   120,    19,   149,   163,   147,   -60,    82,    19,   150,    20,
   135,   131,   132,   133,    12,    20,   105,   141,   138,   144,
     2,    88,   170,     2,    52,    89,    82,    19,    90,    91,
   175,   176,   -73,   -50,   -50,    20,    48,    53,    19,    21,
    92,   -50,    33,    12,    12,   -62,    20,    49,    89,   154,
    28,    90,    91,   -55,    64,    34,   168,   160,   -62,   -62,
   162,   -62,   169,   -62,   164,    19,    72,   -62,   166,    33,
    19,   172,   -62,    20,    76,    12,    51,   -32,    20,    52,
   -55,     7,    13,    19,     8,   -62,   -62,   174,   -62,   101,
   -62,    20,    53,    19,   -62,    54,    24,   -61,     1,    25,
   -72,    20,     2,    50,    52,   119,    19,    26,   109,     2,
    80,    52,    89,    19,    20,    90,    91,    53,   128,    52,
    54,    20,    65,    81,    53,    80,   129,    92,   145,    52,
    89,    68,    53,    90,    91,    54,   117,    52,   131,   132,
   133,    52,    53,    80,    74,    92,    52,    80,   136,   178,
    53,   116,    80,    54,    53,   103,   165,    54,   113,    53,
   112,    19,    54,   130,    19,   131,   132,   133,    12,    20,
   137,   142,    20,   131,   132,   133,    19,   148,   151,   128,
    86,   134,    19,   140,    20,    19,   167,     6,   143,     7,
    20,   153,     8,    20,   133,     2,   131,   132,   133,   180,
   181,    23,   146,    44
};

static const short yycheck[] = {     0,
    11,     3,    90,    91,     6,    12,    17,    68,    40,     1,
    12,    18,     5,    24,    12,    56,    18,    50,    11,    26,
    12,    53,    54,    12,    26,    17,    18,     5,    20,    40,
    41,    92,    25,    34,    26,    46,    47,    78,    79,    80,
    51,   129,    83,    76,     5,     5,    24,    10,    59,     4,
     1,    62,    63,    86,     5,    66,     4,    98,    18,    10,
    92,    72,    17,    24,     1,    20,    67,    18,    19,     5,
   131,   132,   133,   134,     5,    26,   137,    88,   139,    22,
    81,    18,    18,   144,   116,    22,   127,    18,    24,    26,
   101,     8,     9,    10,     5,    26,     1,   108,     9,   110,
     5,     1,    19,     5,     4,     5,   147,    18,     8,     9,
   171,   172,    12,    18,    19,    26,     1,    17,    18,    11,
    20,    26,     1,     5,     5,     4,    26,    12,     5,   130,
    22,     8,     9,    12,    15,    14,    18,   138,    17,    18,
   141,    20,    24,    22,   145,    18,     1,    26,   149,     1,
    18,   162,     4,    26,    22,     5,     1,    12,    26,     4,
    12,     3,    12,    18,     6,    17,    18,   168,    20,     1,
    22,    26,    17,    18,    26,    20,     1,    22,     1,     4,
    12,    26,     5,    22,     4,     1,    18,    12,     1,     5,
    10,     4,     5,    18,    26,     8,     9,    17,     5,     4,
    20,    26,    12,    23,    17,    10,    13,    20,    17,     4,
     5,    20,    17,     8,     9,    20,    21,     4,     8,     9,
    10,     4,    17,    10,    12,    20,     4,    10,    19,    19,
    17,    18,    10,    20,    17,    12,    19,    20,    12,    17,
    16,    18,    20,    23,    18,     8,     9,    10,     5,    26,
    18,    21,    26,     8,     9,    10,    18,    24,    21,     5,
    22,    16,    18,    19,    26,    18,    24,     1,    21,     3,
    26,     1,     6,    26,    10,     5,     8,     9,    10,     0,
     0,    16,   112,    35
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/local/lib/bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman

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


#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
#define YYLEX		yylex(&yylval, &yylloc)
#else
#define YYLEX		yylex(&yylval)
#endif
#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_bcopy(FROM,TO,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_bcopy (from, to, count)
     char *from;
     char *to;
     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_bcopy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

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

#endif
#endif

#line 184 "/usr/local/lib/bison.simple"
int
yyparse()
{
  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_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_bcopy ((char *)yyls1, (char *)yyls, 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 75 "input.y"
{setupinverses(yyvsp[-1].genlist,yyvsp[0].genlist);;
    break;}
case 2:
#line 77 "input.y"
{subgens = yyvsp[-1].smg; relators = yyvsp[0].rell; YYACCEPT;;
    break;}
case 3:
#line 79 "input.y"
{setfield(yyvsp[-1].snum);;
    break;}
case 4:
#line 80 "input.y"
{Warn("Bad characteristic",true); setfield(1);;
    break;}
case 5:
#line 82 "input.y"
{ yyval.snum = yyvsp[0].snum;;
    break;}
case 6:
#line 83 "input.y"
{ yyval.snum = yyvsp[-1].snum*10+yyvsp[0].snum;;
    break;}
case 7:
#line 85 "input.y"
{ yyval.num = startint(yyvsp[0].snum);;
    break;}
case 8:
#line 86 "input.y"
{ yyval.num = contint(yyvsp[-1].num,yyvsp[0].snum);;
    break;}
case 9:
#line 87 "input.y"
{ yyval.num = yyvsp[0].num;;
    break;}
case 10:
#line 88 "input.y"
{ yyval.num = negint(yyvsp[0].num);;
    break;}
case 11:
#line 90 "input.y"
{ yyval.rat = inttorat(yyvsp[0].num);;
    break;}
case 12:
#line 91 "input.y"
{ yyval.rat = makerat(yyvsp[-2].num,yyvsp[0].num);;
    break;}
case 13:
#line 93 "input.y"
{ addugen(yyvsp[0].gen);;
    break;}
case 14:
#line 94 "input.y"
{ addlgen(yyvsp[0].string);;
    break;}
case 15:
#line 96 "input.y"
{zapscanner();;
    break;}
case 16:
#line 97 "input.y"
{Warn("Syntax error in generator definitions",true); DIE();
    break;}
case 20:
#line 103 "input.y"
{ yyval.genlist = yyvsp[-1].genlist; ;
    break;}
case 21:
#line 104 "input.y"
{Warn("Syntax error in generator list",true); yyval.genlist = yyvsp[-2].genlist;;
    break;}
case 22:
#line 106 "input.y"
{ yyval.genlist = newgl();;
    break;}
case 23:
#line 107 "input.y"
{ yyval.genlist = NULL; ;
    break;}
case 24:
#line 108 "input.y"
{ {int i=0; while (yyvsp[-1].genlist[i++] != 0) ; yyvsp[-1].genlist[--i] = yyvsp[0].gen+1; yyval.genlist = yyvsp[-1].genlist;};
    break;}
case 25:
#line 109 "input.y"
{ {int i=0; while (yyvsp[-2].genlist[i++] != 0) ; yyvsp[-2].genlist[--i] = yyvsp[0].gen+1; yyval.genlist = yyvsp[-2].genlist;};
    break;}
case 26:
#line 110 "input.y"
{ Warn("Syntax error in generator list",true); yyval.genlist = yyvsp[-2].genlist;;
    break;}
case 27:
#line 112 "input.y"
{yyval.smg = relltosmg(yyvsp[0].rell);;
    break;}
case 28:
#line 113 "input.y"
{yyval.smg = smgltosmg(yyvsp[-1].smgl);
    break;}
case 29:
#line 114 "input.y"
{yyval.smg = smgltosmg(yyvsp[-2].smgl); Warn("Bad last submodule generator",true);;
    break;}
case 30:
#line 115 "input.y"
{yyval.smg = smgltosmg(yyvsp[-2].smgl); Warn("Bad last submodule generator",true);;
    break;}
case 31:
#line 117 "input.y"
{startvecs = yyvsp[-1].snum;;
    break;}
case 34:
#line 121 "input.y"
{yyval.smgl = NULL;
    break;}
case 35:
#line 122 "input.y"
{yyval.smgl = yyvsp[-1].smgl;
    break;}
case 36:
#line 123 "input.y"
{yyval.smgl = yyvsp[-1].smgl;
    break;}
case 37:
#line 124 "input.y"
{yyval.smgl = yyvsp[-2].smgl; Warn("Rubbish after submodule generator",true);;
    break;}
case 38:
#line 125 "input.y"
{yyval.smgl = yyvsp[-2].smgl; Warn("Bad submodule generator",true);;
    break;}
case 39:
#line 127 "input.y"
{yyvsp[0].smgl->next = yyvsp[-1].smgl; yyval.smgl = yyvsp[0].smgl;;
    break;}
case 40:
#line 131 "input.y"
{ yyval.smgl = newsmgl(yyvsp[-2].wordl,yyvsp[0].wordl);;
    break;}
case 41:
#line 132 "input.y"
{yyval.smgl = newsmgl(yyvsp[0].wordl,NULL);;
    break;}
case 42:
#line 133 "input.y"
{yyval.smgl = newuniv(0,startvecs-1,yyvsp[-1].word);;
    break;}
case 43:
#line 134 "input.y"
{yyval.smgl = newuniv(yyvsp[-5].snum-1,yyvsp[-3].snum-1,yyvsp[-1].word);;
    break;}
case 44:
#line 137 "input.y"
{ if (yyvsp[-1].wordl->body.p.len != startvecs)
			    Warn("Wrong length word list",true);
			  yyval.wordl = yyvsp[-1].wordl;;
    break;}
case 45:
#line 140 "input.y"
{Warn("Bad packed submodule generator",true); yyval.wordl = NULL;;
    break;}
case 46:
#line 141 "input.y"
{yyval.wordl = yyvsp[-1].wordl;;
    break;}
case 47:
#line 142 "input.y"
{Warn("Bad sparse submodule generator", true); yyval.wordl = NULL;;
    break;}
case 48:
#line 146 "input.y"
{yyval.wordl = newwordl(yyvsp[0].word);;
    break;}
case 49:
#line 148 "input.y"
{yyvsp[-2].wordl->body.p.wds[yyvsp[-2].wordl->body.p.len++] = yyvsp[0].word; yyval.wordl  = yyvsp[-2].wordl;;
    break;}
case 50:
#line 151 "input.y"
{yyval.wordl = newwordl(NULL);;
    break;}
case 51:
#line 153 "input.y"
{if (1 > yyvsp[-2].snum || yyvsp[-2].snum > startvecs) 
			    Warn("Invalid index in sparse submodule gen.\n",true);
			 else
			   {
			     yyval.wordl = newwordl(NULL);
			     yyval.wordl->body.s = newswl(yyvsp[-2].snum-1,yyvsp[0].word, NULL);
			   }
		       ;
    break;}
case 52:
#line 162 "input.y"
{if (1 > yyvsp[-2].snum || yyvsp[-2].snum > startvecs) 
			  {
			    fprintf(stderr,"Invalid index in sparse submodule gen.\n");
			    DIE();
			  }
			yyvsp[-4].wordl->body.s = newswl(yyvsp[-2].snum-1,yyvsp[0].word,yyvsp[-4].wordl->body.s);
			yyval.wordl = yyvsp[-4].wordl; ;
    break;}
case 53:
#line 170 "input.y"
{yyval.rell = yyvsp[-1].rell;;
    break;}
case 54:
#line 171 "input.y"
{Warn("Junk after relators",true); yyval.rell = yyvsp[-2].rell;;
    break;}
case 55:
#line 173 "input.y"
{yyval.rell = NULL;;
    break;}
case 56:
#line 174 "input.y"
{yyval.rell = relconcat(yyvsp[-2].rell,yyvsp[0].rell);;
    break;}
case 57:
#line 175 "input.y"
{Warn("Error in final group relator",true);
					   yyval.rell = relconcat(yyvsp[-3].rell,yyvsp[0].rell);;
    break;}
case 58:
#line 177 "input.y"
{Warn("Error in final group relator",true);
					   yyval.rell = relconcat(yyvsp[-3].rell,yyvsp[0].rell);;
    break;}
case 59:
#line 180 "input.y"
{Warn("Can't parse group type relators",true);
				    yyval.rell = relconcat(NULL,yyvsp[0].rell);;
    break;}
case 60:
#line 182 "input.y"
{yyval.rell = yyvsp[0].rell;;
    break;}
case 61:
#line 183 "input.y"
{yyval.rell = yyvsp[0].rell;;
    break;}
case 62:
#line 185 "input.y"
{yyval.rell = NULL;;
    break;}
case 63:
#line 186 "input.y"
{yyval.rell = yyvsp[-1].rell;;
    break;}
case 64:
#line 187 "input.y"
{yyval.rell = yyvsp[-1].rell;;
    break;}
case 65:
#line 188 "input.y"
{Warn("Bad group type relator",true); yyval.rell = yyvsp[-2].rell;;
    break;}
case 66:
#line 189 "input.y"
{Warn("Rubbish after group type relator",true); yyval.rell = yyvsp[-2].rell;;
    break;}
case 67:
#line 191 "input.y"
{yyvsp[0].rell->next = yyvsp[-1].rell; yyval.rell = yyvsp[0].rell;;
    break;}
case 68:
#line 193 "input.y"
{yyval.rell = gtorel(yyvsp[0].grp);;
    break;}
case 69:
#line 194 "input.y"
{yyval.rell = gtorel(yyvsp[-3].grp); 
				     yyval.rell->wt =  (weight) yyvsp[-1].snum;
				     yyval.rell->lwt = (weight) yyvsp[-1].snum;;
    break;}
case 70:
#line 198 "input.y"
{yyval.rell = gtorel(yyvsp[-5].grp); 
				     yyval.rell->wt =  (weight) yyvsp[-3].snum;
				     yyval.rell->lwt = (weight) yyvsp[-1].snum;;
    break;}
case 71:
#line 201 "input.y"
{yyval.rell = gtorel(yyvsp[-3].grp); Warn("Unparseable weight",false);;
    break;}
case 72:
#line 204 "input.y"
{yyval.rell = yyvsp[0].rell;;
    break;}
case 73:
#line 205 "input.y"
{yyval.rell = yyvsp[0].rell;;
    break;}
case 74:
#line 207 "input.y"
{yyval.rell = NULL;;
    break;}
case 75:
#line 208 "input.y"
{ yyval.rell = yyvsp[-1].rell;;
    break;}
case 76:
#line 209 "input.y"
{ yyval.rell = yyvsp[-1].rell;;
    break;}
case 77:
#line 210 "input.y"
{ Warn("Bad algebra relator",true); yyval.rell = yyvsp[-2].rell;;
    break;}
case 78:
#line 211 "input.y"
{ Warn("Rubbish after algebra relator", true); yyval.rell = yyvsp[-2].rell;;
    break;}
case 79:
#line 213 "input.y"
{ yyvsp[0].rell->next = yyvsp[-1].rell; yyval.rell = yyvsp[0].rell;;
    break;}
case 80:
#line 218 "input.y"
{ yyval.rell = yyvsp[0].rell;;
    break;}
case 81:
#line 219 "input.y"
{yyval.rell = yyvsp[-3].rell;
				     yyval.rell->wt = (weight) yyvsp[-1].snum;
				     yyval.rell->lwt = (weight) yyvsp[-1].snum;;
    break;}
case 82:
#line 223 "input.y"
{yyval.rell = yyvsp[-5].rell;
				     yyval.rell->wt = (weight) yyvsp[-3].snum;
				     yyval.rell->lwt = (weight) yyvsp[-1].snum;;
    break;}
case 83:
#line 226 "input.y"
{yyval.rell = yyvsp[-3].rell; Warn("Bad weight",false);;
    break;}
case 84:
#line 228 "input.y"
{yyval.rell = neweq(yyvsp[0].word,NULL);;
    break;}
case 85:
#line 229 "input.y"
{yyval.rell = neweq(yyvsp[-2].word,yyvsp[0].word);;
    break;}
case 86:
#line 231 "input.y"
{(yyval.word) = newgaw;
				 (yyval.word)->type = scalar;
				 (yyval.word)->body.scalar = (yyvsp[0].fld);;
    break;}
case 87:
#line 234 "input.y"
{(yyval.word) = newgaw;
				 (yyval.word)->type = grp;
				 (yyval.word)->body.group = yyvsp[0].grp;;
    break;}
case 88:
#line 237 "input.y"
{(yyval.word) = yyvsp[-1].word;;
    break;}
case 89:
#line 238 "input.y"
{(yyval.word) = newgaw;
				 (yyval.word)->type = sum;
				 (yyval.word)->body.sum.a = yyvsp[-2].word;
				 (yyval.word)->body.sum.b = yyvsp[0].word;;
    break;}
case 90:
#line 242 "input.y"
{(yyval.word) = newgaw;	/* should really recognize
						 P=2 case */
				 (yyval.word)->type = sum;
				 (yyval.word)->body.sum.a = yyvsp[-2].word;
				 (yyval.word)->body.sum.b = newgaw;
				 (yyval.word)->body.sum.b->type = product;
				 (yyval.word)->body.sum.b->body.prod.c = newgaw;
				 (yyval.word)->body.sum.b->body.prod.d = yyvsp[0].word;
				 (yyval.word)->body.sum.b->body.prod.c->type = scalar;
				 (yyval.word)->body.sum.b->body.prod.c->body.scalar =
				   MinusOne;;
    break;}
case 91:
#line 253 "input.y"
{(yyval.word) = newgaw;
				 (yyval.word)->type = product;
				 (yyval.word)->body.prod.c = yyvsp[-2].word;
				 (yyval.word)->body.prod.d = yyvsp[0].word;;
    break;}
case 92:
#line 258 "input.y"
{(yyval.grp) = yyvsp[0].grp;;
    break;}
case 93:
#line 259 "input.y"
{(yyval.grp) = gconcat(yyvsp[-1].grp,yyvsp[0].grp); wfree(yyvsp[-1].grp); wfree(yyvsp[0].grp);;
    break;}
case 94:
#line 260 "input.y"
{(yyval.grp) = gconcat(yyvsp[-2].grp,yyvsp[0].grp); wfree(yyvsp[-2].grp); wfree(yyvsp[0].grp);;
    break;}
case 95:
#line 262 "input.y"
{newgpwd(yyval.grp,1);
				 (yyval.grp)->word[0] = yyvsp[0].gen;;
    break;}
case 96:
#line 264 "input.y"
{(yyval.grp) = ginverse(yyvsp[-1].grp); wfree(yyvsp[-1].grp);;
    break;}
case 97:
#line 265 "input.y"
{(yyval.grp) = gpower(yyvsp[-1].grp,yyvsp[0].snum);;
    break;}
case 98:
#line 266 "input.y"
{(yyval.grp) = gconj(yyvsp[-2].grp,yyvsp[0].grp);;
    break;}
case 99:
#line 267 "input.y"
{(yyval.grp) = yyvsp[-1].grp;;
    break;}
case 100:
#line 268 "input.y"
{(yyval.grp) = gcomm(yyvsp[-3].grp,yyvsp[-1].grp);;
    break;}
case 101:
#line 270 "input.y"
{(yyval.fld) = rattofelt(yyvsp[0].rat);;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 465 "/usr/local/lib/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 274 "input.y"
					    





