Skip to content

Commit

Permalink
pretty-printing the new add correctly
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@404 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Nov 6, 2008
1 parent 2adc0c7 commit 4d3cd33
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion shared/xsl/xbgf2xbnf.xslt
Expand Up @@ -32,7 +32,7 @@
</xsl:choose>
</xsl:template>

<!-- add, chain, define, ... -->
<!-- chain, define, ... -->

<xsl:template match="xbgf:*">
<xsl:value-of select="local-name()" />
Expand All @@ -46,6 +46,37 @@
</xsl:text>
</xsl:template>

<xsl:template match="xbgf:add">
<xsl:value-of select="local-name()" />
<xsl:text>(
</xsl:text>
<xsl:choose>
<xsl:when test="./bgf:production">
<xsl:apply-templates select="./bgf:production"/>
<xsl:call-template name="context">
<xsl:with-param name="in" select="./in"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="./bgf:expression">
<xsl:apply-templates select="./bgf:expression[1]"/>
<xsl:text>,
</xsl:text>
<xsl:apply-templates select="./bgf:expression[2]"/>
<xsl:choose>
<xsl:when test="in">
<xsl:text>
</xsl:text>
<xsl:call-template name="context">
<xsl:with-param name="in" select="./in"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:when>
</xsl:choose>
<xsl:text>);
</xsl:text>
</xsl:template>

<xsl:template match="xbgf:designate">
<xsl:value-of select="local-name()" />
<xsl:text>("</xsl:text>
Expand Down

0 comments on commit 4d3cd33

Please sign in to comment.