Permalink
Browse files

starting point for BGF to TXL exporter

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@832 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Sep 28, 2010
1 parent 9becccc commit 47c4a7a09fcf407326cfe5b64a7e5c3153aee26d
View
@@ -0,0 +1,23 @@
#!/bin/sh
LOCAL=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
cd ${LOCAL}
if [ $# -eq 1 ]; then
OUTPUT=/dev/stdout
elif [ $# -ne 2 ]; then
echo "This tool pretty-prints BGF."
echo "Usage: bgf2txl <input-bgf-document> [<output-grammar>]"
echo "When output file is not specified, stdout is used."
exit 1
elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
OUTPUT=$2
fi
xsltproc ${SLPS}/shared/xsl/bgf2txl.xslt $1> ${OUTPUT}
@@ -0,0 +1,11 @@
all:
cp ../../fl/txl/FL.Txl FL0.Txl
txl2bgf FL0.Txl fl1.bgf
bgf2txl fl1.bgf FL2.Txl
txl2bgf FL2.Txl fl3.bgf
bgf2bnf fl1.bgf fl1.bnf
bgf2bnf fl3.bgf fl3.bnf
diff fl1.bnf fl3.bnf
clean:
rm -f *~

0 comments on commit 47c4a7a

Please sign in to comment.