case shift_resolution:
case right_resolution:
obstack_fgrow2 (&solved_conflicts_xml_obstack,
- "<resolution rule=\"%d\" symbol=\"%s\""
+ " <resolution rule=\"%d\" symbol=\"%s\""
" type=\"shift\">",
r->number,
xml_escape (symbols[token]->tag));
case reduce_resolution:
case left_resolution:
obstack_fgrow2 (&solved_conflicts_xml_obstack,
- "<resolution rule=\"%d\" symbol=\"%s\""
+ " <resolution rule=\"%d\" symbol=\"%s\""
" type=\"reduce\">",
r->number,
xml_escape (symbols[token]->tag));
case nonassoc_resolution:
obstack_fgrow2 (&solved_conflicts_xml_obstack,
- "<resolution rule=\"%d\" symbol=\"%s\""
+ " <resolution rule=\"%d\" symbol=\"%s\""
" type=\"error\">",
r->number,
xml_escape (symbols[token]->tag));
fputs ("\n\n", out);
}
-void
-conflicts_output_xml (FILE *out, int level)
-{
- bool printed_sth = false;
- state_number i;
- int src_num;
- int rrc_num;
-
- for (i = 0; i < nstates; i++)
- {
- state *s = states[i];
- if (conflicts[i])
- {
- if (!printed_sth) {
- fputc ('\n', out);
- xml_puts (out, level, "<conflicts>");
- }
-
- src_num = count_sr_conflicts (s);
- rrc_num = count_rr_conflicts (s, true);
-
- if (src_num)
- xml_printf (out, level + 1,
- "<conflict state=\"%d\" num=\"%d\""
- " type=\"shift/reduce\"/>",
- i, src_num);
- if (rrc_num)
- xml_printf (out, level + 1,
- "<conflict state=\"%d\" num=\"%d\""
- " type=\"reduce/reduce\"/>",
- i, rrc_num);
-
- printed_sth = true;
- }
- }
- if (printed_sth)
- xml_puts (out, level, "</conflicts>");
- else
- xml_puts (out, level, "<conflicts/>");
-}
-
/*--------------------------------------------------------.
| Total the number of S/R and R/R conflicts. Unlike the |
| code in conflicts_output, however, count EACH pair of |