summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-12-04 15:20:47 +0000
committeraarne <aarne@cs.chalmers.se>2008-12-04 15:20:47 +0000
commit896791e78cca4a21a5837ff2c971aaf0f84324b1 (patch)
tree7ac052c5418f101c7dccf5120b486d7f25ef04f0 /examples
parent7ed9e11bfbaca9a6b937b05e662fb5de404c7a22 (diff)
factored out RET in letter grammars
Diffstat (limited to 'examples')
-rw-r--r--examples/letter/LetterEng.gf10
-rw-r--r--examples/letter/LetterFin.gf9
-rw-r--r--examples/letter/LetterFre.gf9
-rw-r--r--examples/letter/LetterHeb.gf11
-rw-r--r--examples/letter/LetterRus.gf9
-rw-r--r--examples/letter/LetterSwe.gf10
6 files changed, 34 insertions, 24 deletions
diff --git a/examples/letter/LetterEng.gf b/examples/letter/LetterEng.gf
index 5b57f0da7..3ceb7896c 100644
--- a/examples/letter/LetterEng.gf
+++ b/examples/letter/LetterEng.gf
@@ -30,6 +30,8 @@ oper
cnum cn => cn
} ;
+ RET = "" ; -- &-
+
lincat
Letter = SS ;
Recipient = SSSrc ;
@@ -44,8 +46,8 @@ Position = SSDep ;
lin
MkLetter head mess end =
- ss (head.s ++ "," ++ "&-" ++
- mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ "&-" ++
+ ss (head.s ++ "," ++ RET ++
+ mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ RET ++
end.s ! head.n ! head.x) ;
DearRec rec = {s = "Dear" ++ rec.s ; n = rec.n ; x = rec.x} ;
@@ -62,10 +64,10 @@ PlainSent sent = sent ;
FormalEnding auth =
{s = table {n => table {x =>
- ["Sincerely yours &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
+ ["Sincerely yours"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
InformalEnding auth =
{s = table {n => table {x =>
- ["With best regards &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
+ ["With best regards"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
ColleaguesHe = {s = kollega ! pl ; n = pl ; x = masc} ;
ColleaguesShe = {s = kollega ! pl ; n = pl ; x = fem} ;
diff --git a/examples/letter/LetterFin.gf b/examples/letter/LetterFin.gf
index f7daa61a2..19d131fae 100644
--- a/examples/letter/LetterFin.gf
+++ b/examples/letter/LetterFin.gf
@@ -69,6 +69,7 @@ oper
cgen cg => cg
} ;
+ RET = "" ; -- &-
lincat
Letter = SS ;
@@ -84,8 +85,8 @@ Position = SSDep ;
lin
MkLetter head mess end =
- ss (head.s ++ "," ++ "&-" ++
- mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ "&-" ++
+ ss (head.s ++ "," ++ RET ++
+ mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ RET ++
end.s ! head.n ! head.g) ;
DearRec rec = {s = cher ! rec.n ! rec.g ++ rec.s ; n = rec.n ; g = rec.g} ;
@@ -101,10 +102,10 @@ ModeSent mode sent =
PlainSent sent = sent ;
FormalEnding auth =
- {s = table {n => table {g => ["parhain terveisin &-"] ++ auth.s ! n ! g}} ;
+ {s = table {n => table {g => ["parhain terveisin"] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
InformalEnding auth =
- {s = table {n => table {g => ["terveisin &-"] ++ auth.s ! n ! g}} ;
+ {s = table {n => table {g => ["terveisin"] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
ColleaguesHe = {s = regNom "kollega" ! pl ; n = pl ; g = masc} ;
diff --git a/examples/letter/LetterFre.gf b/examples/letter/LetterFre.gf
index 0755a99a0..6e2bbc850 100644
--- a/examples/letter/LetterFre.gf
+++ b/examples/letter/LetterFre.gf
@@ -66,6 +66,7 @@ oper
cgen cg => cg
} ;
+ RET = "" ; -- &-
lincat
Letter = SS ;
@@ -81,8 +82,8 @@ Position = SSDep ;
lin
MkLetter head mess end =
- ss (head.s ++ "," ++ "&-" ++
- mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ "&-" ++
+ ss (head.s ++ "," ++ RET ++
+ mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ RET ++
end.s ! head.n ! head.g) ;
DearRec rec = {s = cher ! rec.n ! rec.g ++ rec.s ; n = rec.n ; g = rec.g} ;
@@ -101,10 +102,10 @@ FormalEnding auth =
{s =
table {n => table {g =>
"avec" ++ mes ! dep2num auth.n n ++
- ["salutations distingues &-"] ++ auth.s ! n ! g}} ;
+ ["salutations distingues"] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
InformalEnding auth =
- {s = table {n => table {g => ["Amicalement &-"] ++ auth.s ! n ! g}} ;
+ {s = table {n => table {g => ["Amicalement"] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
ColleaguesHe = {s = regNom "collgue" ! pl ; n = pl ; g = masc} ;
diff --git a/examples/letter/LetterHeb.gf b/examples/letter/LetterHeb.gf
index 40d411e5e..62443724a 100644
--- a/examples/letter/LetterHeb.gf
+++ b/examples/letter/LetterHeb.gf
@@ -72,6 +72,9 @@ dep2gen : DepGen -> Gen -> Gen = \dg,g -> case dg of {
cgen cg => cg
} ;
+ RET = "" ; -- &-
+
+
lincat
Letter = SS ;
Recipient = SSSrc ;
@@ -86,8 +89,8 @@ Position = SSDep ;
lin
MkLetter head mess end =
- ss ("," ++ head.s ++ "&-" ++
- mess.s ! end.n ! end.g ! head.n ! head.g ++ "&-" ++
+ ss ("," ++ head.s ++ RET ++
+ mess.s ! end.n ! end.g ! head.n ! head.g ++ RET ++
end.s ! head.n ! head.g) ;
DearRec rec = {s = rec.s ++ regAdj "יקר" ! rec.n ! rec.g;
@@ -107,13 +110,13 @@ PlainSent sent = sent ;
FormalEnding auth =
{s =
table {n => table {g =>
- [",בכבוד רב &-"] ++
+ [", בכבוד רב"] ++ RET ++
auth.s ! n ! g
}} ;
n = auth.n ; g = auth.g} ;
InformalEnding auth =
- {s = table {n => table {g => [",בברכה &-"] ++ auth.s ! n ! g}} ;
+ {s = table {n => table {g => [", בברכה"] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
ColleagueHe = {s = "עמית" ; n = sg ; g = masc} ;
diff --git a/examples/letter/LetterRus.gf b/examples/letter/LetterRus.gf
index b5f7434e9..ef9ec25fe 100644
--- a/examples/letter/LetterRus.gf
+++ b/examples/letter/LetterRus.gf
@@ -70,6 +70,7 @@ oper
cgen cg => cg
} ;
+ RET = "" ; -- &-
lincat
Letter = SS ;
@@ -85,8 +86,8 @@ Position = SSDep ;
lin
MkLetter head mess end =
- ss (head.s ++ "," ++ "&-" ++
- mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ "&-" ++
+ ss (head.s ++ "," ++ RET ++
+ mess.s ! end.n ! end.g ! head.n ! head.g ++ "." ++ RET ++
end.s ! head.n ! head.g) ;
DearRec rec = {s = regAdj "Дорог"
@@ -106,10 +107,10 @@ FormalEnding auth =
{s =
table {n => table {g =>
"С" ++
- ["наилучшими пожеланиями, &-"] ++ auth.s ! n ! g}} ;
+ ["наилучшими пожеланиями ,"] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
InformalEnding auth =
- {s = table {n => table {g => ["С дружеским приветом, &-"] ++ auth.s ! n ! g}} ;
+ {s = table {n => table {g => ["С дружеским приветом , "] ++ RET ++ auth.s ! n ! g}} ;
n = auth.n ; g = auth.g} ;
ColleaguesHe = {s = "коллеги" ; n = pl ; g = masc} ;
diff --git a/examples/letter/LetterSwe.gf b/examples/letter/LetterSwe.gf
index e7bcd433d..e26bfb05b 100644
--- a/examples/letter/LetterSwe.gf
+++ b/examples/letter/LetterSwe.gf
@@ -36,6 +36,8 @@ oper
cnum cn => cn
} ;
+ RET = "" ; -- &-
+
lincat
Letter = SS ;
Recipient = SSSrc ;
@@ -50,8 +52,8 @@ Position = SSDep ;
lin
MkLetter head mess end =
- ss (head.s ++ "," ++ "&-" ++
- mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ "&-" ++
+ ss (head.s ++ "," ++ RET ++
+ mess.s ! end.n ! end.x ! head.n ! head.x ++ "." ++ RET ++
end.s ! head.n ! head.x) ;
DearRec rec = {s = kaer ! rec.n ! rec.x ++ rec.s ; n = rec.n ; x = rec.x} ;
@@ -68,11 +70,11 @@ PlainSent sent = sent ;
FormalEnding auth =
{s = table {n => table {x =>
- ["Med vnlig hlsning &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
+ ["Med vnlig hlsning"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
InformalEnding auth =
{s = table {n => table {x =>
- ["Med hlsningar &-"] ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
+ ["Med hlsningar"] ++ RET ++ auth.s ! n ! x}} ; n = auth.n ; x = auth.x} ;
ColleaguesHe = {s = kollega ! pl ; n = pl ; x = masc} ;
ColleaguesShe = {s = kollega ! pl ; n = pl ; x = fem} ;