Skip to content

Commit

Permalink
a dummy noop/skip file; tweaked extract/inline tricks
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@841 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Oct 13, 2010
1 parent e76284a commit 3d483d7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 0 additions & 4 deletions topics/transformation/empty.xbgf

This file was deleted.

15 changes: 15 additions & 0 deletions topics/transformation/normalization/empty.xbgf
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<xbgf:sequence xmlns:xbgf="http://planet-sl.org/xbgf" xmlns:bgf="http://planet-sl.org/bgf">
<!-- an ugly replacement for a noop/id/skip command that is lacking in xbgf now -->
<xbgf:introduce>
<bgf:production>
<nonterminal>temporary_nonterminal_name_which_is_unique</nonterminal>
<bgf:expression>
<epsilon/>
</bgf:expression>
</bgf:production>
</xbgf:introduce>
<xbgf:eliminate>
<nonterminal>temporary_nonterminal_name_which_is_unique</nonterminal>
</xbgf:eliminate>
</xbgf:sequence>
2 changes: 1 addition & 1 deletion topics/transformation/normalization/subdefs/extract.xslt
Expand Up @@ -21,7 +21,7 @@
<bgf:production>
<nonterminal>
<xsl:value-of select="$name"/>
<xsl:text>-grp-</xsl:text>
<xsl:text>_grp_</xsl:text>
<xsl:value-of select="position()"/>
</nonterminal>
<bgf:expression>
Expand Down
2 changes: 1 addition & 1 deletion topics/transformation/normalization/subdefs/inline.xslt
Expand Up @@ -4,7 +4,7 @@
<xsl:template match="/bgf:grammar">
<xbgf:sequence xmlns:bgf="http://planet-sl.org/bgf" xmlns:xbgf="http://planet-sl.org/xbgf">
<xsl:for-each select="bgf:production">
<xsl:if test="contains(nonterminal,'-grp-')">
<xsl:if test="contains(nonterminal,'_grp_')">
<xbgf:inline>
<xsl:value-of select="nonterminal"/>
</xbgf:inline>
Expand Down

0 comments on commit 3d483d7

Please sign in to comment.