more test/srg to examples/test/srg

This commit is contained in:
krasimir
2008-10-20 11:11:59 +00:00
parent 31ccbdb34c
commit 14cd21db6d
6 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
cat S;
fun f : S -> S ;
fun g : S ;
lin f s = { s = s.s } ;
lin g = { s = "g" } ;

View File

@@ -0,0 +1,9 @@
cat S; E;
fun s : S ;
fun es : E -> S -> S ;
fun e : E ;
lin s = { s = "s" } ;
lin es e s = { s = e.s ++ s.s } ;
lin e = { s = [] } ;

View File

@@ -0,0 +1,11 @@
-- a grammar with an indirect cycle
cat S; G;
fun f : S ;
fun fg : G -> S ;
fun gf : S -> G ;
lin f = { s = "f" } ;
lin fg x = x;
lin gf x = x;

View File

@@ -0,0 +1,9 @@
cat S; E;
fun f : E -> S ;
fun g : S -> S ;
fun e : E ;
lin f e = { s = e.s } ;
lin g s = { s = s.s ++ "x" } ;
lin e = { s = "e" } ;

View File

@@ -0,0 +1,7 @@
cat S;
fun f : S -> S ;
g : S ;
lin f x = { s = x.s ++ "f" } ;
g = { s = "s" } ;

View File

@@ -0,0 +1,4 @@
cat S;
fun f : S;
lin f = { s = variants {"a"; "b"} ++ variants {"c"; "d"} ++ variants {"e"; "f"} ++ variants { "g";"h";} } ;