summaryrefslogtreecommitdiff
path: root/grammars/ljung/thesis/Erasing.gf
blob: 8b393eec8b70419c221b24a70f4eba0226fbf20f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

-- the example 4.1 from Ljunglöf (2004, page 82) 

concrete Erasing of ErasingAbs = {

lincat 
S = { s : Str };
A = { s1 : Str; s2 : Str };
B = { s : Str };
C = { s : Str };

lin

f x = { s = x.s1 };

g x y z = { s1 = x.s2 ++ y.s;
      	    s2 = x.s1 ++ z.s };

a = { s1 = "a1"; s2 = "a2" };

b = { s = "b" };

c = { s = "c" };


}