refactored Thai so that it can now be compiled producing BIND tokens instead of spaces, by just changing the definition of ResTha.bIND. This is not to be exploited yet, because it produces consecutive BIND tokens, which are not supported at runtime.

This commit is contained in:
aarne
2015-03-16 14:53:53 +00:00
parent 354b89e588
commit 3c27eea68b
7 changed files with 28 additions and 24 deletions
+6 -5
View File
@@ -11,9 +11,10 @@ resource ResTha = ParamX, StringsTha ** open Prelude in {
oper
-- binding words together - if you want. But better do it with the unlexer -unchars.
-- binding words together
-- will be activated when the parser supports consecutive BINDs AR 16/3/2015
bIND = [] ;
bIND = [] ; ---- Predef.BIND ;
thbind = overload {
thbind : Str -> Str = \s -> s ;
@@ -99,8 +100,8 @@ resource ResTha = ParamX, StringsTha ** open Prelude in {
predV : Verb -> VP = \v -> {
s = \\p => if_then_Str v.isCompl
(thbind v.s1 (polStr may_s p ++ v.s2))
(v.s1 ++ (polStr may_s p ++ v.s2)) ; --- v.s1 = [] ;
(thbind v.s1 (polStr may_s p ++bIND++ v.s2))
(v.s1 ++bIND++ (polStr may_s p ++bIND++ v.s2)) ; --- v.s1 = [] ;
e = []
} ;
@@ -111,7 +112,7 @@ resource ResTha = ParamX, StringsTha ** open Prelude in {
insertExtra : Str -> VP -> VP = \o,vp -> {
s = vp.s ;
e = vp.e ++ o
e = vp.e ++bIND++ o
} ;
adjVP : Adj -> VP = \a -> {