Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started a separate test directory for declarative grammar transformat…
…ions
- Loading branch information
1 parent
0949bb4
commit 786e2a0
Showing
10 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
test: | ||
cd tests && make test | ||
|
||
clean: | ||
rm -f *~ | ||
cd tests && make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.xbgf | ||
*.log | ||
tmp* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
test: | ||
ls -1 *.mbgf | xargs -n1 ./testperform | ||
|
||
quiet: | ||
ls -1 *.mbgf | xargs -n1 ./quiettest | ||
|
||
build: | ||
|
||
rebuild: | ||
make clean | ||
make build | ||
|
||
%.test: | ||
./testperform $* | ||
|
||
%.quiet: | ||
./quiettest $* | ||
|
||
clean: | ||
rm -f *.out | ||
rm -f *.log | ||
rm -f *~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# m1 file.mbgf one two | ||
# $0 $1 $2 $3 | ||
../../tri/mbgf2xbgf.py $1 $2 $3 tmp.xbgf | ||
xbgf tmp.xbgf `xpath $1 'mbgf:sequence/sources/src[@name="'$2'"]/text()' 2> /dev/null` tmp1.bgf | ||
gdt tmp1.bgf `xpath $1 'mbgf:sequence/sources/src[@name="'$3'"]/text()' 2> /dev/null` || exit -1 | ||
rm tmp.xbgf tmp1.bgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf"> | ||
<bgf:production> | ||
<nonterminal>a</nonterminal> | ||
<bgf:expression> | ||
<sequence> | ||
<bgf:expression> | ||
<nonterminal>foo</nonterminal> | ||
</bgf:expression> | ||
<bgf:expression> | ||
<terminal>bar</terminal> | ||
</bgf:expression> | ||
</sequence> | ||
</bgf:expression> | ||
</bgf:production> | ||
</bgf:grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf"> | ||
<bgf:production> | ||
<nonterminal>b</nonterminal> | ||
<bgf:expression> | ||
<sequence> | ||
<bgf:expression> | ||
<nonterminal>foo</nonterminal> | ||
</bgf:expression> | ||
<bgf:expression> | ||
<terminal>bar</terminal> | ||
</bgf:expression> | ||
</sequence> | ||
</bgf:expression> | ||
</bgf:production> | ||
</bgf:grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf"> | ||
<bgf:production> | ||
<nonterminal>c</nonterminal> | ||
<bgf:expression> | ||
<sequence> | ||
<bgf:expression> | ||
<nonterminal>foo</nonterminal> | ||
</bgf:expression> | ||
<bgf:expression> | ||
<terminal>bar</terminal> | ||
</bgf:expression> | ||
</sequence> | ||
</bgf:expression> | ||
</bgf:production> | ||
</bgf:grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mbgf:sequence xmlns:bgf="http://planet-sl.org/bgf" xmlns:mbgf="http://planet-sl.org/mbgf"> | ||
<sources> | ||
<src name="a">naming-abc-1.bgf</src> | ||
<src name="b">naming-abc-2.bgf</src> | ||
<src name="c">naming-abc-3.bgf</src> | ||
</sources> | ||
<name-bind> | ||
<name>x</name> | ||
<src name="a">a</src> | ||
<src name="b">b</src> | ||
<src name="c">c</src> | ||
</name-bind> | ||
</mbgf:sequence> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
/bin/echo -n $1 | ||
/bin/echo -n ' ' | ||
(./testperform $1 >/dev/null 2>/dev/null && echo OK) || echo FAIL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
echo [Test MBGF] `basename $1 .mbgf` | ||
./m1 $1 a b | ||
./m1 $1 a c | ||
./m1 $1 b a | ||
./m1 $1 b c | ||
./m1 $1 c a | ||
./m1 $1 c b | ||
|
||
# | ||
# | ||
# | ||
# rm -f `basename $1 .xbgf`.log | ||
# touch `basename $1 .xbgf`.log | ||
# ../../../../shared/tools/checkxml bgf `basename $1 .xbgf`.bgf || exit -1 | ||
# ../../../../shared/tools/checkxml xbgf `basename $1 .xbgf`.xbgf || exit -1 | ||
# ../../../../shared/tools/xbgf `basename $1 .xbgf`.xbgf `basename $1 .xbgf`.bgf `basename $1 .xbgf`.out || exit -1 | ||
# ../../../../shared/tools/gdt `basename $1 .xbgf`.out `basename $1 .xbgf`.baseline || exit -1 |