diff options
Diffstat (limited to 'examples/peacekeeping/PeaceCatI.gf')
| -rw-r--r-- | examples/peacekeeping/PeaceCatI.gf | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/examples/peacekeeping/PeaceCatI.gf b/examples/peacekeeping/PeaceCatI.gf index 9b19b319b..312bc1b1e 100644 --- a/examples/peacekeeping/PeaceCatI.gf +++ b/examples/peacekeeping/PeaceCatI.gf @@ -1,6 +1,22 @@ -incomplete concrete PeaceCatI of PeaceCat = Cat ** open Cat in { +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 + } ; }
\ No newline at end of file |
