#ifdef __cplusplus
   #include <stdio.h>
   extern "C" {
     extern void yyerror(char *);
     extern int yylex();
   }
#endif	/* __cplusplus */ 

# line 13 "ick.y"
#include <stdio.h>
#include "sizes.h"
#include "ick.h"
#include "lose.h"

#define yylex() lexer()

extern node *newnode(), *cons();
extern tuple *newtuple();
extern unsigned int intern();
#ifndef QDOS
extern int yylineno, traditional, yyerrflag;
#else
extern int yylineno, traditional;
static int yyerrflag;
#endif

static node *rlist;	/* pointer to current right-hand node list */
static node *llist;	/* pointer to current left-hand node list */
static node *np;	/* variable for building node lists */

#define ACTION(x, nt, nn)	{x = newtuple(); x->type = nt; x->u.node=nn;}
#define TARGET(x, nt, nn)	{x = newtuple(); x->type = nt; x->u.target=nn;}
#define NEWFANGLED	if (traditional) lose(E111,yylineno,(char*)NULL); else

# line 36 "ick.y"
typedef union 
{
    int 	numval; 	/* a numeric value */
    tuple	*tuple; 	/* a code tuple */
    node	*node;		/* an expression-tree node */
} YYSTYPE;
# define GETS 257
# define RESIZE 258
# define NEXT 259
# define FORGET 260
# define RESUME 261
# define STASH 262
# define RETRIEVE 263
# define IGNORE 264
# define REMEMBER 265
# define ABSTAIN 266
# define REINSTATE 267
# define DISABLE 268
# define ENABLE 269
# define GIVE_UP 270
# define READ_OUT 271
# define WRITE_IN 272
# define COME_FROM 273
# define DO 274
# define PLEASE 275
# define NOT 276
# define MESH 277
# define ONESPOT 278
# define TWOSPOT 279
# define TAIL 280
# define HYBRID 281
# define MINGLE 282
# define SELECT 283
# define SPARK 284
# define EARS 285
# define SUB 286
# define BY 287
# define BADCHAR 288
# define NUMBER 289
# define UNARY 290
# define OHOHSEVEN 291
# define GERUND 292
# define LABEL 293
# define INTERSECTION 294
# define SPLATTERED 295
# define TESTNZ 296
# define EQUALS 297
# define AND 298
# define OR 299
# define XOR 300
# define FIN 301
# define MESH32 302
# define WHIRL 303
# define WHIRL2 304
# define WHIRL3 305
# define WHIRL4 306
# define WHIRL5 307
# define HIGHPREC 308
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif

/* __YYSCLASS defines the scoping/storage class for global objects
 * that are NOT renamed by the -p option.  By default these names
 * are going to be 'static' so that multi-definition errors
 * will not occur with multiple parsers.
 * If you want (unsupported) access to internal names you need
 * to define this to be null so it implies 'extern' scope.
 * This should not be used in conjunction with -p.
 */
#ifndef __YYSCLASS
# define __YYSCLASS static
#endif
YYSTYPE yylval;
__YYSCLASS YYSTYPE yyval;
typedef int yytabelem;
# define YYERRCODE 256

# line 307 "ick.y"


tuple *splat()
/* try to recover from an invalid statement. */
{
    extern FILE *yyin;
    tuple	*sp;
    int tok, i, lineno;
    extern bool re_send_token;

    /* we're going to do our own resynchronization */
    yyerrok;
    yyclearin;

    /*
     * The idea
     * here is to skip to the next DO, PLEASE or label, then unget that token.
     * which we can do with a tricky flag on the lexer (re_send_token).
     */
    lineno = yylineno;

    /*	fprintf(stderr,"attempting to splat at line %d....\n",lineno); */
    for(i = 0,re_send_token = FALSE;tok = lexer();i++) {
	if(tok == DO | tok == PLEASE | tok == LABEL) {
	    re_send_token = TRUE;
	    break;
	}
    }
    /*
	fprintf(stderr,"found %d on line %d after %d other tokens.\n",
		tok,yylineno,i);
     */

    /* generate a placeholder tuple for the text line */
    TARGET(sp, SPLATTERED, 0);
	sp->lineno = lineno;
    return(sp);
}

/* ick.y ends here */
__YYSCLASS yytabelem yyexca[] ={
-1, 1,
	0, -1,
	-2, 0,
	};
# define YYNPROD 87
# define YYLAST 364
__YYSCLASS yytabelem yyact[]={

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

 -3000,  -238, -3000, -3000, -3000,  -222,  -174,  -212, -3000,  -188,
  -153,  -187,	-156,  -155,  -155,  -161,  -161,  -161,  -161,  -266,
  -273,  -161,	-146, -3000,  -280, -3000, -3000, -3000,  -227,  -228,
  -229,  -235, -3000,  -256, -3000, -3000,  -155,  -155,  -155, -3000,
 -3000,  -194, -3000, -3000, -3000, -3000,  -258,  -169,  -183,  -220,
 -3000,  -219, -3000,  -236,  -229,  -235,  -259,  -261, -3000,  -282,
 -3000, -3000,	-282,  -282,  -282, -3000,  -291, -3000, -3000,  -291,
 -3000,  -292, -3000, -3000,  -220, -3000,  -293, -3000, -3000, -3000,
  -220,  -236, -3000, -3000, -3000, -3000, -3000, -3000,  -188, -3000,
 -3000,  -254, -3000, -3000,  -141, -3000, -3000,  -221,  -223,  -155,
  -155,  -237,	-155,  -197,  -155,  -204,  -155, -3000,  -242,  -243,
  -161,  -271,	-161,  -146, -3000,  -155, -3000, -3000,  -155,  -155,
 -3000, -3000, -3000, -3000, -3000, -3000, -3000,  -198, -3000,  -205,
 -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000,
 -3000, -3000, -3000 };
__YYSCLASS yytabelem yypgo[]={

     0,   181,	 258,	186,   114,   154,   142,   167,   146,   168,
   128,   177,	 141,	162,   161,   176,   106,   143,   144,   127,
   179,   113,	 185,	149,   155,   153,   150,   148 };
__YYSCLASS yytabelem yyr1[]={

     0,     1,	   1,	 25,	25,    26,    26,    26,    26,    23,
    23,    22,	  22,	 22,	22,    22,    22,    22,    22,    22,
    22,    22,	  22,	 22,	22,    22,    22,    22,    22,    27,
    27,     5,	   5,	  7,	 7,    11,    11,    12,    12,    19,
    19,     6,	   3,	  3,	13,    13,    13,     8,     8,    14,
    14,    14,	  14,	  4,	 4,    10,    10,     9,     9,    17,
    15,    15,	  18,	 18,	18,    20,    20,    21,     2,     2,
     2,     2,	   2,	  2,	 2,	2,     2,    24,    24,    24,
    16,    16,	  16,	 16,	16,    16,    16 };
__YYSCLASS yytabelem yyr2[]={

     0,     0,	   4,	  2,	 3,	5,     7,     7,     9,     3,
     5,     7,	   7,	  5,	 5,	5,     5,     5,     5,     5,
     5,     5,	   5,	  5,	 5,	5,     3,     5,     3,     3,
     7,     2,	   2,	  2,	 2,	5,     5,     5,     5,     7,
     7,     5,	   3,	  7,	 2,	2,     2,     7,     3,     2,
     2,     2,	   2,	  7,	 3,	7,     3,     3,     7,     7,
     5,     5,	   3,	  3,	 3,	3,     7,     7,     3,     7,
     7,     7,	   7,	  7,	 7,	3,     3,     3,     3,     3,
     3,     3,	   7,	  9,	 9,	7,     7 };
__YYSCLASS yytabelem yychk[]={

 -3000,    -1,	 -25,	-26,   256,   -23,   293,   274,   -22,   291,
    -7,   -12,	 293,	260,   261,   262,   263,   264,   265,   266,
   267,   272,	 271,	270,   273,   256,   -11,    -9,   280,   281,
   278,   279,	 -17,	-23,   276,   -22,   257,   257,   286,   259,
    -2,   -16,	  -9,	-20,	-5,    -6,   -24,   284,   285,   -12,
   -21,   -19,	 -11,	277,   278,   279,   280,   281,    -2,    -3,
    -5,   -12,	  -3,	 -3,	-3,   293,   -27,   292,   293,   -27,
    -8,   -13,	 -11,	 -9,   -12,    -4,   -14,   -11,    -9,    -6,
   -12,   277,	 293,	289,   289,   289,   289,   -22,   291,    -2,
   -10,    -2,	 -15,	-18,   -16,   -17,   -21,   -12,   -19,   283,
   282,   290,	 290,	 -2,   290,    -2,   286,   289,   290,   290,
   294,   294,	 294,	294,   -22,   287,   -15,   -18,   286,   286,
   -16,    -9,	 -20,	-16,	-9,   -20,   289,    -2,   284,    -2,
   285,   -15,	 -18,	289,   289,    -5,   292,    -8,    -4,   -10,
   -16,   284,	 285 };
__YYSCLASS yytabelem yydef[]={

     1,    -2,	   2,	  3,	 4,	0,     0,     9,     5,     0,
     0,     0,	   0,	  0,	 0,	0,     0,     0,     0,     0,
     0,     0,	   0,	 26,	 0,    28,    33,    34,     0,     0,
     0,     0,	  57,	  0,	10,	6,     0,     0,     0,    13,
    14,    68,	  75,	 76,	80,    81,     0,     0,     0,    32,
    65,     0,	  31,	 77,	78,    79,     0,     0,    15,    16,
    42,    32,	  17,	 18,	19,    20,    21,    29,    22,    23,
    24,    48,	  44,	 45,	46,    25,    54,    49,    50,    51,
    52,     0,	  27,	 37,	38,    35,    36,     7,     0,    11,
    12,    56,	  58,	 59,	64,    62,    63,    32,     0,     0,
     0,     0,	   0,	  0,	 0,	0,     0,    41,     0,     0,
     0,     0,	   0,	  0,	 8,	0,    60,    61,     0,     0,
    69,    70,	  71,	 72,	73,    74,    82,     0,    85,     0,
    86,    66,	  67,	 39,	40,    43,    30,    47,    53,    55,
    64,    83,	  84 };
typedef struct { char *t_name; int t_val; } yytoktype;
#ifndef YYDEBUG
#	define YYDEBUG	0	/* don't allow debugging */
#endif

#if YYDEBUG

__YYSCLASS yytoktype yytoks[] =
{
	"GETS", 257,
	"RESIZE",	258,
	"NEXT", 259,
	"FORGET",	260,
	"RESUME",	261,
	"STASH",	262,
	"RETRIEVE",	263,
	"IGNORE",	264,
	"REMEMBER",	265,
	"ABSTAIN",	266,
	"REINSTATE",	267,
	"DISABLE",	268,
	"ENABLE",	269,
	"GIVE_UP",	270,
	"READ_OUT",	271,
	"WRITE_IN",	272,
	"COME_FROM",	273,
	"DO",	274,
	"PLEASE",	275,
	"NOT",	276,
	"MESH", 277,
	"ONESPOT",	278,
	"TWOSPOT",	279,
	"TAIL", 280,
	"HYBRID",	281,
	"MINGLE",	282,
	"SELECT",	283,
	"SPARK",	284,
	"EARS", 285,
	"SUB",	286,
	"BY",	287,
	"BADCHAR",	288,
	"NUMBER",	289,
	"UNARY",	290,
	"OHOHSEVEN",	291,
	"GERUND",	292,
	"LABEL",	293,
	"INTERSECTION", 294,
	"SPLATTERED",	295,
	"TESTNZ",	296,
	"EQUALS",	297,
	"AND",	298,
	"OR",	299,
	"XOR",	300,
	"FIN",	301,
	"MESH32",	302,
	"WHIRL",	303,
	"WHIRL2",	304,
	"WHIRL3",	305,
	"WHIRL4",	306,
	"WHIRL5",	307,
	"HIGHPREC",	308,
	"-unknown-",	-1	/* ends search */
};

__YYSCLASS char * yyreds[] =
{
	"-no such reduction-",
	"program : /* empty */",
	"program : program statemnt",
	"statemnt : command",
	"statemnt : error",
	"command : please perform",
	"command : please OHOHSEVEN perform",
	"command : LABEL please perform",
	"command : LABEL please OHOHSEVEN perform",
	"please : DO",
	"please : DO NOT",
	"perform : lvalue GETS expr",
	"perform : array GETS byexpr",
	"perform : LABEL NEXT",
	"perform : FORGET expr",
	"perform : RESUME expr",
	"perform : STASH varlist",
	"perform : RETRIEVE varlist",
	"perform : IGNORE varlist",
	"perform : REMEMBER varlist",
	"perform : ABSTAIN LABEL",
	"perform : ABSTAIN gerunds",
	"perform : REINSTATE LABEL",
	"perform : REINSTATE gerunds",
	"perform : WRITE_IN inlist",
	"perform : READ_OUT outlist",
	"perform : GIVE_UP",
	"perform : COME_FROM LABEL",
	"perform : error",
	"gerunds : GERUND",
	"gerunds : gerunds INTERSECTION GERUND",
	"variable : scalar",
	"variable : array",
	"lvalue : scalar",
	"lvalue : subscr",
	"scalar : ONESPOT NUMBER",
	"scalar : TWOSPOT NUMBER",
	"array : TAIL NUMBER",
	"array : HYBRID NUMBER",
	"oparray : TAIL UNARY NUMBER",
	"oparray : HYBRID UNARY NUMBER",
	"constant : MESH NUMBER",
	"varlist : variable",
	"varlist : varlist INTERSECTION variable",
	"initem : scalar",
	"initem : subscr",
	"initem : array",
	"inlist : initem INTERSECTION inlist",
	"inlist : initem",
	"outitem : scalar",
	"outitem : subscr",
	"outitem : constant",
	"outitem : array",
	"outlist : outitem INTERSECTION outlist",
	"outlist : outitem",
	"byexpr : expr BY byexpr",
	"byexpr : expr",
	"subscr : subscr1",
	"subscr : array SUB sublist",
	"subscr1 : array SUB sublist1",
	"sublist : unambig sublist",
	"sublist : unambig sublist1",
	"sublist1 : subscr1",
	"sublist1 : osubscr1",
	"sublist1 : unambig",
	"osubscr : osubscr1",
	"osubscr : oparray SUB sublist",
	"osubscr1 : oparray SUB sublist1",
	"expr : unambig",
	"expr : unambig SELECT unambig",
	"expr : unambig SELECT subscr",
	"expr : unambig SELECT osubscr",
	"expr : unambig MINGLE unambig",
	"expr : unambig MINGLE subscr",
	"expr : unambig MINGLE osubscr",
	"expr : subscr",
	"expr : osubscr",
	"preftype : MESH",
	"preftype : ONESPOT",
	"preftype : TWOSPOT",
	"unambig : variable",
	"unambig : constant",
	"unambig : preftype UNARY NUMBER",
	"unambig : SPARK UNARY expr SPARK",
	"unambig : EARS UNARY expr EARS",
	"unambig : SPARK expr SPARK",
	"unambig : EARS expr EARS",
};
#endif /* YYDEBUG */
#define YYFLAG	(-3000)
/* @(#) $Revision: 66.3 $ */	

/*
** Skeleton parser driver for yacc output
*/

#if defined(NLS) && !defined(NL_SETN)
#include <msgbuf.h>
#endif

#ifndef nl_msg
#define nl_msg(i,s) (s)
#endif

/*
** yacc user known macros and defines
*/
#define YYERROR 	goto yyerrlab

#ifndef __RUNTIME_YYMAXDEPTH
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#else
#define YYACCEPT	{free_stacks(); return(0);}
#define YYABORT 	{free_stacks(); return(1);}
#endif

#define YYBACKUP( newtoken, newvalue )\
{\
	if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
	{\
		yyerror( (nl_msg(30001,"syntax error - cannot backup")) );\
		goto yyerrlab;\
	}\
	yychar = newtoken;\
	yystate = *yyps;\
	yylval = newvalue;\
	goto yynewstate;\
}
#define YYRECOVERING()	(!!yyerrflag)
#ifndef YYDEBUG
#	define YYDEBUG	1	/* make debugging available */
#endif

/*
** user known globals
*/
int yydebug;			/* set to 1 to get debugging */

/*
** driver internal defines
*/
/* define for YYFLAG now generated by yacc program. */
/*#define YYFLAG		(FLAGVAL)*/

/*
** global variables used by the parser
*/
# ifndef __RUNTIME_YYMAXDEPTH
__YYSCLASS YYSTYPE yyv[ YYMAXDEPTH ];	/* value stack */
__YYSCLASS int yys[ YYMAXDEPTH ];		/* state stack */
# else
__YYSCLASS YYSTYPE *yyv;			/* pointer to malloc'ed value stack */
__YYSCLASS int *yys;			/* pointer to malloc'ed stack stack */
#ifdef __cplusplus
	extern char *malloc(int);
	extern char *realloc(char *, int);
	extern void free();
# else
	extern char *malloc();
	extern char *realloc();
	extern void free();
# endif /* __cplusplus */
static int allocate_stacks(); 
static void free_stacks();
# ifndef YYINCREMENT
# define YYINCREMENT (YYMAXDEPTH/2) + 10
# endif
# endif /* __RUNTIME_YYMAXDEPTH */
long  yymaxdepth = YYMAXDEPTH;

__YYSCLASS YYSTYPE *yypv;			/* top of value stack */
__YYSCLASS int *yyps;			/* top of state stack */

__YYSCLASS int yystate; 		/* current state */
__YYSCLASS int yytmp;			/* extra var (lasts between blocks) */

int yynerrs;			/* number of errors */
__YYSCLASS int yyerrflag;			/* error recovery flag */
int yychar;			/* current input token number */



/*
** yyparse - return 0 if worked, 1 if syntax error not recovered from
*/
int
yyparse()
{
	register YYSTYPE *yypvt;	/* top of value stack for $vars */

	/*
	** Initialize externals - yyparse may be called more than once
	*/
# ifdef __RUNTIME_YYMAXDEPTH
	if (allocate_stacks()) YYABORT;
# endif
	yypv = &yyv[-1];
	yyps = &yys[-1];
	yystate = 0;
	yytmp = 0;
	yynerrs = 0;
	yyerrflag = 0;
	yychar = -1;

	goto yystack;
	{
		register YYSTYPE *yy_pv;	/* top of value stack */
		register int *yy_ps;		/* top of state stack */
		register int yy_state;		/* current state */
		register int  yy_n;		/* internal state number info */

		/*
		** get globals into registers.
		** branch to here only if YYBACKUP was called.
		*/
	yynewstate:
		yy_pv = yypv;
		yy_ps = yyps;
		yy_state = yystate;
		goto yy_newstate;

		/*
		** get globals into registers.
		** either we just started, or we just finished a reduction
		*/
	yystack:
		yy_pv = yypv;
		yy_ps = yyps;
		yy_state = yystate;

		/*
		** top of for (;;) loop while no reductions done
		*/
	yy_stack:
		/*
		** put a state and value onto the stacks
		*/
#if YYDEBUG
		/*
		** if debugging, look up token value in list of value vs.
		** name pairs.	0 and negative (-1) are special values.
		** Note: linear search is used since time is not a real
		** consideration while debugging.
		*/
		if ( yydebug )
		{
			register int yy_i;

			printf( "State %d, token ", yy_state );
			if ( yychar == 0 )
				printf( "end-of-file\n" );
			else if ( yychar < 0 )
				printf( "-none-\n" );
			else
			{
				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
					yy_i++ )
				{
					if ( yytoks[yy_i].t_val == yychar )
						break;
				}
				printf( "%s\n", yytoks[yy_i].t_name );
			}
		}
#endif /* YYDEBUG */
		if ( ++yy_ps >= &yys[ yymaxdepth ] )	/* room on stack? */
		{
# ifndef __RUNTIME_YYMAXDEPTH
			yyerror( (nl_msg(30002,"yacc stack overflow")) );
			YYABORT;
# else
			/* save old stack bases to recalculate pointers */
			YYSTYPE * yyv_old = yyv;
			int * yys_old = yys;
			yymaxdepth += YYINCREMENT;
			yys = (int *) realloc(yys, yymaxdepth * sizeof(int));
			yyv = (YYSTYPE *) realloc(yyv, yymaxdepth * sizeof(YYSTYPE));
			if (yys==0 || yyv==0) {
			    yyerror( (nl_msg(30002,"yacc stack overflow")) );
			    YYABORT;
			    }
			/* Reset pointers into stack */
			yy_ps = (yy_ps - yys_old) + yys;
			yyps = (yyps - yys_old) + yys;
			yy_pv = (yy_pv - yyv_old) + yyv;
			yypv = (yypv - yyv_old) + yyv;
# endif

		}
		*yy_ps = yy_state;
		*++yy_pv = yyval;

		/*
		** we have a new state - find out what to do
		*/
	yy_newstate:
		if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
			goto yydefault; 	/* simple state */
#if YYDEBUG
		/*
		** if debugging, need to mark whether new token grabbed
		*/
		yytmp = yychar < 0;
#endif
		if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
			yychar = 0;		/* reached EOF */
#if YYDEBUG
		if ( yydebug && yytmp )
		{
			register int yy_i;

			printf( "Received token " );
			if ( yychar == 0 )
				printf( "end-of-file\n" );
			else if ( yychar < 0 )
				printf( "-none-\n" );
			else
			{
				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
					yy_i++ )
				{
					if ( yytoks[yy_i].t_val == yychar )
						break;
				}
				printf( "%s\n", yytoks[yy_i].t_name );
			}
		}
#endif /* YYDEBUG */
		if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
			goto yydefault;
		if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar )	/*valid shift*/
		{
			yychar = -1;
			yyval = yylval;
			yy_state = yy_n;
			if ( yyerrflag > 0 )
				yyerrflag--;
			goto yy_stack;
		}

	yydefault:
		if ( ( yy_n = yydef[ yy_state ] ) == -2 )
		{
#if YYDEBUG
			yytmp = yychar < 0;
#endif
			if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
				yychar = 0;		/* reached EOF */
#if YYDEBUG
			if ( yydebug && yytmp )
			{
				register int yy_i;

				printf( "Received token " );
				if ( yychar == 0 )
					printf( "end-of-file\n" );
				else if ( yychar < 0 )
					printf( "-none-\n" );
				else
				{
					for ( yy_i = 0;
						yytoks[yy_i].t_val >= 0;
						yy_i++ )
					{
						if ( yytoks[yy_i].t_val
							== yychar )
						{
							break;
						}
					}
					printf( "%s\n", yytoks[yy_i].t_name );
				}
			}
#endif /* YYDEBUG */
			/*
			** look through exception table
			*/
			{
				register int *yyxi = yyexca;

				while ( ( *yyxi != -1 ) ||
					( yyxi[1] != yy_state ) )
				{
					yyxi += 2;
				}
				while ( ( *(yyxi += 2) >= 0 ) &&
					( *yyxi != yychar ) )
					;
				if ( ( yy_n = yyxi[1] ) < 0 )
					YYACCEPT;
			}
		}

		/*
		** check for syntax error
		*/
		if ( yy_n == 0 )	/* have an error */
		{
			/* no worry about speed here! */
			switch ( yyerrflag )
			{
			case 0: 	/* new error */
				yyerror( (nl_msg(30003,"syntax error")) );
				yynerrs++;
				goto skip_init;
			yyerrlab:
				/*
				** get globals into registers.
				** we have a user generated syntax type error
				*/
				yy_pv = yypv;
				yy_ps = yyps;
				yy_state = yystate;
				yynerrs++;
			skip_init:
			case 1:
			case 2: 	/* incompletely recovered error */
					/* try again... */
				yyerrflag = 3;
				/*
				** find state where "error" is a legal
				** shift action
				*/
				while ( yy_ps >= yys )
				{
					yy_n = yypact[ *yy_ps ] + YYERRCODE;
					if ( yy_n >= 0 && yy_n < YYLAST &&
						yychk[yyact[yy_n]] == YYERRCODE)					{
						/*
						** simulate shift of "error"
						*/
						yy_state = yyact[ yy_n ];
						goto yy_stack;
					}
					/*
					** current state has no shift on
					** "error", pop stack
					*/
#if YYDEBUG
#	define _POP_ "Error recovery pops state %d, uncovers state %d\n"
					if ( yydebug )
						printf( _POP_, *yy_ps,
							yy_ps[-1] );
#	undef _POP_
#endif
					yy_ps--;
					yy_pv--;
				}
				/*
				** there is no state on stack with "error" as
				** a valid shift.  give up.
				*/
				YYABORT;
			case 3: 	/* no shift yet; eat a token */
#if YYDEBUG
				/*
				** if debugging, look up token in list of
				** pairs.  0 and negative shouldn't occur,
				** but since timing doesn't matter when
				** debugging, it doesn't hurt to leave the
				** tests here.
				*/
				if ( yydebug )
				{
					register int yy_i;

					printf( "Error recovery discards " );
					if ( yychar == 0 )
						printf( "token end-of-file\n" );
					else if ( yychar < 0 )
						printf( "token -none-\n" );
					else
					{
						for ( yy_i = 0;
							yytoks[yy_i].t_val >= 0;
							yy_i++ )
						{
							if ( yytoks[yy_i].t_val
								== yychar )
							{
								break;
							}
						}
						printf( "token %s\n",
							yytoks[yy_i].t_name );
					}
				}
#endif /* YYDEBUG */
				if ( yychar == 0 )	/* reached EOF. quit */
					YYABORT;
				yychar = -1;
				goto yy_newstate;
			}
		}/* end if ( yy_n == 0 ) */
		/*
		** reduction by production yy_n
		** put stack tops, etc. so things right after switch
		*/
#if YYDEBUG
		/*
		** if debugging, print the string that is the user's
		** specification of the reduction which is just about
		** to be done.
		*/
		if ( yydebug )
			printf( "Reduce by (%d) \"%s\"\n",
				yy_n, yyreds[ yy_n ] );
#endif
		yytmp = yy_n;			/* value to switch over */
		yypvt = yy_pv;			/* $vars top of value stack */
		/*
		** Look in goto table for next state
		** Sorry about using yy_state here as temporary
		** register variable, but why not, if it works...
		** If yyr2[ yy_n ] doesn't have the low order bit
		** set, then there is no action to be done for
		** this reduction.  So, no saving & unsaving of
		** registers done.  The only difference between the
		** code just after the if and the body of the if is
		** the goto yy_stack in the body.  This way the test
		** can be made before the choice of what to do is needed.
		*/
		{
			/* length of production doubled with extra bit */
			register int yy_len = yyr2[ yy_n ];

			if ( !( yy_len & 01 ) )
			{
				yy_len >>= 1;
				yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
				yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
					*( yy_ps -= yy_len ) + 1;
				if ( yy_state >= YYLAST ||
					yychk[ yy_state =
					yyact[ yy_state ] ] != -yy_n )
				{
					yy_state = yyact[ yypgo[ yy_n ] ];
				}
				goto yy_stack;
			}
			yy_len >>= 1;
			yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
			yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
				*( yy_ps -= yy_len ) + 1;
			if ( yy_state >= YYLAST ||
				yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
			{
				yy_state = yyact[ yypgo[ yy_n ] ];
			}
		}
					/* save until reenter driver code */
		yystate = yy_state;
		yyps = yy_ps;
		yypv = yy_pv;
	}
	/*
	** code supplied by user is placed in this switch
	*/
	switch( yytmp )
	{
		
case 4:
# line 84 "ick.y"
{splat(); lose(E017, yylineno,(char *)NULL);} break;
case 5:
# line 94 "ick.y"
{yypvt[-0].tuple->label = 0; yypvt[-0].tuple->exechance = yypvt[-1].numval * 100;} break;
case 6:
# line 96 "ick.y"
{yypvt[-0].tuple->label = 0; yypvt[-0].tuple->exechance = yypvt[-2].numval * yypvt[-1].numval;} break;
case 7:
# line 98 "ick.y"
{yypvt[-0].tuple->label = yypvt[-2].numval; yypvt[-0].tuple->exechance = yypvt[-1].numval * 100;} break;
case 8:
# line 100 "ick.y"
{yypvt[-0].tuple->label = yypvt[-3].numval; yypvt[-0].tuple->exechance = yypvt[-2].numval * yypvt[-1].numval;} break;
case 9:
# line 104 "ick.y"
{yyval.numval = 1;} break;
case 10:
# line 105 "ick.y"
{yyval.numval = -1;} break;
case 11:
# line 109 "ick.y"
{ACTION(yyval.tuple, GETS,cons(GETS,yypvt[-2].node,yypvt[-0].node));} break;
case 12:
# line 110 "ick.y"
{ACTION(yyval.tuple,RESIZE,cons(RESIZE,yypvt[-2].node,yypvt[-0].node));} break;
case 13:
# line 111 "ick.y"
{TARGET(yyval.tuple, NEXT,      yypvt[-1].numval);} break;
case 14:
# line 112 "ick.y"
{ACTION(yyval.tuple, FORGET,    yypvt[-0].node);} break;
case 15:
# line 113 "ick.y"
{ACTION(yyval.tuple, RESUME,    yypvt[-0].node);} break;
case 16:
# line 114 "ick.y"
{ACTION(yyval.tuple, STASH,     rlist);} break;
case 17:
# line 115 "ick.y"
{ACTION(yyval.tuple, RETRIEVE,  rlist);} break;
case 18:
# line 116 "ick.y"
{ACTION(yyval.tuple, IGNORE,    rlist);} break;
case 19:
# line 117 "ick.y"
{ACTION(yyval.tuple, REMEMBER,  rlist);} break;
case 20:
# line 118 "ick.y"
{TARGET(yyval.tuple, ABSTAIN,   yypvt[-0].numval);} break;
case 21:
# line 119 "ick.y"
{ACTION(yyval.tuple, DISABLE,   rlist);} break;
case 22:
# line 120 "ick.y"
{TARGET(yyval.tuple, REINSTATE, yypvt[-0].numval);} break;
case 23:
# line 121 "ick.y"
{ACTION(yyval.tuple, ENABLE,    rlist);} break;
case 24:
# line 122 "ick.y"
{ACTION(yyval.tuple, WRITE_IN,  yypvt[-0].node);} break;
case 25:
# line 123 "ick.y"
{ACTION(yyval.tuple, READ_OUT,  yypvt[-0].node);} break;
case 26:
# line 124 "ick.y"
{ACTION(yyval.tuple, GIVE_UP,   0);} break;
case 27:
# line 125 "ick.y"
{NEWFANGLED {TARGET(yyval.tuple,COME_FROM,yypvt[-0].numval)}} break;
case 28:
# line 126 "ick.y"
{yyval.tuple=splat();} break;
case 29:
# line 131 "ick.y"
{rlist = np = newnode(); np->constant = yypvt[-0].numval;} break;
case 30:
# line 133 "ick.y"
{
		    np->rval = newnode();
		    np = np->rval;
		    np->constant = yypvt[-0].numval;
		} break;
case 35:
# line 146 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = ONESPOT;
		    yyval.node->constant = intern(ONESPOT, yypvt[-0].numval);
		} break;
case 36:
# line 152 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = TWOSPOT;
		    yyval.node->constant = intern(TWOSPOT, yypvt[-0].numval);
		} break;
case 37:
# line 160 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = TAIL;
		    yyval.node->constant = intern(TAIL, yypvt[-0].numval);
		} break;
case 38:
# line 166 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = HYBRID;
		    yyval.node->constant = intern(HYBRID, yypvt[-0].numval);
		} break;
case 39:
# line 176 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = yypvt[-1].numval;
		    yyval.node->rval = newnode();
		    yyval.node->rval->opcode = TAIL;
		    yyval.node->rval->constant = intern(TAIL, yypvt[-0].numval);
		} break;
case 40:
# line 184 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = yypvt[-1].numval;
		    yyval.node->rval = newnode();
		    yyval.node->rval->opcode = HYBRID;
		    yyval.node->rval->constant = intern(HYBRID, yypvt[-0].numval);
		} break;
case 41:
# line 195 "ick.y"
{
		    /* enforce the 16-bit constant constraint */
		    if (yypvt[-0].numval > Max_small)
			lose(E017, yylineno, (char *)NULL);
		    yyval.node = newnode();
		    yyval.node->opcode = MESH;
		    yyval.node->constant = yypvt[-0].numval;
		} break;
case 42:
# line 206 "ick.y"
{rlist = np = yypvt[-0].node;} break;
case 43:
# line 207 "ick.y"
{np = np->rval = yypvt[-0].node;
							/* newnode(); */ } break;
case 47:
# line 214 "ick.y"
{yyval.node=cons(INTERSECTION,yypvt[-2].node,yypvt[-0].node);} break;
case 48:
# line 215 "ick.y"
{yyval.node=cons(INTERSECTION,yypvt[-0].node,0);} break;
case 53:
# line 220 "ick.y"
{yyval.node=cons(INTERSECTION,yypvt[-2].node,yypvt[-0].node);} break;
case 54:
# line 221 "ick.y"
{yyval.node=cons(INTERSECTION,yypvt[-0].node,0);} break;
case 55:
# line 227 "ick.y"
{yyval.node = cons(BY, yypvt[-2].node, yypvt[-0].node);} break;
case 56:
# line 228 "ick.y"
{yyval.node = cons(BY, yypvt[-0].node, 0);} break;
case 57:
# line 232 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 58:
# line 233 "ick.y"
{yyval.node = cons(SUB, yypvt[-2].node, yypvt[-0].node);} break;
case 59:
# line 235 "ick.y"
{yyval.node = cons(SUB, yypvt[-2].node, yypvt[-0].node);} break;
case 60:
# line 237 "ick.y"
{yyval.node = cons(INTERSECTION, yypvt[-1].node, yypvt[-0].node);} break;
case 61:
# line 238 "ick.y"
{yyval.node = cons(INTERSECTION, yypvt[-1].node, yypvt[-0].node);} break;
case 62:
# line 240 "ick.y"
{yyval.node = cons(INTERSECTION, yypvt[-0].node, 0);} break;
case 63:
# line 241 "ick.y"
{yyval.node = cons(INTERSECTION, yypvt[-0].node, 0);} break;
case 64:
# line 242 "ick.y"
{yyval.node = cons(INTERSECTION, yypvt[-0].node, 0);} break;
case 65:
# line 246 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 66:
# line 248 "ick.y"
{yyval.node = yypvt[-2].node; yyval.node->rval = cons(SUB, yyval.node->rval, yypvt[-0].node);} break;
case 67:
# line 251 "ick.y"
{yyval.node = yypvt[-2].node; yyval.node->rval = cons(SUB, yyval.node->rval, yypvt[-0].node);} break;
case 68:
# line 255 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 69:
# line 256 "ick.y"
{yyval.node = cons(SELECT, yypvt[-2].node, yypvt[-0].node);} break;
case 70:
# line 257 "ick.y"
{yyval.node = cons(SELECT, yypvt[-2].node, yypvt[-0].node);} break;
case 71:
# line 258 "ick.y"
{yyval.node = cons(SELECT, yypvt[-2].node, yypvt[-0].node);} break;
case 72:
# line 259 "ick.y"
{yyval.node = cons(MINGLE, yypvt[-2].node, yypvt[-0].node);} break;
case 73:
# line 260 "ick.y"
{yyval.node = cons(MINGLE, yypvt[-2].node, yypvt[-0].node);} break;
case 74:
# line 261 "ick.y"
{yyval.node = cons(MINGLE, yypvt[-2].node, yypvt[-0].node);} break;
case 75:
# line 262 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 76:
# line 263 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 77:
# line 266 "ick.y"
{yyval.numval=MESH; } break;
case 78:
# line 266 "ick.y"
{yyval.numval=ONESPOT;} break;
case 79:
# line 266 "ick.y"
{yyval.numval=TWOSPOT;} break;
case 80:
# line 268 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 81:
# line 269 "ick.y"
{yyval.node = yypvt[-0].node;} break;
case 82:
# line 273 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = yypvt[-1].numval;
		    yyval.node->rval = newnode();
		    yyval.node->rval->opcode = yypvt[-2].numval;
		    if(yypvt[-2].numval == MESH) {
			    /* enforce the 16-bit constant constraint */
			    if (yypvt[-0].numval > Max_small)
				lose(E017, yylineno, (char *)NULL);
			    yyval.node->rval->constant = yypvt[-0].numval;
		    }
		    else {
			yyval.node->rval->constant = intern(yypvt[-2].numval, yypvt[-0].numval);
		    }
		} break;
case 83:
# line 291 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = yypvt[-2].numval;
		    yyval.node->rval = yypvt[-1].node;
		} break;
case 84:
# line 297 "ick.y"
{
		    yyval.node = newnode();
		    yyval.node->opcode = yypvt[-2].numval;
		    yyval.node->rval = yypvt[-1].node;
		} break;
case 85:
# line 303 "ick.y"
{yyval.node = yypvt[-1].node;} break;
case 86:
# line 304 "ick.y"
{yyval.node = yypvt[-1].node;} break;
	}
	goto yystack;		/* reset registers in driver code */
}

# ifdef __RUNTIME_YYMAXDEPTH

static int allocate_stacks() {
	/* allocate the yys and yyv stacks */
	yys = (int *) malloc(yymaxdepth * sizeof(int));
	yyv = (YYSTYPE *) malloc(yymaxdepth * sizeof(YYSTYPE));

	if (yys==0 || yyv==0) {
	   yyerror( (nl_msg(30004,"unable to allocate space for yacc stacks")) );
	   return(1);
	   }
	else return(0);

}


static void free_stacks() {
	if (yys!=0) free((char *) yys);
	if (yyv!=0) free((char *) yyv);
}

# endif  /* defined(__RUNTIME_YYMAXDEPTH) */
