doc: use dot/'•' rather than point/'.'

AFAICT, "dotted rule" is a more frequent synonym of "item" than
"pointed rule".  So let's migrate to using "dot" only.

* doc/bison.texi: Use dot/'•' rather than point/'.'.

* src/print-xml.c (print_core): Use dot rather than point.  This is
not backward compatible, but AFAICT, we don't have actual user of the
XML output (but ourselves).  So...
* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl,
* data/xslt/xml2xhtml.xsl, tests/report.at: ... adjust.
This commit is contained in:
Akim Demaille
2020-06-23 07:21:52 +02:00
parent b65bd16e45
commit c4b1a2b68f
8 changed files with 181 additions and 187 deletions

View File

@@ -159,7 +159,7 @@
<xsl:param name="prev-rule-number"
select="preceding-sibling::item[1]/@rule-number"/>
<xsl:apply-templates select="key('bison:ruleByNumber', @rule-number)">
<xsl:with-param name="point" select="@point"/>
<xsl:with-param name="dot" select="@dot"/>
<xsl:with-param name="num" select="@rule-number"/>
<xsl:with-param name="prev-lhs"
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
@@ -169,7 +169,7 @@
</xsl:template>
<xsl:template match="rule">
<xsl:param name="point"/>
<xsl:param name="dot"/>
<xsl:param name="num"/>
<xsl:param name="prev-lhs"/>
<xsl:text>&#10;</xsl:text>
@@ -198,14 +198,14 @@
<xsl:text>:</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$point = 0">
<xsl:if test="$dot = 0">
<xsl:text> .</xsl:text>
</xsl:if>
<!-- RHS -->
<xsl:for-each select="rhs/symbol|rhs/empty">
<xsl:apply-templates select="."/>
<xsl:if test="$point = position()">
<xsl:if test="$dot = position()">
<xsl:text> .</xsl:text>
</xsl:if>
</xsl:for-each>

View File

@@ -300,7 +300,7 @@
name="prev-lhs"
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
/>
<xsl:with-param name="point" select="@point"/>
<xsl:with-param name="dot" select="@dot"/>
<xsl:with-param name="lookaheads">
<xsl:apply-templates select="lookaheads"/>
</xsl:with-param>
@@ -311,7 +311,7 @@
<xsl:param name="itemset"/>
<xsl:param name="pad"/>
<xsl:param name="prev-lhs"/>
<xsl:param name="point"/>
<xsl:param name="dot"/>
<xsl:param name="lookaheads"/>
<xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
@@ -347,11 +347,11 @@
<!-- RHS -->
<xsl:for-each select="rhs/*">
<xsl:if test="position() = $point + 1">
<xsl:if test="position() = $dot + 1">
<xsl:text> .</xsl:text>
</xsl:if>
<xsl:apply-templates select="."/>
<xsl:if test="position() = last() and position() = $point">
<xsl:if test="position() = last() and position() = $dot">
<xsl:text> .</xsl:text>
</xsl:if>
</xsl:for-each>

View File

@@ -75,7 +75,7 @@
ol.lower-alpha {
list-style-type: lower-alpha;
}
.point {
.dot {
color: #cc0000;
}
#footer {
@@ -457,7 +457,7 @@
<xsl:with-param name="prev-lhs"
select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
/>
<xsl:with-param name="point" select="@point"/>
<xsl:with-param name="dot" select="@dot"/>
<xsl:with-param name="lookaheads">
<xsl:apply-templates select="lookaheads"/>
</xsl:with-param>
@@ -468,7 +468,7 @@
<xsl:param name="itemset"/>
<xsl:param name="pad"/>
<xsl:param name="prev-lhs"/>
<xsl:param name="point"/>
<xsl:param name="dot"/>
<xsl:param name="lookaheads"/>
<xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
@@ -529,14 +529,14 @@
<!-- RHS -->
<xsl:for-each select="rhs/*">
<xsl:if test="position() = $point + 1">
<xsl:if test="position() = $dot + 1">
<xsl:text> </xsl:text>
<span class="point">&#x2022;</span>
<span class="dot">&#x2022;</span>
</xsl:if>
<xsl:apply-templates select="."/>
<xsl:if test="position() = last() and position() = $point">
<xsl:if test="position() = last() and position() = $dot">
<xsl:text> </xsl:text>
<span class="point">&#x2022;</span>
<span class="dot">&#x2022;</span>
</xsl:if>
</xsl:for-each>
<xsl:if test="$lookaheads">