diff options
| author | peb <unknown> | 2004-06-02 11:17:15 +0000 |
|---|---|---|
| committer | peb <unknown> | 2004-06-02 11:17:15 +0000 |
| commit | 7716f818869971da138cf706c124a6be73bbab62 (patch) | |
| tree | 4ec44ec8a042d15b48a4554ef8333e6395487689 /grammars/testConversions | |
| parent | 9b0a96859790a4d30bf2071a20a7e7d29dbd1131 (diff) | |
*** empty log message ***
Diffstat (limited to 'grammars/testConversions')
| -rw-r--r-- | grammars/testConversions/MicroAbs.gf | 12 | ||||
| -rw-r--r-- | grammars/testConversions/MicroCnc.gf | 22 | ||||
| -rw-r--r-- | grammars/testConversions/SimpleAbs.gf | 7 | ||||
| -rw-r--r-- | grammars/testConversions/SimpleEng.gf | 5 |
4 files changed, 39 insertions, 7 deletions
diff --git a/grammars/testConversions/MicroAbs.gf b/grammars/testConversions/MicroAbs.gf index 44a3a0982..3e2e6c24b 100644 --- a/grammars/testConversions/MicroAbs.gf +++ b/grammars/testConversions/MicroAbs.gf @@ -1,8 +1,16 @@ abstract MicroAbs = { -cat S; +cat S; V; VV; W; -fun vars : S; +fun +sv : V -> S; +vars : VV; +ww : W -> W; +svw : V -> W -> S; +supr : V -> V -> S; +supredup : S -> S -> S; +suplbl : V -> S; +reorder : V -> V -> V; } diff --git a/grammars/testConversions/MicroCnc.gf b/grammars/testConversions/MicroCnc.gf index c58c44c9b..a88795ec4 100644 --- a/grammars/testConversions/MicroCnc.gf +++ b/grammars/testConversions/MicroCnc.gf @@ -1,10 +1,26 @@ -concrete MicroCnc of MicroAbs = { +concrete MicroCnc of MicroAbs = open MicroRes in { -lincat S = {a : {s1:Str ; s2:Str}}; +lincat +S = {s : Str}; +VV = {a : {s1:Str ; s2:Str}}; +V = {s1 : Str ; s2 : Str ; p : PQ}; +W = {s : Num => Str ; p : PQ => Num}; -lin vars = {a = variants { {s1="a" ; s2=variants{"b";"c"}} ; {s1="d";s2="e"} }}; +lin +sv x = {s = x.s1 ++ x.s2}; +vars = {a = variants { {s1="a" ; s2=variants{"b";"c"}} ; {s1="d";s2="e"} }}; +ww x = {s = table {Sg => x.s!(x.p!P); + Pl => x.s!(x.p!Q Pl)}; + p = table {P => Sg ; Q n => n}}; +svw x y = {s = x.s2 ++ y.s!(y.p!x.p) ++ x.s1}; +supr x y = {s = x.s1 ++ "a" ++ x.s2}; +supredup x y = {s = x.s ++ "b" ++ x.s}; +suplbl x = {s = x.s1}; +reorder x y = {s1 = x.s2 ++ y.s1 ++ x.s1; + s2 = y.s2 ++ y.s1; + p = x.p}; } diff --git a/grammars/testConversions/SimpleAbs.gf b/grammars/testConversions/SimpleAbs.gf index 0cd6d3a05..2222bfc28 100644 --- a/grammars/testConversions/SimpleAbs.gf +++ b/grammars/testConversions/SimpleAbs.gf @@ -2,14 +2,16 @@ abstract SimpleAbs = { cat -S; VP; NP; V; N; D; +S; VP; NP; V; N; D; P; PP; fun cyclic : S -> S; -mkS : NP -> V -> S; +mkS : NP -> VP -> S; mkVP : V -> NP -> VP; mkNP1 : D -> N -> NP; mkNP2 : N -> NP; +mkNP3 : NP -> PP -> NP; +mkPP : P -> NP -> PP; robin : NP; dog : N; @@ -18,6 +20,7 @@ love : V; hate : V; one : D; all : D; +inside : P; } diff --git a/grammars/testConversions/SimpleEng.gf b/grammars/testConversions/SimpleEng.gf index dce5fb999..20bed94ff 100644 --- a/grammars/testConversions/SimpleEng.gf +++ b/grammars/testConversions/SimpleEng.gf @@ -8,6 +8,8 @@ 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; @@ -15,6 +17,8 @@ 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 = x.s ++ y.s}; robin = {s = "Robin" ; n = Sg}; dog = {s = table {Sg => "dog" ; Pl => "dogs"}}; @@ -23,6 +27,7 @@ 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"}; } |
