forked from GitHub/gf-core
Added very basic list test grammars.
This commit is contained in:
8
grammars/bringert/ListTest.gf
Normal file
8
grammars/bringert/ListTest.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
abstract ListTest = {
|
||||||
|
|
||||||
|
cat A; [A]; B; [B]{1};
|
||||||
|
|
||||||
|
fun apa : A;
|
||||||
|
fun bepa : B;
|
||||||
|
|
||||||
|
}
|
||||||
12
grammars/bringert/ListTestEng.gf
Normal file
12
grammars/bringert/ListTestEng.gf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
concrete ListTestEng of ListTest = {
|
||||||
|
|
||||||
|
lin BaseA = { s = "" } ;
|
||||||
|
lin ConsA a as = { s = a.s ++ "" ++ as.s } ;
|
||||||
|
|
||||||
|
lin BaseB b = { s = b.s } ;
|
||||||
|
lin ConsB b bs = { s = b.s ++ "," ++ bs.s } ;
|
||||||
|
|
||||||
|
lin apa = { s = "apa" } ;
|
||||||
|
lin bepa = { s = "bepa" } ;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user