Skip to content

Commit

Permalink
some new metrics plus makefile tweaking
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@318 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Oct 2, 2008
1 parent 91b575d commit 2bb53d2
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 13 deletions.
24 changes: 24 additions & 0 deletions shared/tools/xbgflc
@@ -0,0 +1,24 @@
#!/bin/sh

# Get our hands on basedir
LOCAL1=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
cd ${LOCAL1}

if [ $# -ne 1 ]; then
echo "This tool runs some metrics on a XBGF document"
echo "Usage: xbgflc <BGF-input>"
exit 1
elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
/bin/echo -n "Total lines: "
wc -l $1
/bin/echo -n "Total transformations: "
xpath $1 `cat ${SLPS}/topics/presentation/metrics/transformations.xpath` 2> /dev/null
/bin/echo -n "Total issues solved: "
cat $1 | grep -c "<\!--"
fi
25 changes: 17 additions & 8 deletions topics/extraction/html2bgf/Makefile
@@ -1,13 +1,22 @@
build:

test:
python xpathpre.py ../../java/jls1/syntax.html >jls1.html
python html2bgf.py jls1.html jls1.bgf
python html2bgf.py ../../java/jls2/syntax.html jls2.bgf
python html2bgf.py ../../java/jls3/syntax.html jls3.bgf
../../../shared/tools/checkxml bgf jls1.bgf
../../../shared/tools/checkxml bgf jls2.bgf
../../../shared/tools/checkxml bgf jls3.bgf
@python getpre.py ../../java/jls1/syntax.kw ../../java/jls1/syntax.html parse.html
@python html2bgf.py parse.html jls1.bgf | grep "problems encountered"
@python getpre.py ../../java/jls1/collect.kw ../../java/jls1/collected.html parse.html
@python html2bgf.py parse.html jls1c.bgf | grep "problems encountered"
@python html2bgf.py ../../java/jls2/syntax.html jls2.bgf | grep "problems encountered"
@python getpre.py ../../java/jls2/collect.kw ../../java/jls2/collected.html parse.html
@python html2bgf.py parse.html jls2c.bgf | grep "problems encountered"
@python html2bgf.py ../../java/jls3/syntax.html jls3.bgf | grep "problems encountered"
@python getpre.py ../../java/jls3/collect.kw ../../java/jls3/collected.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

clean:
rm -f *.bgf jls1.html
rm -f *.bgf parse.html
2 changes: 1 addition & 1 deletion topics/java/jls1/collect.kw
Expand Up @@ -15,7 +15,7 @@
8.1.5
8.3
8.3.1
8.4
8.4/2
8.4.1/2
8.4.3
8.4.4
Expand Down
6 changes: 2 additions & 4 deletions topics/java/lci/Makefile
Expand Up @@ -6,10 +6,8 @@ diff2: test
gdt bgf/jls1app.prepare1.refactorStatements.refactorTypes.structure1.addFeatures1to2.cropFeatures1.bgf bgf/jls2.prepare2.bgf

diff:
../../../shared/tools/xbgf xbgf/refactorMiscDeclarations.xbgf bgf/jls2doc.fixErrors2doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes.deyaccifyExpressions.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations.refactorInterfaceDeclarations.bgf bgf/jls2doc.fixErrors2doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes.deyaccifyExpressions.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations.refactorInterfaceDeclarations.refactorMiscDeclarations.bgf
../../../shared/tools/xbgf xbgf/breakSemantics2doc.xbgf bgf/jls2doc.fixErrors2doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes.deyaccifyExpressions.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations.refactorInterfaceDeclarations.refactorMiscDeclarations.bgf bgf/jls2doc.fixErrors2doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes.deyaccifyExpressions.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations.refactorInterfaceDeclarations.refactorMiscDeclarations.breakSemantics2doc.bgf
../../../shared/tools/gdt bgf/jls2syntax.fixErrors2.prepare2.expandOps.bgf bgf/jls2doc.fixErrors2doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes.deyaccifyExpressions.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations.refactorInterfaceDeclarations.refactorMiscDeclarations.breakSemantics2doc.bgf

../../../shared/tools/xbgf xbgf/refactorClassDeclarations3.xbgf bgf/jls3doc.fixErrors3doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes3.deyaccifyExpressions3.inlineStatements2doc.inlineExpressions2doc.bgf bgf/jls3doc.fixErrors3doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes3.deyaccifyExpressions3.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations3.bgf
../../../shared/tools/gdt bgf/jls3syntax.fixErrors3.prepare3.bgf bgf/jls3doc.fixErrors3doc.unifyModifiers.unifyNames.deyaccify2doc.refactorTypes3.deyaccifyExpressions3.inlineStatements2doc.inlineExpressions2doc.refactorClassDeclarations3.bgf


test:
Expand Down
1 change: 1 addition & 0 deletions topics/presentation/metrics/transformations.xpath
@@ -0,0 +1 @@
count(/*[local-name()='sequence']/*)

0 comments on commit 2bb53d2

Please sign in to comment.