forked from GitHub/gf-core
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:
@@ -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