
/*  A Bison parser, made from sisgram.y  */

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

#define	NUMBER	258
#define	NGEN	259
#define	CGEN	260
#define	GRGEN	261
#define	PRINT	262
#define	QUIT	263
#define	GRADUATION	264
#define	END	265
#define	CUT	266
#define	MEMORY	267
#define	VERSION	268
#define	PRIME	269
#define	SHOW	270
#define	CALC	271
#define	RED	272
#define	SET	273
#define	MOD	274
#define	RESET	275
#define	SBASE	276
#define	NOBASE	277
#define	VECTOR	278
#define	PROMPT	279
#define	LENGTH	280
#define	IDEAL	281
#define	FETCH	282
#define	LOAD	283
#define	SAVE	284
#define	TEXT	285
#define	LIFT	286
#define	DEFGRP	287
#define	DEFPCGRP	288
#define	DEFAGGRP	289
#define	PQUOTIENT	290
#define	FLAGS	291
#define	APRES	292
#define	DEFGRPRING	293
#define	INTERACTIVE	294
#define	BINARY	295
#define	ASCII	296
#define	ASAUTO	297
#define	AUTGRP	298
#define	ISOMORPHISMS	299
#define	ISOMORPHIC	300
#define	AUTLIST	301
#define	ELEMENTS	302
#define	PRESENTATION	303
#define	DECOMPOSE	304
#define	INNER	305
#define	ISCONJ	306
#define	RHO	307
#define	SOLUTION	308
#define	FUNDAMENTAL	309
#define	SPECIAL	310
#define	ADDRESS	311
#define	VERIFY	312
#define	HELP	313
#define	VERBOSE	314
#define	LIST	315
#define	SUBLIFT	316
#define	SLIFT	317
#define	SPLIT	318
#define	ALL	319
#define	OUTER	320
#define	LOOKAHEAD	321
#define	FULL	322
#define	SORTED	323
#define	CENTRE	324
#define	CENTRALIZER	325
#define	CLASSES	326
#define	ORDER	327
#define	SIDE	328
#define	REGREP	329
#define	SWITCH	330
#define	STYLE	331
#define	DISSTYLE	332
#define	RELATIONS	333
#define	STRING	334
#define	CODE	335
#define	MCODE	336
#define	IDENTIFIER	337
#define	COMPLEMENT	338
#define	ANNIHILATOR	339
#define	PIDEAL	340
#define	POTSPACE	341
#define	VECSPACE	342
#define	LIEPRODUCT	343
#define	CLOSURE	344
#define	LIEIDEAL	345
#define	LIESERIES	346
#define	JSERIES	347
#define	SYMBOLS	348
#define	NUM	349
#define	RELS	350
#define	GEN	351
#define	ID	352
#define	FPGROUP	353
#define	READAUTGRP	354
#define	READGRP	355
#define	READPCGRP	356
#define	READAGGRP	357
#define	MINIMAL	358
#define	ACTUAL	359
#define	SETDOMAIN	360
#define	DGRPRING	361
#define	USE	362
#define	MTABLE	363
#define	JTABLE	364
#define	GENS	365
#define	WEIGHTS	366
#define	BATCH	367
#define	MECHO	368
#define	COMMUT	369
#define	PSI	370
#define	UNITGROUP	371
#define	COHOMOLOGY	372
#define	EXTORBIT	373
#define	SMALL	374
#define	UMINUS	375


#include <ctype.h>
#include "aglobals.h"
#include "fdecla.h"
#include "pc.h"
# include	"aggroup.h"
# include	"grpring.h"
# include	"hgroup.h"
# include	"symtab.h"
# include	"parsesup.h"
# include	"storage.h"
# include	"error.h"
# include	"aut.h"

#define TAMOUNT 100000L

#ifdef __TOS__
#define do_prompt() 
#else
#define do_prompt() show_prompt()
#endif

#ifdef SUN3
#include <strings.h>
#else
#include <string.h>
#endif

#ifndef ANSI
extern void exit();
#else
#ifndef SUN3
#include <stdlib.h>
#endif
#endif

typedef unsigned long ULONG;
#ifndef __GNUC__
#define alloca malloc
#endif
#define IS_VALID( expr )		((expr) != 0)

void show_prompt			_(( void ));
void show_logo				_(( void ));
void set_paths				_(( void ));
static int find_gen 		_(( char *name ));
int getopt				_(( int argc, char *const *argv, const char *optstring ));
void show_homomorphisms 		_(( GRPDSC *h, int n, long count, char *file_n ));
void show_version			_(( void ));
void get_j_series			_(( void ));
VEC mult_comm				_(( VEC u1, VEC u2, int mod_id ));
void init_mem_stats			_(( void ));
void init_act_table			_(( void ));
void memory_usage			_(( void ));
void show_aut_pres 			_(( HOM *hom, int only_outer ));
void fspecial				_(( int no ));
void aut_write 			_(( char file_n[], HOM *maps ));
HOM *aut_read 				_(( char file_n[], PCGRPDESC *g_desc ));
void gr_decompose 			_(( VEC elem, int mod_id ));
int yyparse 				_(( void ));
int yyerror				_(( char *s ));
int yylex					_(( void ));
void put_back				_(( char c ));
PCGRPDESC *p_quotient  		_(( PCGRPDESC *g_desc, int class ));
void calc_cohomology 		_(( int n, PCGRPDESC *g ));
void calc_extorbit 			_(( PCGRPDESC *g ));
void show_pres 			_(( int mod_id, char *file_n ));
VEC sn_group_mul			_(( VEC vec1, VEC vec2, int cut ));
VEC sngroup_exp			_(( VEC vector, int power, int cut ));
int psi 					_(( int n, int m, int k ));

extern int cut, fend, bperelem;
extern PCGRPDESC *group_desc;
extern GRPRING *group_ring;
extern long n_rho[MAXGRAD];
extern int s_int;
extern int have_ls, have_li, have_js;
extern int lie_ser_len, lie_id_len, j_ser_len;
extern SPACE *lie_series[MAXLIE];
extern SPACE *lie_ideal[MAXLIE];
extern SPACE *j_series[MAXLIE];
extern int prime;
extern VEC absolut, inhom;
extern VEC centre[MAXCARD];
extern int cent_dim;
extern VEC id[MAXGEN];
extern int min_gen;
extern VEC old_rho[MAXGEN];
extern VEC h1[H1MAX];
extern int old_xdim;
extern IHEADER h_in;
extern GRPDSC *h_desc;
extern void *yy_mem_top;
extern char *optarg;
extern char root_path[256];

char *mem_bottom;
char out_n[32];
char in_n[32];
char proto_n[32];
char *proto_p;
FILE *out_f, *in_f;
FILE *proto = NULL;
int have_classes = FALSE;
int verbose = FALSE;
int p_abort = FALSE;
int banner = TRUE;
int quiet = FALSE;
DSTYLE displaystyle = SISYPHOS;
char *boolean_prefix;
char *boolean_postfix;
int elim_grp_aut = TRUE;
long amount;
long tamount;
VEC v_list[1000];
GRPDSC *g_list[100];
PCGRPDESC *pc_list[100];
SPACE *s_list[100];
FILE *out_hdl;
int mon_per_line;
int read_group_el = FALSE;

/* algorithm flags */				/* default values */	
#define MAXFLAGS 					10
static int flags[MAXFLAGS];			
extern int use_filtration;			/* TRUE */
extern int use_max_elab_sections;		/* FALSE */
extern int only_normal_auts;			/* FALSE */
extern int use_fail_list;			/* TRUE */
extern int with_inner;				/* FALSE */
extern OPTION display_basis;			/* NONE */
extern OPTION aut_pres_style;			/* NONE */
extern int aut_pres_all;				/* FALSE */

static char prompt[20] = "COMMAND> ";
static DYNLIST p, q;
static symbol *yysym;
static GENVAL *yyhval;
static size_t node_size = sizeof ( rel_node );
static GRPDSC *g_desc;
static PCGRPDESC *old_pc_group;
static VEC agword;
static int i;
static int use_proto = FALSE;


typedef union {
	int ival;
	GENVAL *gval;
	} 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 __STDC__
#define const
#endif



#define	YYFINAL		485
#define	YYFLAG		-32768
#define	YYNTBASE	134

#define YYTRANSLATE(x) ((unsigned)(x) <= 375 ? yytranslate[x] : 188)

static const short 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,   133,     2,     2,     2,   127,
   128,   122,   120,   130,   121,     2,   123,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,   126,     2,
   129,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   131,     2,   132,   125,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     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,   111,   112,   113,   114,   115,
   116,   117,   118,   119,   124
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     1,     5,     9,    10,    12,    13,    20,    25,    30,
    32,    35,    40,    43,    46,    47,    56,    60,    64,    68,
    69,    75,    76,    83,    92,    98,   106,   113,   118,   123,
   130,   131,   140,   154,   165,   172,   182,   183,   189,   191,
   193,   196,   197,   202,   203,   206,   207,   210,   212,   214,
   218,   219,   221,   223,   227,   231,   232,   234,   236,   240,
   244,   245,   247,   250,   255,   256,   259,   264,   266,   270,
   273,   278,   280,   284,   287,   290,   291,   294,   296,   298,
   302,   306,   311,   317,   319,   320,   322,   324,   326,   328,
   330,   332,   336,   337,   339,   341,   343,   345,   347,   349,
   351,   356,   358,   360,   362,   363,   368,   369,   374,   375,
   380,   384,   388,   392,   396,   400,   403,   407,   413,   420,
   429,   431,   436,   438,   440,   442,   444,   445,   451,   456,
   467,   473,   481,   487,   494,   499,   504,   509,   515,   522,
   523,   534,   535,   549,   556,   561,   563,   564,   575,   576,
   590,   597,   604,   605,   613,   614,   625,   630,   636,   644,
   651,   652,   661,   668,   669,   674,   675,   678,   680,   682,
   683
};

#endif

static const short yyrhs[] = {    -1,
   134,   135,   126,     0,   134,     1,   126,     0,     0,   171,
     0,     0,     7,   136,   127,   175,   168,   128,     0,    55,
   127,     3,   128,     0,    81,   127,   175,   128,     0,    20,
     0,   107,   146,     0,   112,   127,    79,   128,     0,   113,
    79,     0,    15,   170,     0,     0,    18,   111,   137,   127,
   175,   128,   129,   153,     0,    18,    24,    79,     0,    18,
    59,    75,     0,    18,    77,    76,     0,     0,    18,    36,
   138,   129,   153,     0,     0,   105,   139,   127,   175,   143,
   128,     0,   115,   127,     3,   130,     3,   130,     3,   128,
     0,   116,   127,     3,   145,   128,     0,    45,   127,   175,
   130,   175,   185,   128,     0,   117,   127,     3,   130,   175,
   128,     0,   118,   127,   175,   128,     0,    49,   127,   175,
   128,     0,    48,   127,   175,   130,   186,   128,     0,     0,
    42,   127,   175,   140,   130,   153,   168,   128,     0,    31,
   127,   175,   130,     3,   130,     3,   130,    75,   130,   142,
   144,   128,     0,    61,   127,   175,   130,     3,   130,     3,
   130,   142,   128,     0,    57,   127,   175,   130,     3,   128,
     0,    30,   127,   175,   130,     3,   130,   167,   145,   128,
     0,     0,    56,   141,   127,   175,   128,     0,     8,     0,
    67,     0,    66,     3,     0,     0,    19,    26,   125,     3,
     0,     0,   130,   119,     0,     0,   130,    79,     0,   108,
     0,   109,     0,   131,   148,   132,     0,     0,   149,     0,
   150,     0,   149,   130,   150,     0,   131,   151,   132,     0,
     0,   152,     0,   175,     0,   152,   130,   175,     0,   131,
   154,   132,     0,     0,   155,     0,   165,     3,     0,   155,
   130,   165,     3,     0,     0,   103,   130,     0,   110,   127,
   158,   128,     0,    96,     0,   158,   130,    96,     0,   158,
     1,     0,    95,   127,   160,   128,     0,   161,     0,   160,
   130,   161,     0,   160,     1,     0,   164,   162,     0,     0,
   129,   163,     0,   164,     0,    97,     0,   127,   164,   128,
     0,   164,   122,   164,     0,   164,   125,   165,    94,     0,
   131,   164,   130,   164,   132,     0,    96,     0,     0,   121,
     0,    52,     0,   175,     0,    64,     0,     3,     0,   169,
     0,   168,   130,   169,     0,     0,    21,     0,    37,     0,
   186,     0,    12,     0,    14,     0,    11,     0,    10,     0,
    25,   127,    91,   128,     0,    93,     0,    13,     0,    36,
     0,     0,    82,   129,   172,   175,     0,     0,     5,   129,
   173,   175,     0,     0,     4,   129,   174,   175,     0,   127,
   175,   128,     0,   175,   120,   175,     0,   175,   121,   175,
     0,   175,   122,   175,     0,   175,   123,   175,     0,   121,
   175,     0,   175,   125,   175,     0,   131,   175,   130,   175,
   132,     0,   114,   127,   175,   130,   175,   128,     0,    17,
   127,   175,    19,    26,   125,     3,   128,     0,    82,     0,
    80,   127,   153,   128,     0,     4,     0,     5,     0,     6,
     0,     3,     0,     0,    72,   176,   127,   175,   128,     0,
    83,   127,   175,   128,     0,    87,   127,    26,   125,     3,
   123,    26,   125,     3,   128,     0,    73,    89,   127,   175,
   128,     0,    73,    85,   127,   175,   130,     3,   128,     0,
    73,    84,   127,   175,   128,     0,    86,   127,   175,   130,
     3,   128,     0,    90,   127,     3,   128,     0,    91,   127,
     3,   128,     0,    92,   127,     3,   128,     0,    69,    19,
    26,   125,     3,     0,    70,   127,   166,   130,     3,   128,
     0,     0,    32,   177,   127,   156,     3,   130,   157,   130,
   159,   128,     0,     0,   100,   127,     3,   130,    79,   128,
   178,   156,     3,   130,   157,   130,   159,     0,   100,   127,
     3,   130,    79,   133,     0,    98,   127,   175,   128,     0,
   104,     0,     0,    33,   179,   127,     3,   130,   157,   130,
   159,   184,   128,     0,     0,   101,   127,     3,   130,    79,
   128,   180,     3,   130,   157,   130,   159,   184,     0,    35,
   127,   175,   130,     3,   128,     0,   101,   127,     3,   130,
    79,   133,     0,     0,    34,   181,   127,   157,   130,   159,
   128,     0,     0,   102,   127,     3,   130,    79,   128,   182,
   157,   130,   159,     0,   106,   127,   175,   128,     0,    43,
   127,   175,   185,   128,     0,    44,   127,   175,   130,   175,
   185,   128,     0,    47,   127,   175,   130,   186,   128,     0,
     0,    46,   127,   175,   183,   130,   147,   187,   128,     0,
    99,   127,   175,   130,    79,   128,     0,     0,   111,   127,
   153,   128,     0,     0,   130,     3,     0,    64,     0,    65,
     0,     0,   130,    68,     0
};

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   292,   293,   296,   299,   300,   301,   301,   308,   310,   312,
   326,   327,   328,   330,   332,   332,   345,   351,   354,   356,
   356,   367,   367,   395,   399,   401,   432,   441,   450,   463,
   473,   481,   493,   514,   525,   535,   548,   548,   555,   558,
   560,   563,   565,   568,   570,   573,   576,   579,   584,   591,
   594,   597,   600,   605,   612,   615,   618,   621,   626,   633,
   636,   639,   642,   647,   655,   658,   662,   673,   678,   684,
   687,   696,   701,   707,   710,   718,   721,   724,   726,   730,
   732,   739,   746,   753,   764,   766,   769,   771,   774,   776,
   779,   780,   782,   785,   787,   789,   792,   795,   797,   799,
   801,   804,   807,   810,   821,   822,   830,   831,   833,   834,
   837,   841,   846,   851,   856,   861,   866,   871,   876,   886,
   892,   899,   901,   906,   910,   914,   917,   917,   932,   941,
   946,   955,   964,   973,   982,   991,  1000,  1009,  1013,  1025,
  1028,  1031,  1034,  1037,  1039,  1046,  1053,  1055,  1066,  1068,
  1078,  1102,  1107,  1109,  1115,  1117,  1126,  1140,  1153,  1175,
  1187,  1199,  1207,  1221,  1223,  1226,  1228,  1231,  1233,  1236,
  1238
};

static const char * const yytname[] = {   "$","error","$illegal.","NUMBER","NGEN",
"CGEN","GRGEN","PRINT","QUIT","GRADUATION","END","CUT","MEMORY","VERSION","PRIME",
"SHOW","CALC","RED","SET","MOD","RESET","SBASE","NOBASE","VECTOR","PROMPT","LENGTH",
"IDEAL","FETCH","LOAD","SAVE","TEXT","LIFT","DEFGRP","DEFPCGRP","DEFAGGRP","PQUOTIENT",
"FLAGS","APRES","DEFGRPRING","INTERACTIVE","BINARY","ASCII","ASAUTO","AUTGRP",
"ISOMORPHISMS","ISOMORPHIC","AUTLIST","ELEMENTS","PRESENTATION","DECOMPOSE",
"INNER","ISCONJ","RHO","SOLUTION","FUNDAMENTAL","SPECIAL","ADDRESS","VERIFY",
"HELP","VERBOSE","LIST","SUBLIFT","SLIFT","SPLIT","ALL","OUTER","LOOKAHEAD",
"FULL","SORTED","CENTRE","CENTRALIZER","CLASSES","ORDER","SIDE","REGREP","SWITCH",
"STYLE","DISSTYLE","RELATIONS","STRING","CODE","MCODE","IDENTIFIER","COMPLEMENT",
"ANNIHILATOR","PIDEAL","POTSPACE","VECSPACE","LIEPRODUCT","CLOSURE","LIEIDEAL",
"LIESERIES","JSERIES","SYMBOLS","NUM","RELS","GEN","ID","FPGROUP","READAUTGRP",
"READGRP","READPCGRP","READAGGRP","MINIMAL","ACTUAL","SETDOMAIN","DGRPRING",
"USE","MTABLE","JTABLE","GENS","WEIGHTS","BATCH","MECHO","COMMUT","PSI","UNITGROUP",
"COHOMOLOGY","EXTORBIT","SMALL","'+'","'-'","'*'","'/'","UMINUS","'^'","';'",
"'('","')'","'='","','","'['","']'","'$'","cmdlist","stat","@1","@2","@3","@4",
"@5","@6","lahead","modulo","optsmall","optfile","method","autglist","gitems",
"gitemsp","glist","imlist","imlistp","numlist","litems","litemsp","min","gendecl",
"gens","reldecl","rels","rel","rside","rword","lword","sign","carg","count",
"options","option","setvar","assign","@7","@8","@9","expr","@10","@11","@12",
"@13","@14","@15","@16","@17","wdecl","optclass","showall","sorted",""
};
#endif

static const short yyr1[] = {     0,
   134,   134,   134,   135,   135,   136,   135,   135,   135,   135,
   135,   135,   135,   135,   137,   135,   135,   135,   135,   138,
   135,   139,   135,   135,   135,   135,   135,   135,   135,   135,
   140,   135,   135,   135,   135,   135,   141,   135,   135,   142,
   142,   143,   143,   144,   144,   145,   145,   146,   146,   147,
   148,   148,   149,   149,   150,   151,   151,   152,   152,   153,
   154,   154,   155,   155,   156,   156,   157,   158,   158,   158,
   159,   160,   160,   160,   161,   162,   162,   163,   163,   164,
   164,   164,   164,   164,   165,   165,   166,   166,   167,   167,
   168,   168,   169,   169,   169,   169,   170,   170,   170,   170,
   170,   170,   170,   170,   172,   171,   173,   171,   174,   171,
   175,   175,   175,   175,   175,   175,   175,   175,   175,   175,
   175,   175,   175,   175,   175,   175,   176,   175,   175,   175,
   175,   175,   175,   175,   175,   175,   175,   175,   175,   177,
   175,   178,   175,   175,   175,   175,   179,   175,   180,   175,
   175,   175,   181,   175,   182,   175,   175,   175,   175,   175,
   183,   175,   175,   184,   184,   185,   185,   186,   186,   187,
   187
};

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

static const short yydefact[] = {     1,
     0,     0,     0,     0,     6,    39,     0,     0,    10,     0,
     0,     0,     0,     0,     0,     0,    37,     0,     0,     0,
     0,    22,     0,     0,     0,     0,     0,     0,     0,     0,
     5,     3,   109,   107,     0,   100,    99,    97,   103,    98,
     0,   104,   102,    14,     0,    20,     0,     0,    15,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   105,     0,    48,    49,    11,     0,    13,     0,     0,     0,
     0,     2,     0,     0,     0,     0,    17,     0,    18,    19,
     0,   126,   123,   124,   125,     0,   140,   147,   153,     0,
     0,     0,     0,     0,     0,     0,   127,     0,     0,   121,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,   146,     0,     0,     0,     0,     0,     0,     0,    31,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,    46,     0,     0,   110,   108,    93,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   116,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,    29,     8,     0,     0,     0,     9,   106,
    42,    12,     0,     0,     0,     0,    28,    94,    95,   168,
   169,     0,    91,    96,   101,    61,    21,     0,     0,    65,
     0,     0,     0,   166,     0,   161,     0,     0,    87,     0,
    88,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,   111,
     0,   112,   113,   114,   115,   117,     0,     0,     0,   166,
     0,    38,     0,     0,     0,     0,     0,    47,    25,     0,
     7,    93,    86,     0,    62,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,   122,   129,     0,     0,   135,
   136,   137,   145,     0,     0,     0,     0,   157,     0,     0,
     0,     0,    93,     0,    30,    35,     0,     0,    23,     0,
    27,    92,    60,    85,    63,     0,     0,    66,     0,     0,
     0,     0,     0,   167,   158,   166,     0,     0,   138,     0,
   128,   133,     0,   131,     0,     0,     0,     0,     0,     0,
     0,   118,    90,    89,    46,     0,     0,    26,     0,     0,
     0,     0,    16,     0,     0,     0,    68,     0,     0,     0,
   151,     0,    51,   170,   160,   139,     0,   134,     0,   163,
   142,   144,   149,   152,   155,   119,     0,     0,    32,     0,
    43,    24,    64,     0,     0,     0,    70,    67,     0,     0,
   154,   159,    56,     0,    52,    53,     0,     0,   132,     0,
    65,     0,     0,    36,     0,     0,    40,     0,   120,     0,
   164,    69,    84,     0,     0,     0,    72,    76,     0,    57,
    58,    50,     0,   171,   162,     0,     0,     0,     0,     0,
    41,    34,     0,     0,     0,     0,     0,    74,    71,     0,
     0,    85,     0,    75,    55,     0,    54,     0,     0,     0,
     0,    44,   141,     0,   148,    80,     0,    73,    81,     0,
    79,    77,    78,    59,   130,     0,     0,   156,     0,     0,
     0,     0,    82,     0,     0,    45,    33,   165,    83,     0,
   164,   143,   150,     0,     0
};

static const short yydefgoto[] = {     1,
    30,    35,    81,    78,    62,   181,    57,   408,   256,   470,
   195,    65,   364,   394,   395,   396,   419,   420,   207,   264,
   265,   270,   273,   358,   360,   416,   417,   444,   462,   418,
   266,   220,   345,   202,   203,    44,    31,   129,    74,    73,
   118,   153,   143,   401,   144,   402,   145,   403,   278,   435,
   276,   204,   398
};

static const short yypact[] = {-32768,
   372,  -105,   -91,   -73,-32768,-32768,    19,    -8,-32768,   -66,
   -44,   -27,   -17,   -11,    -5,    15,-32768,    17,    26,    35,
     8,-32768,   -61,    48,   101,    55,    62,    64,    66,    73,
-32768,-32768,-32768,-32768,    81,-32768,-32768,-32768,-32768,-32768,
    83,-32768,-32768,-32768,   132,-32768,   143,   149,-32768,   257,
   257,   257,   257,   257,   257,   216,   109,   257,   257,   257,
-32768,   112,-32768,-32768,-32768,   161,-32768,   241,   242,   243,
   257,-32768,   257,   257,   257,   156,-32768,   125,-32768,-32768,
   129,-32768,-32768,-32768,-32768,   131,-32768,-32768,-32768,   137,
   148,   150,   152,   153,   240,   154,-32768,   103,   160,-32768,
   171,   178,   179,   185,   208,   218,   219,   223,   224,   225,
   226,-32768,   227,   233,   257,   257,   257,    92,   146,   349,
   163,   188,   -86,   142,   257,   194,   211,   -36,   257,   257,
   145,   232,   238,   245,   107,   349,   349,    56,   210,   239,
   257,   257,   254,   255,   256,   257,   257,   257,   257,   257,
   359,   151,   259,   262,   264,   266,   239,   257,   257,   368,
   397,   401,   402,   257,   257,   404,   412,   413,   257,   257,
   287,   174,   244,   257,   257,   257,   257,   257,   416,   419,
   293,   257,    40,-32768,-32768,   200,   421,   422,-32768,   349,
    27,-32768,   423,   351,   303,   257,-32768,-32768,-32768,-32768,
-32768,   -13,-32768,-32768,-32768,    12,-32768,   382,    38,   329,
   435,   342,   276,   288,   314,   349,   320,   330,-32768,   331,
   349,   257,   257,   257,   257,   347,   391,   326,   353,   348,
   352,   354,   400,   337,   356,   365,   367,   409,   343,-32768,
   257,   -50,   -50,   287,   287,   287,   369,   370,   239,   288,
   355,-32768,   378,   379,   455,   380,   385,-32768,-32768,   418,
-32768,     6,-32768,   386,   387,   521,   398,   500,   403,   532,
   406,   415,   414,   542,   548,   425,   257,   424,    40,   557,
   559,   427,   436,   371,   445,-32768,-32768,   560,   566,-32768,
-32768,-32768,-32768,   492,   493,   499,   501,-32768,   257,    84,
    16,   578,     6,   456,-32768,-32768,   580,   460,-32768,   583,
-32768,-32768,-32768,   466,-32768,   239,   463,-32768,   459,   342,
   494,   496,   464,-32768,-32768,   288,   462,   467,-32768,   468,
-32768,-32768,   591,-32768,   469,   475,   471,   -70,   -52,   472,
   454,-32768,-32768,-32768,   238,   473,     0,-32768,   474,   598,
   477,   599,-32768,   603,   342,   478,-32768,    10,   480,   481,
-32768,   482,   483,   485,-32768,-32768,   484,-32768,   585,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,   488,   538,-32768,   135,
-32768,-32768,-32768,   489,   490,   496,-32768,-32768,   522,   -82,
-32768,-32768,   257,   487,   491,-32768,   554,   495,-32768,   502,
   329,   621,   342,-32768,   498,   622,-32768,   503,-32768,   496,
   515,-32768,-32768,   -82,   -82,    11,-32768,     7,   497,   504,
   349,-32768,   483,-32768,-32768,   627,   629,   505,   506,   135,
-32768,-32768,   509,   511,   512,    42,   -63,-32768,-32768,   -82,
   -82,   466,    69,-32768,-32768,   257,-32768,   513,   514,   342,
   496,   516,-32768,   239,-32768,-32768,   -82,-32768,   508,   545,
-32768,-32768,    21,   349,-32768,   342,   517,-32768,   523,   520,
   524,   -72,-32768,   519,   496,-32768,-32768,-32768,-32768,   496,
   515,-32768,-32768,   643,-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,   215,-32768,-32768,
   305,-32768,-32768,-32768,-32768,   228,-32768,-32768,  -147,-32768,
-32768,   252,  -315,-32768,  -369,-32768,   214,-32768,-32768,  -389,
  -308,-32768,-32768,   357,   393,-32768,-32768,-32768,-32768,-32768,
   -51,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   175,
  -232,  -170,-32768
};


#define	YYLAST		660


static const short yytable[] = {   119,
   120,   121,   122,   123,   356,   352,   126,   127,   128,   226,
   387,   438,   251,   413,   -85,    45,   411,   304,   343,   135,
    32,   136,   137,   138,   436,   437,   198,    46,    36,    37,
    38,    39,    40,   174,   175,   176,   177,    33,   178,   385,
   433,   184,   199,    41,   414,   255,    63,    64,   415,   441,
    47,   459,   442,   463,    42,    34,   268,   371,   441,   479,
    50,   442,   372,   171,   172,   173,   457,   472,    48,   200,
   201,   176,   177,   186,   178,   373,   198,   190,   191,   344,
   374,   468,    51,   174,   175,   176,   177,   429,   178,   208,
   209,   189,   199,   362,   213,   214,   215,   216,   217,    52,
   221,   303,    49,   200,   201,   481,   227,   228,   328,    53,
   482,    43,   233,   234,   261,    54,   262,   238,   239,   200,
   201,    55,   242,   243,   244,   245,   246,   379,   441,   262,
   250,   442,   263,   460,   467,   443,    61,   388,   439,   389,
   440,    56,   441,    58,   260,   442,   174,   175,   176,   177,
   474,   178,    59,    82,    83,    84,    85,   174,   175,   176,
   177,    60,   178,   441,   413,   461,   442,    86,   353,   456,
   282,   283,   284,   285,    66,   174,   175,   176,   177,    67,
   178,    68,    87,    88,    89,    90,   154,   155,    69,   300,
    70,   156,    71,    91,    92,   414,    93,    94,    72,   415,
   406,   407,   219,   174,   175,   176,   177,    75,   178,    76,
    77,   174,   175,   176,   177,   342,   178,    79,   124,    95,
    96,   179,    97,    98,    80,   326,   174,   175,   176,   177,
    99,   178,   100,   101,   197,   125,   102,   103,   130,   131,
   104,   105,   106,   132,   133,   134,   139,   341,   107,   108,
   109,   110,   111,   140,   112,   141,   113,   142,   151,    82,
    83,    84,    85,   146,   114,   174,   175,   176,   177,   185,
   178,   115,   192,    86,   147,   180,   148,   116,   149,   150,
   152,   117,   174,   175,   176,   177,   157,   178,    87,    88,
    89,    90,   182,   174,   175,   176,   177,   158,   178,    91,
    92,   240,    93,    94,   159,   160,   471,   174,   175,   176,
   177,   161,   178,   174,   175,   176,   177,   183,   178,   174,
   175,   176,   177,   187,   178,    95,    96,   252,    97,    98,
   174,   175,   176,   177,   162,   178,    99,   205,   100,   101,
   188,   421,   102,   103,   163,   164,   104,   105,   106,   165,
   166,   167,   168,   169,   107,   108,   109,   110,   111,   170,
   112,   193,   113,   174,   175,   176,   177,   194,   178,   206,
   114,   484,     2,   241,   196,     3,     4,   115,     5,     6,
   210,   211,   212,   116,   218,   222,     7,   117,   223,     8,
   224,     9,   225,   229,   464,   174,   175,   176,   177,   230,
   178,    10,    11,   231,   232,   274,   235,   174,   175,   176,
   177,   178,   178,    12,   236,   237,    13,   275,   247,    14,
    15,   248,   249,   253,   254,   257,    16,    17,    18,   258,
   259,   269,    19,   174,   175,   176,   177,   271,   178,   174,
   175,   176,   177,   277,   178,   174,   175,   176,   177,   279,
   178,   272,    20,    21,   280,   288,   174,   175,   176,   177,
   281,   178,   174,   175,   176,   177,   294,   178,   174,   175,
   176,   177,   299,   178,   286,   290,    22,   289,    23,   291,
   308,   292,   305,    24,    25,   295,    26,    27,    28,    29,
   174,   175,   176,   177,   296,   178,   297,    -4,   301,   302,
   333,   174,   175,   176,   177,   306,   178,   309,   307,   267,
   174,   175,   176,   177,   310,   178,   314,   313,   287,   174,
   175,   176,   177,   315,   178,   317,   316,   293,   174,   175,
   176,   177,   318,   178,   319,   320,   298,   174,   175,   176,
   177,   321,   178,   322,   323,   311,   174,   175,   176,   177,
   324,   178,   325,   327,   331,   174,   175,   176,   177,   329,
   178,   330,   335,   332,   174,   175,   176,   177,   336,   178,
   337,   338,   334,   174,   175,   176,   177,   339,   178,   340,
   346,   376,   349,   348,   350,   351,   263,   354,   355,   357,
   359,   361,   363,   367,   365,   366,   368,   369,   370,   375,
   381,   383,   378,   380,   382,   384,   390,   386,   391,   392,
   400,   399,   405,   393,   397,   404,   409,   412,   422,   410,
   423,   424,   425,   428,   431,   434,   426,   430,   445,   448,
   432,   449,   442,   446,   450,   451,   453,   454,   473,   455,
   465,   476,   485,   466,   452,   469,   475,   477,   480,   377,
   447,   478,   427,   458,   312,   483,     0,     0,     0,   347
};

static const short yycheck[] = {    51,
    52,    53,    54,    55,   320,   314,    58,    59,    60,   157,
     1,     1,   183,    96,     3,    24,   386,   250,     3,    71,
   126,    73,    74,    75,   414,   415,    21,    36,    10,    11,
    12,    13,    14,   120,   121,   122,   123,   129,   125,   355,
   410,   128,    37,    25,   127,    19,   108,   109,   131,   122,
    59,   441,   125,   443,    36,   129,    19,   128,   122,   132,
   127,   125,   133,   115,   116,   117,   130,   457,    77,    64,
    65,   122,   123,   125,   125,   128,    21,   129,   130,    64,
   133,   451,   127,   120,   121,   122,   123,   403,   125,   141,
   142,   128,    37,   326,   146,   147,   148,   149,   150,   127,
   152,   249,   111,    64,    65,   475,   158,   159,   279,   127,
   480,    93,   164,   165,   128,   127,   130,   169,   170,    64,
    65,   127,   174,   175,   176,   177,   178,   128,   122,   130,
   182,   125,   121,   442,   450,   129,   129,   128,   128,   130,
   130,   127,   122,   127,   196,   125,   120,   121,   122,   123,
   466,   125,   127,     3,     4,     5,     6,   120,   121,   122,
   123,   127,   125,   122,    96,    97,   125,    17,   316,   128,
   222,   223,   224,   225,   127,   120,   121,   122,   123,    79,
   125,   127,    32,    33,    34,    35,    84,    85,   127,   241,
   127,    89,   127,    43,    44,   127,    46,    47,   126,   131,
    66,    67,    52,   120,   121,   122,   123,   127,   125,   127,
    79,   120,   121,   122,   123,   132,   125,    75,     3,    69,
    70,   130,    72,    73,    76,   277,   120,   121,   122,   123,
    80,   125,    82,    83,   128,   127,    86,    87,   127,    79,
    90,    91,    92,     3,     3,     3,    91,   299,    98,    99,
   100,   101,   102,   129,   104,   127,   106,   127,    19,     3,
     4,     5,     6,   127,   114,   120,   121,   122,   123,   128,
   125,   121,   128,    17,   127,   130,   127,   127,   127,   127,
   127,   131,   120,   121,   122,   123,   127,   125,    32,    33,
    34,    35,   130,   120,   121,   122,   123,   127,   125,    43,
    44,   128,    46,    47,   127,   127,   454,   120,   121,   122,
   123,   127,   125,   120,   121,   122,   123,   130,   125,   120,
   121,   122,   123,   130,   125,    69,    70,   128,    72,    73,
   120,   121,   122,   123,   127,   125,    80,   128,    82,    83,
   130,   393,    86,    87,   127,   127,    90,    91,    92,   127,
   127,   127,   127,   127,    98,    99,   100,   101,   102,   127,
   104,   130,   106,   120,   121,   122,   123,   130,   125,   131,
   114,     0,     1,   130,   130,     4,     5,   121,     7,     8,
   127,   127,   127,   127,    26,   127,    15,   131,   127,    18,
   127,    20,   127,    26,   446,   120,   121,   122,   123,     3,
   125,    30,    31,     3,     3,   130,     3,   120,   121,   122,
   123,   125,   125,    42,     3,     3,    45,   130,     3,    48,
    49,     3,   130,     3,     3,     3,    55,    56,    57,    79,
   128,   103,    61,   120,   121,   122,   123,     3,   125,   120,
   121,   122,   123,   130,   125,   120,   121,   122,   123,   130,
   125,   110,    81,    82,   125,   130,   120,   121,   122,   123,
   130,   125,   120,   121,   122,   123,   130,   125,   120,   121,
   122,   123,   130,   125,   128,   128,   105,   125,   107,   128,
    26,   128,   128,   112,   113,   130,   115,   116,   117,   118,
   120,   121,   122,   123,   130,   125,   130,   126,   130,   130,
   130,   120,   121,   122,   123,   128,   125,   128,   130,   128,
   120,   121,   122,   123,   130,   125,   130,   132,   128,   120,
   121,   122,   123,     3,   125,    26,   129,   128,   120,   121,
   122,   123,   130,   125,     3,   130,   128,   120,   121,   122,
   123,   127,   125,   130,     3,   128,   120,   121,   122,   123,
     3,   125,   128,   130,   128,   120,   121,   122,   123,     3,
   125,     3,     3,   128,   120,   121,   122,   123,     3,   125,
    79,    79,   128,   120,   121,   122,   123,    79,   125,    79,
     3,   128,     3,   128,   125,     3,   121,   125,   130,    96,
    95,   128,   131,     3,   128,   128,   128,   123,   128,   128,
     3,     3,   130,   130,   128,     3,   127,   130,   128,   128,
    26,   128,    75,   131,   130,   128,   128,    96,   132,   130,
   130,    68,   128,     3,     3,   111,   125,   130,   132,     3,
   128,     3,   125,   130,   130,   130,   128,   127,    94,   128,
   128,   119,     0,   130,   430,   130,   130,   128,   130,   345,
   423,   128,   401,   440,   262,   481,    -1,    -1,    -1,   303
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */


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

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;		/*  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.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
#ifdef YYLSP_NEEDED
		 &yyls1, size * sizeof (*yylsp),
#endif
		 &yystacksize);

      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];
  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 2:
{ proc_error();
			  aut_pres_style = NONE; ;
    break;}
case 3:
{  yyerrok; ;
    break;}
case 6:
{ tpush_stack(); ;
    break;}
case 7:
{ if ( yyvsp[-2].gval != NULL )
				print_expr ( yyvsp[-2].gval );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			  tpop_stack();
			;
    break;}
case 8:
{ fspecial ( yyvsp[-1].ival); ;
    break;}
case 9:
{ expr_to_code ( yyvsp[-1].gval ); ;
    break;}
case 10:
{ clear();
			  clear_t();
		  	  init_memory_stack();
			  init_sym_tab();
			  group_mul = n_group_mul;
			  cgroup_mul = c_group_mul;
			  group_exp = ngroup_exp;

			  /* init dispatcher */
		       use_permanent_stack();
 			  init_act_table();
		       use_temporary_stack();
			;
    break;}
case 13:
{ printf ( "%s\n", (char *)yyvsp[0].gval->pval );;
    break;}
case 14:
{ if ( yyvsp[0].ival != -1 ) printf ( "%d\n", yyvsp[0].ival ); ;
    break;}
case 15:
{ tpush_stack(); ;
    break;}
case 16:
{ if ( IS_VALID ( yyvsp[-3].gval ) ) 
				if ( yyvsp[-3].gval->exptype == PCGROUP ) {
					i = 0;
					for ( p = ((LISTP *)yyvsp[0].gval->pval)->first; p != NULL; p = p->next )
						((PCGRPDESC *)yyvsp[-3].gval->pval)->g_ideal[i++] = p->value.intv;
				}
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			  tpop_stack();
			;
    break;}
case 17:
{ if ( IS_VALID ( yyvsp[0].gval ) )
				strcpy ( prompt, (char *)yyvsp[0].gval->pval );
			  else
			  	set_error ( STRING_EXPECTED );
			;
    break;}
case 18:
{ if ( yyvsp[0].ival == 1 ) verbose = TRUE;
			  else verbose = FALSE; ;
    break;}
case 19:
{ displaystyle = yyvsp[0].ival; ;
    break;}
case 20:
{ tpush_stack(); ;
    break;}
case 21:
{ i = 0;
			for ( p = ((LISTP *)yyvsp[0].gval->pval)->first; p != NULL; p = p->next )
				flags[i++] = p->value.intv;
			use_filtration = flags[0];
			use_max_elab_sections = flags[1];
			only_normal_auts = flags[2];
			use_fail_list = flags[3];
			with_inner = aut_pres_all = flags[4];
			tpop_stack();
			;
    break;}
case 22:
{ tpush_stack(); ;
    break;}
case 23:
{ if ( IS_VALID ( yyvsp[-2].gval ) )
				if ( yyvsp[-2].gval->exptype == GROUPRING ) {
					if ( (yysym = find_symbol ( "_$GRACTUAL" ) ) == NULL ) {
						yysym = new_symbol ( "_$GRACTUAL", 0 );
						yysym = add_symbol ( yysym );
						assign_symbol ( yysym, yyvsp[-2].gval );
					}
					else
						copy_grpring ( (GRPRING *)yyvsp[-2].gval->pval, yysym->object, TRUE );
					set_domain ( (GRPRING *)yysym->object, yyvsp[-1].ival );
					if ( (yysym = find_symbol ( "_$PCGACTUAL" ) ) == NULL ) {
						yyhval = ALLOCATE ( sizeof ( GENVAL ) );
						yyhval->exptype = PCGROUP;
						yyhval->pval = ((GRPRING *)yyvsp[-2].gval->pval)->g;
						yysym = new_symbol ( "_$PCGACTUAL", 0 );
						yysym = add_symbol ( yysym );
						assign_symbol ( yysym, yyhval );
					}
					else
						copy_pcgroup ( ((GRPRING *)yyvsp[-2].gval->pval)->g, (PCGRPDESC *)yysym->object, TRUE, NULL ); 
				}
				else
					set_error ( IS_NOT_TYPE_GROUPRING );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			  tpop_stack();
			;
    break;}
case 24:
{ printf ( "dim of kernel Psi(%d,%d,%d) : %d\n", 
				yyvsp[-5].ival, yyvsp[-3].ival, yyvsp[-1].ival, psi ( yyvsp[-5].ival, yyvsp[-3].ival, yyvsp[-1].ival ) );
			;
    break;}
case 25:
{ show_pres ( yyvsp[-2].ival, (char *)yyvsp[-1].gval->pval  ); ;
    break;}
case 26:
{ if ( (IS_VALID ( yyvsp[-4].gval )) && (IS_VALID ( yyvsp[-2].gval )) )
				if ( yyvsp[-4].gval->exptype == PCGROUP ) {
					if ( displaystyle == GAP ) {
						boolean_prefix = "SISYPHOS.SISBOOL := ";
						boolean_postfix = ";";
					}
					else {
						boolean_prefix = "";
						boolean_postfix = "";
					}
					if ( yyvsp[-2].gval->exptype == GROUP  )
						if ( is_isomorphic ( (PCGRPDESC *)yyvsp[-4].gval->pval,
							yyvsp[-2].gval->pval, FALSE, yyvsp[-1].ival ) )
							printf ( "%strue%s\n", boolean_prefix, boolean_postfix );
						else
							printf ( "%sfalse%s\n", boolean_prefix, boolean_postfix );
					else if ( yyvsp[-2].gval->exptype == PCGROUP )
						if ( is_isomorphic ( (PCGRPDESC *)yyvsp[-4].gval->pval,
							yyvsp[-2].gval->pval, TRUE, yyvsp[-1].ival ) )
							printf ( "%strue%s\n", boolean_prefix, boolean_postfix );
						else
							printf ( "%sfalse%s\n", boolean_prefix, boolean_postfix );
					else
						set_error ( WRONG_TYPE );
				}
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 27:
{ if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == PCGROUP )
					calc_cohomology ( yyvsp[-3].ival, (PCGRPDESC *)yyvsp[-1].gval->pval );
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 28:
{ if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == PCGROUP )
					calc_extorbit ( (PCGRPDESC *)yyvsp[-1].gval->pval );
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 29:
{ if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == GRELEMENT ) {
					if ( ((VEC)yyvsp[-1].gval->pval)[0] == 0 )
						set_error ( IS_NOT_UNIT );
					else
						gr_decompose ( (VEC)yyvsp[-1].gval->pval, cut );
				}
				else
					set_error ( IS_NOT_TYPE_GRELEMENT );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 30:
{ if ( IS_VALID ( yyvsp[-3].gval ) )
				if ( yyvsp[-3].gval->exptype == HOMREC ) {
					show_aut_pres ( (HOM *)yyvsp[-3].gval->pval, !yyvsp[-1].ival );
				}
				else
					set_error ( IS_NOT_TYPE_HOMREC );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 31:
{ if ( IS_VALID ( yyvsp[0].gval ) ) {
				if ( yyvsp[0].gval->exptype != HOMREC ) 
					set_error ( IS_NOT_TYPE_HOMREC );
				}
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 32:
{
			i = 0;
			for ( p = ((LISTP *)yyvsp[-2].gval->pval)->first; p != NULL; p = p->next ) i++;
			agword = CALLOCATE ( i );
			i = 0;
			for ( p = ((LISTP *)yyvsp[-2].gval->pval)->first; p != NULL; p = p->next )
				agword[i++] = p->value.intv;
			evaluate_aut ( ((HOM *)yyvsp[-5].gval->pval)->aut_gens[1],
						((HOM *)yyvsp[-5].gval->pval)->g, agword, i );
			;
    break;}
case 33:
{ if ( IS_VALID ( yyvsp[-10].gval ) )
				if ( yyvsp[-10].gval->exptype == GROUP ) {
					elim_grp_aut = yyvsp[-4].ival;
					if ( yyvsp[-1].ival == 1 ) {
						group_mul = sn_group_mul;
						group_exp = sngroup_exp;
					}
					if ( !elim_grp_aut )
						lift_control ( (GRPDSC *)yyvsp[-10].gval->pval, yyvsp[-8].ival, yyvsp[-6].ival, yyvsp[-2].ival, FALSE );
					else
						if ( prepare_aut ( group_desc ) )
							lift_control ( (GRPDSC *)yyvsp[-10].gval->pval, yyvsp[-8].ival, yyvsp[-6].ival, yyvsp[-2].ival, FALSE );
					group_mul = n_group_mul;
					group_exp = ngroup_exp;
				}
				else
					set_error ( IS_NOT_TYPE_GROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 34:
{ if ( IS_VALID ( yyvsp[-7].gval ) )
				if ( yyvsp[-7].gval->exptype == GROUP ) {
					elim_grp_aut = FALSE;
					lift_control ( (GRPDSC *)yyvsp[-7].gval->pval, yyvsp[-5].ival, yyvsp[-3].ival, yyvsp[-1].ival, TRUE );
				}
				else
					set_error ( IS_NOT_TYPE_GROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 35:
{ if ( IS_VALID ( yyvsp[-3].gval ) )
				if ( yyvsp[-3].gval->exptype == GROUP ) {
					verify ( (GRPDSC *)yyvsp[-3].gval->pval, yyvsp[-1].ival );
				}
				else
					set_error ( IS_NOT_TYPE_GROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 36:
{ if ( IS_VALID ( yyvsp[-6].gval ) )
				if ( yyvsp[-6].gval->exptype == GROUP ) {
					if ( yyvsp[-2].ival == -1 )
						show_homomorphisms ( (GRPDSC *)yyvsp[-6].gval->pval, yyvsp[-4].ival, n_rho[yyvsp[-4].ival], (char *)yyvsp[-1].gval->pval );
			  		else
			  			show_homomorphisms ( (GRPDSC *)yyvsp[-6].gval->pval, yyvsp[-4].ival, yyvsp[-2].ival, (char *)yyvsp[-1].gval->pval );
				}
				else
					set_error ( IS_NOT_TYPE_GROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 37:
{ tpush_stack(); ;
    break;}
case 38:
{ if ( IS_VALID ( yyvsp[-1].gval ) ) 
				 printf ( "%ld\n", (long)yyvsp[-1].gval->pval );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			  tpop_stack();
			;
    break;}
case 39:
{ YYACCEPT; ;
    break;}
case 40:
{ yyval.ival = 0; ;
    break;}
case 41:
{ yyval.ival = yyvsp[0].ival; ;
    break;}
case 42:
{ yyval.ival = -1; ;
    break;}
case 43:
{ yyval.ival = yyvsp[0].ival; ;
    break;}
case 44:
{ yyval.ival = 0; ;
    break;}
case 45:
{ yyval.ival = 1; ;
    break;}
case 46:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = NULL; ;
    break;}
case 47:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 48:
{ use_permanent_stack();
			group_ring->mul_table = multiplication_table();
			cgroup_mul = tc_group_mul;
			use_temporary_stack(); ;
    break;}
case 49:
{ use_permanent_stack();
			group_ring->jenn_table = jennings_table ( cut );
			group_mul = t_group_mul;
			group_exp = tgroup_exp;
			use_temporary_stack(); ;
    break;}
case 50:
{ yyval.gval = yyvsp[-1].gval;;
    break;}
case 51:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = NULL; ;
    break;}
case 52:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 53:
{ yyval.gval = galloc ( DLIST );
			((LISTP *)yyval.gval->pval)->first = ((LISTP *)yyval.gval->pval)->last = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->first->value.gv = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->first->next = NULL; ;
    break;}
case 54:
{ yyval.gval = yyvsp[-2].gval;
			((LISTP *)yyval.gval->pval)->last->next = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->last = ((LISTP *)yyval.gval->pval)->last->next;
			((LISTP *)yyval.gval->pval)->last->value.gv = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->last->next = NULL; ;
    break;}
case 55:
{ yyval.gval = yyvsp[-1].gval; ;
    break;}
case 56:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = NULL; ;
    break;}
case 57:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 58:
{ yyval.gval = galloc ( DLIST );
			((LISTP *)yyval.gval->pval)->first = ((LISTP *)yyval.gval->pval)->last = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->first->value.gv = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->first->next = NULL; ;
    break;}
case 59:
{ yyval.gval = yyvsp[-2].gval;
			((LISTP *)yyval.gval->pval)->last->next = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->last = ((LISTP *)yyval.gval->pval)->last->next;
			((LISTP *)yyval.gval->pval)->last->value.gv = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->last->next = NULL; ;
    break;}
case 60:
{ yyval.gval = yyvsp[-1].gval;;
    break;}
case 61:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = NULL; ;
    break;}
case 62:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 63:
{ yyval.gval = galloc ( DLIST );
			((LISTP *)yyval.gval->pval)->first = ((LISTP *)yyval.gval->pval)->last = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->first->value.intv = yyvsp[-1].ival*yyvsp[0].ival;
			((LISTP *)yyval.gval->pval)->first->next = NULL; ;
    break;}
case 64:
{ yyval.gval = yyvsp[-3].gval;
			((LISTP *)yyval.gval->pval)->last->next = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->last = ((LISTP *)yyval.gval->pval)->last->next;
			((LISTP *)yyval.gval->pval)->last->value.intv = yyvsp[-1].ival*yyvsp[0].ival;
			((LISTP *)yyval.gval->pval)->last->next = NULL; ;
    break;}
case 65:
{ yyval.ival = 0;
			g_desc->is_minimal = FALSE; ;
    break;}
case 66:
{ yyval.ival = 1;
			g_desc->is_minimal = TRUE; ;
    break;}
case 67:
{ i = 0;
			for ( p = ((LISTP *)yyvsp[-1].gval->pval)->first; p != NULL; p = p->next ) i++;
			g_desc->num_gen = i;
			g_desc->gen = ALLOCATE ( i * sizeof ( char * ) );
			i = 0;
			for ( p = ((LISTP *)yyvsp[-1].gval->pval)->first; p != NULL; p = p->next ) {
				g_desc->gen[i] = ALLOCATE ( strlen ( (char *)p->value.gv )+1 );
				strcpy ( g_desc->gen[i++], (char *)p->value.gv );
			} ;
    break;}
case 68:
{ yyval.gval = galloc ( DLIST );
			((LISTP *)yyval.gval->pval)->first = ((LISTP *)yyval.gval->pval)->last = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->first->value.gv = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->first->next = NULL; ;
    break;}
case 69:
{ yyval.gval = yyvsp[-2].gval;
			((LISTP *)yyval.gval->pval)->last->next = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->last = ((LISTP *)yyval.gval->pval)->last->next;
			((LISTP *)yyval.gval->pval)->last->value.gv = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->last->next = NULL; ;
    break;}
case 70:
{ yyclearin; ;
    break;}
case 71:
{ i = 0;
			for ( p = ((LISTP *)yyvsp[-1].gval->pval)->first; p != NULL; p = p->next ) i++;
			g_desc->num_rel = i;
			g_desc->rel_list = (node *)ALLOCATE ( i * sizeof ( node ) );
			i = 0;
			for ( p = ((LISTP *)yyvsp[-1].gval->pval)->first; p != NULL; p = p->next )
				g_desc->rel_list[i++] = p->value.nodev; ;
    break;}
case 72:
{ yyval.gval = galloc ( DLIST );
			((LISTP *)yyval.gval->pval)->first = ((LISTP *)yyval.gval->pval)->last = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->first->value.nodev = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->first->next = NULL; ;
    break;}
case 73:
{ yyval.gval = yyvsp[-2].gval;
			((LISTP *)yyval.gval->pval)->last->next = ALLOCATE ( sizeof ( dynlistitem ) );
			((LISTP *)yyval.gval->pval)->last = ((LISTP *)yyval.gval->pval)->last->next;
			((LISTP *)yyval.gval->pval)->last->value.nodev = yyvsp[0].gval->pval;
			((LISTP *)yyval.gval->pval)->last->next = NULL; ;
    break;}
case 74:
{ yyclearin; ;
    break;}
case 75:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = ALLOCATE ( node_size );
			  ((node)yyval.gval->pval)->nodetype = EQ;
			  ((node)yyval.gval->pval)->value = 0;
			  ((node)yyval.gval->pval)->left = yyvsp[-1].gval->pval;
			  ((node)yyval.gval->pval)->right = yyvsp[0].gval->pval; ;
    break;}
case 76:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = NULL; ;
    break;}
case 77:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 78:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 79:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = NULL; ;
    break;}
case 80:
{ yyval.gval = yyvsp[-1].gval; ;
    break;}
case 81:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = ALLOCATE ( node_size );
			  ((node)yyval.gval->pval)->nodetype = MULT;
			  ((node)yyval.gval->pval)->value = 0;
			  ((node)yyval.gval->pval)->left = yyvsp[-2].gval->pval;
			  ((node)yyval.gval->pval)->right = yyvsp[0].gval->pval; ;
    break;}
case 82:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = ALLOCATE ( node_size );
			  ((node)yyval.gval->pval)->nodetype = EXP;
			  ((node)yyval.gval->pval)->value = yyvsp[-1].ival*yyvsp[0].ival;
			  ((node)yyval.gval->pval)->left = yyvsp[-3].gval->pval;
			  ((node)yyval.gval->pval)->right = NULL; ;
    break;}
case 83:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = ALLOCATE ( node_size );
			  ((node)yyval.gval->pval)->nodetype = COMM;
			  ((node)yyval.gval->pval)->value = 0;
			  ((node)yyval.gval->pval)->left = yyvsp[-3].gval->pval;
			  ((node)yyval.gval->pval)->right = yyvsp[-1].gval->pval; ;
    break;}
case 84:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->pval = ALLOCATE ( node_size );
			  ((node)yyval.gval->pval)->nodetype = GGEN;
			  if ( (((node)yyval.gval->pval)->value = find_gen ( yyvsp[0].gval->pval )) == -1 ) {
			  	set_error ( INVALID_GENERATOR );
			  }
			  ((node)yyval.gval->pval)->left = NULL;
			  ((node)yyval.gval->pval)->right = NULL;
			;
    break;}
case 85:
{ yyval.ival = 1; ;
    break;}
case 86:
{ yyval.ival = -1; ;
    break;}
case 87:
{ yyval.gval = NULL; ;
    break;}
case 88:
{ yyval.gval = yyvsp[0].gval; ;
    break;}
case 89:
{ yyval.ival = -1; ;
    break;}
case 90:
{ yyval.ival = yyvsp[0].ival; ;
    break;}
case 93:
{ aut_pres_style = NONE;
			display_basis = NONE; ;
    break;}
case 94:
{ display_basis = STANDARD_BASIS; ;
    break;}
case 95:
{ aut_pres_style = yyvsp[0].ival; ;
    break;}
case 96:
{ aut_pres_all = yyvsp[0].ival; ;
    break;}
case 97:
{ yyval.ival = -1;
			  show_memory_info(); ;
    break;}
case 98:
{ yyval.ival = prime; ;
    break;}
case 99:
{ yyval.ival = cut; ;
    break;}
case 100:
{ yyval.ival = fend; ;
    break;}
case 101:
{ if ( !have_ls ) get_lie_series();
			  yyval.ival = lie_ser_len; ;
    break;}
case 102:
{ show_symbols();
			  yyval.ival = -1; ;
    break;}
case 103:
{ show_version();
			  yyval.ival = -1; ;
    break;}
case 104:
{
			printf ( "     use_filtration:        %s\n", flags[0] == 1 ? "true" : "false" );
			printf ( "     use_max_elab_sections: %s\n", flags[1] == 1 ? "true" : "false" );
			printf ( "     only_normal_auts:      %s\n", flags[2] == 1 ? "true" : "false" );
			printf ( "     use_fail_list:         %s\n", flags[3] == 1 ? "true" : "false" );
			printf ( "     with_inner:            %s\n", flags[4] == 1 ? "true" : "false" );
			yyval.ival = -1;
			;
    break;}
case 105:
{ tpush_stack(); ;
    break;}
case 106:
{ if ( IS_VALID ( yyvsp[0].gval ) && ( error_no == NO_ERROR ) ) {
				if ( (yysym = find_symbol ( yyvsp[-3].gval->pval ) ) == NULL ) {
					yysym = new_symbol ( yyvsp[-3].gval->pval, 0 );
					yysym = add_symbol ( yysym );
				}
				assign_symbol ( yysym, yyvsp[0].gval );
				tpop_stack();
			} ;
    break;}
case 107:
{ tpush_stack(); ;
    break;}
case 108:
{ set_error ( GEN_MAY_NOT_BE_REASSIGNED );
			  tpop_stack(); ;
    break;}
case 109:
{ tpush_stack(); ;
    break;}
case 110:
{ set_error ( GEN_MAY_NOT_BE_REASSIGNED );
			  tpop_stack(); ;
    break;}
case 111:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = yyvsp[-1].gval->exptype;
			  yyval.gval->pval = yyvsp[-1].gval->pval; ;
    break;}
case 112:
{ if ( (IS_VALID ( yyvsp[-2].gval )) && (IS_VALID ( yyvsp[0].gval )) )
				yyval.gval = do_op ( yyvsp[-2].gval, yyvsp[0].gval, O_ADD );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 113:
{ if ( (IS_VALID ( yyvsp[-2].gval )) && (IS_VALID ( yyvsp[0].gval )) )
				yyval.gval = do_op ( yyvsp[-2].gval, yyvsp[0].gval, O_SUB );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 114:
{ if ( (IS_VALID ( yyvsp[-2].gval )) && (IS_VALID ( yyvsp[0].gval )) )
				yyval.gval = do_op ( yyvsp[-2].gval, yyvsp[0].gval, O_MUL );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 115:
{ if ( (IS_VALID ( yyvsp[-2].gval )) && (IS_VALID ( yyvsp[0].gval )) )
				yyval.gval = do_op ( yyvsp[-2].gval, yyvsp[0].gval, O_DIV );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 116:
{ if ( IS_VALID ( yyvsp[0].gval ) )
				yyval.gval = do_op ( yyvsp[0].gval, NULL, O_UMI );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 117:
{ if ( (IS_VALID ( yyvsp[-2].gval )) && (IS_VALID ( yyvsp[0].gval )) )
				yyval.gval = do_op ( yyvsp[-2].gval, yyvsp[0].gval, O_EXP );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 118:
{ if ( (IS_VALID ( yyvsp[-3].gval )) && (IS_VALID ( yyvsp[-1].gval )) )
				yyval.gval = do_op ( yyvsp[-3].gval, yyvsp[-1].gval, O_LIE );
			  else
			  	yyval.gval = NULL; ;
    break;}
case 119:
{ if ( (IS_VALID ( yyvsp[-3].gval )) && (IS_VALID ( yyvsp[-1].gval )) )
				if ( (yyvsp[-3].gval->exptype == GRELEMENT) && (yyvsp[-3].gval->exptype == GRELEMENT) ) {
					yyval.gval = galloc ( GRELEMENT );
					yyval.gval->pval = mult_comm ( (VEC)yyvsp[-3].gval->pval, (VEC)yyvsp[-1].gval->pval, cut );
					if ( yyval.gval->pval == NULL )
						yyval.gval = NULL;
				}
			  else
			  	yyval.gval = NULL; ;
    break;}
case 120:
{ yyval.gval = NULL;
			if ( (IS_VALID ( yyvsp[-5].gval )) && (yyvsp[-5].gval->exptype == GRELEMENT) ) {
				yyval.gval = galloc ( GRELEMENT );
				copy_vector ( yyvsp[-5].gval->pval, yyval.gval->pval, FILTRATION[yyvsp[-1].ival].i_start ); }
			;
    break;}
case 121:
{ yyval.gval = NULL; 
			if ( (yysym = find_symbol ( yyvsp[0].gval->pval ) ) != NULL ) {
				yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
				yyval.gval->exptype = yysym->type;
				yyval.gval->pval = yysym->object;
			} ;
    break;}
case 122:
{ yyval.gval = code_to_expr ( (LISTP *)yyvsp[-1].gval->pval ); ;
    break;}
case 123:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = GRELEMENT;
			  yyval.gval->pval = NGEN_VEC[yyvsp[0].ival];
			;
    break;}
case 124:
{ yyval.gval = galloc ( GRELEMENT );
			  copy_vector ( NGEN_VEC[yyvsp[0].ival], (char *)yyval.gval->pval, fend );
			  ((VEC)yyval.gval->pval)[0] = 1; ;
    break;}
case 125:
{ yyval.gval = galloc ( GROUPEL );
			  copy_vector ( group_desc->nom[yyvsp[0].ival], (PCELEM)yyval.gval->pval, bperelem );
			;
    break;}
case 126:
{ yyval.gval = galloc ( INT );
			  *((int *)yyval.gval->pval) = yyvsp[0].ival; ;
    break;}
case 127:
{ tpush_stack(); ;
    break;}
case 128:
{ if ( IS_VALID ( yyvsp[-1].gval ) ) 
				if ( yyvsp[-1].gval->exptype == GRELEMENT ) {
					yyval.gval = galloc ( INT );
					*((int *)yyval.gval->pval) = get_order ( (VEC)yyvsp[-1].gval->pval, cut );
				}
				else
					set_error ( IS_NOT_TYPE_GRELEMENT );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			  tpop_stack();
			;
    break;}
case 129:
{ yyval.gval = NULL; 
			if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == VECTORSPACE ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = VECTORSPACE;
					yyval.gval->pval = compl_space ( (SPACE *)yyvsp[-1].gval->pval );
				}
			;
    break;}
case 130:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = VECTORSPACE;
			  yyval.gval->pval = conv_I_space ( yyvsp[-5].ival, yyvsp[-1].ival );
			;
    break;}
case 131:
{ yyval.gval = NULL;
			if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == VECTORSPACE ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = VECTORSPACE;
					yyval.gval->pval = ideal_closure ( (SPACE *)yyvsp[-1].gval->pval, yyvsp[-4].ival );
				}
			;
    break;}
case 132:
{ yyval.gval = NULL;
			if ( IS_VALID ( yyvsp[-3].gval ) )
				if ( yyvsp[-3].gval->exptype == GRELEMENT ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = VECTORSPACE;
					yyval.gval->pval = principal_ideal ( (VEC)yyvsp[-3].gval->pval, yyvsp[-1].ival, yyvsp[-6].ival );
				}
			;
    break;}
case 133:
{ yyval.gval = NULL;
			if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == VECTORSPACE ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = VECTORSPACE;
					yyval.gval->pval = annihilator ( yyvsp[-4].ival, (SPACE *)yyvsp[-1].gval->pval );
				}
			;
    break;}
case 134:
{ yyval.gval = NULL;
			if ( IS_VALID ( yyvsp[-3].gval ) )
				if ( yyvsp[-3].gval->exptype == VECTORSPACE ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = VECTORSPACE;
					yyval.gval->pval = pot_space ( (SPACE *)yyvsp[-3].gval->pval, yyvsp[-1].ival );
				}
			;
    break;}
case 135:
{ use_permanent_stack(); 
			  if ( !have_li )
				get_lie_ideal();
			  use_temporary_stack();
			  yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = VECTORSPACE;
			  yyval.gval->pval = lie_ideal[yyvsp[-1].ival];
			;
    break;}
case 136:
{ use_permanent_stack();
			  if ( !have_ls )
				get_lie_series();
			  use_temporary_stack();
			  yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = VECTORSPACE;
			  yyval.gval->pval = lie_series[yyvsp[-1].ival];
			;
    break;}
case 137:
{ use_permanent_stack();
			  if ( !have_js )
				get_j_series();
			  use_temporary_stack();
			  yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = VECTORSPACE;
			  yyval.gval->pval = j_series[yyvsp[-1].ival];
			;
    break;}
case 138:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = VECTORSPACE;
			yyval.gval->pval = e_centralizer ( NGEN_VEC, GMINGEN, yyvsp[0].ival ); ;
    break;}
case 139:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = VECTORSPACE;
			if ( yyvsp[-3].gval->pval == (char *)0L )
			 	yyval.gval->pval = e_centralizer ( NGEN_VEC, NUMGEN, yyvsp[-1].ival );
			  else {
			  	v_list[0] = yyvsp[-3].gval->pval;
			  	yyval.gval->pval = e_centralizer ( v_list, 1, yyvsp[-1].ival );
			  } ;
    break;}
case 140:
{ yyhval = galloc ( GROUP ); 
			g_desc = (GRPDSC *)yyhval->pval ;
    break;}
case 141:
{ g_desc->prime = yyvsp[-5].ival;
			  yyval.gval = yyhval; ;
    break;}
case 142:
{ yyhval = galloc ( GROUP ); 
			  g_desc = (GRPDSC *)yyhval->pval ;
    break;}
case 143:
{ g_desc->prime = yyvsp[-4].ival;
			  yyval.gval = yyhval; ;
    break;}
case 144:
{ yyval.gval = NULL; ;
    break;}
case 145:
{ yyval.gval = NULL;
			if ( (IS_VALID ( yyvsp[-1].gval )) && (yyvsp[-1].gval->exptype == PCGROUP) ) {
				yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
				yyval.gval->exptype = GROUP;
				yyval.gval->pval = conv_rel ( (PCGRPDESC *)yyvsp[-1].gval->pval );
			} ;
    break;}
case 146:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = GROUP;
			yyval.gval->pval = h_desc; ;
    break;}
case 147:
{ g_desc = ALLOCATE ( sizeof ( GRPDSC ) ); ;
    break;}
case 148:
{ g_desc->prime = yyvsp[-6].ival;
			yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = PCGROUP;
			yyval.gval->pval = grp_to_pcgrp ( g_desc );
			if ( yyvsp[-1].gval != NULL ) {
				i = 0;
				for ( p = ((LISTP *)yyvsp[-1].gval->pval)->first; p != NULL; p = p->next )
				((PCGRPDESC *)yyval.gval->pval)->g_ideal[i++] = p->value.intv;
			}
			;
    break;}
case 149:
{ g_desc = ALLOCATE ( sizeof ( GRPDSC ) ); ;
    break;}
case 150:
{ g_desc->prime = yyvsp[-5].ival;
			yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = PCGROUP;
			yyval.gval->pval = grp_to_pcgrp ( g_desc );
			if ( yyvsp[0].gval != NULL ) {
				i = 0;
				for ( p = ((LISTP *)yyvsp[0].gval->pval)->first; p != NULL; p = p->next )
				((PCGRPDESC *)yyval.gval->pval)->g_ideal[i++] = p->value.intv;
			} ;
    break;}
case 151:
{ if ( IS_VALID ( yyvsp[-3].gval ) )
				if ( yyvsp[-3].gval->exptype == PCGROUP ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval ->exptype = PCGROUP;
					yyval.gval->pval = p_quotient ( (PCGRPDESC *)yyvsp[-3].gval->pval, yyvsp[-1].ival );
					}
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 152:
{ yyval.gval = NULL; ;
    break;}
case 153:
{ g_desc = ALLOCATE ( sizeof ( GRPDSC ) ); ;
    break;}
case 154:
{ 
			yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = AGGROUP;
			yyval.gval->pval = grp_to_aggrp ( g_desc );
			;
    break;}
case 155:
{ g_desc = ALLOCATE ( sizeof ( GRPDSC ) ); ;
    break;}
case 156:
{
			yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			yyval.gval->exptype = AGGROUP;
			yyval.gval->pval = grp_to_aggrp ( g_desc );
			;
    break;}
case 157:
{ if ( IS_VALID ( yyvsp[-1].gval ) )
				if ( yyvsp[-1].gval->exptype == PCGROUP ) {
					yyval.gval = galloc ( GROUPRING );
					set_groupring ( (PCGRPDESC *)yyvsp[-1].gval->pval, (GRPRING *)yyval.gval->pval );
				}
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 158:
{
			if ( IS_VALID ( yyvsp[-2].gval ) )
				if ( yyvsp[-2].gval->exptype == PCGROUP ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval ->exptype = HOMREC;
					yyval.gval->pval = automorphisms ( (PCGRPDESC *)yyvsp[-2].gval->pval, yyvsp[-1].ival );
				}
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 159:
{ if ( (IS_VALID ( yyvsp[-4].gval )) && (IS_VALID ( yyvsp[-2].gval )) )
				if ( yyvsp[-4].gval->exptype == PCGROUP )
					if ( yyvsp[-2].gval->exptype == GROUP  ) {
						yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
						yyval.gval ->exptype = HOMREC;
						yyval.gval->pval = isomorphisms ( (PCGRPDESC *)yyvsp[-4].gval->pval,
							yyvsp[-2].gval->pval, FALSE, yyvsp[-1].ival );
					}
					else if ( yyvsp[-2].gval->exptype == PCGROUP ) {
						yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
						yyval.gval ->exptype = HOMREC;
						yyval.gval->pval = isomorphisms ( (PCGRPDESC *)yyvsp[-4].gval->pval,
							yyvsp[-2].gval->pval, TRUE, yyvsp[-1].ival );
					}
					else
						set_error ( WRONG_TYPE );
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 160:
{ if ( IS_VALID ( yyvsp[-3].gval ) )
				if ( yyvsp[-3].gval->exptype == HOMREC ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = HOMREC;
					yyval.gval->pval = generate_automorphism_group ( (HOM *)yyvsp[-3].gval->pval, !yyvsp[-1].ival );
				}
				else
					set_error ( IS_NOT_TYPE_HOMREC );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 161:
{ if ( IS_VALID ( yyvsp[0].gval ) )
				if ( yyvsp[0].gval->exptype == PCGROUP ) {
					old_pc_group = group_desc;
					set_main_group ( (PCGRPDESC *)yyvsp[0].gval->pval );
					read_group_el = TRUE;
				}
				else
					set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 162:
{ yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
			  yyval.gval->exptype = HOMREC;
			  yyval.gval->pval = conv_to_hom ( (PCGRPDESC *)yyvsp[-5].gval->pval, (LISTP *)yyvsp[-2].gval->pval, !yyvsp[-1].ival );
			  set_main_group ( old_pc_group );
			  read_group_el = FALSE;
			;
    break;}
case 163:
{ if ( (IS_VALID ( yyvsp[-3].gval )) && (IS_VALID ( yyvsp[-1].gval )) )
				if ( yyvsp[-3].gval->exptype == PCGROUP ) {
					yyval.gval = ALLOCATE ( sizeof ( GENVAL ) );
					yyval.gval->exptype = HOMREC;
					yyval.gval->pval = aut_read ( (char *)yyvsp[-1].gval->pval, (PCGRPDESC *)yyvsp[-3].gval->pval );
			  	}
			  	else
			  		set_error ( IS_NOT_TYPE_PCGROUP );
			  else
			  	set_error ( UNDEFINED_EXPRESSION );
			;
    break;}
case 164:
{ yyval.gval = NULL; ;
    break;}
case 165:
{ yyval.gval = yyvsp[-1].gval; ;
    break;}
case 166:
{ yyval.ival = 0; ;
    break;}
case 167:
{ yyval.ival = yyvsp[0].ival; ;
    break;}
case 168:
{ yyval.ival = TRUE; ;
    break;}
case 169:
{ yyval.ival = FALSE; ;
    break;}
case 170:
{ yyval.ival = FALSE; ;
    break;}
case 171:
{ yyval.ival = TRUE; ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */


  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;
	  for (x = 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 = 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;
}


int yyerror ( s )
char *s;
{
	if ( (strcmp ( s, "parse error")) == 0 ) {
		set_error ( SYNTAX_ERROR );
		proc_error();
	}
	else
		fprintf ( stderr, "Unexpected error: %s\n", s );
	return 0;
}

void show_prompt()
{
	if ( !quiet )
		fprintf ( stdout, "%s", prompt );
}

static int find_gen ( char *name )
{
	int i;
	
	for ( i = 0; i < g_desc->num_gen; i++ )
		if ( !strcmp ( g_desc->gen[i], name ) )
			return ( i );
	return ( -1 );
}

void sys_init ( void )
{
	/* get dynamic storage */
	if ( ( mem_bottom = get_memblock ( amount ) ) == NULL ) {
		puts ( "amount not available !!!!!" );
		exit(-1);
	}

	if ( ( mem_bottom = tget_memblock ( tamount ) ) == NULL ) {
		puts ( "temporary amount not available !!!!!" );
		exit(-1);
	}

	init_mem_stats();
	/* set output to stdout */
	out_hdl = stdout;

	/* init dispatcher */
	use_permanent_stack();
	init_act_table();
	use_temporary_stack();
	
	/* set initial value for prime and setup arithmetic for GF(2) */
	prime = 2;
	swap_arith ( 2 );
	
	/* initialize paths */
	set_paths();
	
	/* initialize algorithm flags */
	flags[0] = use_filtration;
	flags[1] = use_max_elab_sections;
	flags[2] = only_normal_auts;
	flags[3] = use_fail_list;
	flags[4] = with_inner;

	/* initialize group ring multiplication routines */
	group_mul = n_group_mul;
	cgroup_mul = c_group_mul;
	group_exp = ngroup_exp;
	
	mon_per_line = 16;
	if ( banner ) {
		show_logo();
		show_settings();
	}

	if ( use_proto ) {
		proto_p = add_path ( "PROTO", proto_n );
		if ( (proto = fopen ( proto_p, "w" ) ) == 0 )
			printf ( "ERROR : couldn't open logfile !!!\n" );
	}
}

int main ( int argc, char *argv[] )
{
	int c;
	
#ifdef YYDEBUG
	yydebug = 1;
#endif

	amount  = 100000L;
	tamount = 300000L;
	root_path[0] = '\0';
	strcpy ( proto_n, "LOGFILE0.dat" );
	strcpy ( in_n, "ideal000.lif" );
	strcpy ( out_n, "ideal000.lif" );
	while ( (c = getopt ( argc, argv, "m:t:l:p:d:s:bq" )) != -1 )
		switch ( c ) {
			case 'm':
				amount = atol ( optarg );
				break;
			case 't':
				tamount = atol ( optarg );
				break;
			case 'l':
				strcpy ( root_path, optarg );
				break;
			case 'p':
				strcpy ( proto_n, optarg );
				use_proto = TRUE;
				break;
			case 'd':
				strcpy ( in_n, optarg );
				strcpy ( out_n, optarg );
				break;
			case 's':
				if ( strcmp ( "gap", optarg ) == 0 )
					displaystyle = GAP;					
				break;
			case 'b':
				banner = FALSE;
				break;
			case 'q':
				quiet = TRUE;
				break;
			case '?':
				exit (-1);
				break;
		}
		
	init_memory_stack();
	sys_init();
	init_sym_tab();
	yyparse();
	if ( !quiet )
		memory_usage();
	return 0;
}


