parser-combinators: added <!?>
parent
5a88cc8d75
commit
fb01efed25
|
@ -221,3 +221,11 @@ LAZY: <!+> ( parser -- parser )
|
||||||
#! usually the effect you want and cuts down on backtracking
|
#! usually the effect you want and cuts down on backtracking
|
||||||
#! required.
|
#! required.
|
||||||
<+> only-first ;
|
<+> only-first ;
|
||||||
|
|
||||||
|
LAZY: <!?> ( parser -- parser )
|
||||||
|
#! Like <?> but only return one possible result
|
||||||
|
#! containing all matching parses. Does not return
|
||||||
|
#! partial matches. Useful for efficiency since that's
|
||||||
|
#! usually the effect you want and cuts down on backtracking
|
||||||
|
#! required.
|
||||||
|
<?> only-first ;
|
||||||
|
|
Loading…
Reference in New Issue