mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 08:42:50 -06:00
Added Eclipse contents
This commit is contained in:
5
eclipse/examples/hello/AbsCat.gf
Normal file
5
eclipse/examples/hello/AbsCat.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
abstract AbsCat = {
|
||||
|
||||
cat Greeting ; Recipient ;
|
||||
|
||||
};
|
||||
12
eclipse/examples/hello/HelloAbs.gf
Normal file
12
eclipse/examples/hello/HelloAbs.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
abstract HelloAbs = AbsCat [Greeting, Recipient] ** {
|
||||
|
||||
flags startcat = Greeting ;
|
||||
|
||||
cat Farewell ;
|
||||
|
||||
fun
|
||||
Hello : Recipient -> Greeting ;
|
||||
Goodbye : Recipient -> Farewell ;
|
||||
World, Parent, Friends : Recipient ;
|
||||
|
||||
}
|
||||
21
eclipse/examples/hello/HelloEng.gf
Normal file
21
eclipse/examples/hello/HelloEng.gf
Normal file
@@ -0,0 +1,21 @@
|
||||
concrete HelloEng of HelloAbs = ResEng ** {
|
||||
|
||||
lincat
|
||||
Greeting, Farewell = {s : Str} ;
|
||||
Recipient = {s : Gender => Str} ;
|
||||
|
||||
lin
|
||||
Hello recip = {s = "hello" ++ recip.s ! Masc} ;
|
||||
Goodbye recip = {s = "goodbye" ++ recip.s ! Fem} ;
|
||||
|
||||
World = {s = \\_ => "world"} ;
|
||||
Parent = { s = table {
|
||||
Masc => "dad" ; Fem => "mum"
|
||||
} } ;
|
||||
Friends = superate "friends" ;
|
||||
|
||||
oper
|
||||
superate : Str -> Recipient = \s ->
|
||||
lin Recipient { s = \\_ => "super" ++ s } ;
|
||||
|
||||
}
|
||||
8
eclipse/examples/hello/ResEng.gf
Normal file
8
eclipse/examples/hello/ResEng.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
resource ResEng = {
|
||||
|
||||
param
|
||||
OtherParam = A | B ;
|
||||
Gender = Masc | Fem ;
|
||||
|
||||
} ;
|
||||
Reference in New Issue
Block a user