Permalink
Browse files

getting rid of checkxml and checkbtf tools in favour of a general 'va…

…lidate' tool

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@839 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Oct 12, 2010
1 parent 0060ce5 commit 88182109350e0c8e7e309895a218490ea492fddf
View
@@ -0,0 +1,27 @@
#!/bin/sh
# Get our hands on basedir
LOCAL1=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
cd ${LOCAL1}
if [ $# -ne 2 ]; then
echo "SLPS general validation tool"
echo "Usage: validate <format> <input>"
exit 1
elif [ ! -r $2 ]; then
echo "Oops: $2 not found or not readable."
exit 1
elif [ $1 == 'txl' ]; then
txl $2 ${SLPS}/topics/extraction/txl/TXLGrammar/Txl/txl.txl
elif [ $1 == 'btf' ]; then
/usr/local/bin/xmllint --noout --schema ${SLPS}/shared/xsd/$1.xsd $2
swipl -q -f ${SLPS}/shared/prolog/cli/checkbtf.pro -- $2
elif [ ! -r ${SLPS}/shared/xsd/$1.xsd ]; then
echo "Oops: schema for $1 not found or not readable."
exit 1
else
/usr/local/bin/xmllint --noout --schema ${SLPS}/shared/xsd/$1.xsd $2
fi
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build:
time make slice
@@ -28,10 +28,10 @@
<tool>
<name>validation</name>
<grammar>
<expand>tools</expand>/checkxml bgf
<expand>tools</expand>/validate bgf
</grammar>
<tree>
<expand>tools</expand>/checkbtf
<expand>tools</expand>/validate btf
</tree>
</tool>
<tool>
@@ -1,14 +1,15 @@
tools = ../../../shared/tools
validator = ${tools}/validate
build:
test:
${tools}/lci fl.lcf architecture
check:
${tools}/checkxml lcf fl.lcf
ls -1 xbgf/*.xbgf | xargs -n1 ${tools}/checkxml xbgf
ls -1 bgf/*.bgf | xargs -n1 ${tools}/checkxml bgf
${validator} lcf fl.lcf
ls -1 xbgf/*.xbgf | xargs -n1 ${validator} xbgf
ls -1 bgf/*.bgf | xargs -n1 ${validator} bgf
clean:
rm -f *~
@@ -33,10 +33,10 @@
<tool>
<name>validation</name>
<grammar>
<expand>tools</expand>/checkxml bgf
<expand>tools</expand>/validate bgf
</grammar>
<tree>
<expand>tools</expand>/checkbtf
<expand>tools</expand>/validate btf
</tree>
</tool>
<tool>
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build:
time make slice
@@ -1,14 +1,15 @@
tools = ../../../shared/tools
validator = ${tools}/validate
build:
test:
${tools}/lci java.lcf architecture
check:
${tools}/checkxml lcf java.lcf
ls -1 xbgf/*.xbgf | xargs -n1 ${tools}/checkxml xbgf
ls -1 bgf/*.bgf | xargs -n1 ${tools}/checkxml bgf
${validator} lcf java.lcf
ls -1 xbgf/*.xbgf | xargs -n1 ${validator} xbgf
ls -1 bgf/*.bgf | xargs -n1 ${validator} bgf
debug:
${tools}/bgf2bnf snapshot/impl1.bgf 1.bnf
@@ -19,7 +19,7 @@
<!--tool>
<name>validation</name>
<grammar>
<expand>tools</expand>/checkxml bgf
<expand>tools</expand>/validate bgf
</grammar>
</tool-->
<tool>
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build: tex html
pdflatex -interaction=batchmode bgf
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build: tex html
pdflatex -interaction=batchmode lcf
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build: tex html
pdflatex -interaction=batchmode ldf
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build: bnfbgf.pdf tex html
pdflatex -interaction=batchmode xbgf
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
build: tex html
pdflatex -interaction=batchmode xldf
@@ -1,11 +1,11 @@
build:
../../../shared/tools/spec2bgf xpath1.xml xpath1.bgf
../../../shared/tools/checkxml bgf xpath1.bgf
../../../shared/tools/validate bgf xpath1.bgf
/usr/local/bin/xsltproc --stringparam grammar `pwd`'/xpath1.bgf' ../../extraction/w3c/spec2ldf.xslt xpath1.xml > xpath1.ldf
../../../shared/tools/checkxml ldf xpath1.ldf
../../../shared/tools/validate ldf xpath1.ldf
test:
../../../shared/tools/checkxml ldf xpath1.ldf
../../../shared/tools/validate ldf xpath1.ldf
get:
curl -k http://www.w3.org/TR/1999/REC-xpath-19991116.xml > xpath1.xml
@@ -11,5 +11,11 @@ fl:
${tooldir}/txl2bgf FL2.txl fl3.bgf
${tooldir}/gdt fl1.bgf fl3.bgf
bgf-validate:
ls -1 *.bgf | xargs -n1 ${tooldir}/validate bgf
txl-validate:
ls -1 *.txl | xargs -n1 -I _ txl _ ../../extraction/txl/TXLGrammar/Txl/txl.txl
clean:
rm -f *~ *.bgf *.txl *.bnf
@@ -35,7 +35,7 @@ test:
cat fac.trm | sglr -p Main.tbl | asfe -e Main.eqs | unparsePT > myfactorial1.btf
xsltproc ../../../shared/xsl/btf2btf.xslt myfactorial1.btf > myfactorial.btf
cp ../xml2btf/tests/factorial.btf .
ls -1 *.btf | xargs -n1 checkxml btf
ls -1 *.btf | xargs -n1 validate btf
clean:
rm -f reduct.out
@@ -11,12 +11,12 @@ test:
@python html2bgf.py ../../java/jls3/app.html jls3.bgf | grep "problems encountered"
@python getpre.py ../../java/jls3/collect.kw ../../java/jls3/doc.html parse.html
@python html2bgf.py parse.html jls3c.bgf | grep "problems encountered"
@../../../shared/tools/checkxml bgf jls1.bgf
@../../../shared/tools/checkxml bgf jls2.bgf
@../../../shared/tools/checkxml bgf jls3.bgf
@../../../shared/tools/checkxml bgf jls1c.bgf
@../../../shared/tools/checkxml bgf jls2c.bgf
@../../../shared/tools/checkxml bgf jls3c.bgf
@../../../shared/tools/validate bgf jls1.bgf
@../../../shared/tools/validate bgf jls2.bgf
@../../../shared/tools/validate bgf jls3.bgf
@../../../shared/tools/validate bgf jls1c.bgf
@../../../shared/tools/validate bgf jls2c.bgf
@../../../shared/tools/validate bgf jls3c.bgf
compare:
../../../shared/tools/gdt jls1.bgf ../../java/lci/snapshot/jls1app.bgf
@@ -6,7 +6,7 @@ build:
test:
make clean-tests
../../../shared/tools/dcg2bgf ${source} ${target}.bgf
../../../shared/tools/checkxml bgf ${target}.bgf
../../../shared/tools/validate bgf ${target}.bgf
../../../shared/tools/showbgf ${target}.bgf > ${target}.out
diff ${target}.out ${target}.baseline
@@ -8,7 +8,7 @@ build:
test:
make clean-tests
../../../shared/tools/java2bgf ${basedir} ${package} ${target}.bgf
../../../shared/tools/checkxml bgf ${target}.bgf
../../../shared/tools/validate bgf ${target}.bgf
../../../shared/tools/showbgf ${target}.bgf > ${target}.out
diff ${target}.out ${target}.baseline
@@ -6,7 +6,7 @@ build:
test:
find ../../.. -name "*.ldf" | xargs -n1 ../../../shared/tools/ldf2bgf
ls -1 *.bgf | xargs -n1 ../../../shared/tools/checkxml bgf
ls -1 *.bgf | xargs -n1 ../../../shared/tools/validate bgf
clean:
rm -f *.bgf
@@ -30,7 +30,7 @@ test:
@cat ${flsdf}/*.sdf >> FL.trm
@echo ")" >>FL.trm
cat FL.trm | sglr -p Main.tbl | asfe -e Main.eqs | unparsePT > fl.bgf
../../../shared/tools/checkxml bgf fl.bgf
../../../shared/tools/validate bgf fl.bgf
clean:
rm -f reduct.out
@@ -2,7 +2,7 @@ build:
test:
../../../shared/tools/spec2bgf ../../grammars/xpath/xpath1.xml xpath.bgf
../../../shared/tools/checkxml bgf xpath.bgf
../../../shared/tools/validate bgf xpath.bgf
clean:
rm -f *~ *.bgf
@@ -5,7 +5,7 @@ bgf = ../../../shared/xsd/bgf.xsd
xbgf = ../../../shared/xsd/xbgf.xsd
btf = ../../../shared/xsd/btf.xsd
apps = ../../transformation/xbgf/apps
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
xml2btf = ../../../shared/tools/xml2btf
build:
@@ -3,7 +3,7 @@ bgf = ../../../shared/xsd/bgf.xsd
xbgf = ../../../shared/xsd/xbgf.xsd
xsd2bgf = ../../../shared/tools/xsd2bgf
showbgf = ../../../shared/tools/showbgf
validate = ../../../shared/tools/checkxml
validate = ../../../shared/tools/validate
build:
View
@@ -4,7 +4,7 @@ build:
test:
../../../shared/tools/ecore2bgf fl.ecore fl.bgf
../../../shared/tools/checkxml bgf fl.bgf
../../../shared/tools/validate bgf fl.bgf
clean:
rm -f *~ fl.bgf
View
@@ -1,7 +1,7 @@
all:
../../../shared/tools/checkxml ldf fl.ldf
../../../shared/tools/validate ldf fl.ldf
../../../shared/tools/ldf2bgf fl.ldf fl.bgf
../../../shared/tools/checkxml bgf fl.bgf
../../../shared/tools/validate bgf fl.bgf
clean:
rm -f fl.bgf
View
@@ -15,19 +15,19 @@ append.xbgf:
${xbgf}/massageXsd.xbgf \
${xbgf}/makeSignature.xbgf \
${xbgf}/stripSelectors.xbgf
${tools}/checkxml xbgf append.xbgf
${tools}/validate xbgf append.xbgf
limit.bgf: append.xbgf
${tools}/xsd2bgf ${schema} source.bgf
${tools}/checkxml bgf source.bgf
${tools}/validate bgf source.bgf
${tools}/xbgf append.xbgf source.bgf limit.bgf
${tools}/checkxml bgf limit.bgf
${tools}/validate bgf limit.bgf
limit.btf: append.xbgf
${tools}/xml2btf ${schema} ${xfactorial} source.btf
${tools}/checkbtf source.btf
${tools}/validate btf source.btf
${tools}/xbtf append.xbgf source.btf limit.btf
${tools}/checkbtf limit.btf
${tools}/validate btf limit.btf
rebuild:
make clean
View
@@ -15,19 +15,19 @@ append.xbgf:
${xbgf}/stripTerminals.xbgf \
${xbgf}/permuteArgs.xbgf \
${xbgf}/reroot.xbgf
${tools}/checkxml xbgf append.xbgf
${tools}/validate xbgf append.xbgf
limit.bgf: append.xbgf
${tools}/sdf2bgf ${sdf}/*.sdf source.bgf
${tools}/checkxml bgf source.bgf
${tools}/validate bgf source.bgf
${tools}/xbgf append.xbgf source.bgf limit.bgf
${tools}/checkxml bgf limit.bgf
${tools}/validate bgf limit.bgf
limit.btf: append.xbgf
${tools}/asfix2btf ${sdf} ${fl}/shared/factorial.txt source.btf
${tools}/checkbtf source.btf
${tools}/validate btf source.btf
${tools}/xbtf append.xbgf source.btf limit.btf
${tools}/checkbtf limit.btf
${tools}/validate btf limit.btf
rebuild:
make clean
@@ -1,6 +1,6 @@
test:
../../../shared/tools/spec2bgf xpath1.xml xpath.bgf
../../../shared/tools/checkxml bgf xpath.bgf
../../../shared/tools/validate bgf xpath.bgf
../../../shared/tools/xbgf xpath1.normalize.xbgf xpath.bgf xpath.fixed.bgf
../../../shared/tools/bgf2html xpath.fixed.bgf xpath.html
@@ -15,7 +15,7 @@ steps:
perl -pi -w -e 's/<unknown>\)<\/unknown>/<\/bgf:expression><\/sequence>/g;' xpath.v2.bgf
/usr/local/bin/xsltproc ../../extraction/w3c/postfix2confix.xslt xpath.v2.bgf > xpath.v3.bgf
/usr/local/bin/xsltproc ../../extraction/w3c/cleanup.xslt xpath.v3.bgf > xpath.v4.bgf
../../../shared/tools/checkxml bgf xpath.v4.bgf
../../../shared/tools/validate bgf xpath.v4.bgf
../../../shared/tools/xbgf xpath1.normalize.xbgf xpath.v4.bgf xpath.v5.bgf
../../../shared/tools/bgf2html xpath.v5.bgf xpath.html
@@ -1,4 +1,4 @@
validator = ../../../shared/tools/checkxml
validator = ../../../shared/tools/validate
all:
make clean
@@ -21,7 +21,7 @@
<tool>
<name>validation</name>
<grammar>
<expand>tools</expand>/checkxml bgf
<expand>tools</expand>/validate bgf
</grammar>
</tool>
<tool>

0 comments on commit 8818210

Please sign in to comment.