summaryrefslogtreecommitdiff
path: root/testsuite/canonical/grammars
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/canonical/grammars')
-rw-r--r--testsuite/canonical/grammars/Foods.gf16
-rw-r--r--testsuite/canonical/grammars/FoodsFin.gf6
-rw-r--r--testsuite/canonical/grammars/FoodsI.gf29
-rw-r--r--testsuite/canonical/grammars/LexFoods.gf15
-rw-r--r--testsuite/canonical/grammars/LexFoodsFin.gf21
-rw-r--r--testsuite/canonical/grammars/Phrasebook.gf9
-rw-r--r--testsuite/canonical/grammars/PhrasebookBul.gf31
-rw-r--r--testsuite/canonical/grammars/PhrasebookGer.gf14
8 files changed, 141 insertions, 0 deletions
diff --git a/testsuite/canonical/grammars/Foods.gf b/testsuite/canonical/grammars/Foods.gf
new file mode 100644
index 000000000..aa68d4429
--- /dev/null
+++ b/testsuite/canonical/grammars/Foods.gf
@@ -0,0 +1,16 @@
+-- (c) 2009 Aarne Ranta under LGPL
+
+abstract Foods = {
+ flags startcat = Comment ;
+ cat
+ Comment ; Item ; Kind ; Quality ;
+ fun
+ -- Pred : Item -> Quality -> Comment ;
+ -- This, That, These, Those : Kind -> Item ;
+ -- Mod : Quality -> Kind -> Kind ;
+ -- Wine, Cheese, Fish, Pizza : Kind ;
+ -- Very : Quality -> Quality ;
+ -- Fresh, Warm, Italian,
+ -- Expensive, Delicious, Boring : Quality ;
+ Expensive: Quality;
+}
diff --git a/testsuite/canonical/grammars/FoodsFin.gf b/testsuite/canonical/grammars/FoodsFin.gf
new file mode 100644
index 000000000..962199805
--- /dev/null
+++ b/testsuite/canonical/grammars/FoodsFin.gf
@@ -0,0 +1,6 @@
+
+-- (c) 2009 Aarne Ranta under LGPL
+
+concrete FoodsFin of Foods = FoodsI with
+ (Syntax = SyntaxFin),
+ (LexFoods = LexFoodsFin) ;
diff --git a/testsuite/canonical/grammars/FoodsI.gf b/testsuite/canonical/grammars/FoodsI.gf
new file mode 100644
index 000000000..f4113b724
--- /dev/null
+++ b/testsuite/canonical/grammars/FoodsI.gf
@@ -0,0 +1,29 @@
+-- (c) 2009 Aarne Ranta under LGPL
+
+incomplete concrete FoodsI of Foods =
+ open Syntax, LexFoods in {
+ lincat
+ Comment = Utt ;
+ Item = NP ;
+ Kind = CN ;
+ Quality = AP ;
+ lin
+ Pred item quality = mkUtt (mkCl item quality) ;
+ This kind = mkNP this_Det kind ;
+ That kind = mkNP that_Det kind ;
+ These kind = mkNP these_Det kind ;
+ Those kind = mkNP those_Det kind ;
+ Mod quality kind = mkCN quality kind ;
+ Very quality = mkAP very_AdA quality ;
+
+ Wine = mkCN wine_N ;
+ Pizza = mkCN pizza_N ;
+ Cheese = mkCN cheese_N ;
+ Fish = mkCN fish_N ;
+ Fresh = mkAP fresh_A ;
+ Warm = mkAP warm_A ;
+ Italian = mkAP italian_A ;
+ Expensive = mkAP expensive_A ;
+ Delicious = mkAP delicious_A ;
+ Boring = mkAP boring_A ;
+}
diff --git a/testsuite/canonical/grammars/LexFoods.gf b/testsuite/canonical/grammars/LexFoods.gf
new file mode 100644
index 000000000..12ace208c
--- /dev/null
+++ b/testsuite/canonical/grammars/LexFoods.gf
@@ -0,0 +1,15 @@
+-- (c) 2009 Aarne Ranta under LGPL
+
+interface LexFoods = open Syntax in {
+ oper
+ wine_N : N ;
+ pizza_N : N ;
+ cheese_N : N ;
+ fish_N : N ;
+ fresh_A : A ;
+ warm_A : A ;
+ italian_A : A ;
+ expensive_A : A ;
+ delicious_A : A ;
+ boring_A : A ;
+}
diff --git a/testsuite/canonical/grammars/LexFoodsFin.gf b/testsuite/canonical/grammars/LexFoodsFin.gf
new file mode 100644
index 000000000..8b12f449f
--- /dev/null
+++ b/testsuite/canonical/grammars/LexFoodsFin.gf
@@ -0,0 +1,21 @@
+-- (c) 2009 Aarne Ranta under LGPL
+--# -coding=latin1
+
+instance LexFoodsFin of LexFoods =
+ open SyntaxFin, ParadigmsFin in {
+ oper
+ wine_N = mkN "viini" ;
+ pizza_N = mkN "pizza" ;
+ cheese_N = mkN "juusto" ;
+ fish_N = mkN "kala" ;
+ fresh_A = mkA "tuore" ;
+ warm_A = mkA
+ (mkN "l�mmin" "l�mpim�n" "l�mmint�" "l�mpim�n�" "l�mpim��n"
+ "l�mpimin�" "l�mpimi�" "l�mpimien" "l�mpimiss�" "l�mpimiin"
+ )
+ "l�mpim�mpi" "l�mpimin" ;
+ italian_A = mkA "italialainen" ;
+ expensive_A = mkA "kallis" ;
+ delicious_A = mkA "herkullinen" ;
+ boring_A = mkA "tyls�" ;
+}
diff --git a/testsuite/canonical/grammars/Phrasebook.gf b/testsuite/canonical/grammars/Phrasebook.gf
new file mode 100644
index 000000000..eff538f62
--- /dev/null
+++ b/testsuite/canonical/grammars/Phrasebook.gf
@@ -0,0 +1,9 @@
+abstract Phrasebook = {
+
+cat PlaceKind ;
+fun Airport : PlaceKind ;
+
+cat VerbPhrase ;
+fun VRead : VerbPhrase ;
+
+}
diff --git a/testsuite/canonical/grammars/PhrasebookBul.gf b/testsuite/canonical/grammars/PhrasebookBul.gf
new file mode 100644
index 000000000..347d69297
--- /dev/null
+++ b/testsuite/canonical/grammars/PhrasebookBul.gf
@@ -0,0 +1,31 @@
+--# -path=.:present
+
+concrete PhrasebookBul of Phrasebook =
+ open
+ SyntaxBul,
+ (R = ResBul),
+ ParadigmsBul,
+ Prelude in {
+
+ lincat
+ PlaceKind = CNPlace ;
+
+ oper
+ CNPlace : Type = {name : CN ; at : Prep ; to : Prep; isPl : Bool} ;
+
+ mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \n,p ->
+ mkCNPlace (mkCN n) p to_Prep ;
+
+ mkCNPlace : CN -> Prep -> Prep -> CNPlace = \p,i,t -> {
+ name = p ;
+ at = i ;
+ to = t ;
+ isPl = False
+ } ;
+
+ na_Prep = mkPrep "на" R.Acc ;
+
+ lin
+ Airport = mkPlace (mkN066 "летище") na_Prep ;
+
+}
diff --git a/testsuite/canonical/grammars/PhrasebookGer.gf b/testsuite/canonical/grammars/PhrasebookGer.gf
new file mode 100644
index 000000000..c6402297c
--- /dev/null
+++ b/testsuite/canonical/grammars/PhrasebookGer.gf
@@ -0,0 +1,14 @@
+--# -path=.:present
+
+concrete PhrasebookGer of Phrasebook =
+ open
+ SyntaxGer,
+ LexiconGer in {
+
+ lincat
+ VerbPhrase = VP ;
+
+ lin
+ VRead = mkVP <lin V read_V2 : V> ;
+
+}