Skip to content

Commit

Permalink
more universal and more configurable extractor; +Eiffel grammar
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@1049 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed May 25, 2011
1 parent e75c52a commit 574e2a5
Show file tree
Hide file tree
Showing 21 changed files with 1,309 additions and 744 deletions.
31 changes: 18 additions & 13 deletions topics/export/hypertext/bgf2fancy.xslt
Expand Up @@ -77,30 +77,30 @@
<li>
<xsl:text>Number of defined nonterminal symbols: </xsl:text>
<strong>
<xsl:choose>
<xsl:when test="bgf:production/nonterminal[not(text()=../preceding-sibling::*/nonterminal/text())]">
<xsl:value-of select="count(bgf:production/nonterminal[not(text()=../preceding-sibling::*/nonterminal/text())])"/>
</xsl:when>
<xsl:otherwise>—</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="count(bgf:production/nonterminal[not(text()=../preceding-sibling::*/nonterminal/text())])"/>
</strong>
</li>
<li>
<xsl:text>Root nonterminal symbols: </xsl:text>
<xsl:choose>
<xsl:when test="root">
<xsl:for-each select="root">
<a href="#{.}" class="nt">
<xsl:value-of select="."/>
<code>
<a href="#{root[1]}" class="nt">
<xsl:value-of select="root[1]"/>
</a>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:for-each select="root[position()&gt;1]">
<xsl:text>, </xsl:text>
<a href="#{.}" class="nt">
<xsl:value-of select="."/>
</a>
</xsl:for-each>
</code>
</xsl:when>
<xsl:otherwise>—</xsl:otherwise>
</xsl:choose>
</li>
<li>
<xsl:text>Top nonterminal symbols: </xsl:text>
<xsl:text>Other top nonterminal symbols: </xsl:text>
<xsl:choose>
<xsl:when test="$xmlreport/top">
<strong>
Expand Down Expand Up @@ -148,7 +148,12 @@
<li>
<xsl:text>Number of used terminal symbols: </xsl:text>
<strong>
<xsl:value-of select="count($xmlreport/terminal)+count($xmlreport/keyword)"/>
<xsl:choose>
<xsl:when test="count($xmlreport/terminal)+count($xmlreport/keyword) &gt; 0">
<xsl:value-of select="count($xmlreport/terminal)+count($xmlreport/keyword)"/>
</xsl:when>
<xsl:otherwise>—</xsl:otherwise>
</xsl:choose>
</strong>
</li>
<xsl:if test="$xmlreport/terminal">
Expand Down
22 changes: 11 additions & 11 deletions topics/grammars/ada/Makefile
@@ -1,9 +1,9 @@
build:
cd kempe && make build
cd kellogg && make build
cd laemmel-verhoef && make build
cd lncs-2219 && make build
cd lncs-4348 && make build
extract:
cd kempe && make extract
cd kellogg && make extract
cd laemmel-verhoef && make extract
cd lncs-2219 && make extract
cd lncs-4348 && make extract

clean:
cd kempe && make clean
Expand All @@ -20,12 +20,12 @@ test:
cd lncs-4348 && make test

diff:
cp kempe/ada.bgf kempe.bgf
cp laemmel-verhoef/ada.bgf laemmel-verhoef.bgf
cp lncs-2219/ada.bgf lncs-2219.bgf
cp lncs-4348/ada.bgf lncs-4348.bgf
make build
make extract
../../../shared/tools/gdts kempe/ada.bgf kempe.bgf || exit -1
../../../shared/tools/gdts laemmel-verhoef/ada.bgf laemmel-verhoef.bgf || exit -1
../../../shared/tools/gdts lncs-2219/ada.bgf lncs-2219.bgf || exit -1
../../../shared/tools/gdts lncs-4348/ada.bgf lncs-4348.bgf || exit -1
cp kempe/ada.bgf kempe.bgf
cp laemmel-verhoef/ada.bgf laemmel-verhoef.bgf
cp lncs-2219/ada.bgf lncs-2219.bgf
cp lncs-4348/ada.bgf lncs-4348.bgf

0 comments on commit 574e2a5

Please sign in to comment.