From 7a45882be224c4396397843761245da089937f35 Mon Sep 17 00:00:00 2001 From: "chris.double" Date: Fri, 6 Oct 2006 03:38:48 +0000 Subject: [PATCH] parser-combinators: refactor --- contrib/parser-combinators/parser-combinators.factor | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/contrib/parser-combinators/parser-combinators.factor b/contrib/parser-combinators/parser-combinators.factor index 9fe2a1d50e..916c1f3fa2 100644 --- a/contrib/parser-combinators/parser-combinators.factor +++ b/contrib/parser-combinators/parser-combinators.factor @@ -192,20 +192,12 @@ M: some-parser (parse) ( input parser -- result ) : <*> ( parser -- parser ) [ dup <*> <&:> { } succeed <|> ] promise-with ; -: (<+>) ( parser -- parser ) - #! Non-delayed implementation of <+> - dup <*> <&:> ; - : <+> ( parser -- parser ) #! Return a parser that accepts one or more occurences of the original #! parser. dup <*> <&:> ; -: () ( parser -- parser ) - #! Non-delayed implementation of - [ unit ] <@ f succeed <|> ; - : ( parser -- parser ) #! Return a parser that optionally uses the parser #! if that parser would be successfull. - [ () call ] curry ; + [ 1array ] <@ f succeed <|> ; -- 2.34.1