sp = rules[r].rhs;
/* Display the lookahead tokens? */
- if (report_flag & report_lookahead_tokens)
+ if (report_flag & report_lookahead_tokens
+ && item_number_is_rule_number (*sp1))
{
reductions *reds = s->reductions;
int red = state_reduction_find (s, &rules[r]);
item_number *rhsp;
xml_printf (out, level + 2,
- "<terminal type=\"%d\" symbol=\"%s\">",
+ "<terminal number=\"%d\" name=\"%s\">",
i, xml_escape (tag));
for (r = 0; r < nrules; r++)
}
xml_printf (out, level + 2,
- "<nonterminal type=\"%d\" symbol=\"%s\">",
+ "<nonterminal number=\"%d\" name=\"%s\">",
i, xml_escape (tag));
if (left_count > 0)