extern char *malloc(), *realloc();

# line 3 "apl.y"
#include "apl.h"
#include <memory.h>

#ifdef QDOS
#ifndef __UNSIGNED_CHAR__
#error "compile with -uchar"
#endif
#endif

int	vcount;
int	scount;
int	litflag;
int	nlexsym;
int	context;
char	*iline;
char	*ccharp, *ccharp2;
data	lnumb;				/* current label number */
char	*labcpp;			/* label prologue */
char	*labcpe;			/* label epilogue */
int	immedcmd;				/* immediate command number */

static char oline[OBJS];

# line 21 "apl.y"
typedef union  {
	char	*charptr;
	char	charval;
} YYSTYPE;
# define lex0 257
# define lex1 258
# define lex2 259
# define lex3 260
# define lex4 261
# define lex5 262
# define lex6 263
# define lpar 264
# define rpar 265
# define lbkt 266
# define rbkt 267
# define eol 268
# define unk 269
# define com 270
# define com0 271
# define quad 272
# define asg 273
# define null 274
# define dot 275
# define cln 276
# define semi 277
# define comnt 278
# define tran 279
# define strng 280
# define nam 281
# define numb 282
# define nfun 283
# define mfun 284
# define dfun 285
# define comexpr 286
# define comnam 287
# define comnull 288
# define comlist 289
# define dscal 290
# define mdscal 291
# define m 292
# define d 293
# define md 294
# define msub 295
# define mdsub 296
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar;
extern int yyerrflag;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif
YYSTYPE yylval, yyval;
# define YYERRCODE 256

# line 556 "apl.y"

#include "tab.c"
#include "lex.c"

int yyexca[] ={
-1, 1,
	0, -1,
	-2, 0,
-1, 29,
	266, 69,
	-2, 67,
-1, 31,
	266, 70,
	-2, 90,
-1, 32,
	270, 91,
	271, 91,
	275, 91,
	-2, 88,
-1, 56,
	276, 93,
	-2, 48,
-1, 57,
	276, 94,
	-2, 47,
-1, 58,
	276, 95,
	-2, 63,
-1, 76,
	275, 92,
	-2, 81,
-1, 80,
	266, 87,
	-2, 85,
-1, 82,
	266, 86,
	-2, 90,
	};
# define YYNPROD 97
# define YYLAST 301
int yyact[]={

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

   -88, -1000,  -206,  -143,  -278,  -278,  -278,  -239, -1000,  -277,
  -164,  -214, -1000,  -255, -1000,  -128,  -143,  -202, -1000,  -203,
 -1000,  -222, -1000, -1000, -1000, -1000,  -143, -1000, -1000, -1000,
 -1000, -1000, -1000, -1000,  -269, -1000, -1000, -1000, -1000,  -213,
 -1000, -1000, -1000, -1000, -1000,  -230, -1000, -1000, -1000, -1000,
  -264, -1000, -1000, -1000,  -185,  -253, -1000, -1000, -1000,  -218,
  -143,  -278,  -278, -1000, -1000,  -229, -1000,  -143, -1000,  -143,
 -1000,  -203, -1000,  -238,  -240, -1000, -1000, -1000, -1000, -1000,
 -1000, -1000, -1000, -1000,  -143, -1000, -1000,  -143, -1000,  -203,
 -1000,  -204, -1000,  -278,  -278, -1000,  -267, -1000, -1000, -1000,
 -1000, -1000,  -232, -1000, -1000, -1000, -1000,  -278, -1000, -1000,
 -1000,  -255, -1000, -1000, -1000,  -289,  -289,  -243, -1000, -1000,
  -205, -1000, -1000, -1000,  -278, -1000,  -230, -1000, -1000, -1000,
 -1000, -1000, -1000,  -143, -1000, -1000, -1000 };
int yypgo[]={

     0,   180,    82,   192,    69,   191,   134,   103,   155,   190,
   189,   133,   184,   181,   178,   167,    65,   156,   136,    92,
   175,    67,   125,   124,   123,   122,   114,   113,   112,   102,
   179,   161,   101,    94,    93,    91,    81,    80 };
int yyr1[]={

     0,    32,    32,    32,    32,    32,    32,    32,    32,    32,
     1,     1,     2,     3,     3,     3,     4,     4,    33,    22,
    22,    22,    22,    35,    35,    34,    34,    34,    34,     5,
     5,     6,     7,     7,     7,     8,     9,     9,    21,    10,
    10,    36,    11,    11,    11,    12,    12,    13,    13,    13,
    13,    13,    13,    37,    37,    14,    23,    15,    15,    16,
    16,    17,    17,    17,    17,    17,    24,    24,    24,    25,
    25,    18,    18,    18,    18,    18,    26,    19,    27,    27,
    28,    28,    28,    28,    28,    28,    29,    29,    30,    30,
    30,    31,    31,    20,    20,    20,    20 };
int yyr2[]={

     0,     5,     9,     7,     9,     4,     4,     4,     4,     4,
     7,     3,     5,     7,     5,     3,     7,     3,     3,     4,
     5,     4,     2,     5,     3,     3,     5,     4,     2,     2,
     4,     5,     3,     5,     7,     4,     2,     2,     6,     3,
     2,     3,     2,     5,     7,     2,     9,     3,     3,     3,
     3,     7,     3,     5,     3,     3,     3,     2,     7,     2,
     1,     3,     5,     3,     5,     7,     2,     2,     3,     2,
     3,     3,     5,     3,     7,     7,     3,     7,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2 };
int yychk[]={

 -1000,   -32,   257,   258,   259,   260,   261,   262,    -8,   -33,
   279,    -9,   265,   -11,   -21,   -12,   -17,   -13,   -24,   -25,
   284,   -31,   283,   281,   280,   -37,   264,   272,   292,   295,
   -30,   296,   291,   290,   -14,   294,   282,    -8,    -1,   -20,
    -2,   281,   283,   284,   285,    -3,    -1,    -1,   -34,   268,
    -5,    -7,    -6,    -8,   279,   -20,   281,   283,   284,   -22,
   286,   287,   289,   288,   268,   -11,   268,   -36,   277,   -18,
   -28,   -26,   285,   274,   -31,   -30,   290,   293,   271,   273,
   270,   -29,   296,   -11,   -23,   266,   -19,   266,   -27,   270,
   271,   -11,   -37,   273,   -20,    -4,   277,   268,   268,    -7,
    -6,   268,   -11,   276,   268,   -11,   -20,   -35,   -20,   268,
   -10,   -11,   -21,   -11,   -19,   275,   275,   -15,   -16,   -11,
   -11,   -19,   265,    -2,   -20,   -20,   281,   268,   -20,   -31,
   291,   -31,   267,   277,   267,    -4,   -16 };
int yydef[]={

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

#if YYDEBUG

yytoktype yytoks[] =
{
	"lex0",	257,
	"lex1",	258,
	"lex2",	259,
	"lex3",	260,
	"lex4",	261,
	"lex5",	262,
	"lex6",	263,
	"lpar",	264,
	"rpar",	265,
	"lbkt",	266,
	"rbkt",	267,
	"eol",	268,
	"unk",	269,
	"com",	270,
	"com0",	271,
	"quad",	272,
	"asg",	273,
	"null",	274,
	"dot",	275,
	"cln",	276,
	"semi",	277,
	"comnt",	278,
	"tran",	279,
	"strng",	280,
	"nam",	281,
	"numb",	282,
	"nfun",	283,
	"mfun",	284,
	"dfun",	285,
	"comexpr",	286,
	"comnam",	287,
	"comnull",	288,
	"comlist",	289,
	"dscal",	290,
	"mdscal",	291,
	"m",	292,
	"d",	293,
	"md",	294,
	"msub",	295,
	"mdsub",	296,
	"-unknown-",	-1	/* ends search */
};

char * yyreds[] =
{
	"-no such reduction-",
	"line : lex0 stat",
	"line : lex0 bcomand comand eol",
	"line : lex0 tran eol",
	"line : lex0 tran expr eol",
	"line : lex1 stat",
	"line : lex2 func",
	"line : lex3 func",
	"line : lex4 func",
	"line : lex5 fstat",
	"func : anyname asg header",
	"func : header",
	"header : args autos",
	"args : anyname anyname anyname",
	"args : anyname anyname",
	"args : anyname",
	"autos : semi nam autos",
	"autos : eol",
	"bcomand : rpar",
	"comand : comexpr expr",
	"comand : comnam anyname",
	"comand : comlist anylist",
	"comand : comnull",
	"anylist : anylist anyname",
	"anylist : anyname",
	"fstat : eol",
	"fstat : labels eol",
	"fstat : labels fstat0",
	"fstat : fstat0",
	"labels : label",
	"labels : labels label",
	"label : anyname cln",
	"fstat0 : stat",
	"fstat0 : tran eol",
	"fstat0 : tran expr eol",
	"stat : statement eol",
	"statement : expr",
	"statement : hprint",
	"hprint : expr hsemi output",
	"output : expr",
	"output : hprint",
	"hsemi : semi",
	"expr : e1",
	"expr : monadic expr",
	"expr : e1 dyadic expr",
	"e1 : e2",
	"e1 : e2 lsub subs rbkt",
	"e2 : nfun",
	"e2 : nam",
	"e2 : strng",
	"e2 : vector",
	"e2 : lpar expr rpar",
	"e2 : quad",
	"vector : number vector",
	"vector : number",
	"number : numb",
	"lsub : lbkt",
	"subs : sub",
	"subs : subs semi sub",
	"sub : expr",
	"sub : /* empty */",
	"monadic : monad",
	"monadic : smonad subr",
	"monadic : mfun",
	"monadic : scalar comp",
	"monadic : scalar com subr",
	"monad : m",
	"monad : msub",
	"monad : mondya",
	"smonad : msub",
	"smonad : mdsub",
	"dyadic : dyad",
	"dyadic : sdyad subr",
	"dyadic : dfun",
	"dyadic : null dot scalar",
	"dyadic : scalar dot scalar",
	"sdyad : mdcom",
	"subr : lbkt expr rbkt",
	"comp : com",
	"comp : com0",
	"dyad : mondya",
	"dyad : dscal",
	"dyad : d",
	"dyad : com0",
	"dyad : asg",
	"dyad : com",
	"mdcom : mdsub",
	"mdcom : com",
	"mondya : mdscal",
	"mondya : md",
	"mondya : mdsub",
	"scalar : mdscal",
	"scalar : dscal",
	"anyname : nam",
	"anyname : nfun",
	"anyname : mfun",
	"anyname : dfun",
};
#endif /* YYDEBUG */
#line 1 "/usr/lib/yaccpar"
/*	@(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10	*/

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

/*
** yacc user known macros and defines
*/
#define YYERROR		goto yyerrlab
#define YYACCEPT	{ free(yys); free(yyv); return(0); }
#define YYABORT		{ free(yys); free(yyv); 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)
#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		(-1000)

/*
** static variables used by the parser
*/
static YYSTYPE *yyv;			/* value stack */
static int *yys;			/* state stack */

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

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

int yynerrs;			/* number of errors */

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 */
	unsigned yymaxdepth = YYMAXDEPTH;

	/*
	** Initialize externals - yyparse may be called more than once
	*/
	yyv = (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE));
	yys = (int*)malloc(yymaxdepth*sizeof(int));
	if (!yyv || !yys)
	{
		yyerror( "out of memory" );
		return(1);
	}
	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;

			(void)printf( "State %d, token ", yy_state );
			if ( yychar == 0 )
				(void)printf( "end-of-file\n" );
			else if ( yychar < 0 )
				(void)printf( "-none-\n" );
			else
			{
				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
					yy_i++ )
				{
					if ( yytoks[yy_i].t_val == yychar )
						break;
				}
				(void)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);
			yymaxdepth += YYMAXDEPTH;
			yyv = (YYSTYPE*)realloc((char*)yyv,
				yymaxdepth * sizeof(YYSTYPE));
			yys = (int*)realloc((char*)yys,
				yymaxdepth * sizeof(int));
			if (!yyv || !yys)
			{
				yyerror( "yacc stack overflow" );
				return(1);
			}
			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;

			(void)printf( "Received token " );
			if ( yychar == 0 )
				(void)printf( "end-of-file\n" );
			else if ( yychar < 0 )
				(void)printf( "-none-\n" );
			else
			{
				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
					yy_i++ )
				{
					if ( yytoks[yy_i].t_val == yychar )
						break;
				}
				(void)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;

				(void)printf( "Received token " );
				if ( yychar == 0 )
					(void)printf( "end-of-file\n" );
				else if ( yychar < 0 )
					(void)printf( "-none-\n" );
				else
				{
					for ( yy_i = 0;
						yytoks[yy_i].t_val >= 0;
						yy_i++ )
					{
						if ( yytoks[yy_i].t_val
							== yychar )
						{
							break;
						}
					}
					(void)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( "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;
				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 )
						(void)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;

					(void)printf( "Error recovery discards " );
					if ( yychar == 0 )
						(void)printf( "token end-of-file\n" );
					else if ( yychar < 0 )
						(void)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;
							}
						}
						(void)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 )
			(void)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 54 "apl.y"
{
		*ccharp = EOF;
		integ = lastCode(oline);
		if (integ != ASGN && integ != PRINT && integ != COMNT) *ccharp++ = PRINT;
		*ccharp++ = EOL;
	} break;
case 2:
# line 61 "apl.y"
{
		*ccharp++ = IMMED;
		*ccharp++ = yypvt[-1].charval;
	} break;
case 3:
# line 69 "apl.y"
{
		*ccharp++ = SICLR0;
	} break;
case 4:
# line 73 "apl.y"
{
		*ccharp++ = SICLR;
	} break;
case 10:
# line 103 "apl.y"
{
		switch(context) {

		case lex3:
			name(yyval.charptr, AUTO);
			/*
			 * see comments in ai.c/funcomp() concerning
			 * label processing.
			 */
			*ccharp++ = ELID;
			break;

		case lex4:
			ccharp2 = ccharp;
			*ccharp++ = EOL;
			name(yyval.charptr, RVAL);
			name(yyval.charptr, REST);
			invert(yypvt[-0].charptr, ccharp2);
		}
	} break;
case 11:
# line 124 "apl.y"
{
		if(context == lex3) *ccharp++ = ELID;
		if(context == lex4){
			*ccharp++ = EOL;	/* pop previous result */
			*ccharp++ = NILRET;	/* return empty result */
		}
	} break;
case 12:
# line 133 "apl.y"
{
		if(context == lex4) invert(yyval.charptr, yypvt[-0].charptr);
	} break;
case 13:
# line 139 "apl.y"
{
		yyval.charptr = ccharp;
		switch(context) {

		case lex2:
			name(yypvt[-1].charptr, DF);
			break;

		case lex3:
			name(yypvt[-0].charptr, ARG2);
			name(yypvt[-2].charptr, ARG1);
			break;

		case lex4:
			name(yypvt[-2].charptr, REST);
			name(yypvt[-0].charptr, REST);
		}
	} break;
case 14:
# line 158 "apl.y"
{
		yyval.charptr = ccharp;
		switch(context) {

		case lex2:
			name(yypvt[-1].charptr, MF);
			break;

		case lex3:
			name(yypvt[-0].charptr, ARG1);
			break;

		case lex4:
			name(yypvt[-0].charptr, REST);
		}
	} break;
case 15:
# line 175 "apl.y"
{
		if(context == lex2) name(yyval.charptr, NF);
		yyval.charptr = ccharp;
	} break;
case 16:
# line 181 "apl.y"
{
		yyval.charptr = yypvt[-0].charptr;
		switch(context) {

		case lex3:
			name(yypvt[-1].charptr, AUTO);
			break;

		case lex4:
			ccharp2 = name(yypvt[-1].charptr, REST);
			invert(yyval.charptr, ccharp2);
		}
	} break;
case 17:
# line 195 "apl.y"
{
		yyval.charptr = ccharp;
	} break;
case 18:
# line 204 "apl.y"
{
		litflag = -1;
	} break;
case 20:
# line 210 "apl.y"
{
		name(yypvt[-0].charptr, NAME);
	} break;
case 23:
# line 218 "apl.y"
{
	    *ccharp++ = IMMED;
	    *ccharp++ = immedcmd;
	    name(yypvt[-0].charptr, NAME);
	} break;
case 24:
# line 224 "apl.y"
{
	    name(yypvt[-0].charptr, NAME);
	} break;
case 25:
# line 238 "apl.y"
{
		*ccharp++ = COMNT;
	} break;
case 26:
# line 242 "apl.y"
{
		*ccharp++ = COMNT;
	} break;
case 31:
# line 254 "apl.y"
{
		if(labgen) genlab(yypvt[-1].charptr);
	} break;
case 32:
# line 260 "apl.y"
{
		*ccharp = EOF;
		integ = lastCode(oline);
		if (integ != ASGN && integ != PRINT && integ != COMNT) *ccharp++ = PRINT;
	} break;
case 33:
# line 266 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = BRAN0;
	} break;
case 34:
# line 271 "apl.y"
{
		yyval.charptr = yypvt[-1].charptr;
		*ccharp++ = BRAN;
	} break;
case 39:
# line 284 "apl.y"
{
		*ccharp++ = PRINT;
	} break;
case 41:
# line 290 "apl.y"
{
		*ccharp++ = HPRINT;
	} break;
case 43:
# line 296 "apl.y"
{
		invert(yyval.charptr, yypvt[-0].charptr);
	} break;
case 44:
# line 300 "apl.y"
{
		invert(yyval.charptr, yypvt[-0].charptr);
	} break;
case 46:
# line 306 "apl.y"
{
		invert(yyval.charptr, yypvt[-1].charptr);
		*ccharp++ = INDEX;
		*ccharp++ = scount;
		scount = yypvt[-2].charval;
	} break;
case 47:
# line 314 "apl.y"
{
		yyval.charptr = name(yyval.charptr, FUN);
	} break;
case 48:
# line 318 "apl.y"
{
		yyval.charptr = name(yyval.charptr, NAME);
	} break;
case 49:
# line 322 "apl.y"
{
		yyval.charptr = ccharp;
		ccharp += 2;
		integ = iline[-1];
		vcount = 0;
		for(;;) {
			if (*iline == '\n') {
				nlexsym = unk;
				break;
			}
			if (*iline == '\\') {
				char temp, sum;
				int dcount;
				iline++;
				switch (*iline) {
					case 'b':
					temp = '\b';
					break;

					case 't':
					temp = '\t';
					break;

					case 'n':
					temp = '\n';
					break;

					case 'e':
					temp = '\033';
					break;

					case 'f':
					temp = '\014';
					break;

					case 'r':
					temp = '\r';
					break;

					default:
					temp = *iline;
					if (temp == '\n') continue;
					if (isodigit(temp)) {
						dcount = 0;
						sum = 0;
						while (isodigit(temp) && dcount < 3) {
							sum = 8 * sum + (temp - '0');
							dcount++;
							iline++;
							temp = *iline;
						}
						if (temp == '\n') continue;
						temp = sum;
						iline--;
					}
					break;
				}
				*ccharp++ = temp;
				iline++;
				vcount++;
				continue;
			}
			if( *iline == integ) {
				iline++;
				if(*iline != integ) break;
			}
			*ccharp++ = *iline++;
			vcount++;
		}
		((struct chrstrct *)yyval.charptr)->c[0] = QUOT;
		((struct chrstrct *)yyval.charptr)->c[1] = vcount;
	} break;
case 50:
# line 395 "apl.y"
{
		*ccharp++ = CONST;
		*ccharp++ = vcount;
		invert(yyval.charptr, ccharp-2);
	} break;
case 51:
# line 401 "apl.y"
{
		yyval.charptr = yypvt[-1].charptr;
	} break;
case 52:
# line 405 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = yypvt[-0].charval;
	} break;
case 53:
# line 411 "apl.y"
{
		vcount++;
	} break;
case 54:
# line 415 "apl.y"
{
		vcount = 1;
	} break;
case 55:
# line 420 "apl.y"
{
		yyval.charptr = ccharp;
		ccharp += copy(DA,&datum,ccharp,1);
	} break;
case 56:
# line 431 "apl.y"
{
		yyval.charval = scount;
		scount = 1;
	} break;
case 58:
# line 438 "apl.y"
{
		invert(yyval.charptr, yypvt[-0].charptr);
		scount++;
	} break;
case 60:
# line 444 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = ELID;
	} break;
case 61:
# line 454 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = yypvt[-0].charval;
	} break;
case 62:
# line 459 "apl.y"
{
		yyval.charptr = yypvt[-0].charptr;
		*ccharp++ = yypvt[-1].charval+1;
	} break;
case 63:
# line 464 "apl.y"
{
		yyval.charptr = name(yyval.charptr, FUN);
	} break;
case 64:
# line 468 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = yypvt[-0].charval+1;
		*ccharp++ = yypvt[-1].charval;
	} break;
case 65:
# line 474 "apl.y"
{
		yyval.charptr = yypvt[-0].charptr;
		*ccharp++ = yypvt[-1].charval+3;
		*ccharp++ = yypvt[-2].charval;
	} break;
case 68:
# line 483 "apl.y"
{
		yyval.charval++;
	} break;
case 70:
# line 489 "apl.y"
{
		yyval.charval += 2;
	} break;
case 71:
# line 498 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = yypvt[-0].charval;
	} break;
case 72:
# line 503 "apl.y"
{
		yyval.charptr = yypvt[-0].charptr;
		*ccharp++ = yypvt[-1].charval;
	} break;
case 73:
# line 508 "apl.y"
{
		yyval.charptr = name(yyval.charptr, FUN);
	} break;
case 74:
# line 512 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = OPROD;
		*ccharp++ = yypvt[-0].charval;
	} break;
case 75:
# line 518 "apl.y"
{
		yyval.charptr = ccharp;
		*ccharp++ = IPROD;
		*ccharp++ = yypvt[-2].charval;
		*ccharp++ = yypvt[-0].charval;
	} break;
case 76:
# line 526 "apl.y"
{
		yyval.charval += 2;
	} break;
case 77:
# line 537 "apl.y"
{
		yyval.charptr = yypvt[-1].charptr;
	} break;
	}
	goto yystack;		/* reset registers in driver code */
}
