Permalink
Browse files

topics/extraction order: TXL extractor

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@831 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Sep 28, 2010
1 parent 257f310 commit 9beccccd041f7990faac6a249e5e41a799a0090e
View
@@ -11,24 +11,24 @@ if [ ! -r $1 ]; then
exit 1
elif [ $# -eq 2 ]; then
rm -f $2
txl $1 ${SLPS}/topics/extraction/txl2bgf/TXLGrammar/Txl/txl.txl -xml > grammar.xml
txl $1 ${SLPS}/topics/extraction/txl/TXLGrammar/Txl/txl.txl -xml > grammar.xml
perl -pi -w -e 's/repeat statement/repeat_statement/g;' grammar.xml
perl -pi -w -e 's/repeat compound/repeat_compound/g;' grammar.xml
perl -pi -w -e 's/repeat literalOrType/repeat_literalOrType/g;' grammar.xml
perl -pi -w -e 's/repeat literalOrVariable/repeat_literalOrVariable/g;' grammar.xml
perl -pi -w -e 's/repeat barLiteralsAndTypes/repeat_barLiteralsAndTypes/g;' grammar.xml
perl -pi -w -e 's/opt typeRepeater/opt_typeRepeater/g;' grammar.xml
xsltproc ${SLPS}/shared/xsl/txl2bgf.xslt grammar.xml > $2
xsltproc ${SLPS}/topics/extraction/txl/txl2bgf.xslt grammar.xml > $2
rm -f grammar.xml
elif [ $# -eq 1 ]; then
txl $1 ${SLPS}/topics/extraction/txl2bgf/TXLGrammar/Txl/txl.txl -xml > grammar.xml
txl $1 ${SLPS}/topics/extraction/txl/TXLGrammar/Txl/txl.txl -xml > grammar.xml
perl -pi -w -e 's/repeat statement/repeat_statement/g;' grammar.xml
perl -pi -w -e 's/repeat compound/repeat_compound/g;' grammar.xml
perl -pi -w -e 's/repeat literalOrType/repeat_literalOrType/g;' grammar.xml
perl -pi -w -e 's/repeat literalOrVariable/repeat_literalOrVariable/g;' grammar.xml
perl -pi -w -e 's/repeat barLiteralsAndTypes/repeat_barLiteralsAndTypes/g;' grammar.xml
perl -pi -w -e 's/opt typeRepeater/opt_typeRepeater/g;' grammar.xml
xsltproc ${SLPS}/shared/xsl/txl2bgf.xslt grammar.xml > ${LOCAL}/`basename $1 .txl`.bgf
xsltproc ${SLPS}/topics/extraction/txl/txl2bgf.xslt grammar.xml > ${LOCAL}/`basename $1 .txl`.bgf
rm -f grammar.xml
else
echo "This tool extracts a BGF grammar from a TXL grammar"
File renamed without changes.
File renamed without changes.

0 comments on commit 9becccc

Please sign in to comment.