USG_PG3/usr/source/lexgen1/common.c

# include "../lexgen1/ldefs.c"
# define table(i,c) ((pp=move(i,c,1,0)) ? pp[1] : 0)
common(act, k)
	int *act;
{
int c, i, n, *pp;
for(n=c=0; c<NCH; c++)
	if (act[c] != 0)
		{
		if (act[c] == ((pp=move(i,c,1,0)) ? pp[1] : 0))
			n++;
		}
return(n);
}
check(act,k)
	int *act;
{
int c, i, *pp;
for(c=0; c<NCH; c++)
	if (act[c] == 0)
		if (((pp=move(i,c,1,0)) ? pp[1] : 0) != 0)
			return(0);
return(1);
}