1
0
forked from GitHub/gf-core

Fix lin2string and pass all unittests and Phrasebook

This commit is contained in:
John J. Camilleri
2021-03-08 09:53:10 +01:00
parent 0f4b349b0b
commit 785d6069e2
5 changed files with 81 additions and 31 deletions

View File

@@ -9,4 +9,6 @@ abstract Bind = {
softspace : S -> S -> S ;
capit : S -> S ;
allcapit : S -> S ;
prebind : S -> S ;
precapit : S -> S ;
}

View File

@@ -18,3 +18,15 @@ BindCnc: hello there goodbye
Bind: concat (capit f1) (allcapit f2)
BindCnc: Hello there GOODBYE
Bind: prebind f1
BindCnc: |hello there
Bind: prebind f2
BindCnc: > goodbye
Bind: precapit f1
BindCnc: |Hello there
Bind: precapit f2
BindCnc: > Goodbye

View File

@@ -10,4 +10,12 @@ concrete BindCnc of Bind = open Prelude in {
softspace a b = ss (a.s ++ SOFT_SPACE ++ b.s) ;
capit a = ss (CAPIT ++ a.s) ;
allcapit a = ss (ALL_CAPIT ++ a.s) ;
prebind a = ss (p ++ a.s) ;
precapit a = ss (p ++ CAPIT ++ a.s) ;
oper
p = pre {
"he" => "|" ++ BIND;
"H"|"G" => "^" ++ BIND;
_ => ">"
} ;
}