mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 02:09:32 -06:00
started examples-3.0 with examples that are tested to work
This commit is contained in:
10
examples-3.0/tutorial/hello/Hello.gf
Normal file
10
examples-3.0/tutorial/hello/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
examples-3.0/tutorial/hello/HelloEng.gf
Normal file
10
examples-3.0/tutorial/hello/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
examples-3.0/tutorial/hello/HelloFin.gf
Normal file
10
examples-3.0/tutorial/hello/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
examples-3.0/tutorial/hello/HelloIta.gf
Normal file
10
examples-3.0/tutorial/hello/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"} ;
|
||||
}
|
||||
4
examples-3.0/tutorial/hello/hello.gfs
Normal file
4
examples-3.0/tutorial/hello/hello.gfs
Normal file
@@ -0,0 +1,4 @@
|
||||
import HelloEng.gf
|
||||
import HelloFin.gf
|
||||
import HelloIta.gf
|
||||
linearize Hello World
|
||||
Reference in New Issue
Block a user