Skip to content

Commit

Permalink
LDF pretty-printing
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@883 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Nov 24, 2010
1 parent d7b6e1d commit 19a6b03
Show file tree
Hide file tree
Showing 8 changed files with 1,431 additions and 8 deletions.
3 changes: 2 additions & 1 deletion shared/tools/xldf
Expand Up @@ -5,6 +5,7 @@ LOCAL1=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
export PYTHONPATH=${SLPS}/shared/python
cd ${LOCAL1}

if [ $# -ne 3 ]; then
Expand All @@ -18,5 +19,5 @@ elif [ ! -r $2 ]; then
exit 1
else
rm -f $3
python ${SLPS}/shared/python/xldf.py $1 $2 $3
python ${SLPS}/topics/transformation/xldf/xldf.py $1 $2 $3
fi
14 changes: 7 additions & 7 deletions shared/xsd/ldf.xsd
Expand Up @@ -132,7 +132,7 @@
<xsd:element name="version" type="xsd:string" default="1.0"/>
<xsd:element name="edition" type="xsd:string"/>
</xsd:choice>
<xsd:element name="previous" minOccurs="0" maxOccurs="unbounded" type="ldf:title-ve-uri">
<xsd:element name="previous" minOccurs="0" maxOccurs="unbounded" type="ldf:named-link">
<xsd:annotation>
<xsd:documentation>Previous version(s) of the same standard.</xsd:documentation>
</xsd:annotation>
Expand All @@ -145,7 +145,7 @@
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="title-ve-uri">
<xsd:complexType name="named-link">
<xsd:sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:choice minOccurs="0">
Expand Down Expand Up @@ -230,11 +230,11 @@
<!-- -->
<xsd:enumeration value="top-section"/>
<xsd:enumeration value="lexical-section"/>
<!-- -->
<!--
<xsd:enumeration value="description"/>
<xsd:enumeration value="syntax"/>
<xsd:enumeration value="example"/>
<xsd:enumeration value="subsection"/>
<xsd:enumeration value="example"/>
<xsd:enumeration value="subsection"/>-->
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Expand Down Expand Up @@ -322,7 +322,7 @@
<xsd:element ref="bgf:production"/>
</xsd:choice>
</xsd:group>
<xsd:group name="section">
<xsd:group name="any-section">
<xsd:choice>
<xsd:element ref="ldf:placeholder">
<xsd:annotation>
Expand All @@ -342,7 +342,7 @@
<xsd:element name="composite-section">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="ldf:section" maxOccurs="unbounded"/>
<xsd:group ref="ldf:any-section" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Expand Down
11 changes: 11 additions & 0 deletions topics/grammars/ldf/Makefile
@@ -0,0 +1,11 @@
test:
../../../shared/tools/xsd2bgf ../../../shared/xsd/ldf.xsd ldf.raw.bgf
../../../shared/tools/xbgf fold-roles.xbgf ldf.raw.bgf ldf.1.bgf
../../../shared/tools/xbgf fold-names.xbgf ldf.1.bgf ldf.2.bgf
../../../shared/tools/xbgf fold-meta.xbgf ldf.2.bgf ldf.3.bgf
../../../shared/tools/xbgf rename-types.xbgf ldf.3.bgf ldf.4.bgf
../../../shared/tools/xbgf beautify.xbgf ldf.4.bgf ldf.final.bgf
../../../shared/tools/bgf2bnf ldf.final.bgf ldf.final.bnf

clean:
rm -f *~ ldf.*

0 comments on commit 19a6b03

Please sign in to comment.