Skip to content

Commit

Permalink
naming convention; enhancing the test data set for DCG2BGF extractor;…
Browse files Browse the repository at this point in the history
… fixing the extractor to cover the test set

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@903 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Dec 10, 2010
1 parent 08c3f77 commit 814e764
Show file tree
Hide file tree
Showing 12 changed files with 1,696 additions and 34 deletions.
8 changes: 7 additions & 1 deletion shared/prolog/cli/dcg2bgf.pro
Expand Up @@ -29,6 +29,12 @@ rhsToX([],true).

rhsToX({_},true).

rhsToX([0' ],t(' ')).

rhsToX([0' ],t('\t')).

rhsToX([10],n('NEWLINE')).

rhsToX(R,X)
:-
R = (_,_),
Expand All @@ -45,7 +51,7 @@ rhsToX(R1,X)
rhsToX(R,t(Y))
:-
R =.. [F,X],
member(F,[reserved,@]),
member(F,[reserved,keyword,@]),
name(Y,X).

rhsToX(R1,','([Y,*(','([X,Y]))]))
Expand Down
7 changes: 7 additions & 0 deletions topics/extraction/dcg/Makefile
@@ -0,0 +1,7 @@
build:

test:
cat tests/set | xargs -n1 ./testperform

clean:
rm -f *.bgf *~
6 changes: 6 additions & 0 deletions topics/extraction/dcg/testperform
@@ -0,0 +1,6 @@
#!/bin/sh

echo [Test Case] $1
../../../shared/tools/dcg2bgf $1 extracted.bgf
../../../shared/tools/validate bgf extracted.bgf
../../../shared/tools/gdt extracted.bgf tests/`echo $1 | tr -d ./`.baseline || exit -1

0 comments on commit 814e764

Please sign in to comment.