From d6f73f175f0f063c615ee1813554e036d8dc9445 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Tue, 12 Nov 2013 10:18:35 +0000 Subject: [PATCH] use SOFT_BIND in the Bulgarian and Swedish grammars --- lib/src/bulgarian/NounBul.gf | 2 +- lib/src/bulgarian/NumeralBul.gf | 2 +- lib/src/bulgarian/ParseBul.gf | 2 +- lib/src/bulgarian/PhraseBul.gf | 2 +- lib/src/bulgarian/ResBul.gf | 2 ++ lib/src/bulgarian/SentenceBul.gf | 8 ++++---- lib/src/bulgarian/SymbolBul.gf | 2 +- lib/src/bulgarian/VerbBul.gf | 4 ++-- lib/src/scandinavian/ResScand.gf | 1 + lib/src/swedish/ExtraSwe.gf | 2 +- lib/src/swedish/ParseSwe.gf | 2 +- 11 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/src/bulgarian/NounBul.gf b/lib/src/bulgarian/NounBul.gf index 6f594731d..06bd59a18 100644 --- a/lib/src/bulgarian/NounBul.gf +++ b/lib/src/bulgarian/NounBul.gf @@ -62,7 +62,7 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in { } ; ExtAdvNP np adv = { - s = \\c => np.s ! c ++ "," ++ adv.s ; + s = \\c => np.s ! c ++ comma ++ adv.s ; a = np.a } ; diff --git a/lib/src/bulgarian/NumeralBul.gf b/lib/src/bulgarian/NumeralBul.gf index 3c30d62de..3cf2d64e5 100644 --- a/lib/src/bulgarian/NumeralBul.gf +++ b/lib/src/bulgarian/NumeralBul.gf @@ -113,7 +113,7 @@ lin pot3plus n m = { oper commaIf : DTail -> Str = \t -> case t of { - T3 => "," ; + T3 => comma ; _ => [] } ; diff --git a/lib/src/bulgarian/ParseBul.gf b/lib/src/bulgarian/ParseBul.gf index cd40b2fd7..812f752fb 100644 --- a/lib/src/bulgarian/ParseBul.gf +++ b/lib/src/bulgarian/ParseBul.gf @@ -146,7 +146,7 @@ lin } ; ApposNP np1 np2 = { - s = \\role => np1.s ! role ++ "," ++ np2.s ! RSubj ; + s = \\role => np1.s ! role ++ comma ++ np2.s ! RSubj ; a = np1.a } ; diff --git a/lib/src/bulgarian/PhraseBul.gf b/lib/src/bulgarian/PhraseBul.gf index 7445242d9..e61920a69 100644 --- a/lib/src/bulgarian/PhraseBul.gf +++ b/lib/src/bulgarian/PhraseBul.gf @@ -25,5 +25,5 @@ concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in { PConjConj conj = {s = conj.s ++ linCoord!conj.conj} ; NoVoc = {s = []} ; - VocNP np = {s = "," ++ np.s ! RVoc} ; + VocNP np = {s = comma ++ np.s ! RVoc} ; } diff --git a/lib/src/bulgarian/ResBul.gf b/lib/src/bulgarian/ResBul.gf index 7578482ca..26190cd76 100644 --- a/lib/src/bulgarian/ResBul.gf +++ b/lib/src/bulgarian/ResBul.gf @@ -693,4 +693,6 @@ resource ResBul = ParamX ** open Prelude, Predef in { linCoordSep : Str -> Bool => Ints 2 => Str ; linCoordSep s = table {True => linCoord; False=> \\_ => s} ; + + comma : Str = SOFT_BIND ++ "," ; } diff --git a/lib/src/bulgarian/SentenceBul.gf b/lib/src/bulgarian/SentenceBul.gf index 871c23902..36d367263 100644 --- a/lib/src/bulgarian/SentenceBul.gf +++ b/lib/src/bulgarian/SentenceBul.gf @@ -47,7 +47,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in { c2 = slash.c2 } ; - EmbedS s = {s = "," ++ "÷å" ++ s.s} ; + EmbedS s = {s = comma ++ "÷å" ++ s.s} ; EmbedQS qs = {s = qs.s ! QIndir} ; EmbedVP vp = {s = daComplex Simul Pos vp ! Perf ! {gn=GSg Masc; p=P1}} ; @@ -66,10 +66,10 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in { c2 = cl.c2 } ; - ExtAdvS a s = {s = a.s ++ "," ++ s.s} ; + ExtAdvS a s = {s = a.s ++ comma ++ s.s} ; AdvS a s = {s = a.s ++ s.s} ; - SSubjS a s b = {s = a.s ++ "," ++ s.s ++ b.s} ; + SSubjS a s b = {s = a.s ++ comma ++ s.s ++ b.s} ; - RelS s r = {s = s.s ++ "," ++ r.s ! {gn=gennum ANeut Sg; p=P3}} ; + RelS s r = {s = s.s ++ comma ++ r.s ! {gn=gennum ANeut Sg; p=P3}} ; } diff --git a/lib/src/bulgarian/SymbolBul.gf b/lib/src/bulgarian/SymbolBul.gf index 48c1efba9..e37e5c863 100644 --- a/lib/src/bulgarian/SymbolBul.gf +++ b/lib/src/bulgarian/SymbolBul.gf @@ -49,6 +49,6 @@ lin MkSymb s = s ; BaseSymb = infixSS "è" ; - ConsSymb = infixSS "," ; + ConsSymb = infixSS comma ; } diff --git a/lib/src/bulgarian/VerbBul.gf b/lib/src/bulgarian/VerbBul.gf index d6c5b79a8..773476fc0 100644 --- a/lib/src/bulgarian/VerbBul.gf +++ b/lib/src/bulgarian/VerbBul.gf @@ -22,7 +22,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { }) (predV vv) ; - ComplVS v s = insertObj (\\_ => "," ++ "÷å" ++ s.s) (predV v) ; + ComplVS v s = insertObj (\\_ => comma ++ "÷å" ++ s.s) (predV v) ; ComplVQ v q = insertObj (\\_ => q.s ! QDir) (predV v) ; ComplVA v ap = @@ -33,7 +33,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { insertSlashObj2 (\\a => ap.s ! aform a.gn Indef (RObj Acc)) (slashV v v.c2) ; -- test: I saw a boy to whom she said that they are here - SlashV2S v s = insertSlashObj2 (\\_ => "," ++ "÷å" ++ s.s) (slashV v v.c2) ; + SlashV2S v s = insertSlashObj2 (\\_ => comma ++ "÷å" ++ s.s) (slashV v v.c2) ; -- test: I saw a boy whom she asked who is here SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) (slashV v v.c2) ; diff --git a/lib/src/scandinavian/ResScand.gf b/lib/src/scandinavian/ResScand.gf index d59cbfd20..d9dd99431 100644 --- a/lib/src/scandinavian/ResScand.gf +++ b/lib/src/scandinavian/ResScand.gf @@ -76,5 +76,6 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in { en2,ea2,eext : Bool = False -- indicate if the field exists } ; + comma : Str = SOFT_BIND ++ "," ; } diff --git a/lib/src/swedish/ExtraSwe.gf b/lib/src/swedish/ExtraSwe.gf index ebb735c8c..9bb83e2da 100644 --- a/lib/src/swedish/ExtraSwe.gf +++ b/lib/src/swedish/ExtraSwe.gf @@ -33,7 +33,7 @@ lin insertObj (\\a => vps.c2.s ++ vps.n3 ! a) (passiveVP vps) ; - RelVS s rvs = {s = \\o => s.s ! o ++ "," ++ rvs.s ! agrP3 Neutr Sg ! RPrep True} ; + RelVS s rvs = {s = \\o => s.s ! o ++ comma ++ rvs.s ! agrP3 Neutr Sg ! RPrep True} ; RelSlashVS t p vs np = let vpform = VPFinite t.t t.a ; cl = PredVP np (predV vs) ; vilket = IdRP.s ! Neutr ! Sg ! (RPrep True) in diff --git a/lib/src/swedish/ParseSwe.gf b/lib/src/swedish/ParseSwe.gf index b5b77f2b1..2b05dd83e 100644 --- a/lib/src/swedish/ParseSwe.gf +++ b/lib/src/swedish/ParseSwe.gf @@ -113,7 +113,7 @@ lin PresPartRS ant pol vp = mkRS ant pol (mkRCl which_RP vp) ; --- probably not as participle construction ApposNP np1 np2 = { - s = \\c => np1.s ! c ++ "," ++ np2.s ! NPNom ; + s = \\c => np1.s ! c ++ comma ++ np2.s ! NPNom ; a = np1.a } ;