rem: if (k == CHAR && c == f->re[p[i]].lval || k == DOT && c != 0 && c != HAT || k == ALL && c != 0 || k == CCL && member(c, (uchar *) f->re[p[i]].lval) || k == NCCL && !member(c, (uchar *) f->re[p[i]].lval) && c != 0 && c != HAT) { q = f->re[p[i]].lfollow; for (j=1; j<=*q; j++) { if (setvec[q[j]] == 0) { setcnt++; setvec[q[j]] = 1; }
add: if (k == CHAR && c == f->re[p[i]].lval || k == DOT && c != 0 && c != HAT || k == ALL && c != 0 || k == CCL && member(c, (uchar *)f->re[p[i]].lval) || k == NCCL && !member(c, (uchar *)f->re[p[i]].lval) && c != 0 && c != HAT) { q = f->re[p[i]].lfollow; for (j = 1; j <= *q; j++) { if (setvec[q[j]] == 0) { setcnt++; setvec[q[j]] = 1;
context: int cgoto(f, s, c)	fa *f;	int s, c;{	register int i, j, k;	register int *p, *q;	for (i=0; i<=f->accept; i++)		setvec[i] = 0;	setcnt = 0;	/* compute positions of gototab[s,c] into setvec */	p = f->posns[s];	for (i=1; i<=*p; i++) {		if ((k = f->re[p[i]].ltype) != FINAL) {			if (k == CHAR && c == f->re[p[i]].lval				|| k == DOT && c != 0 && c != HAT				|| k == ALL && c != 0				|| k == CCL && member(c, (uchar *) f->re[p[i]].lval)				|| k == NCCL && !member(c, (uchar *) f->re[p[i]].lval) && c != 0 && c != HAT) {					q = f->re[p[i]].lfollow;					for (j=1; j<=*q; j++) {						if (setvec[q[j]] == 0) {							setcnt++;							setvec[q[j]] = 1;						}					}				}		}	}	/* determine if setvec is a previous state */	tmpset[0] = setcnt;	j = 1;	for (i = f->accept; i >= 0; i--)		if (setvec[i]) {			tmpset[j++] = i;		}	/* tmpset == previous state? */	for (i=1; i<= f->curstat; i++) {		p = f->posns[i];		if ((k = tmpset[0]) != p[0])			goto different;		for (j = 1; j <= k; j++)			if (tmpset[j] != p[j])				goto different;		/* setvec is state i */		f->gototab[s][c] = i;		return i;	different:;	}	/* add tmpset to current set of states */	if (f->curstat >= NSTATES-1) {		f->curstat = 2;		f->reset = 1;		for (i=2; i<NSTATES; i++)			xfree(f->posns[i]);	}	else		++(f->curstat);	for (i=0; i<NCHARS; i++)		f->gototab[f->curstat][i] = 0;	xfree(f->posns[f->curstat]);	if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL)		overflo("out of space in cgoto");	f->posns[f->curstat] = p;	f->gototab[s][c] = f->curstat;	for (i = 0; i <= setcnt; i++)		p[i] = tmpset[i];	if (setvec[f->accept])		f->out[f->curstat] = 1;	else		f->out[f->curstat] = 0;	return f->curstat;}