91 |
|
|
92 |
shifts *shiftp = state->shifts; |
shifts *shiftp = state->shifts; |
93 |
reductions *redp = state->reductions; |
reductions *redp = state->reductions; |
|
#if 0 |
|
|
errs *errp = state->errs; |
|
|
#endif |
|
94 |
|
|
95 |
static char buff[10]; |
static char buff[10]; |
96 |
edge_t edge; |
edge_t edge; |
97 |
|
|
98 |
if (!shiftp->nshifts && !redp) |
if (!shiftp->nshifts && !redp) |
99 |
{ |
return; |
|
#if 0 |
|
|
if (final_state == state) |
|
|
obstack_sgrow (node_obstack, "$default: accept"); |
|
|
else |
|
|
obstack_sgrow (node_obstack, "NO ACTIONS"); |
|
|
#endif |
|
|
return; |
|
|
} |
|
100 |
|
|
101 |
for (i = 0; i < shiftp->nshifts; i++) |
for (i = 0; i < shiftp->nshifts; i++) |
102 |
if (!SHIFT_IS_DISABLED (shiftp, i)) |
if (!SHIFT_IS_DISABLED (shiftp, i)) |
119 |
output_edge (&edge, fgraph); |
output_edge (&edge, fgraph); |
120 |
close_edge (fgraph); |
close_edge (fgraph); |
121 |
} |
} |
|
|
|
|
#if 0 |
|
|
if (errp) |
|
|
{ |
|
|
int j, nerrs; |
|
|
|
|
|
nerrs = errp->nerrs; |
|
|
|
|
|
for (j = 0; j < nerrs; j++) |
|
|
{ |
|
|
if (!errp->errs[j]) |
|
|
continue; |
|
|
symbol = errp->errs[j]; |
|
|
/* If something has been added in the NODE_OBSTACK after |
|
|
the declaration of the label, then we need a `\n'. |
|
|
if (obstack_object_size (node_obstack) > node_output_size) |
|
|
obstack_sgrow (node_obstack, "\n"); |
|
|
*/ |
|
|
obstack_fgrow1 (node_obstack, _("%-4s\terror (nonassociative)"), |
|
|
tags[symbol]); |
|
|
} |
|
|
if (j > 0) |
|
|
obstack_1grow (node_obstack, '\n'); |
|
|
} |
|
|
|
|
|
if (state->consistent && redp) |
|
|
{ |
|
|
rule = redp->rules[0]; |
|
|
symbol = rule_table[rule].lhs; |
|
|
/* |
|
|
if (obstack_object_size (node_obstack) > node_output_size) |
|
|
obstack_sgrow (node_obstack, "\n"); |
|
|
*/ |
|
|
obstack_fgrow2 (node_obstack, _("$default\treduce using rule %d (%s)"), |
|
|
rule, tags[symbol]); |
|
|
} |
|
|
#endif |
|
122 |
} |
} |
123 |
|
|
124 |
|
|