Esempio n. 1
0
static Renode *parsealt(struct cstate *g)
{
	Renode *alt, *x;
	alt = parsecat(g);
	while (accept(g, '|')) {
		x = alt;
		alt = newnode(g, P_ALT);
		alt->x = x;
		alt->y = parsecat(g);
	}
	return alt;
}
Esempio n. 2
0
static Renode *parsealt(void)
{
	Renode *alt, *x;
	alt = parsecat();
	while (re_accept('|')) {
		x = alt;
		alt = newnode(P_ALT);
		alt->x = x;
		alt->y = parsecat();
	}
	return alt;
}