Skip to content

Commit

Permalink
Languedoc refactoring
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@590 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Apr 13, 2009
1 parent cbd11df commit 1e0dd8f
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 24 deletions.
2 changes: 1 addition & 1 deletion shared/xsl/bgf2bnf.xslt
Expand Up @@ -79,7 +79,7 @@
<xsl:template match="value">
<xsl:choose>
<xsl:when test=". = 'string'">
<xsl:text>STRING</xsl:text>
<xsl:text>STR</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>INT</xsl:text>
Expand Down
10 changes: 5 additions & 5 deletions topics/languedoc/ldf/Makefile
@@ -1,14 +1,14 @@
validator = ../../shared/tools/checkxml

build: ldf.ldf
xsltproc ../../../shared/xsl/ldf2tex.xslt ldf.ldf > ldf.tex
build: tex
pdflatex -interaction=batchmode ldf
pdflatex -interaction=batchmode ldf

ldf.ldf:
tex:
../../../shared/tools/xsd2bgf ../../../shared/xsd/ldf.xsd ldf.bgf
../../../shared/tools/xbgf beautify.xbgf ldf.bgf ldf_cool.bgf
../../../topics/extraction/xsd2ldf/ldfgen.py ../../../shared/xsd/ldf.xsd ldf_cool.bgf ldf.ldf
../../../topics/extraction/xsd2ldf/ldfgen.py ../../../shared/xsd/ldf.xsd ldf.bgf ldf.ldf
../../../shared/tools/xldf ldf.xldf ldf.ldf ldf.ready.ldf
xsltproc ../../../shared/xsl/ldf2tex.xslt ldf.ready.ldf > ldf.tex

rebuild:
make clean
Expand Down
10 changes: 0 additions & 10 deletions topics/languedoc/ldf/beautify.xbgf

This file was deleted.

12 changes: 12 additions & 0 deletions topics/languedoc/ldf/ldf.xldf
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<xldf:evolution-sequence
xmlns:xldf="http://planet-sl.org/xldf">

<xldf:transform-document>
<file>xldf/dropBgf.xldf</file>
</xldf:transform-document>
<xldf:transform-document>
<file>xldf/beautify.xldf</file>
</xldf:transform-document>

</xldf:evolution-sequence>
13 changes: 13 additions & 0 deletions topics/languedoc/ldf/xldf/beautify.xldf
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<xldf:evolution-sequence
xmlns:xldf="http://planet-sl.org/xldf"
xmlns:xbgf="http://planet-sl.org/xbgf">

<xldf:transform-grammar>
<target>simpleType-body</target>
<xbgf:vertical>
<nonterminal>body</nonterminal>
</xbgf:vertical>
</xldf:transform-grammar>

</xldf:evolution-sequence>
30 changes: 30 additions & 0 deletions topics/languedoc/ldf/xldf/dropBgf.xldf
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xldf:evolution-sequence
xmlns:xldf="http://planet-sl.org/xldf">

<xldf:drop>
<section>element-grammar</section>
</xldf:drop>
<xldf:drop>
<section>element-production</section>
</xldf:drop>
<xldf:drop>
<section>element-expression</section>
</xldf:drop>
<xldf:drop>
<section>simpleType-value</section>
</xldf:drop>
<xldf:drop>
<section>simpleType-label</section>
</xldf:drop>
<xldf:drop>
<section>simpleType-nonterminal</section>
</xldf:drop>
<xldf:drop>
<section>simpleType-selector</section>
</xldf:drop>
<xldf:drop>
<section>simpleType-terminal</section>
</xldf:drop>

</xldf:evolution-sequence>
8 changes: 5 additions & 3 deletions topics/languedoc/xbgf/Makefile
Expand Up @@ -2,13 +2,15 @@ validator = ../../../shared/tools/checkxml
xldf = ../../../shared/tools/xldf
xbgf = ../../../shared/tools/xbgf

build: bnfbgf.pdf
build: bnfbgf.pdf tex
pdflatex -interaction=batchmode xbgf
pdflatex -interaction=batchmode xbgf

tex:
../../../shared/tools/xsd2bgf ../../../shared/xsd/xbgf.xsd xbgf.bgf
../../../topics/extraction/xsd2ldf/ldfgen.py ../../../shared/xsd/xbgf.xsd xbgf.bgf xbgf.ldf
${xldf} xbgf.xldf xbgf.ldf xbgf.ready.ldf
xsltproc ../../../shared/xsl/ldf2tex.xslt xbgf.ready.ldf > xbgf.tex
pdflatex -interaction=batchmode xbgf
pdflatex -interaction=batchmode xbgf

bnfbgf.pdf:
cd ../../presentation/prettyprint ; make
Expand Down
12 changes: 7 additions & 5 deletions topics/languedoc/xldf/Makefile
@@ -1,13 +1,15 @@
validator = ../../shared/tools/checkxml

build:
../../../shared/tools/xsd2bgf ../../../shared/xsd/xldf.xsd xldf.bgf
../../../topics/extraction/xsd2ldf/ldfgen.py ../../../shared/xsd/xldf.xsd xldf.bgf xldf.ldf
../../../shared/tools/xldf xldf.xldf xldf.ldf xldf_ready.ldf
xsltproc ../../../shared/xsl/ldf2tex.xslt xldf_ready.ldf > xldf.tex
build: tex
pdflatex -interaction=batchmode xldf
pdflatex -interaction=batchmode xldf

tex:
../../../shared/tools/xsd2bgf ../../../shared/xsd/xldf.xsd xldf.bgf
../../../topics/extraction/xsd2ldf/ldfgen.py ../../../shared/xsd/xldf.xsd xldf.bgf xldf.ldf
../../../shared/tools/xldf xldf.xldf xldf.ldf xldf.ready.ldf
xsltproc ../../../shared/xsl/ldf2tex.xslt xldf.ready.ldf > xldf.tex

rebuild:
make clean
make build
Expand Down

0 comments on commit 1e0dd8f

Please sign in to comment.