diff --git a/src/compiler/GF/Compile/GrammarToLPGF.hs b/src/compiler/GF/Compile/GrammarToLPGF.hs index 9b4b78300..575dddaf0 100644 --- a/src/compiler/GF/Compile/GrammarToLPGF.hs +++ b/src/compiler/GF/Compile/GrammarToLPGF.hs @@ -92,7 +92,7 @@ mkCanon2lpgf opts gr am = do C.PredefValue (C.PredefId pid) -> case pid of "BIND" -> return L.LFBind - -- "SOFT_BIND" -> + "SOFT_BIND" -> return L.LFBind -- "SOFT_SPACE" -> -- "CAPIT" -> -- "ALL_CAPIT" -> diff --git a/testsuite/lpgf/Bind.gf b/testsuite/lpgf/Bind.gf index 2d90ba1b5..fcae20ac3 100644 --- a/testsuite/lpgf/Bind.gf +++ b/testsuite/lpgf/Bind.gf @@ -1,7 +1,9 @@ abstract Bind = { - cat S ; F ; + cat S ; fun - FtoS : F -> S ; - f1 : F ; - f2 : F ; + f1 : S ; + f2 : S ; + concat : S -> S -> S ; + bind : S -> S -> S ; + softbind : S -> S -> S ; } diff --git a/testsuite/lpgf/Bind.treebank b/testsuite/lpgf/Bind.treebank index 5d3a30e11..04d8160c3 100644 --- a/testsuite/lpgf/Bind.treebank +++ b/testsuite/lpgf/Bind.treebank @@ -1,6 +1,14 @@ -Bind: FtoS f1 +Bind: f1 BindCnc: hello there -Bind: FtoS f2 -BindCnc: good bye +Bind: f2 +BindCnc: goodbye +Bind: concat f1 f2 +BindCnc: hello there goodbye + +Bind: bind f1 f2 +BindCnc: hello theregoodbye + +Bind: softbind f1 f2 +BindCnc: hello theregoodbye diff --git a/testsuite/lpgf/Bind.trees b/testsuite/lpgf/Bind.trees index dd3b55e19..64bc5fb52 100644 --- a/testsuite/lpgf/Bind.trees +++ b/testsuite/lpgf/Bind.trees @@ -1,2 +1,5 @@ -FtoS f1 -FtoS f2 +f1 +f2 +concat f1 f2 +bind f1 f2 +softbind f1 f2 diff --git a/testsuite/lpgf/BindCnc.gf b/testsuite/lpgf/BindCnc.gf index efca9b94d..730e158bb 100644 --- a/testsuite/lpgf/BindCnc.gf +++ b/testsuite/lpgf/BindCnc.gf @@ -1,9 +1,10 @@ concrete BindCnc of Bind = open Prelude in { lincat - S = Str ; - F = { s : Str } ; + S = SS ; lin - f1 = { s = "hello the" ++ BIND ++ "re" } ; - f2 = { s = "good" ++ "bye" } ; - FtoS f = f.s ; + f1 = ss ("hello the" ++ BIND ++ "re") ; + f2 = ss ("good" ++ SOFT_BIND ++ "bye") ; + concat a b = ss (a.s ++ b.s) ; + bind a b = ss (a.s ++ BIND ++ b.s) ; + softbind a b = ss (a.s ++ SOFT_BIND ++ b.s) ; }