mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
For the XML output's terminal element, rename @number to @token-number,
and add @symbol-number. In the nonterminal element, rename @number to @symbol-number. Discussed starting at <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>. * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for renames. (xsl:template match="nonterminal"): Likewise. * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise. (xsl:template match="nonterminal"): Likewise. * src/print-xml.c (print_grammar): Implement.
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="line-length" select="66" />
|
||||
<xsl:with-param name="text">
|
||||
<xsl:value-of select="concat(' (', @number, ')')"/>
|
||||
<xsl:value-of select="concat(' (', @token-number, ')')"/>
|
||||
<xsl:apply-templates select="rule" />
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
<xsl:template match="nonterminal">
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:value-of select="concat(' (', @number, ')')"/>
|
||||
<xsl:value-of select="concat(' (', @symbol-number, ')')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:variable name="output">
|
||||
<xsl:call-template name="line-wrap">
|
||||
|
||||
Reference in New Issue
Block a user