mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
Added peacekeeping example back in. Doesn't compile yet.
This commit is contained in:
22
examples/peacekeeping/PeaceCatI.gf
Normal file
22
examples/peacekeeping/PeaceCatI.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
incomplete concrete PeaceCatI of PeaceCat =
|
||||
Cat ** open Lang, PeaceRes, Prelude in {
|
||||
|
||||
lincat
|
||||
MassN = N ;
|
||||
Phrase = { s : Str; p : Punct } ;
|
||||
PhraseWritten = { s : Str } ;
|
||||
PhraseSpoken = { s : Str } ;
|
||||
|
||||
lin
|
||||
Written x = mkWritten x.s x.p ;
|
||||
Spoken x = { s = x.s } ;
|
||||
|
||||
oper
|
||||
mkWritten : Str -> Punct -> { s : Str } ;
|
||||
mkWritten x p = case p of {
|
||||
FullStop => { s = x ++ "." } ; --TFullStop (ss s) TEmpty ;
|
||||
QuestMark => { s = x ++ "?" } ; --TQuestMark (ss s) TEmpty ;
|
||||
ExclMark => { s = x ++ "!" } --TExclMark (ss s) TEmpty
|
||||
} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user