Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consistent testing; param -> variable in XSL
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@737 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
1 parent
024fdde
commit cbd2c0e
Showing
9 changed files
with
121 additions
and
18 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
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
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
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 |
---|---|---|
@@ -1,11 +1,22 @@ | ||
Loading XML file 'tests/fl.bgf'. | ||
g( [], [ | ||
p([], program, +n(function)), | ||
p([], function, ','([n('ID'), +n('ID'), t(=), n(expr), +n('NEWLINE')])), | ||
p([], expr, ;([n(binary), n(apply), n(ifThenElse)])), | ||
p([], binary, ','([n(atom), *(','([n(ops), n(atom)]))])), | ||
p([], apply, ','([n('ID'), +n(atom)])), | ||
p([], ifThenElse, ','([t(if), n(expr), t(then), n(expr), t(else), n(expr)])), | ||
p([], atom, ;([n('ID'), n('INT'), ','([t('('), n(expr), t(')')])])), | ||
p([], ops, ;([t(==), t(+), t(-)])) | ||
]) | ||
program: | ||
function+ | ||
function: | ||
ID ID+ "=" expr NEWLINE+ | ||
expr: | ||
binary | ||
apply | ||
ifThenElse | ||
binary: | ||
atom (ops atom)* | ||
apply: | ||
ID atom+ | ||
ifThenElse: | ||
"if" expr "then" expr "else" expr | ||
atom: | ||
ID | ||
INT | ||
"(" expr ")" | ||
ops: | ||
"==" | ||
"+" | ||
"-" |
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 @@ | ||
source1 = ../../fl/emf1/fl.ecore | ||
target1 = fl1 | ||
source2 = ../../fl/emf2/model/fl.ecore | ||
target2 = fl2 | ||
|
||
test: | ||
make clean | ||
../../../shared/tools/ecore2bgf ${source1} ${target1}.bgf | ||
../../../shared/tools/ecore2bgf ${source2} ${target2}.bgf | ||
../../../shared/tools/bgf2bnf ${target1}.bgf ${target1}.out | ||
../../../shared/tools/bgf2bnf ${target2}.bgf ${target2}.out | ||
diff ${target1}.out ${target1}.baseline | ||
diff ${target2}.out ${target2}.baseline | ||
|
||
clean: | ||
rm -f *.bgf *.out |
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,30 @@ | ||
Program: | ||
function::Function+ | ||
Function: | ||
name::STR argument::Argument+ definition::Exp | ||
Argument: | ||
name::STR | ||
Exp: | ||
LiteralExp | ||
ArgumentExp | ||
IfThenElseExp | ||
ApplyExp | ||
BinaryExp | ||
LiteralExp: | ||
value::INT | ||
ArgumentExp: | ||
argument::Argument | ||
IfThenElseExp: | ||
if::Exp then::Exp else::Exp | ||
ApplyExp: | ||
function::Function argument::Exp+ | ||
BinaryExp: | ||
PlusExp | ||
MinusExp | ||
EqualExp | ||
PlusExp: | ||
left::Exp right::Exp | ||
MinusExp: | ||
left::Exp right::Exp | ||
EqualExp: | ||
left::Exp right::Exp |
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,24 @@ | ||
Apply: | ||
name::STR arg::Expr+ | ||
Argument: | ||
name::STR | ||
Binary: | ||
ops::Ops left::Expr right::Expr | ||
Expr: | ||
Apply | ||
Argument | ||
Binary | ||
IfThenElse | ||
Literal | ||
Function: | ||
name::STR arg::STR+ rhs::Expr | ||
IfThenElse: | ||
ifExpr::Expr thenExpr::Expr elseExpr::Expr | ||
Literal: | ||
info::INT | ||
Ops: | ||
Equal::EPSILON | ||
Plus::EPSILON | ||
Minus::EPSILON | ||
ProgramType: | ||
function::Function+ |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
source = ../../fl/txl/FL.Txl | ||
target = tests/fl | ||
|
||
test: | ||
../../../shared/tools/txl2bgf ../../fl/txl/FL.Txl fl.bgf | ||
../../../shared/tools/bgf2bnf fl.bgf | ||
make clean | ||
../../../shared/tools/txl2bgf ${source} ${target}.bgf | ||
../../../shared/tools/bgf2bnf ${target}.bgf ${target}.out | ||
diff ${target}.out ${target}.baseline | ||
|
||
clean: | ||
rm -f tests/*.bgf tests/*.out |
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,15 @@ | ||
program: | ||
fun+ | ||
fun: | ||
id id+ "=" expression newline | ||
expression: | ||
expression op expression | ||
id expression+ | ||
"if" expression "then" expression "else" expression | ||
"(" expression ")" | ||
id | ||
number | ||
op: | ||
"+" | ||
"-" | ||
"==" |