# define PROGRAM 257
# define END 258
# define VAR 259
# define INTEGER 260
# define REAL 261
# define CHAR 262
# define BOOLEAN 263
# define IDENTIFIER 264
# define PROCEDURE 265
# define BEGIN 266
# define IF 267
# define THEN 268
# define ENDIF 269
# define ELSE 270
# define OR 271
# define AND 272
# define LEQ 273
# define GEG 274
# define NEW 275
# define REALVAL 276
# define INTEGERVAL 277
# define CHARVAL 278
# define BOOLVAL 279
# define GEQ 280
# define NEQ 281

#ifdef __STDC__
#include <stdlib.h>
#include <string.h>
#else
#include <malloc.h>
#include <memory.h>
#endif

#include <values.h>

#ifdef __cplusplus

#ifndef yyerror
	void yyerror(const char *);
#endif

#ifndef yylex
#ifdef __EXTERN_C__
	extern "C" { int yylex(void); }
#else
	int yylex(void);
#endif
#endif
	int yyparse(void);

#endif
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar;
extern int yyerrflag;
#ifndef YYSTYPE
#define YYSTYPE int
#endif
YYSTYPE yylval;
YYSTYPE yyval;
typedef int yytabelem;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif
#if YYMAXDEPTH > 0
int yy_yys[YYMAXDEPTH], *yys = yy_yys;
YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv;
#else	/* user does initial allocation */
int *yys;
YYSTYPE *yyv;
#endif
static int yymaxdepth = YYMAXDEPTH;
# define YYERRCODE 256
static const yytabelem yyexca[] ={
-1, 1,
	0, -1,
	-2, 0,
-1, 21,
	59, 24,
	-2, 22,
	};
# define YYNPROD 60
# define YYLAST 267
static const yytabelem yyact[]={

    85,    62,    59,    22,    60,    98,    63,    62,    59,    41,
    60,    42,    63,    62,    59,    17,    60,    30,    63,    53,
    55,    54,    92,    93,     7,    53,    55,    54,    19,    87,
     8,    53,    55,    54,    62,    59,    62,    60,    20,    63,
    12,    63,     2,    13,    68,    69,    70,    71,    28,    75,
     9,    46,    11,    40,    67,    21,    16,    14,    90,    38,
    89,    79,    39,    48,    94,    88,    78,    65,    43,    23,
    11,    15,    44,    32,     3,    31,    47,    24,    52,    51,
    50,    27,    26,    25,    10,    76,    45,    18,    16,    37,
     6,    11,    77,    74,    66,     5,    73,     4,    11,     1,
    80,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,    72,     0,     0,    81,    82,    83,    84,     0,     0,
     0,     0,     0,     0,     0,     0,     0,    86,     0,     0,
     0,    91,     0,     0,     0,     0,     0,     0,    77,    95,
     0,     0,    11,     0,    97,    96,     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,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,    42,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    61,    64,    56,    49,     0,     0,    61,    64,    56,    57,
    58,    29,    61,    64,    56,    57,    58,     0,     0,     0,
     0,    57,    58,    35,    36,    33,    34,     0,     0,     0,
     0,     0,     0,    61,    64,     0,    64 };
static const yytabelem yypact[]={

  -215,-10000000,  -235,  -224,    -2,-10000000,-10000000,  -249,  -236,  -220,
    -4,  -279,    29,   -23,  -235,     1,    18,-10000000,   -49,    28,
-10000000,  -224,   -23,   -23,   -35,-10000000,-10000000,-10000000,-10000000,    27,
   -23,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,  -216,  -249,
-10000000,  -216,  -224,  -249,-10000000,   -29,    25,    17,   -29,  -224,
   -23,   -23,   -23,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
-10000000,-10000000,-10000000,-10000000,-10000000,   -23,   -41,-10000000,-10000000,-10000000,
-10000000,-10000000,-10000000,  -255,  -229,    24,    16,     0,-10000000,   -23,
  -247,    -8,    -6,-10000000,    23,-10000000,-10000000,-10000000,-10000000,  -249,
  -216,-10000000,-10000000,  -224,-10000000,-10000000,-10000000,  -264,-10000000 };
static const yytabelem yypgo[]={

     0,    99,    74,    50,    97,    95,    90,    71,    54,    48,
    87,    53,    49,    85,    84,    63,    51,    83,    82,    81,
    80,    79,    78,    76,    75,    73 };
static const yytabelem yyr1[]={

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

     0,     9,     1,     7,     3,     3,     9,     3,     3,     3,
     3,     3,     7,     3,     7,    11,     9,     1,     3,     7,
     7,     7,     5,     7,     0,     7,     9,    11,    15,     3,
     3,     3,     3,     9,     7,     7,     7,     7,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     1,     3,     7,     3,     3,     3,     3,     3,     3,     3 };
static const yytabelem yychk[]={

-10000000,    -1,   257,    -2,    -4,    -5,    -6,   259,   265,    -3,
   -14,    -9,   264,   267,    59,    -7,    -9,   264,   -10,   264,
   258,    59,   282,    40,   -15,   -17,   -18,   -19,    -9,   264,
    40,   -24,   -25,   278,   279,   276,   277,    -2,    58,    44,
   -11,    58,   266,    40,    -3,   -15,   -16,   -23,   -15,   268,
   -20,   -21,   -22,    60,    62,    61,   273,   280,   281,    43,
    45,   271,    42,    47,   272,    40,   -15,    -8,   260,   261,
   262,   263,    -7,    -8,    -3,   -12,   -13,    -9,    41,    44,
    -3,   -15,   -15,   -15,   -16,    41,   -11,   258,    41,    44,
    58,   -16,   269,   270,    41,   -12,    -8,    -3,   269 };
static const yytabelem yydef[]={

     0,    -2,     2,    24,     0,     4,     5,     0,     0,     0,
     0,     0,    13,     0,     2,     0,    11,    13,     0,     0,
     1,    -2,     0,    50,     0,    29,    30,    31,    32,    13,
     0,    54,    55,    58,    59,    56,    57,     3,     0,     0,
    14,     0,    24,    17,    23,    25,     0,    51,    53,    24,
     0,     0,     0,    44,    45,    46,    47,    48,    49,    38,
    39,    40,    41,    42,    43,    50,     0,     6,     7,     8,
     9,    10,    12,     0,     0,     0,    18,     0,    26,    50,
     0,    34,    35,    36,     0,    37,    15,    21,    16,    17,
     0,    52,    27,    24,    33,    19,    20,     0,    28 };
typedef struct
#ifdef __cplusplus
	yytoktype
#endif
{ char *t_name; int t_val; } yytoktype;
#ifndef YYDEBUG
#	define YYDEBUG	0	/* don't allow debugging */
#endif

#if YYDEBUG

yytoktype yytoks[] =
{
	"PROGRAM",	257,
	"END",	258,
	"VAR",	259,
	"INTEGER",	260,
	"REAL",	261,
	"CHAR",	262,
	"BOOLEAN",	263,
	"IDENTIFIER",	264,
	"PROCEDURE",	265,
	"BEGIN",	266,
	"IF",	267,
	"THEN",	268,
	"ENDIF",	269,
	"ELSE",	270,
	"OR",	271,
	"AND",	272,
	"LEQ",	273,
	"GEG",	274,
	"NEW",	275,
	"REALVAL",	276,
	"INTEGERVAL",	277,
	"CHARVAL",	278,
	"BOOLVAL",	279,
	"=",	61,
	"<",	60,
	">",	62,
	"GEQ",	280,
	"NEQ",	281,
	"+",	43,
	"-",	45,
	"*",	42,
	"/",	47,
	"-unknown-",	-1	/* ends search */
};

char * yyreds[] =
{
	"-no such reduction-",
	"program : PROGRAM decls stmts END",
	"decls : /* empty */",
	"decls : decl ';' decls",
	"decl : vardecl",
	"decl : procdecl",
	"vardecl : VAR vars ':' type",
	"type : INTEGER",
	"type : REAL",
	"type : CHAR",
	"type : BOOLEAN",
	"vars : var",
	"vars : var ',' vars",
	"var : IDENTIFIER",
	"procdecl : PROCEDURE prochdr procbody",
	"procdecl : PROCEDURE prochdr ':' type procbody",
	"prochdr : IDENTIFIER '(' formals ')'",
	"formals : /* empty */",
	"formals : formal",
	"formals : formal ',' formals",
	"formal : var ':' type",
	"procbody : BEGIN stmts END",
	"stmts : stmt ';'",
	"stmts : stmt ';' stmts",
	"stmt : /* empty */",
	"stmt : var ':=' expr",
	"stmt : IDENTIFIER '(' actuals ')'",
	"stmt : IF expr THEN stmts ENDIF",
	"stmt : IF expr THEN stmts ELSE stmts ENDIF",
	"expr : number",
	"expr : char",
	"expr : bool",
	"expr : var",
	"expr : IDENTIFIER '(' actuals ')'",
	"expr : expr rel_op expr",
	"expr : expr add_op expr",
	"expr : expr mult_op expr",
	"expr : '(' expr ')'",
	"add_op : '+'",
	"add_op : '-'",
	"add_op : OR",
	"mult_op : '*'",
	"mult_op : '/'",
	"mult_op : AND",
	"rel_op : '<'",
	"rel_op : '>'",
	"rel_op : '='",
	"rel_op : LEQ",
	"rel_op : GEQ",
	"rel_op : NEQ",
	"actuals : /* empty */",
	"actuals : actual",
	"actuals : actual ',' actuals",
	"actual : expr",
	"number : real",
	"number : integer",
	"real : REALVAL",
	"integer : INTEGERVAL",
	"char : CHARVAL",
	"bool : BOOLVAL",
};
#endif /* YYDEBUG */
# line	1 "/usr/ccs/bin/yaccpar"
/*
 * Copyright (c) 1993 by Sun Microsystems, Inc.
 */

#pragma ident	"@(#)yaccpar	6.14	97/01/16 SMI"

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

/*
** yacc user known macros and defines
*/
#define YYERROR		goto yyerrlab
#define YYACCEPT	return(0)
#define YYABORT		return(1)
#define YYBACKUP( newtoken, newvalue )\
{\
	if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
	{\
		yyerror( "syntax error - cannot backup" );\
		goto yyerrlab;\
	}\
	yychar = newtoken;\
	yystate = *yyps;\
	yylval = newvalue;\
	goto yynewstate;\
}
#define YYRECOVERING()	(!!yyerrflag)
#define YYNEW(type)	malloc(sizeof(type) * yynewmax)
#define YYCOPY(to, from, type) \
	(type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type))
#define YYENLARGE( from, type) \
	(type *) realloc((char *) from, yynewmax * sizeof(type))
#ifndef YYDEBUG
#	define YYDEBUG	1	/* make debugging available */
#endif

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

/*
** driver internal defines
*/
#define YYFLAG		(-10000000)

/*
** global variables used by the parser
*/
YYSTYPE *yypv;			/* top of value stack */
int *yyps;			/* top of state stack */

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

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



#ifdef YYNMBCHARS
#define YYLEX()		yycvtok(yylex())
/*
** yycvtok - return a token if i is a wchar_t value that exceeds 255.
**	If i<255, i itself is the token.  If i>255 but the neither 
**	of the 30th or 31st bit is on, i is already a token.
*/
#if defined(__STDC__) || defined(__cplusplus)
int yycvtok(int i)
#else
int yycvtok(i) int i;
#endif
{
	int first = 0;
	int last = YYNMBCHARS - 1;
	int mid;
	wchar_t j;

	if(i&0x60000000){/*Must convert to a token. */
		if( yymbchars[last].character < i ){
			return i;/*Giving up*/
		}
		while ((last>=first)&&(first>=0)) {/*Binary search loop*/
			mid = (first+last)/2;
			j = yymbchars[mid].character;
			if( j==i ){/*Found*/ 
				return yymbchars[mid].tvalue;
			}else if( j<i ){
				first = mid + 1;
			}else{
				last = mid -1;
			}
		}
		/*No entry in the table.*/
		return i;/* Giving up.*/
	}else{/* i is already a token. */
		return i;
	}
}
#else/*!YYNMBCHARS*/
#define YYLEX()		yylex()
#endif/*!YYNMBCHARS*/

/*
** yyparse - return 0 if worked, 1 if syntax error not recovered from
*/
#if defined(__STDC__) || defined(__cplusplus)
int yyparse(void)
#else
int yyparse()
#endif
{
	register YYSTYPE *yypvt = 0;	/* top of value stack for $vars */

#if defined(__cplusplus) || defined(lint)
/*
	hacks to please C++ and lint - goto's inside
	switch should never be executed
*/
	static int __yaccpar_lint_hack__ = 0;
	switch (__yaccpar_lint_hack__)
	{
		case 1: goto yyerrlab;
		case 2: goto yynewstate;
	}
#endif

	/*
	** Initialize externals - yyparse may be called more than once
	*/
	yypv = &yyv[-1];
	yyps = &yys[-1];
	yystate = 0;
	yytmp = 0;
	yynerrs = 0;
	yyerrflag = 0;
	yychar = -1;

#if YYMAXDEPTH <= 0
	if (yymaxdepth <= 0)
	{
		if ((yymaxdepth = YYEXPAND(0)) <= 0)
		{
			yyerror("yacc initialization error");
			YYABORT;
		}
	}
#endif

	{
		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 */
	goto yystack;	/* moved from 6 lines above to here to please C++ */

		/*
		** 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? */
		{
			/*
			** reallocate and recover.  Note that pointers
			** have to be reset, or bad things will happen
			*/
			int yyps_index = (yy_ps - yys);
			int yypv_index = (yy_pv - yyv);
			int yypvt_index = (yypvt - yyv);
			int yynewmax;
#ifdef YYEXPAND
			yynewmax = YYEXPAND(yymaxdepth);
#else
			yynewmax = 2 * yymaxdepth;	/* double table size */
			if (yymaxdepth == YYMAXDEPTH)	/* first time growth */
			{
				char *newyys = (char *)YYNEW(int);
				char *newyyv = (char *)YYNEW(YYSTYPE);
				if (newyys != 0 && newyyv != 0)
				{
					yys = YYCOPY(newyys, yys, int);
					yyv = YYCOPY(newyyv, yyv, YYSTYPE);
				}
				else
					yynewmax = 0;	/* failed */
			}
			else				/* not first time */
			{
				yys = YYENLARGE(yys, int);
				yyv = YYENLARGE(yyv, YYSTYPE);
				if (yys == 0 || yyv == 0)
					yynewmax = 0;	/* failed */
			}
#endif
			if (yynewmax <= yymaxdepth)	/* tables not expanded */
			{
				yyerror( "yacc stack overflow" );
				YYABORT;
			}
			yymaxdepth = yynewmax;

			yy_ps = yys + yyps_index;
			yy_pv = yyv + yypv_index;
			yypvt = yyv + yypvt_index;
		}
		*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 const 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( "syntax error" );
				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;
			skip_init:
				yynerrs++;
				/* FALLTHRU */
			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 1:
# line 252 "sil.rsl.attr"
{yypvt[-2].env = init_env()
                         yypvt[-1].env = yypvt[-2].env`
                         yypvt[-1].store = []
                         yyval.state = if (yypvt[-2].type != error_type) and
                                            (yypvt[-1].type != error_type) then
                                        (yypvt[-2].env`, yypvt[-1].store`)
                                    else
                                        error_state} break;
case 2:
# line 263 "sil.rsl.attr"
{yyval.env` = []
                         yyval.type = "OK"} break;
case 3:
# line 266 "sil.rsl.attr"
{yypvt[-2].env = yyval.env
                         yypvt[-0].env = yypvt[-2].env`
                         yyval.env` = yypvt[-2].env` @ yypvt[-0].env`
                         yyval.type = if (yypvt[-2].type != error_type) and
                                           (yypvt[-0].type != error_type) then
                                       "OK"
                                   else
                                       error_type} break;
case 4:
# line 277 "sil.rsl.attr"
{yyval.env` = yypvt[-0].env`
                         yyval.type = yypvt[-0].type} break;
case 5:
# line 280 "sil.rsl.attr"
{yypvt[-0].env = yyval.env
                         yyval.env` = yypvt[-0].env`
                         yyval.type = yypvt[-0].type} break;
case 6:
# line 286 "sil.rsl.attr"
{yypvt[-2].type = yypvt[-0].type
                         yyval.env` = yypvt[-2].env`
                         yyval.type = yypvt[-0].type} break;
case 7:
# line 292 "sil.rsl.attr"
{yyval.type = "integer"} break;
case 8:
# line 294 "sil.rsl.attr"
{yyval.type = "real"} break;
case 9:
# line 296 "sil.rsl.attr"
{yyval.type = "char"} break;
case 10:
# line 298 "sil.rsl.attr"
{yyval.type = "boolean"} break;
case 11:
# line 302 "sil.rsl.attr"
{yyval.env` = [(yypvt[-0].name, yyval.type)]} break;
case 12:
# line 304 "sil.rsl.attr"
{yypvt[-0].type = yyval.type
                         yyval.env` = [(yypvt[-2].name, yyval.type)] @ yypvt[-0].env`} break;
case 13:
# line 309 "sil.rsl.attr"
{yyval.name = yypvt[-0].name} break;
case 14:
# line 314 "sil.rsl.attr"
{yypvt[-0].env = yypvt[-1].formals @ yyval.env
                         yyval.env` =
                            [(yypvt[-1].name, nil_type, yypvt[-1].formals, yypvt[-0].fun_body)]
                         yyval.type = yypvt[-0].type} break;
case 15:
# line 319 "sil.rsl.attr"
{yypvt[-0].env = yypvt[-3].formals @ [(yypvt[-3].name, yypvt[-1].type)] @ yyval.env
                         yyval.env` =
                            [(yypvt[-3].name, yypvt[-1].type,
                                 yypvt[-3].formals @ [(yypvt[-3].name, yypvt[-1].type)],
                                           /*  ^^^^^^^^^^^^^^^^^^ return val */
                                 yypvt[-0].fun_body)]
                         yyval.type = yypvt[-0].type} break;
case 16:
# line 328 "sil.rsl.attr"
{yyval.name = yypvt[-3].name
                         yyval.formals = yypvt[-1].formals} break;
case 17:
# line 333 "sil.rsl.attr"
{yyval.formals = []} break;
case 18:
# line 335 "sil.rsl.attr"
{yyval.formals = [yypvt[-0].env_binding]} break;
case 19:
# line 337 "sil.rsl.attr"
{yyval.formals = yypvt[-2].env_binding @ yypvt[-0].formals} break;
case 20:
# line 341 "sil.rsl.attr"
{yyval.env_binding = (yypvt[-2].name, yypvt[-0].type)} break;
case 21:
# line 345 "sil.rsl.attr"
{yyval.type = yypvt[-1].type
                         yyval.fun_body = functionize(yypvt[-1],(env,store),store`)} break;
case 22:
# line 350 "sil.rsl.attr"
{yypvt[-1].env = yyval.env
                         yypvt[-1].store = yyval.store
                         yyval.type = yypvt[-1].type
                         yyval.store` = yypvt[-1].store`} break;
case 23:
# line 355 "sil.rsl.attr"
{yypvt[-2].env = yypvt[-0].env = yyval.env
                         yyval.type = if yypvt[-2].(type = "OK") and (yypvt[-0].type = "OK")
                                        then "OK" else error_type
                         yypvt[-2].store = yyval.store
                         yypvt[-0].store = yypvt[-2].store`
                         yyval.store` = yypvt[-0].store`} break;
case 25:
# line 365 "sil.rsl.attr"
{yyval.type = if #2(assoc(yypvt[-2].name, yyval.env)) = yypvt[-0].type
                                        then "OK" else error_type
                         yypvt[-0].store = yyval.store
                         yyval.store` =
                             if (length(yyval.store) > 1) andalso
                                     assoc(yypvt[-2].name, hd(yyval.store)) then
                                 reassign(yypvt[-2],name, yypvt[-0].value, hd(yyval.store)) @
                                     tl(store)
                             else if assoc(yypvt[-2].name, last(yyval.store)) then
                                 butlast(store) @
                                    reassign(yypvt[-2].name, yypvt[-0].value, last(yyval.store))
                             else
                                 butlast(store) @
                                    assign(yypvt[-2].name, yypvt[-0].value, last(yyval.store))} break;
case 26:
# line 380 "sil.rsl.attr"
{yyval.type = if chk_apply(yypvt[-3],name, yypvt[-1].types, yyval.env)
                         yyval.store` = tl(apply(
                             yypvt[-3].name, yypvt[-1].values, yyval.env, yyval.store))} break;
case 27:
# line 384 "sil.rsl.attr"
{yypvt[-3].env = yypvt[-1].env = yyval.env
                         yyval.type = 
                             if yypvt[-3].type = "boolean"
                                 then yypvt[-1].type else error_type
                                                 (* NOTE WEAKNESS HERE *)
                         yypvt[-1].store = yyval.store
                         yyval.store` = if yypvt[-3].value then yypvt[-1].store` else yyval.store} break;
case 28:
# line 392 "sil.rsl.attr"
{yypvt[-5].env = yypvt[-3].env = yypvt[-1].env = yyval.env
                         yyval.type = 
                             if yypvt[-5].type = "boolean"
                                 then if yypvt[-3].type = "OK" and yypvt[-1].type = "OK"
                                      then "OK"
                                      else error_type (* NOTE WEAKNESS HERE *)
                         yypvt[-3].store = yypvt[-1].store = yyval.store
                         yyval.store` = if yypvt[-5].value then yypvt[-3].store` else yypvt[-1].store`} break;
case 29:
# line 403 "sil.rsl.attr"
{yyval.type = yypvt[-0].type
                         yyval.store` = yyval.store
                         yyval.value = yypvt[-0].value} break;
case 30:
# line 407 "sil.rsl.attr"
{yyval.type = yypvt[-0].type
                         yyval.store` = yyval.store
                         yyval.value = yypvt[-0].value} break;
case 31:
# line 411 "sil.rsl.attr"
{yyval.type = yypvt[-0].type
                         yyval.store` = yyval.store
                         yyval.value = yypvt[-0].value} break;
case 32:
# line 415 "sil.rsl.attr"
{yyval.type = 
                             if assoc(yypvt[-0].name, yyval.env) then
                                 #2(assoc(yypvt[-0].name, yyval.env))
                             else
                                 error_type
                         yyval.store` = yyval.store
                         yyval.value = 
                             if (length(yyval.store) > 1) and also
                                    assoc(yypvt[-0].name, hd(yyval.store)) then
                                #2(assoc(yypvt[-0].name, hd(yyval.store)))
                             else if assoc(yypvt[-0].name, last(yyval.store)) then
                                #2(assoc(yypvt[-0].name, last(yyval.store)))
                             else
                                error_value} break;
case 33:
# line 430 "sil.rsl.attr"
{yypvt[-1].env = yyval.env
                         yypvt[-1].store = yyval.store
                         yyval.type = chk_apply(yypvt[-3],name, yypvt[-1].types, yyval.env)
                         yyval.store` = tl(apply(
                             yypvt[-3].name, yypvt[-1].values, yyval.env, yyval.store))
                         yyval.value = last(hd(apply(
                             yypvt[-3].name, yypvt[-1].values, yyval.env, yyval.store)))} break;
case 34:
# line 438 "sil.rsl.attr"
{yypvt[-2].env = yypvt[-0].env = yyval.env
                         yyval.type = 
                             if (yypvt[-2].type = yypvt[-1].type)
                             then yypvt[-2].type
                             else error_type
                         yypvt[-2].store = yyval.store
                         yypvt[-0].store = yypvt[-2].store`   (* NOTE *)
                         yyval.store` = yypvt[-0].store `
                         yyval.value = yypvt[-1].op_fun(yypvt[-2].value, yypvt[-0].value)} break;
case 35:
# line 448 "sil.rsl.attr"
{yypvt[-2].env = yypvt[-0].env = yyval.env
                         yyval.type = 
                             if (yypvt[-2].type = yypvt[-1].type) and
                               ((yypvt[-2].type = "real") or (yypvt[-2].type = "integer"))
                             then yypvt[-2].type
                             else error_type
                         yypvt[-2].store = yyval.store
                         yypvt[-0].store = yypvt[-2].store`
                         yyval.store` = yypvt[-0].store `
                         yyval.value = yypvt[-1].op_fun(yypvt[-2].value, yypvt[-0].value)} break;
case 36:
# line 459 "sil.rsl.attr"
{yypvt[-2].env = yypvt[-0].env = yyval.env
                         yyval.type =
                             if (yypvt[-2].type = yypvt[-1].type) and
                                ((yypvt[-2].type = "real") or (yypvt[-2].type = "integer"))
                             then yypvt[-2].type
                             else error_type
                         yypvt[-2].store = yyval.store
                         yypvt[-0].store = yypvt[-2].store`
                         yyval.store` = yypvt[-0].store `
                         yyval.value = yypvt[-1].op_fun(yypvt[-2].value, yypvt[-0].value)} break;
case 37:
# line 470 "sil.rsl.attr"
{yypvt[-1].env = yyval.env
                         yyval.type = yypvt[-1].type
                         yypvt[-1].store = yyval.store
                         yyval.store` = yypvt[-1].store`
                         yyval.value = yypvt[-1].value} break;
case 38:
# line 477 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 39:
# line 478 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 40:
# line 479 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 41:
# line 483 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 42:
# line 484 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 43:
# line 485 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 44:
# line 488 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 45:
# line 489 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 46:
# line 490 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 47:
# line 491 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 48:
# line 492 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 49:
# line 493 "sil.rsl.attr"
{yyval.op_fun = yypvt[-0].op_fun} break;
case 50:
# line 497 "sil.rsl.attr"
{yyval.types = []
                         yyval.store` = yyval.store
                         yyval.values = []} break;
case 51:
# line 501 "sil.rsl.attr"
{yypvt[-0].env = yyval.env
                         yypvt[-0].store = yyval.store
                         yyval.types = [yypvt[-0].type]
                         yyval.store` = yypvt[-0].store`
                         yyval.values = [yypvt[-0].value]} break;
case 52:
# line 507 "sil.rsl.attr"
{yypvt[-2].env = yypvt[-0].env = yyval.env
                         yypvt[-2].store = yyval.store
                         yypvt[-0].store = yypvt[-2].store`   /* NOTE sequential eval */
                         yyval.store` = yypvt[-0].store`
                         yyval.values = yypvt[-2].value @ yypvt[-0].values} break;
case 53:
# line 515 "sil.rsl.attr"
{yyval.type = yypvt[-0].type
                         yyval.store` = yypvt[-0].store`
                         yyval.value = yypvt[-0].value} break;
case 54:
# line 521 "sil.rsl.attr"
{yyval.type = yypvt[-0].type
                         yyval.value = yypvt[-0].value} break;
case 55:
# line 524 "sil.rsl.attr"
{yyval.type = yypvt[-0].type
                         yyval.value = yypvt[-0].value} break;
case 56:
# line 529 "sil.rsl.attr"
{yyval.type = "real"
                         yyval.value = yypvt[-0].value} break;
case 57:
# line 535 "sil.rsl.attr"
{yyval.type = "integer"
                         yyval.value = yypvt[-0].value} break;
case 58:
# line 541 "sil.rsl.attr"
{yyval.type = "char"
                         yyval.value = yypvt[-0].value} break;
case 59:
# line 547 "sil.rsl.attr"
{yyval.type = "boolean"
                         yyval.value = yypvt[-0].value} break;
# line	531 "/usr/ccs/bin/yaccpar"
	}
	goto yystack;		/* reset registers in driver code */
}