summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeb <unknown>2004-04-29 08:11:20 +0000
committerpeb <unknown>2004-04-29 08:11:20 +0000
commit51da7e3c0f5e743f3508fa3e6b645f2ccacb81ab (patch)
treed748d69b1300cb3f17d3a9af37361f4c5fc0cc83
parentb5bb4fc2b5b1d7e8ce17eb87722ba11e46a2ab2b (diff)
29/4-04, peb: added directory 'testConversions' with a simple grammar
for testing grammar conversions
-rw-r--r--grammars/testConversions/SimpleAbs.gf24
-rw-r--r--grammars/testConversions/SimpleEng.gf29
-rw-r--r--grammars/testConversions/SimpleEngRes.gf8
-rw-r--r--grammars/testConversions/SimpleSwe.gf57
-rw-r--r--grammars/testConversions/SimpleSweRes.gf27
5 files changed, 145 insertions, 0 deletions
diff --git a/grammars/testConversions/SimpleAbs.gf b/grammars/testConversions/SimpleAbs.gf
new file mode 100644
index 000000000..0cd6d3a05
--- /dev/null
+++ b/grammars/testConversions/SimpleAbs.gf
@@ -0,0 +1,24 @@
+
+abstract SimpleAbs = {
+
+cat
+S; VP; NP; V; N; D;
+
+fun
+cyclic : S -> S;
+mkS : NP -> V -> S;
+mkVP : V -> NP -> VP;
+mkNP1 : D -> N -> NP;
+mkNP2 : N -> NP;
+
+robin : NP;
+dog : N;
+child : N;
+love : V;
+hate : V;
+one : D;
+all : D;
+
+}
+
+
diff --git a/grammars/testConversions/SimpleEng.gf b/grammars/testConversions/SimpleEng.gf
new file mode 100644
index 000000000..dce5fb999
--- /dev/null
+++ b/grammars/testConversions/SimpleEng.gf
@@ -0,0 +1,29 @@
+
+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};
+
+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};
+
+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};
+
+}
+
+
diff --git a/grammars/testConversions/SimpleEngRes.gf b/grammars/testConversions/SimpleEngRes.gf
new file mode 100644
index 000000000..21b7e7c3e
--- /dev/null
+++ b/grammars/testConversions/SimpleEngRes.gf
@@ -0,0 +1,8 @@
+
+resource SimpleEngRes = {
+
+param Num = Sg | Pl;
+
+}
+
+
diff --git a/grammars/testConversions/SimpleSwe.gf b/grammars/testConversions/SimpleSwe.gf
new file mode 100644
index 000000000..36ca77ee0
--- /dev/null
+++ b/grammars/testConversions/SimpleSwe.gf
@@ -0,0 +1,57 @@
+
+concrete SimpleSwe of SimpleAbs = open SimpleSweRes in {
+
+lincat
+S = {s : Str};
+VP = {s : Str};
+NP = {s : Str};
+V = {s : Str};
+N = {s : Num => Str ; g : Gen};
+D = {s : Gen => Str ; n : Num};
+
+lin
+cyclic x = x;
+mkS x y = {s = x.s ++ y.s};
+mkVP x y = {s = x.s ++ y.s};
+mkNP1 x y = {s = x.s ! y.g ++ y.s ! x.n};
+mkNP2 x = {s = x.s ! Pl};
+
+robin = {s = "Robin"};
+dog = {s = table {Sg => "hund" ; Pl => "hundar"} ; g = Utr};
+child = {s = table {_ => "barn"} ; g = Neu};
+love = {s = "älskar"};
+hate = {s = "hatar"};
+one = {s = table {Utr => "en" ; Neu => "ett"} ; n = Sg};
+all = {s = table {_ => "alla"} ; n = Pl};
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/grammars/testConversions/SimpleSweRes.gf b/grammars/testConversions/SimpleSweRes.gf
new file mode 100644
index 000000000..f846f62e6
--- /dev/null
+++ b/grammars/testConversions/SimpleSweRes.gf
@@ -0,0 +1,27 @@
+
+resource SimpleSweRes = {
+
+param Num = Sg | Pl;
+param Gen = Utr | Neu;
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+