added Predef.SOFT_BIND. This special token allows zero or more spaces between ordinary tokens. It is also used in the English RGL to attach the commas to the previous word.

This commit is contained in:
kr.angelov
2013-11-12 09:54:57 +00:00
parent 2da15f558e
commit 1d7b6f44b6
27 changed files with 86 additions and 28 deletions

View File

@@ -38,5 +38,6 @@ resource Predef = {
-- map all strings in a data structure; experimental ---
oper nonExist : Str = variants {} ; -- a placeholder for non-existant morphological forms
oper BIND : Str = variants {} ; -- a token for gluing
oper SOFT_BIND : Str = variants {} ; -- a token for soft gluing
} ;

View File

@@ -2,7 +2,7 @@
-- This file defines some prelude facilities usable in all grammars.
resource Prelude = open (Predef=Predef) in {
resource Prelude = Predef[nonExist, BIND, SOFT_BIND] ** open (Predef=Predef) in {
oper
@@ -33,10 +33,6 @@ oper
--2 Optional elements
-- Missing form.
nonExist : Str = Predef.nonExist;
-- Optional string with preference on the string vs. empty.
optStr : Str -> Str = \s -> variants {s ; []} ;
@@ -114,7 +110,6 @@ oper
-- These should be hidden, and never changed since they are hardcoded in (un)lexers
BIND : Str = Predef.BIND;
PARA : Str = "&-" ;
CAPIT : Str = "&|" ;