From 32f19b6b47b41c46fdeb66b26cc67b609f8ae48c Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Sun, 28 Oct 2007 00:24:22 +0000 Subject: [PATCH] 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 . * 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. --- ChangeLog | 13 +++++++++++++ data/xslt/xml2text.xsl | 4 ++-- data/xslt/xml2xhtml.xsl | 4 ++-- src/print-xml.c | 7 ++++--- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8e62d84..e666d588 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-10-27 Joel E. Denny + + 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 + . + * 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. + 2007-10-21 Joel E. Denny * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After diff --git a/data/xslt/xml2text.xsl b/data/xslt/xml2text.xsl index 291045ad..9271e8c7 100644 --- a/data/xslt/xml2text.xsl +++ b/data/xslt/xml2text.xsl @@ -127,7 +127,7 @@ - + @@ -140,7 +140,7 @@ - + diff --git a/data/xslt/xml2xhtml.xsl b/data/xslt/xml2xhtml.xsl index 891aa68f..ff850455 100644 --- a/data/xslt/xml2xhtml.xsl +++ b/data/xslt/xml2xhtml.xsl @@ -298,7 +298,7 @@ - + @@ -315,7 +315,7 @@ - + on left: diff --git a/src/print-xml.c b/src/print-xml.c index 73a18af5..da8bfcab 100644 --- a/src/print-xml.c +++ b/src/print-xml.c @@ -429,8 +429,9 @@ print_grammar (FILE *out, int level) item_number *rhsp; xml_printf (out, level + 2, - "", - i, xml_escape (tag)); + "", + token_translations[i], i, xml_escape (tag)); for (r = 0; r < nrules; r++) for (rhsp = rules[r].rhs; *rhsp >= 0; rhsp++) @@ -465,7 +466,7 @@ print_grammar (FILE *out, int level) } xml_printf (out, level + 2, - "", + "", i, xml_escape (tag)); if (left_count > 0) -- 2.45.2