mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 08:42:50 -06:00
initial check for unknown words in parsing
This commit is contained in:
30
examples/regulus/toy0/Toy0Fre.gf
Normal file
30
examples/regulus/toy0/Toy0Fre.gf
Normal file
@@ -0,0 +1,30 @@
|
||||
concrete Toy0Fre of Toy0 = {
|
||||
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
Gender = Masc | Fem ;
|
||||
|
||||
lincat
|
||||
Spec = {s : Gender => Str ; n : Number} ;
|
||||
Noun = {s : Number => Str ; g : Gender} ;
|
||||
MAIN,NP = {s : Str} ;
|
||||
|
||||
lin
|
||||
Main np = np ;
|
||||
SpecNoun spec noun = {s = spec.s ! noun.g ++ noun.s ! spec.n} ;
|
||||
|
||||
One = {s = table {Fem => "une" ; _ => "un"} ; n = Sg} ;
|
||||
Two = {s = \\_ => "deux" ; n = Pl} ;
|
||||
|
||||
Felis = mkNoun "chat" Masc ;
|
||||
Canis = mkNoun "chien" Masc ;
|
||||
|
||||
oper
|
||||
mkNoun : Str -> Gender -> {s : Number => Str ; g : Gender} = \s,g -> {
|
||||
s = table {
|
||||
Sg => s ;
|
||||
Pl => s + "s"
|
||||
} ;
|
||||
g = g
|
||||
} ;
|
||||
}
|
||||
Reference in New Issue
Block a user