]> git.saurik.com Git - bison.git/commitdiff
tests: fix maintainer-xml-check.
authorJoel E. Denny <joeldenny@joeldenny.org>
Fri, 30 Apr 2010 23:50:52 +0000 (19:50 -0400)
committerJoel E. Denny <joeldenny@joeldenny.org>
Sun, 2 May 2010 00:41:10 +0000 (20:41 -0400)
* data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
Update output to include comments now produced by --graph.
(xsl:template match="automaton"): As for --graph, name the
digraph after the grammar file.
* src/print-xml.c (escape_bufs): Enlarge array.
(print_xml): Add bug-report and url attributes to
bison-xml-report element.
(cherry picked from commit bc81de36b7ef78ff280e14a173e5cc5d5a3191eb)

ChangeLog
data/xslt/xml2dot.xsl
src/print-xml.c

index 5ee3b75717b2a50434663e8de63d1886c52de264..454a0c0f2dab7c0f3457a6fd59c06bfc6217cdab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-05-01  Joel E. Denny  <joeldenny@joeldenny.org>
+
+       tests: fix maintainer-xml-check.
+       * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
+       Update output to include comments now produced by --graph.
+       (xsl:template match="automaton"): As for --graph, name the
+       digraph after the grammar file.
+       * src/print-xml.c (escape_bufs): Enlarge array.
+       (print_xml): Add bug-report and url attributes to
+       bison-xml-report element.
+
 2010-05-01  Joel E. Denny  <joeldenny@joeldenny.org>
 
        In DOT output, convert from "/*" comments to "//" comments.
index 887a99171bf113bc209259ad2e48e590e002c03b..836bb1b6faf3366da2970dc02feee4d7a8e0d540 100644 (file)
 </xsl:template>
 
 <xsl:template match="bison-xml-report">
-  <xsl:apply-templates select="automaton"/>
+  <xsl:text>// Generated by GNU Bison </xsl:text>
+  <xsl:value-of select="@version"/>
+  <xsl:text>.&#10;</xsl:text>
+  <xsl:text>// Report bugs to &lt;</xsl:text>
+  <xsl:value-of select="@bug-report"/>
+  <xsl:text>&gt;.&#10;</xsl:text>
+  <xsl:text>// Home page: &lt;</xsl:text>
+  <xsl:value-of select="@url"/>
+  <xsl:text>&gt;.&#10;&#10;</xsl:text>
+  <xsl:apply-templates select="automaton">
+    <xsl:with-param name="filename" select="filename"/>
+  </xsl:apply-templates>
 </xsl:template>
 
 <xsl:template match="automaton">
-  <xsl:text>digraph Automaton {&#10;</xsl:text>
+  <xsl:param name="filename"/>
+  <xsl:text>digraph "</xsl:text>
+  <xsl:call-template name="escape">
+    <xsl:with-param name="subject" select="$filename"/>
+  </xsl:call-template>
+  <xsl:text>"&#10;{&#10;</xsl:text>
   <xsl:apply-templates select="state"/>
   <xsl:text>}&#10;</xsl:text>
 </xsl:template>
index 0d68171bf1ff13e8d464c049cc18f974db1f8350..b23de387da20f731c3966c8ac63bf266a0e8ccd6 100644 (file)
@@ -48,7 +48,7 @@ struct escape_buf
   char *ptr;
   size_t size;
 };
-static struct escape_buf escape_bufs[2];
+static struct escape_buf escape_bufs[3];
 
 
 /*--------------------------------.
@@ -505,8 +505,12 @@ print_xml (void)
   FILE *out = xfopen (spec_xml_file, "w");
 
   fputs ("<?xml version=\"1.0\"?>\n\n", out);
-  xml_printf (out, level, "<bison-xml-report version=\"%s\">",
-             xml_escape (VERSION));
+  xml_printf (out, level,
+              "<bison-xml-report version=\"%s\" bug-report=\"%s\""
+              " url=\"%s\">",
+              xml_escape_n (0, VERSION),
+              xml_escape_n (1, PACKAGE_BUGREPORT),
+              xml_escape_n (2, PACKAGE_URL));
 
   fputc ('\n', out);
   xml_printf (out, level + 1, "<filename>%s</filename>",