Hello grammars in tutorial

This commit is contained in:
aarne
2007-08-14 14:09:25 +00:00
parent bc1c5a6a09
commit 76c14c4a2c
8 changed files with 534 additions and 483 deletions

View File

@@ -1,10 +1,12 @@
abstract Food = {
cat
S ; Item ; Kind ; Quality ;
Phrase ; Item ; Kind ; Quality ;
flags startcat = Phrase ;
fun
Is : Item -> Quality -> S ;
Is : Item -> Quality -> Phrase ;
This, That : Kind -> Item ;
QKind : Quality -> Kind -> Kind ;
Wine, Cheese, Fish : Kind ;

View File

@@ -1,7 +1,7 @@
concrete FoodEng of Food = {
lincat
S, Item, Kind, Quality = {s : Str} ;
Phrase, Item, Kind, Quality = {s : Str} ;
lin
Is item quality = {s = item.s ++ "is" ++ quality.s} ;

View File

@@ -1,7 +1,7 @@
concrete FoodIta of Food = {
lincat
S, Item, Kind, Quality = {s : Str} ;
Phrase, Item, Kind, Quality = {s : Str} ;
lin
Is item quality = {s = item.s ++ "è" ++ quality.s} ;

10
doc/tutorial/Hello.gf Normal file
View File

@@ -0,0 +1,10 @@
abstract Hello = {
cat Greeting ; Recipient ;
flags startcat = Greeting ;
fun
Hello : Recipient -> Greeting ;
World, Mum, Friends : Recipient ;
}

10
doc/tutorial/HelloEng.gf Normal file
View File

@@ -0,0 +1,10 @@
concrete HelloEng of Hello = {
lincat Greeting, Recipient = {s : Str} ;
lin
Hello rec = {s = "hello" ++ rec.s} ;
World = {s = "world"} ;
Mum = {s = "mum"} ;
Friends = {s = "friends"} ;
}

10
doc/tutorial/HelloFin.gf Normal file
View File

@@ -0,0 +1,10 @@
concrete HelloFin of Hello = {
lincat Greeting, Recipient = {s : Str} ;
lin
Hello rec = {s = "terve" ++ rec.s} ;
World = {s = "maailma"} ;
Mum = {s = "äiti"} ;
Friends = {s = "ystävät"} ;
}

10
doc/tutorial/HelloIta.gf Normal file
View File

@@ -0,0 +1,10 @@
concrete HelloIta of Hello = {
lincat Greeting, Recipient = {s : Str} ;
lin
Hello rec = {s = "ciao" ++ rec.s} ;
World = {s = "mondo"} ;
Mum = {s = "mamma"} ;
Friends = {s = "amici"} ;
}

File diff suppressed because it is too large Load Diff