2007-11-08 Paolo Bonzini <bonzini@gnu.org>
[bison.git] / src / conflicts.c
index 3a8edba4529dcd9b120f0148134825970a8cc0c6..9a02d4bb28dbdaf4880448e34d735978576aba19 100644 (file)
@@ -145,7 +145,7 @@ log_resolution (rule *r, symbol_number token,
            case shift_resolution:
            case right_resolution:
              obstack_fgrow2 (&solved_conflicts_xml_obstack,
            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));
                              " type=\"shift\">",
                              r->number,
                              xml_escape (symbols[token]->tag));
@@ -154,7 +154,7 @@ log_resolution (rule *r, symbol_number token,
            case reduce_resolution:
            case left_resolution:
              obstack_fgrow2 (&solved_conflicts_xml_obstack,
            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));
                              " type=\"reduce\">",
                              r->number,
                              xml_escape (symbols[token]->tag));
@@ -162,7 +162,7 @@ log_resolution (rule *r, symbol_number token,
 
            case nonassoc_resolution:
              obstack_fgrow2 (&solved_conflicts_xml_obstack,
 
            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));
                              " type=\"error\">",
                              r->number,
                              xml_escape (symbols[token]->tag));
@@ -522,47 +522,6 @@ conflicts_output (FILE *out)
     fputs ("\n\n", out);
 }
 
     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   |
 /*--------------------------------------------------------.
 | Total the number of S/R and R/R conflicts.  Unlike the  |
 | code in conflicts_output, however, count EACH pair of   |