Permalink
Browse files

encoded dependencies on XPath and XQuery processors

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@775 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Feb 22, 2010
1 parent 353a2c2 commit 1989dd975857d224b7568888e2c8bb7fd5339c7d
Showing with 33 additions and 4 deletions.
  1. +3 −0 shared/tools/asfix2btf
  2. +11 −0 shared/tools/bgflc
  3. +3 −0 shared/tools/sdf2bgf
  4. +6 −2 shared/tools/xbgfi
  5. +10 −2 shared/tools/xbgflc
View
@@ -13,6 +13,9 @@ if [ $# -ne 3 ]; then
elif [ ! -r $2 ]; then
echo "Oops: $2 not found or not readable."
exit 1
elif [ -z `which asfe` ] || [ -z `which sglr` ] || [ -z `which unparsePT` ]; then
echo 'Need these tools in path: sglr, asfe, unparsePT.'
exit 2
else
# Build extractor if needed
cd ${SLPS}/topics/extraction/asfix2btf
View
@@ -14,6 +14,16 @@ if [ $# -ne 1 ]; then
elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
elif [ `uname` == "Linux" ] ; then
echo -n "Total productions: "
xpath -e `cat ${SLPS}/topics/presentation/metrics/productions.xpath` $1 2> /dev/null
echo -n "Total nonterminals: "
xpath -e `cat ${SLPS}/topics/presentation/metrics/nonterminals.xpath` $1 2> /dev/null
echo -n "Top nonterminals: "
xpath -e `cat ${SLPS}/topics/presentation/metrics/top.xpath` $1 2> /dev/null
echo -n "Bottom nonterminals: "
xpath -e `cat ${SLPS}/topics/presentation/metrics/bottom.xpath` $1 2> /dev/null
echo
else
/bin/echo -n "Total productions: "
xpath $1 `cat ${SLPS}/topics/presentation/metrics/productions.xpath` 2> /dev/null
@@ -23,4 +33,5 @@ else
xpath $1 `cat ${SLPS}/topics/presentation/metrics/top.xpath` 2> /dev/null
/bin/echo -n "Bottom nonterminals: "
xpath $1 `cat ${SLPS}/topics/presentation/metrics/bottom.xpath` 2> /dev/null
echo
fi
View
@@ -11,6 +11,9 @@ if [ $# -le 1 ]; then
echo "This extractor gives a BGF for a list of SDF modules"
echo "Usage: sdf2bgf <SDF-module> [<SDF-module> ...] <BGF-output>"
exit 1
elif [ -z `which asfe` ] || [ -z `which sglr` ] || [ -z `which unparsePT` ]; then
echo 'Need these tools in path: sglr, asfe, unparsePT.'
exit 2
else
# Build extractor if needed
cd ${XTR}
View
@@ -16,9 +16,13 @@ elif [ ! -r $1 ]; then
exit 1
else
/bin/echo -n "Number of lines: "
wc -l $1
wc -l $1 | awk '{print $1}'
/bin/echo -n "Number of transformations: "
xpath $1 `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` 2> /dev/null
if [ `uname` == "Linux" ] ; then
xpath -e `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` $1 2> /dev/null
else
xpath $1 `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` 2> /dev/null
fi
/bin/echo -n "Number of unsafe optimizations: "
grep -c BREFACTOR $1
/bin/echo -n "Number of issues (1): "
View
@@ -20,7 +20,15 @@ else
/bin/echo -n "Total issues solved: "
cat $1 | grep -c "<\!--"
/bin/echo -n "Total transformations: "
xpath $1 `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` 2> /dev/null
if [ `uname` == "Linux" ] ; then
xpath -e `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` $1 2> /dev/null
else
xpath $1 `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` 2> /dev/null
fi
/bin/echo "XBGF commands statistics:"
galax-run ${SLPS}/topics/presentation/metrics/perxbgfcommand.xq -serialize wf -doc xsd=${SLPS}/shared/xsd/xbgf.xsd -doc xbgf=$1 -language dxq | grep -v "glx:result"
if [ -z `which galax-run`] ; then
echo ' Unavailable, please install Galax!'
else
galax-run ${SLPS}/topics/presentation/metrics/perxbgfcommand.xq -serialize wf -doc xsd=${SLPS}/shared/xsd/xbgf.xsd -doc xbgf=$1 -language dxq | grep -v "glx:result"
fi
fi

0 comments on commit 1989dd9

Please sign in to comment.