mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 18:29:33 -06:00
29 lines
474 B
Plaintext
29 lines
474 B
Plaintext
concrete Toy0Eng of Toy0 = {
|
|
|
|
param
|
|
Number = Sg | Pl ;
|
|
|
|
lincat
|
|
Spec = {s : Str ; n : Number} ;
|
|
Noun = {s : Number => Str} ;
|
|
MAIN,NP = {s : Str} ;
|
|
|
|
lin
|
|
Main np = np ;
|
|
SpecNoun spec noun = {s = spec.s ++ noun.s ! spec.n} ;
|
|
|
|
One = {s = "one" ; n = Sg} ;
|
|
Two = {s = "two" ; n = Pl} ;
|
|
|
|
Felis = regNoun "cat" ;
|
|
Canis = regNoun "dog" ;
|
|
|
|
oper
|
|
regNoun : Str -> {s : Number => Str} = \s -> {
|
|
s = table {
|
|
Sg => s ;
|
|
Pl => s + "s"
|
|
}
|
|
} ;
|
|
}
|