mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/xslt/bison.xsl (bison:ruleNumber): Rename to...
(bison:ruleByNumber): ... this for clarity. * data/xslt/xml2dot.xsl (xsl:template match="item"): Update. * data/xslt/xml2text.xsl (xsl:template match="item"): Update. (xsl:template match="reduction"): Update. (xsl:template match="item"): Update. (xsl:template match="reduction"): Update. In the XML output, don't print the list of rules where symbols appear. Compute it in XSLT instead. Discussed at <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>. * data/xslt/bison.xsl (bison:ruleByLhs): New. (bison:ruleByRhs): New. * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use bison:ruleByRhs. (xsl:template match="terminal/rule"): Remove. (xsl:template match="nonterminal"): Use bison:ruleByLhs and bison:ruleByRhs. (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"): Remove. * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use bison:ruleByRhs and mode="number-link" for rule template. (xsl:template match="terminal/rule"): Remove. (xsl:template match="nonterminal"): Use bison:ruleByLhs and bison:ruleByRhs and mode="number-link" for rule template. (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"): Rewrite as... (xsl:template match="rule" mode="number-link"): ... this. * src/print-xml.c (print_grammar): Don't print the list of rules.
This commit is contained in:
@@ -26,9 +26,23 @@
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bison="http://www.gnu.org/software/bison/">
|
||||
|
||||
<xsl:key name="bison:ruleNumber"
|
||||
match="/bison-xml-report/grammar/rules/rule"
|
||||
use="@number"/>
|
||||
<xsl:key
|
||||
name="bison:ruleByNumber"
|
||||
match="/bison-xml-report/grammar/rules/rule"
|
||||
use="@number"
|
||||
/>
|
||||
<xsl:key
|
||||
name="bison:ruleByLhs"
|
||||
match="/bison-xml-report/grammar/rules/rule[
|
||||
@usefulness != 'useless-in-grammar']"
|
||||
use="lhs"
|
||||
/>
|
||||
<xsl:key
|
||||
name="bison:ruleByRhs"
|
||||
match="/bison-xml-report/grammar/rules/rule[
|
||||
@usefulness != 'useless-in-grammar']"
|
||||
use="rhs/symbol"
|
||||
/>
|
||||
|
||||
<!-- For the specified state, output: #sr-conflicts,#rr-conflicts -->
|
||||
<xsl:template match="state" mode="bison:count-conflicts">
|
||||
|
||||
Reference in New Issue
Block a user