/* KJT 20/01/23: added function prototypes */
int yyparse();
int yyerror (char* mess);

# line 2 "gram.y"
/* Revision 2000/07/00  16:32:00  kjt
   changed YYMAXDEPTH to 512 */

# include "swbus.h"
# define YYMAXDEPTH      512
# define YYSTYPE         yystype
# define putgrn(n)       (void)ITadd(n, gl)
# define class(nt)       { cls= 0; xxc= nt-1;   \
	       for (xc= 0; xc < nt; xc++, xxc--)    \
			     if (stpick(xc)->type != tNULL) \
		 cls += (1 << xxc);}
# define ndput(tp)   { stput(tp);   \
	       if (gn != NULL){gn->value0=  \
		  (CLR_TYPE)IAT_IT_add(gl, grnl); \
		  gl->size= 0;} \
	       gn= (sttype() == tNULL) ? NULL : sttop(); }
# define ndterm(tp, val) { stput (tp);  \
		       staclr (c_lexv, (CLR_TYPE)val.name); \
		       staclr (c_line, (CLR_TYPE)val.line);}

IT* gl;
TNODE*  gn;
int cls;
int xc;
int xxc;

# define QUIT 260
# define LOAD 261
# define XEWRITE 262
# define CHECK 263
# define VAR 264
# define LET 265
# define FREE 266
# define RESETVAR 267
# define IF 268
# define FI 269
# define ELSE 270
# define OF 271
# define DISPLAY 272
# define SORTS 273
# define OPNS 274
# define EQNS 275
# define VARS 276
# define SETDEB 277
# define SPECIAL 278
# define STAT 279
# define WRITE 280
# define STRING 281
# define RESET 282
# define EXEC 283
# define HELP 284
# define RENAME 285
# define IS 286
# define TRACE 287
# define IDENTIFIER 288
# define FILEID 289
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar;
extern short yyerrflag;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif
#ifndef YYSTYPE
#define YYSTYPE int
#endif
YYSTYPE yylval, yyval;
# define YYERRCODE 256

# line 1111 "gram.y"


PRIVATE int
yylex ()
{
    token *tk;

   tk = gtk ();
   yylval = tk->yylval;
   return tk->type;
}

PUBLIC TNODE*
bast ()
{
   gl= ITcreate (4, 2, 1);
   gn= NULL;
   (void)yyparse();
   if (gn != NULL) gn->value0= (CLR_TYPE)IAT_IT_add(gl, grnl);
   return sttop();
}
short yyexca[] ={
-1, 1,
	0, -1,
	-2, 0,
	};
# define YYNPROD 96
# define YYLAST 261
short yyact[]={

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

-1000,-1000,-260,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
-1000,-1000,-1000,-274, -30, -30,-267,-267,  19,-243,
-242,-244,-252,-1000,-274,-267,-267,-267,-267,-267,
-1000,-1000,-262,-231,  18, -30,-1000,-1000, -47,-1000,
  11,-1000,  -8,  10,-1000,-1000, -15, -30,-1000,-1000,
-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-258,-1000,
-1000,  -9,   9,-1000, -10,   8,-1000, -30,-1000,-270,
-1000, -30, -28, -30,-267,-270,-267, -30, -50,-267,
-1000,-270,-267,-1000,-270,-267,-236,-1000,-1000,  15,
   7,-262,-1000,-262,-1000,-1000,-1000,-262, -30,-1000,
-1000,-1000,-1000,-1000,-1000,-270,-1000, -30, -32,-1000,
-262,-1000,-232,-1000,-1000,-230,-1000 };
short yypgo[]={

   0,  42, 119, 118, 117, 116, 115, 114, 113, 112,
 111, 110, 109, 108, 107, 106, 105, 104, 103, 102,
 100,  99,  63,  43,  92,  57,  91,  44,  88,  47,
  87,  86,  83,  82,  81,  80,  79,  78,  45,  77,
  41,  76,  75,  74,  73,  72,  71,  70,  68,  67,
  66,  65,  64,  62,  61,  60 };
short yyr1[]={

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

   0,   0,   2,   1,   1,   1,   1,   1,   1,   1,
   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
   1,   1,   1,   2,   2,   4,   2,   4,   1,   3,
   1,   3,   1,   3,   1,   0,   2,   3,   1,   3,
   1,   0,   2,   3,   1,   3,   1,   8,  10,   0,
   2,   2,   0,   2,   4,   0,   3,   2,   3,   1,
   3,   1,   0,   1,   2,   1,   1,   1,   1,   1,
   1,   1,   1,   0,   1,   2,   1,   2,   1,   2,
   1,   1,   2,   0,   1,   2,   4,   1,   0,   1,
   2,   1,   1,   1,   1,   1 };
short yychk[]={

-1000,  -1,  -2,  -3,  -4,  -5,  -6,  -7,  -8,  -9,
 -10, -11, -12, -13, -14, -15, -16, -17, -18, -19,
 -20, -21, 260, 261, 262, 263, 264, 265, 268, 272,
 277, 279, 280, 282, 283, 284, 285, 287, 266, 267,
 -22, 289, -23, -38, -40,  40, 278, 288, -23, -24,
 -26, -27, -28, -30, -25, 288, -25,  40, -44, -45,
 -46, -47, -48, -49, 273, 274, 275, 276, -50, -51,
 278, -52, 278, -53, 281, -22, -54, -25, -25, -55,
 -25, -32, -33, -25, -35, -36, -25, -40, -37, 271,
 -41,  40, -23,  61,  44,  58,  44,  61, -23, 286,
 -31,  58,  44, -34,  58,  44, -38, -29, 288, -42,
 -43, -23,  41, -23, -27, -29, -25, -23,  61, -25,
 -29, -25, -29, -25, -39, 271,  41,  44, -23, -29,
 -23,  41,  -1, 269, 270,  -1, 269 };
short yydef[]={

   1,  -2,   3,   2,   4,   5,   6,   7,   8,   9,
  10,  11,  12,  13,  14,  15,  16,  17,  18,  19,
  20,  21,  22,   0,   0,   0,   0,   0,   0,  62,
  73,   0,   0,  81,   0,  83,  87,  88,   0,   0,
  23,  95,  24,  49,  55,   0,  91,  92,   0,  26,
  30,  28,   0,  34,  32,  94,   0,   0,  64,  63,
  65,  66,  67,  68,  69,  70,  71,  72,  75,  74,
  76,  77,  78,  79,  80,  82,  85,  84,   0,  90,
  89,  35,  40,  38,  41,  46,  44,   0,  51,   0,
  57,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  37,   0,   0,  43,   0,   0,  52,  50,  93,   0,
  61,  59,  58,  25,  29,  31,  33,  27,   0,  86,
  36,  39,  42,  45,  54,   0,  56,   0,   0,  53,
  60,   1,   0,  47,   1,   0,  48 };
# line 1 "/usr/lib/yaccpar"
#ifndef lint
static char yaccpar_sccsid[] = "@(#)yaccpar	4.1	(Berkeley)	2/11/83";
#endif

# define YYFLAG -1000
# define YYERROR goto yyerrlab
# define YYACCEPT return(0)
# define YYABORT return(1)

/*	parser for yacc output	*/

#ifdef YYDEBUG
int yydebug = 0; /* 1 for debugging */
#endif
YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
int yychar = -1; /* current input token number */
int yynerrs = 0;  /* number of errors */
short yyerrflag = 0;  /* error recovery flag */

/* KJT 20/02/23: added "int2 type */
int yyparse() {

	short yys[YYMAXDEPTH];
	short yyj, yym;
	register YYSTYPE *yypvt;
	register short yystate, *yyps, yyn;
	register YYSTYPE *yypv;
	register short *yyxi;

	yystate = 0;
	yychar = -1;
	yynerrs = 0;
	yyerrflag = 0;
	yyps= &yys[-1];
	yypv= &yyv[-1];

 yystack:    /* put a state and value onto the stack */

#ifdef YYDEBUG
	if( yydebug  ) printf( "state %d, char 0%o\n", yystate, yychar );
#endif
		if( ++yyps>= &yys[YYMAXDEPTH] ) { yyerror( "yacc stack overflow" ); return(1); }
		*yyps = yystate;
		++yypv;
		*yypv = yyval;

 yynewstate:

	yyn = yypact[yystate];

	if( yyn<= YYFLAG ) goto yydefault; /* simple state */

	if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0;
	if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;

	if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */
		yychar = -1;
		yyval = yylval;
		yystate = yyn;
		if( yyerrflag > 0 ) --yyerrflag;
		goto yystack;
		}

 yydefault:
	/* default state action */

	if( (yyn=yydef[yystate]) == -2 ) {
		if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0;
		/* look through exception table */

		for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */

		while( *(yyxi+=2) >= 0 ){
			if( *yyxi == yychar ) break;
			}
		if( (yyn = yyxi[1]) < 0 ) return(0);   /* accept */
		}

	if( yyn == 0 ){ /* error */
		/* error ... attempt to resume parsing */

		switch( yyerrflag ){

		case 0:   /* brand new error */

			yyerror( "syntax error" );
		yyerrlab:
			++yynerrs;

		case 1:
		case 2: /* incompletely recovered error ... try again */

			yyerrflag = 3;

			/* find a state where "error" is a legal shift action */

			while ( yyps >= yys ) {
			   yyn = yypact[*yyps] + YYERRCODE;
			   if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){
			      yystate = yyact[yyn];  /* simulate a shift of "error" */
			      goto yystack;
			      }
			   yyn = yypact[*yyps];

			   /* the current yyps has no shift onn "error", pop stack */

#ifdef YYDEBUG
			   if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
#endif
			   --yyps;
			   --yypv;
			   }

			/* there is no state on the stack with an error shift ... abort */

	yyabort:
			return(1);


		case 3:  /* no shift yet; clobber input char */

#ifdef YYDEBUG
			if( yydebug ) printf( "error recovery discards char %d\n", yychar );
#endif

			if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */
			yychar = -1;
			goto yynewstate;   /* try again in the same state */

			}

		}

	/* reduction by production yyn */

#ifdef YYDEBUG
		if( yydebug ) printf("reduce %d\n",yyn);
#endif
		yyps -= yyr2[yyn];
		yypvt = yypv;
		yypv -= yyr2[yyn];
		yyval = yypv[1];
		yym=yyn;
			/* consult goto table to find next state */
		yyn = yyr1[yyn];
		yyj = yypgo[yyn] + *yyps + 1;
		if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]];
		switch(yym){

case 1:
# line 68 "gram.y"
{ ndput(tNULL); } break;
case 2:
# line 73 "gram.y"
{
	if (errorcount == 0)
	{
	 if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	}
	} break;
case 3:
# line 84 "gram.y"
{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tcmdl);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(1);
	}
	} break;
case 4:
# line 102 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(2);
	}
	} break;
case 5:
# line 112 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(3);
	}
	} break;
case 6:
# line 122 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(4);
	}
	} break;
case 7:
# line 132 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(5);
	}
	} break;
case 8:
# line 142 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(6);
	}
	} break;
case 9:
# line 152 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(7);
	}
	} break;
case 10:
# line 162 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(8);
	}
	} break;
case 11:
# line 172 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(9);
	}
	} break;
case 12:
# line 182 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(10);
	}
	} break;
case 13:
# line 192 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(11);
	}
	} break;
case 14:
# line 202 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(12);
	}
	} break;
case 15:
# line 212 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(13);
	}
	} break;
case 16:
# line 222 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(14);
	}
	} break;
case 17:
# line 232 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(15);
	}
	} break;
case 18:
# line 242 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(16);
	}
	} break;
case 19:
# line 252 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(17);
	}
	} break;
case 20:
# line 262 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(18);
	}
	} break;
case 21:
# line 272 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(19);
	}
	} break;
case 22:
# line 282 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tquit);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(20);
	}
	} break;
case 23:
# line 295 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tload);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(21);
	}
	} break;
case 24:
# line 311 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(trewrite);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(22);
	}
	} break;
case 25:
# line 327 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 stlrlink ();
	 ndput(tcheck);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(23);
	}
	} break;
case 26:
# line 344 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tvar);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(24);
	}
	} break;
case 27:
# line 360 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 stlrlink ();
	 ndput(tlet);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(25);
	}
	} break;
case 29:
# line 381 "gram.y"
{ if (errorcount == 0) stlrlink (); } break;
case 30:
# line 386 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tvariable_declaration);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(26);
	}
	} break;
case 31:
# line 402 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 stlrlink ();
	 ndput(tidentifier_declaration);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(27);
	}
	} break;
case 33:
# line 423 "gram.y"
{ if (errorcount == 0) stlrlink (); } break;
case 34:
# line 428 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tidentifier_declaration_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(28);
	}
	} break;
case 35:
# line 444 "gram.y"
{ ndput (tNULL); } break;
case 37:
# line 453 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(txfree);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(29);
	}
	} break;
case 39:
# line 476 "gram.y"
{ if (errorcount == 0) stlrlink (); } break;
case 40:
# line 481 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tidentifier_free_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(30);
	}
	} break;
case 41:
# line 497 "gram.y"
{ ndput (tNULL); } break;
case 43:
# line 506 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tresetvar);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(31);
	}
	} break;
case 45:
# line 529 "gram.y"
{ if (errorcount == 0) stlrlink (); } break;
case 46:
# line 534 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tidentifier_reset_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(32);
	}
	} break;
case 47:
# line 550 "gram.y"
{
	if (errorcount == 0)
	{
	 class(3);
	 stlrlink ();
	 stlrlink ();
	 ndput(tif);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(33);
	}
	} break;
case 48:
# line 568 "gram.y"
{
	if (errorcount == 0)
	{
	 class(4);
	 stlrlink ();
	 stlrlink ();
	 stlrlink ();
	 ndput(tif);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(34);
	}
	} break;
case 49:
# line 587 "gram.y"
{ ndput (tNULL); } break;
case 51:
# line 596 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tvalue_expression);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(35);
	}
	} break;
case 52:
# line 615 "gram.y"
{ ndput (tNULL); } break;
case 54:
# line 624 "gram.y"
{
	if (errorcount == 0)
	{
	 class(4);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tvalue_expression);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(36);
	}
	} break;
case 55:
# line 649 "gram.y"
{ ndput (tNULL); } break;
case 57:
# line 658 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tterm_expression);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(37);
	}
	} break;
case 58:
# line 677 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tterm_expression);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(38);
	}
	} break;
case 60:
# line 697 "gram.y"
{ if (errorcount == 0) stlrlink (); } break;
case 61:
# line 702 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tvalue_expression_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(39);
	}
	} break;
case 62:
# line 718 "gram.y"
{ ndput (tNULL); } break;
case 64:
# line 727 "gram.y"
{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tdisplay);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(40);
	}
	} break;
case 65:
# line 745 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(41);
	}
	} break;
case 66:
# line 755 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(42);
	}
	} break;
case 67:
# line 765 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(43);
	}
	} break;
case 68:
# line 775 "gram.y"
{
	if (errorcount == 0)
	{
	 putgrn(44);
	}
	} break;
case 69:
# line 785 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tsort);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(45);
	}
	} break;
case 70:
# line 798 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(topn);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(46);
	}
	} break;
case 71:
# line 811 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(teqn);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(47);
	}
	} break;
case 72:
# line 824 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tvars);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(48);
	}
	} break;
case 73:
# line 837 "gram.y"
{ ndput (tNULL); } break;
case 75:
# line 846 "gram.y"
{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tsetdeb);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(49);
	}
	} break;
case 76:
# line 864 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tdeb_value);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(50);
	}
	} break;
case 77:
# line 877 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tstat);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(51);
	}
	} break;
case 78:
# line 893 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tstat_value);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(52);
	}
	} break;
case 79:
# line 906 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(twrite);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(53);
	}
	} break;
case 80:
# line 922 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tstring);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(54);
	}
	} break;
case 81:
# line 935 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(treset);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(55);
	}
	} break;
case 82:
# line 948 "gram.y"
{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(texec);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(56);
	}
	} break;
case 83:
# line 964 "gram.y"
{ ndput (tNULL); } break;
case 85:
# line 973 "gram.y"
{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(thelp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(57);
	}
	} break;
case 86:
# line 991 "gram.y"
{
	if (errorcount == 0)
	{
	 class(2);
	 stlrlink ();
	 ndput(trename);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(58);
	}
	} break;
case 87:
# line 1008 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(trename);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(59);
	}
	} break;
case 88:
# line 1021 "gram.y"
{ ndput (tNULL); } break;
case 90:
# line 1030 "gram.y"
{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(ttrace);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(60);
	}
	} break;
case 91:
# line 1048 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(toperation_identifier);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(61);
	}
	} break;
case 92:
# line 1061 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(toperation_identifier);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(62);
	}
	} break;
case 93:
# line 1074 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tsort_identifier);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(63);
	}
	} break;
case 94:
# line 1087 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tidentifier);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(64);
	}
	} break;
case 95:
# line 1100 "gram.y"
{
	if (errorcount == 0)
	{
	 ndput(tfile_name);
	 staclr (c_lexv, (CLR_TYPE)yypvt[-0].name);
	 staclr (c_line, (CLR_TYPE)yypvt[-0].line);
	 putgrn(65);
	}
	} break;
# line 148 "/usr/lib/yaccpar"

		}
		goto yystack;  /* stack new state and value */

	}
