Moved punctuation to a separate field, to allow spoken language grammars to omit it. Created top-level spoken language grammars. (all in peacekeeping)

This commit is contained in:
bringert
2006-04-21 21:53:20 +00:00
parent 6806c98e29
commit 46f17bb535
19 changed files with 105 additions and 46 deletions

View File

@@ -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
} ;
}