mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 08:42:50 -06:00
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:
@@ -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
|
||||
|
||||
} ;
|
||||
|
||||
@@ -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 = "&|" ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user