summaryrefslogtreecommitdiff
path: root/grammars/testConversions/SimpleEng.gf
blob: 07bee5a70ba464497a93ced7fb637feccb98fac5 (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
27
28
29
30
31
32
33
34

concrete SimpleEng of SimpleAbs = open SimpleEngRes in {

lincat
S  = {s : Str};
VP = {s : Num => Str};
NP = {s : Str ; n : Num};
V  = {s : Num => Str};
N  = {s : Num => Str};
D  = {s : Str ; n : Num};
P  = {s : Str};
PP = {s : Str};

lin 
cyclic x   = x;
mkS    x y = {s = x.s ++ y.s ! x.n};
mkVP   x y = {s = table {n => x.s ! n ++ y.s}};
mkNP1  x y = {s = x.s ++ y.s ! x.n ; n = x.n};
mkNP2  x   = {s = x.s ! Pl ; n = Pl};
mkNP3  x y = {s = x.s ++ y.s; n = x.n};
mkPP   x y = {s = y.s ++ x.s};

robin = {s = "Robin" ; n = Sg};
dog   = {s = table {Sg => "dog"   ; Pl => "dogs"}};
child = {s = table {Sg => "child" ; Pl => "children"}};
love  = {s = table {Sg => "loves" ; Pl => "love"}};
hate  = {s = table {Sg => "hates" ; Pl => "hate"}};
one   = {s = "one" ; n = Sg};
all   = {s = "all" ; n = Pl};
inside= {s = "in"};

}