parser-combinators: added <!?>

darcs
chris.double 2006-12-15 12:51:38 +00:00
parent 5a88cc8d75
commit fb01efed25
1 changed files with 8 additions and 0 deletions

View File

@ -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 ;