bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 06/10] reports: let html reports catch up with --report and --gra


From: Akim Demaille
Subject: [PATCH 06/10] reports: let html reports catch up with --report and --graph
Date: Sat, 11 Jul 2020 12:55:24 +0200

* data/xslt/xml2xhtml.xsl: Show the symbol types.
* tests/report.at: Adjust.
---
 data/xslt/xml2xhtml.xsl |  6 ++++++
 tests/report.at         | 12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/data/xslt/xml2xhtml.xsl b/data/xslt/xml2xhtml.xsl
index c269745b..a1afad2d 100644
--- a/data/xslt/xml2xhtml.xsl
+++ b/data/xslt/xml2xhtml.xsl
@@ -331,6 +331,9 @@
   <xsl:text>  </xsl:text>
   <li>
     <b><xsl:value-of select="@name"/></b>
+    <xsl:if test="string-length(@type) != 0">
+      <xsl:value-of select="concat(' &lt;', @type, '&gt;')"/>
+    </xsl:if>
     <xsl:value-of select="concat(' (', @token-number, ')')"/>
     <xsl:for-each select="key('bison:ruleByRhs', @name)">
       <xsl:apply-templates select="." mode="number-link"/>
@@ -343,6 +346,9 @@
   <xsl:text>  </xsl:text>
   <li>
     <b><xsl:value-of select="@name"/></b>
+    <xsl:if test="string-length(@type) != 0">
+      <xsl:value-of select="concat(' &lt;', @type, '&gt;')"/>
+    </xsl:if>
     <xsl:value-of select="concat(' (', @symbol-number, ')')"/>
     <xsl:text>&#10;    </xsl:text>
     <ul>
diff --git a/tests/report.at b/tests/report.at
index 9f6d6701..2250abbb 100644
--- a/tests/report.at
+++ b/tests/report.at
@@ -1233,8 +1233,8 @@ if test x"$XSLTPROC" != x""; then
   <li><b>error</b> (256)</li>
   <li><b>":="</b> (258) <a href="#rule_4">4</a></li>
   <li><b>"incr"</b> (259) <a href="#rule_8">8</a></li>
-  <li><b>"identifier"</b> (260) <a href="#rule_5">5</a> <a 
href="#rule_10">10</a></li>
-  <li><b>"number"</b> (261) <a href="#rule_11">11</a></li>
+  <li><b>"identifier"</b> &lt;std::string&gt; (260) <a href="#rule_5">5</a> <a 
href="#rule_10">10</a></li>
+  <li><b>"number"</b> &lt;int&gt; (261) <a href="#rule_11">11</a></li>
   <li><b>"("</b> (262) <a href="#rule_9">9</a></li>
   <li><b>")"</b> (263) <a href="#rule_9">9</a></li>
 </ul>
@@ -1265,25 +1265,25 @@ if test x"$XSLTPROC" != x""; then
       <li>on right: <a href="#rule_3">3</a></li>
     </ul>
   </li>
-  <li><b>id</b> (13)
+  <li><b>id</b> &lt;std::string&gt; (13)
     <ul>
       <li>on left: <a href="#rule_5">5</a></li>
       <li>on right: <a href="#rule_4">4</a></li>
     </ul>
   </li>
-  <li><b>exp</b> (14)
+  <li><b>exp</b> &lt;int&gt; (14)
     <ul>
       <li>on left: <a href="#rule_8">8</a> <a href="#rule_9">9</a> <a 
href="#rule_10">10</a> <a href="#rule_11">11</a></li>
       <li>on right: <a href="#rule_1">1</a> <a href="#rule_4">4</a> <a 
href="#rule_8">8</a> <a href="#rule_9">9</a></li>
     </ul>
   </li>
-  <li><b>@1</b> (15)
+  <li><b>@1</b> &lt;int&gt; (15)
     <ul>
       <li>on left: <a href="#rule_6">6</a></li>
       <li>on right: <a href="#rule_8">8</a></li>
     </ul>
   </li>
-  <li><b>@2</b> (16)
+  <li><b>@2</b> &lt;int&gt; (16)
     <ul>
       <li>on left: <a href="#rule_7">7</a></li>
       <li>on right: <a href="#rule_8">8</a></li>
-- 
2.27.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]