]> git.saurik.com Git - bison.git/blobdiff - src/gram.c
Display the changes in cross-options.texi.
[bison.git] / src / gram.c
index 1f2885f07d37929b7019f5dc252e85bdc79fb818..6b9eda13b7c4d60df0950388bf27dfeec3919b81 100644 (file)
@@ -121,8 +121,7 @@ rule_rhs_print_xml (rule *r, FILE *out, int level)
       item_number *rp;
       xml_puts (out, level, "<rhs>");
       for (rp = r->rhs; *rp >= 0; rp++)
       item_number *rp;
       xml_puts (out, level, "<rhs>");
       for (rp = r->rhs; *rp >= 0; rp++)
-       xml_printf (out, level + 1, "<symbol class=\"%s\">%s</symbol>",
-                   symbol_class_get_string (symbols[*rp]),
+       xml_printf (out, level + 1, "<symbol>%s</symbol>",
                    xml_escape (symbols[*rp]->tag));
       xml_puts (out, level, "</rhs>");
     }
                    xml_escape (symbols[*rp]->tag));
       xml_puts (out, level, "</rhs>");
     }
@@ -221,8 +220,12 @@ grammar_rules_print_xml (FILE *out, int level)
           usefulness = "useless-in-parser";
         else
           usefulness = "useful";
           usefulness = "useless-in-parser";
         else
           usefulness = "useful";
-        xml_printf (out, level + 2, "<rule number=\"%d\" usefulness=\"%s\">",
-                    rules[r].number, usefulness);
+        xml_indent (out, level + 2);
+        fprintf (out, "<rule number=\"%d\" usefulness=\"%s\"",
+                 rules[r].number, usefulness);
+        if (rules[r].precsym)
+          fprintf (out, " percent_prec=\"%s\"", rules[r].precsym->tag);
+        fputs (">\n", out);
       }
       rule_lhs_print_xml (&rules[r], out, level + 3);
       rule_rhs_print_xml (&rules[r], out, level + 3);
       }
       rule_lhs_print_xml (&rules[r], out, level + 3);
       rule_rhs_print_xml (&rules[r], out, level + 3);