37 for (i = 3; i <
nrules; ++i)
95 register int symbol, act, number;
118 (accept, reduce %d) on $end\n", state, p->
number - 2);
125 (shift %d, reduce %d) on %s\n", state, number, p->
number - 2,
131 (reduce %d, reduce %d) on %s\n", state, number - 2, p->
number - 2,
146 register core *statep;
153 for (i = 0; i < k; i++)
157 while (*sp >= 0) ++sp;
161 for (sp =
ritem +
rrhs[rule]; sp < sp1; sp++)
180 register int i, j, k, nnulls;
191 for (j = 0; j < nnulls && i >
null_rules[j]; ++j)
199 else if (i != null_rules[j])
202 for (k = nnulls - 1; k > j; --k)
203 null_rules[k] = null_rules[k-1];
210 for (i = 0; i < nnulls; ++i)
254 for (q = p; q; q = q->
next)
262 for (; p; p = p->next)
264 if (p->action_code ==
SHIFT && p->suppressed == 0)
276 register int k, anyreds;
280 for (q = p; q ; q = q->
next)
293 for (; p; p = p->next)
295 if (p->action_code ==
REDUCE && p->number != defred)
298 if (p->suppressed == 0)
320 to_state = sp->
shift;
321 for (i = 0; i < sp->
nshifts; ++i)
short * rlhs
List of left-hand sides of all rules.
int ntokens
The number of tokens (terminals) in the grammar.
static short * null_rules
print_reductions(action *p, int defred)
int nrules
The number of rules in the grammar.
int nvars
The number of variables (non-terminals) in the grammar.
print_conflicts(int state)
short * rrhs
List of right-hand sides of all rules.
short * ritem
Representation of all productions (and items)
print_actions(int stateno)
char ** symbol_name
Array of symbol names.