Skip to content

Commit

Permalink
xldf:move is not xldf:place; xbgf.bgf completion split into several f…
Browse files Browse the repository at this point in the history
…iles

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@496 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Feb 25, 2009
1 parent 2234f95 commit 8f5ff87
Show file tree
Hide file tree
Showing 13 changed files with 690 additions and 444 deletions.
1 change: 1 addition & 0 deletions shared/xsd/ldf.xsd
Expand Up @@ -57,6 +57,7 @@
<xsd:element name="p" type="xsd:string"/>
<xsd:element name="list" type="ldf:SimpleList"/>
<xsd:element name="formula" type="xsd:string"/>
<xsd:element name="sample" type="xsd:string"/>
<xsd:element ref="bgf:production"/>
<!-- later redo with MathML -->
<!--<xsd:element ref="mml:math"/>-->
Expand Down
29 changes: 22 additions & 7 deletions shared/xsd/xldf.xsd
Expand Up @@ -35,8 +35,9 @@
</xsd:annotation>
<xsd:choice>
<xsd:element ref="xldf:insert"/>
<xsd:element ref="xldf:import"/>
<xsd:element ref="xldf:move"/>
<xsd:element ref="xldf:import-grammar"/>
<xsd:element ref="xldf:import-sample"/>
<xsd:element ref="xldf:place"/>
<xsd:element ref="xldf:rename"/>
<xsd:element ref="xldf:append"/>
<xsd:element ref="xldf:add-section"/>
Expand Down Expand Up @@ -84,7 +85,7 @@
</xsd:complexType>
</xsd:element>

<xsd:element name="move">
<xsd:element name="place">
<xsd:annotation>
<xsd:documentation>
TBD
Expand Down Expand Up @@ -133,16 +134,30 @@
</xsd:complexType>
</xsd:element>

<xsd:element name="import">
<xsd:element name="import-grammar">
<xsd:annotation>
<xsd:documentation>
Deprecated
TBD
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="target" type="xsd:string"/> <!-- IDREF -->
<xsd:element name="file" type="xsd:string"/> <!-- IDREF -->
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="import-sample">
<xsd:annotation>
<xsd:documentation>
TBD
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="target" type="xsd:string"/> <!-- IDREF -->
<xsd:element name="file" type="xsd:string"/> <!-- IDREF -->
<xsd:element name="target" type="xsd:string"/> <!-- IDREF -->
<xsd:element name="file" type="xsd:string"/> <!-- IDREF -->
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Expand Down
54 changes: 33 additions & 21 deletions topics/languedoc/Makefile
@@ -1,32 +1,44 @@
build:
../../shared/tools/xsd2bgf ../../shared/xsd/ldf.xsd ldf.bgf
../../topics/extraction/xsd2ldf/ldfgen.py ../../shared/xsd/ldf.xsd ldf.bgf ldf.ldf
../../shared/tools/ldf2pdf ldf.ldf ldf.pdf
validator = ../../shared/tools/checkxml

test:
build: bgf_pretty.bgf xbgf.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeIntro.xldf xbgf.ldf xbgf1.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeFoldSection.xldf xbgf1.ldf xbgf2.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeRefSection.xldf xbgf2.ldf xbgf3.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeIncSection.xldf xbgf3.ldf xbgf4.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeDecSection.xldf xbgf4.ldf xbgf5.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeRevSections.xldf xbgf5.ldf xbgf6.ldf
python ../../topics/transformation/xldf/xldf.py xldf/completeDecorSection.xldf xbgf6.ldf xbgf7.ldf
xsltproc ../../shared/xsl/ldf2tex.xslt xbgf7.ldf > xbgf.tex
pdflatex -interaction=batchmode xbgf
pdflatex -interaction=batchmode xbgf

xbgf:
../../shared/tools/xsd2bgf ../../shared/xsd/xbgf.xsd xbgf.bgf
../../shared/tools/xbgf beautify.xbgf xbgf.bgf xbgf_1.bgf
../../topics/extraction/xsd2ldf/ldfgen.py ../../shared/xsd/xbgf.xsd xbgf_1.bgf xbgf.ldf
python ../../topics/transformation/xldf/xldf.py complete.xldf xbgf.ldf xbgf_1.ldf
xsltproc ../../shared/xsl/ldf2xhtml.xslt xbgf_1.ldf | python ../../topics/presentation/ldf2pdf/closemeta.py > xbgf.html
xsltproc ../../shared/xsl/xhtml2fo.xslt xbgf.html > xbgf.fo
../../download/fop/fop -q xbgf.fo xbgf.pdf
bgf_pretty.bgf:
../../shared/tools/xsd2bgf ../../shared/xsd/bgf.xsd bgf.bgf
../../shared/tools/xbgf beautify_bgf.xbgf bgf.bgf bgf_pretty.bgf

tex:
xbgf.ldf:
../../shared/tools/xsd2bgf ../../shared/xsd/xbgf.xsd xbgf.bgf
../../shared/tools/xsd2bgf ../../shared/xsd/bgf.xsd bgf.bgf
../../shared/tools/xbgf beautify_xbgf.xbgf xbgf.bgf xbgf_1.bgf
../../shared/tools/xbgf beautify_bgf.xbgf bgf.bgf bgf_pretty.bgf
../../topics/extraction/xsd2ldf/ldfgen.py ../../shared/xsd/xbgf.xsd xbgf_1.bgf xbgf.ldf
python ../../topics/transformation/xldf/xldf.py complete.xldf xbgf.ldf xbgf_1.ldf
xsltproc ../../shared/xsl/ldf2tex.xslt xbgf_1.ldf > xbgf.tex
pdflatex -interaction=batchmode xbgf
pdflatex -interaction=batchmode xbgf

rebuild:
make clean
make samples
make build

samples:
../../shared/tools/xbgf2xbnf bnf/xbgf/designate.xbgf designate.xbnf
../../shared/tools/xbgf2xbnf bnf/xbgf/preferBnf.xbgf preferBnf.xbnf
../../shared/tools/xbgf2xbnf bnf/xbgf/refactorBnf.xbgf refactorBnf.xbnf
../../shared/tools/xbgf2xbnf bnf/xbgf/stripTerminals.xbgf stripTerminals.xbnf
../../shared/tools/xbgf2xbnf bnf/xbgf/stripWhitespace.xbgf stripWhitespace.xbnf

clean:
rm -f xbgf*.bgf xbgf*.ldf xbgf.html xbgf.fo xbgf.pdf
rm -f xbgf*.bgf xbgf*.ldf xbgf.html xbgf.fo xbgf.pdf *.xbnf
rm -f bgf*.bgf ldf*.bgf ldf*.ldf ldf.fo ldf.pdf
rm -f *.aux *.log *.toc *.tex

check:
ls -1 *.xbgf | xargs -n1 ${validator} xbgf
ls -1 *.bgf | xargs -n1 ${validator} bgf
ls -1 *.ldf | xargs -n1 ${validator} ldf
26 changes: 14 additions & 12 deletions topics/languedoc/bnf/xbgf/preferBnf.xbgf
Expand Up @@ -35,16 +35,8 @@
</bgf:expression>
</bgf:production>
</xbgf:disappear>
<xbgf:rename>
<nonterminal>
<from>expression</from>
<to>symbol</to>
</nonterminal>
</xbgf:rename>
<xbgf:inline>label</xbgf:inline>
<xbgf:inline>terminal</xbgf:inline>
<xbgf:inline>nonterminal</xbgf:inline>
<xbgf:inline>selector</xbgf:inline>
<xbgf:reroot/>

<xbgf:narrow>
<bgf:expression>
<star>
Expand All @@ -62,12 +54,22 @@
</bgf:expression>
</xbgf:narrow>

<xbgf:rename>
<nonterminal>
<from>expression</from>
<to>symbol</to>
</nonterminal>
</xbgf:rename>
<xbgf:inline>label</xbgf:inline>
<xbgf:inline>terminal</xbgf:inline>
<xbgf:inline>nonterminal</xbgf:inline>
<xbgf:inline>selector</xbgf:inline>

<xbgf:vertical>
<nonterminal>symbol</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>value</nonterminal>
</xbgf:vertical>

<xbgf:reroot/>
</xbgf:sequence>
</xbgf:sequence>

0 comments on commit 8f5ff87

Please sign in to comment.