summaryrefslogtreecommitdiff
path: root/doc/tutorial/old
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-18 21:26:21 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-18 21:26:21 +0000
commit6398140d0ac21ad05a0c595b77007631cd5e1265 (patch)
treefae648d7e9e344fa850be37f1eb0b3b29e8f17e6 /doc/tutorial/old
parenta205829623ea7b928c84e56cd6453148f123a3d5 (diff)
new tutorial example
Diffstat (limited to 'doc/tutorial/old')
-rw-r--r--doc/tutorial/old/Fish.gf4
-rw-r--r--doc/tutorial/old/FishEng.gf5
-rw-r--r--doc/tutorial/old/Gatherer.gf5
-rw-r--r--doc/tutorial/old/Gatherer.gifbin0 -> 12415 bytes
-rw-r--r--doc/tutorial/old/GathererEng.gf5
-rw-r--r--doc/tutorial/old/Mushrooms.gf4
-rw-r--r--doc/tutorial/old/MushroomsEng.gf5
-rw-r--r--doc/tutorial/old/Neolithic.gf5
-rw-r--r--doc/tutorial/old/NeolithicEng.gf6
-rw-r--r--doc/tutorial/old/Paleolithic.gf16
-rw-r--r--doc/tutorial/old/PaleolithicEng.gf28
-rw-r--r--doc/tutorial/old/PaleolithicIta.gf28
-rw-r--r--doc/tutorial/old/paleolithic.cf23
-rw-r--r--doc/tutorial/old/paleolithic.ebnf8
14 files changed, 142 insertions, 0 deletions
diff --git a/doc/tutorial/old/Fish.gf b/doc/tutorial/old/Fish.gf
new file mode 100644
index 000000000..c404115e9
--- /dev/null
+++ b/doc/tutorial/old/Fish.gf
@@ -0,0 +1,4 @@
+abstract Fish = {
+ cat Fish ;
+ fun Salmon, Perch : Fish ;
+}
diff --git a/doc/tutorial/old/FishEng.gf b/doc/tutorial/old/FishEng.gf
new file mode 100644
index 000000000..560f6cda4
--- /dev/null
+++ b/doc/tutorial/old/FishEng.gf
@@ -0,0 +1,5 @@
+concrete FishEng of Fish = {
+ lin
+ Salmon = {s = "salmon"} ;
+ Perch = {s = "perch"} ;
+}
diff --git a/doc/tutorial/old/Gatherer.gf b/doc/tutorial/old/Gatherer.gf
new file mode 100644
index 000000000..4ef16485a
--- /dev/null
+++ b/doc/tutorial/old/Gatherer.gf
@@ -0,0 +1,5 @@
+abstract Gatherer = Paleolithic, Fish, Mushrooms ** {
+ fun
+ FishCN : Fish -> CN ;
+ MushroomCN : Mushroom -> CN ;
+} \ No newline at end of file
diff --git a/doc/tutorial/old/Gatherer.gif b/doc/tutorial/old/Gatherer.gif
new file mode 100644
index 000000000..758b8ea8b
--- /dev/null
+++ b/doc/tutorial/old/Gatherer.gif
Binary files differ
diff --git a/doc/tutorial/old/GathererEng.gf b/doc/tutorial/old/GathererEng.gf
new file mode 100644
index 000000000..3dfc7c8fd
--- /dev/null
+++ b/doc/tutorial/old/GathererEng.gf
@@ -0,0 +1,5 @@
+concrete GathererEng of Gatherer = PaleolithicEng, FishEng, MushroomsEng ** {
+ lin
+ UseFish x = x ;
+ UseMushroom x = x ;
+}
diff --git a/doc/tutorial/old/Mushrooms.gf b/doc/tutorial/old/Mushrooms.gf
new file mode 100644
index 000000000..87f14de96
--- /dev/null
+++ b/doc/tutorial/old/Mushrooms.gf
@@ -0,0 +1,4 @@
+abstract Mushrooms = {
+ cat Mushroom ;
+ fun Cep, Agaric : Mushroom ;
+}
diff --git a/doc/tutorial/old/MushroomsEng.gf b/doc/tutorial/old/MushroomsEng.gf
new file mode 100644
index 000000000..d4e18d6d4
--- /dev/null
+++ b/doc/tutorial/old/MushroomsEng.gf
@@ -0,0 +1,5 @@
+concrete MushroomsEng of Mushrooms = {
+ lin
+ Cep = {s = "cep"} ;
+ Agaric = {s = "agaric"} ;
+}
diff --git a/doc/tutorial/old/Neolithic.gf b/doc/tutorial/old/Neolithic.gf
new file mode 100644
index 000000000..2f5c6d116
--- /dev/null
+++ b/doc/tutorial/old/Neolithic.gf
@@ -0,0 +1,5 @@
+abstract Neolithic = Paleolithic ** {
+ fun
+ Fire, Wheel : CN ;
+ Think : V ;
+}
diff --git a/doc/tutorial/old/NeolithicEng.gf b/doc/tutorial/old/NeolithicEng.gf
new file mode 100644
index 000000000..005781a7e
--- /dev/null
+++ b/doc/tutorial/old/NeolithicEng.gf
@@ -0,0 +1,6 @@
+concrete NeolithicEng of Neolithic = PaleolithicEng ** {
+ lin
+ Fire = {s = "fire"} ;
+ Wheel = {s = "wheel"} ;
+ Think = {s = "thinks"} ;
+}
diff --git a/doc/tutorial/old/Paleolithic.gf b/doc/tutorial/old/Paleolithic.gf
new file mode 100644
index 000000000..05158ba18
--- /dev/null
+++ b/doc/tutorial/old/Paleolithic.gf
@@ -0,0 +1,16 @@
+abstract Paleolithic = {
+cat
+ S ; NP ; VP ; CN ; A ; V ; TV ;
+
+fun
+ PredVP : NP -> VP -> S ;
+ UseV : V -> VP ;
+ ComplTV : TV -> NP -> VP ;
+ UseA : A -> VP ;
+ ModA : A -> CN -> CN ;
+ This, That, Def, Indef : CN -> NP ;
+ Boy, Louse, Snake, Worm : CN ;
+ Green, Rotten, Thick, Warm : A ;
+ Laugh, Sleep, Swim : V ;
+ Eat, Kill, Wash : TV ;
+} \ No newline at end of file
diff --git a/doc/tutorial/old/PaleolithicEng.gf b/doc/tutorial/old/PaleolithicEng.gf
new file mode 100644
index 000000000..ac78f9d9d
--- /dev/null
+++ b/doc/tutorial/old/PaleolithicEng.gf
@@ -0,0 +1,28 @@
+concrete PaleolithicEng of Paleolithic = {
+lincat
+ S, NP, VP, CN, A, V, TV = {s : Str} ;
+lin
+ PredVP np vp = {s = np.s ++ vp.s} ;
+ UseV v = v ;
+ ComplTV tv np = {s = tv.s ++ np.s} ;
+ UseA a = {s = "is" ++ a.s} ;
+ This cn = {s = "this" ++ cn.s} ;
+ That cn = {s = "that" ++ cn.s} ;
+ Def cn = {s = "the" ++ cn.s} ;
+ Indef cn = {s = "a" ++ cn.s} ;
+ ModA a cn = {s = a.s ++ cn.s} ;
+ Boy = {s = "boy"} ;
+ Louse = {s = "louse"} ;
+ Snake = {s = "snake"} ;
+ Worm = {s = "worm"} ;
+ Green = {s = "green"} ;
+ Rotten = {s = "rotten"} ;
+ Thick = {s = "thick"} ;
+ Warm = {s = "warm"} ;
+ Laugh = {s = "laughs"} ;
+ Sleep = {s = "sleeps"} ;
+ Swim = {s = "swims"} ;
+ Eat = {s = "eats"} ;
+ Kill = {s = "kills"} ;
+ Wash = {s = "washes"} ;
+} \ No newline at end of file
diff --git a/doc/tutorial/old/PaleolithicIta.gf b/doc/tutorial/old/PaleolithicIta.gf
new file mode 100644
index 000000000..242c615d7
--- /dev/null
+++ b/doc/tutorial/old/PaleolithicIta.gf
@@ -0,0 +1,28 @@
+concrete PaleolithicIta of Paleolithic = {
+lincat
+ S, NP, VP, CN, A, V, TV = {s : Str} ;
+lin
+ PredVP np vp = {s = np.s ++ vp.s} ;
+ UseV v = v ;
+ ComplTV tv np = {s = tv.s ++ np.s} ;
+ UseA a = {s = "è" ++ a.s} ;
+ This cn = {s = "questo" ++ cn.s} ;
+ That cn = {s = "quello" ++ cn.s} ;
+ Def cn = {s = "il" ++ cn.s} ;
+ Indef cn = {s = "un" ++ cn.s} ;
+ ModA a cn = {s = cn.s ++ a.s} ;
+ Boy = {s = "ragazzo"} ;
+ Louse = {s = "pidocchio"} ;
+ Snake = {s = "serpente"} ;
+ Worm = {s = "verme"} ;
+ Green = {s = "verde"} ;
+ Rotten = {s = "marcio"} ;
+ Thick = {s = "grosso"} ;
+ Warm = {s = "caldo"} ;
+ Laugh = {s = "ride"} ;
+ Sleep = {s = "dorme"} ;
+ Swim = {s = "nuota"} ;
+ Eat = {s = "mangia"} ;
+ Kill = {s = "uccide"} ;
+ Wash = {s = "lava"} ;
+}
diff --git a/doc/tutorial/old/paleolithic.cf b/doc/tutorial/old/paleolithic.cf
new file mode 100644
index 000000000..08496c800
--- /dev/null
+++ b/doc/tutorial/old/paleolithic.cf
@@ -0,0 +1,23 @@
+PredVP. S ::= NP VP ;
+UseV. VP ::= V ;
+ComplTV. VP ::= TV NP ;
+UseA. VP ::= "is" A ;
+This. NP ::= "this" CN ;
+That. NP ::= "that" CN ;
+Def. NP ::= "the" CN ;
+Indef. NP ::= "a" CN ;
+ModA. CN ::= A CN ;
+Boy. CN ::= "boy" ;
+Louse. CN ::= "louse" ;
+Snake. CN ::= "snake" ;
+Worm. CN ::= "worm" ;
+Green. A ::= "green" ;
+Rotten. A ::= "rotten" ;
+Thick. A ::= "thick" ;
+Warm. A ::= "warm" ;
+Laugh. V ::= "laughs" ;
+Sleep. V ::= "sleeps" ;
+Swim. V ::= "swims" ;
+Eat. TV ::= "eats" ;
+Kill. TV ::= "kills"
+Wash. TV ::= "washes" ;
diff --git a/doc/tutorial/old/paleolithic.ebnf b/doc/tutorial/old/paleolithic.ebnf
new file mode 100644
index 000000000..cd091ae04
--- /dev/null
+++ b/doc/tutorial/old/paleolithic.ebnf
@@ -0,0 +1,8 @@
+S ::= NP VP ;
+VP ::= V | TV NP | "is" A ;
+NP ::= ("this" | "that" | "the" | "a") CN ;
+CN ::= A CN ;
+CN ::= "boy" | "louse" | "snake" | "worm" ;
+A ::= "green" | "rotten" | "thick" | "warm" ;
+V ::= "laughs" | "sleeps" | "swims" ;
+TV ::= "eats" | "kills" | "washes" ;