From 64e326e56d5500d1efc980718fab2191976e4642 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Fri, 13 Jan 2006 12:52:21 +0000 Subject: [PATCH] Replace use of '2list' in parser combinators code. parser-combinators are still broken though due to an error calling the 'parens' test. This used to work in 0.78... --- contrib/parser-combinators/lazy.factor | 34 +------------------------ contrib/parser-combinators/tests.factor | 2 +- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/contrib/parser-combinators/lazy.factor b/contrib/parser-combinators/lazy.factor index 2ba6f89cfe..69b85b28bf 100644 --- a/contrib/parser-combinators/lazy.factor +++ b/contrib/parser-combinators/lazy.factor @@ -228,7 +228,7 @@ DEFER: list>llist : lappend ( llist1 llist2 -- llist ) #! Concatenate two lazy lists such that they appear to be one big #! lazy list. - 2list list>llist lappend* ; + [ ] cons cons list>llist lappend* ; : leach ( llist quot -- ) #! Call the quotation on each item in the lazy list. @@ -263,35 +263,3 @@ DEFER: list>llist drop lnil ] if ; -! M: lcons nth lnth ; - -: test1 - [ 1 ] list>llist - [ 2 ] list>llist - 2list - list>llist - lappend* ; - -: test2 - [ 1 2 ] list>llist - [ 3 4 ] list>llist - 2list - list>llist - lappend* ; - -: test3 - [ 1 2 3 ] list>llist - [ 4 5 6 ] list>llist - [ 7 8 9 ] list>llist - 2list cons - list>llist - lappend* ; - -: test4 - [ 1 2 3 4 5 ] list>llist - [ 2 mod 1 = ] lsubset ; - -: test5 lnil unit delay lunit [ lnil? not ] lsubset ; - -: test6 lnil unit delay lunit lappend* ; - diff --git a/contrib/parser-combinators/tests.factor b/contrib/parser-combinators/tests.factor index c2c856785d..b0f7d3135e 100644 --- a/contrib/parser-combinators/tests.factor +++ b/contrib/parser-combinators/tests.factor @@ -21,7 +21,7 @@ ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. IN: scratchpad -USING: kernel lazy parser-combinators test errors strings parser lists math sequences unparser ; +USING: kernel lazy parser-combinators test errors strings parser lists math sequences ; ! Testing <&> [ [ [[ "cd" [[ "a" "b" ]] ]] ] ] [