mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-13 06:49:31 -06:00
Hello grammars in tutorial
This commit is contained in:
@@ -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 ;
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -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
10
doc/tutorial/Hello.gf
Normal 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
10
doc/tutorial/HelloEng.gf
Normal 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
10
doc/tutorial/HelloFin.gf
Normal 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
10
doc/tutorial/HelloIta.gf
Normal 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
Reference in New Issue
Block a user