summaryrefslogtreecommitdiff
path: root/examples/tutorial
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-09-06 11:34:53 +0000
committeraarne <aarne@cs.chalmers.se>2007-09-06 11:34:53 +0000
commit10f621045a53c3a2b75195f355e362537ac6f08b (patch)
treef3f376c12ea4ec8cee316a2fef86c6271a997b26 /examples/tutorial
parent238764e1be73685eb76fa19d0641d7780b0f8d5e (diff)
ExtFoods for book
Diffstat (limited to 'examples/tutorial')
-rw-r--r--examples/tutorial/resource-foods/ExtFoods.gf34
-rw-r--r--examples/tutorial/resource-foods/ExtFoodsEng.gf5
-rw-r--r--examples/tutorial/resource-foods/ExtFoodsFin.gf5
-rw-r--r--examples/tutorial/resource-foods/ExtFoodsGer.gf5
-rw-r--r--examples/tutorial/resource-foods/ExtFoodsI.gf49
-rw-r--r--examples/tutorial/resource-foods/FoodsEng.gf4
-rw-r--r--examples/tutorial/resource-foods/FoodsEni.gf5
-rw-r--r--examples/tutorial/resource-foods/FoodsI.gf4
-rw-r--r--examples/tutorial/resource-foods/LexFoods.gf6
-rw-r--r--examples/tutorial/resource-foods/LexFoodsEng.gf20
-rw-r--r--examples/tutorial/resource-foods/LexFoodsFin.gf7
-rw-r--r--examples/tutorial/resource-foods/LexFoodsGer.gf9
12 files changed, 148 insertions, 5 deletions
diff --git a/examples/tutorial/resource-foods/ExtFoods.gf b/examples/tutorial/resource-foods/ExtFoods.gf
new file mode 100644
index 000000000..fa417190e
--- /dev/null
+++ b/examples/tutorial/resource-foods/ExtFoods.gf
@@ -0,0 +1,34 @@
+abstract ExtFoods = Foods ** {
+
+ flags startcat=Move ;
+
+ cat
+ Move ;
+ Verb ;
+ Guest ;
+ GuestKind ;
+
+ fun
+ MAssert : Phrase -> Move ;
+ MDeny : Phrase -> Move ;
+ MAsk : Phrase -> Move ;
+
+ PVerb : Guest -> Verb -> Item -> Phrase ;
+ PVerbWant : Guest -> Verb -> Item -> Phrase ;
+
+ WhichVerb : Kind -> Guest -> Verb -> Move ;
+ WhichVerbWant : Kind -> Guest -> Verb -> Move ;
+ WhichIs : Kind -> Quality -> Move ;
+
+ Do : Verb -> Item -> Move ;
+ DoPlease : Verb -> Item -> Move ;
+
+ I, You, We : Guest ;
+
+ GThis, GThat, GThese, GThose : GuestKind -> Guest ;
+
+ Eat, Drink, Pay : Verb ;
+
+ Lady, Gentleman : GuestKind ;
+
+}
diff --git a/examples/tutorial/resource-foods/ExtFoodsEng.gf b/examples/tutorial/resource-foods/ExtFoodsEng.gf
new file mode 100644
index 000000000..70ba26b74
--- /dev/null
+++ b/examples/tutorial/resource-foods/ExtFoodsEng.gf
@@ -0,0 +1,5 @@
+--# -path=.:../foods:present:prelude
+
+concrete ExtFoodsEng of ExtFoods = FoodsEni ** ExtFoodsI with
+ (Syntax = SyntaxEng),
+ (LexFoods = LexFoodsEng) ;
diff --git a/examples/tutorial/resource-foods/ExtFoodsFin.gf b/examples/tutorial/resource-foods/ExtFoodsFin.gf
new file mode 100644
index 000000000..9cf90dfa0
--- /dev/null
+++ b/examples/tutorial/resource-foods/ExtFoodsFin.gf
@@ -0,0 +1,5 @@
+--# -path=.:../foods:present:prelude
+
+concrete ExtFoodsFin of ExtFoods = FoodsFin ** ExtFoodsI with
+ (Syntax = SyntaxFin),
+ (LexFoods = LexFoodsFin) ;
diff --git a/examples/tutorial/resource-foods/ExtFoodsGer.gf b/examples/tutorial/resource-foods/ExtFoodsGer.gf
new file mode 100644
index 000000000..62285e3ae
--- /dev/null
+++ b/examples/tutorial/resource-foods/ExtFoodsGer.gf
@@ -0,0 +1,5 @@
+--# -path=.:../foods:present:prelude
+
+concrete ExtFoodsGer of ExtFoods = FoodsGer ** ExtFoodsI with
+ (Syntax = SyntaxGer),
+ (LexFoods = LexFoodsGer) ;
diff --git a/examples/tutorial/resource-foods/ExtFoodsI.gf b/examples/tutorial/resource-foods/ExtFoodsI.gf
new file mode 100644
index 000000000..57b8c1cf1
--- /dev/null
+++ b/examples/tutorial/resource-foods/ExtFoodsI.gf
@@ -0,0 +1,49 @@
+incomplete concrete ExtFoodsI of ExtFoods = FoodsI ** open Syntax, LexFoods in {
+
+ flags lexer=text ; unlexer=text ;
+
+ lincat
+ Move = Text ;
+ Verb = V2 ;
+ Guest = NP ;
+ GuestKind = N ;
+ lin
+ MAssert p = mkText (mkS p) ;
+ MDeny p = mkText (mkS negativePol p) ;
+ MAsk p = mkText (mkQS p) ;
+
+ PVerb = mkCl ;
+ PVerbWant guest verb item = mkCl guest want_VV (mkVP verb item) ;
+
+ WhichVerb kind guest verb =
+ mkText (mkQS (mkQCl (mkIP whichSg_IDet kind) guest verb)) ;
+ WhichVerbWant kind guest verb =
+ mkText (mkQS (mkQCl (mkIP whichSg_IDet kind)
+ (mkSlash guest want_VV verb))) ;
+ WhichIs kind quality =
+ mkText (mkQS (mkQCl (mkIP whichSg_IDet kind) (mkVP quality))) ;
+
+ Do verb item =
+ mkText
+ (mkPhr (mkUtt politeImpForm (mkImp verb item))) exclMarkPunct ;
+ DoPlease verb item =
+ mkText
+ (mkPhr (mkUtt politeImpForm (mkImp verb item)) please_Voc)
+ exclMarkPunct ;
+
+ I = mkNP i_Pron ;
+ You = mkNP youPol_Pron ;
+ We = mkNP we_Pron ;
+
+ GThis = mkNP this_QuantSg ;
+ GThat = mkNP that_QuantSg ;
+ GThese = mkNP these_QuantPl ;
+ GThose = mkNP those_QuantPl ;
+
+ Eat = eat_V2 ;
+ Drink = drink_V2 ;
+ Pay = pay_V2 ;
+ Lady = lady_N ;
+ Gentleman = gentleman_N ;
+
+}
diff --git a/examples/tutorial/resource-foods/FoodsEng.gf b/examples/tutorial/resource-foods/FoodsEng.gf
index 5f3a978c3..90ae07f01 100644
--- a/examples/tutorial/resource-foods/FoodsEng.gf
+++ b/examples/tutorial/resource-foods/FoodsEng.gf
@@ -2,12 +2,12 @@
concrete FoodsEng of Foods = open SyntaxEng,ParadigmsEng in {
lincat
- Phrase = Utt ;
+ Phrase = Cl ;
Item = NP ;
Kind = CN ;
Quality = AP ;
lin
- Is item quality = mkUtt (mkCl item quality) ;
+ Is item quality = mkCl item quality ;
This kind = mkNP this_QuantSg kind ;
That kind = mkNP that_QuantSg kind ;
These kind = mkNP these_QuantPl kind ;
diff --git a/examples/tutorial/resource-foods/FoodsEni.gf b/examples/tutorial/resource-foods/FoodsEni.gf
new file mode 100644
index 000000000..cf1156ea6
--- /dev/null
+++ b/examples/tutorial/resource-foods/FoodsEni.gf
@@ -0,0 +1,5 @@
+--# -path=.:../foods:present:prelude
+
+concrete FoodsEni of Foods = FoodsI with
+ (Syntax = SyntaxEng),
+ (LexFoods = LexFoodsEng) ;
diff --git a/examples/tutorial/resource-foods/FoodsI.gf b/examples/tutorial/resource-foods/FoodsI.gf
index 2ec35f5f9..e19e3c6a4 100644
--- a/examples/tutorial/resource-foods/FoodsI.gf
+++ b/examples/tutorial/resource-foods/FoodsI.gf
@@ -2,12 +2,12 @@
incomplete concrete FoodsI of Foods = open Syntax, LexFoods in {
lincat
- Phrase = Utt ;
+ Phrase = Cl ;
Item = NP ;
Kind = CN ;
Quality = AP ;
lin
- Is item quality = mkUtt (mkCl item quality) ;
+ Is item quality = mkCl item quality ;
This kind = mkNP this_QuantSg kind ;
That kind = mkNP that_QuantSg kind ;
These kind = mkNP these_QuantPl kind ;
diff --git a/examples/tutorial/resource-foods/LexFoods.gf b/examples/tutorial/resource-foods/LexFoods.gf
index 0c88eaa8a..875427b77 100644
--- a/examples/tutorial/resource-foods/LexFoods.gf
+++ b/examples/tutorial/resource-foods/LexFoods.gf
@@ -10,4 +10,10 @@ interface LexFoods = open Syntax in {
expensive_A : A ;
delicious_A : A ;
boring_A : A ;
+
+ eat_V2 : V2 ;
+ drink_V2 : V2 ;
+ pay_V2 : V2 ;
+ lady_N : N ;
+ gentleman_N : N ;
}
diff --git a/examples/tutorial/resource-foods/LexFoodsEng.gf b/examples/tutorial/resource-foods/LexFoodsEng.gf
new file mode 100644
index 000000000..01024b356
--- /dev/null
+++ b/examples/tutorial/resource-foods/LexFoodsEng.gf
@@ -0,0 +1,20 @@
+instance LexFoodsEng of LexFoods = open SyntaxEng, ParadigmsEng, IrregEng in {
+ oper
+ wine_N = mkN "wine" ;
+ pizza_N = mkN "pizza" ;
+ cheese_N = mkN "cheese" ;
+ fish_N = mkN "fish" "fish" ;
+ fresh_A = mkA "fresh" ;
+ warm_A = mkA "warm" ;
+ italian_A = mkA "Italian" ;
+ expensive_A = mkA "expensive" ;
+ delicious_A = mkA "delicious" ;
+ boring_A = mkA "boring" ;
+
+ eat_V2 = mkV2 eat_V ;
+ drink_V2 = mkV2 drink_V ;
+ pay_V2 = mkV2 pay_V ;
+ lady_N = mkN "lady" ;
+ gentleman_N = mkN "gentleman" "gentlemen" ;
+
+}
diff --git a/examples/tutorial/resource-foods/LexFoodsFin.gf b/examples/tutorial/resource-foods/LexFoodsFin.gf
index dc29709a0..513c541b4 100644
--- a/examples/tutorial/resource-foods/LexFoodsFin.gf
+++ b/examples/tutorial/resource-foods/LexFoodsFin.gf
@@ -10,4 +10,11 @@ instance LexFoodsFin of LexFoods = open SyntaxFin, ParadigmsFin in {
expensive_A = mkA "kallis" ;
delicious_A = mkA "herkullinen" ;
boring_A = mkA "tylsä" ;
+
+ eat_V2 = mkV2 (mkV "syödä") partitive ;
+ drink_V2 = mkV2 (mkV "juoda") partitive ;
+ pay_V2 = mkV2 (mkV "maksaa") ;
+ lady_N = mkN "rouva" ;
+ gentleman_N = mkN "herra" ;
+
}
diff --git a/examples/tutorial/resource-foods/LexFoodsGer.gf b/examples/tutorial/resource-foods/LexFoodsGer.gf
index f3d7ff5c1..15c5d94ca 100644
--- a/examples/tutorial/resource-foods/LexFoodsGer.gf
+++ b/examples/tutorial/resource-foods/LexFoodsGer.gf
@@ -1,4 +1,4 @@
-instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer in {
+instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer, IrregGer in {
oper
wine_N = mkN "Wein" ;
pizza_N = mkN "Pizza" "Pizzen" feminine ;
@@ -10,4 +10,11 @@ instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer in {
expensive_A = mkA "teuer" ;
delicious_A = mkA "köstlich" ;
boring_A = mkA "langweilig" ;
+
+ eat_V2 = mkV2 essen_V ;
+ drink_V2 = mkV2 trinken_V ;
+ pay_V2 = mkV2 (mkV "bezahlen") ;
+ lady_N = mkN "Frau" "Frauen" feminine ;
+ gentleman_N = mkN "Herr" "Herren" masculine ;
+
}