]> gitweb.factorcode.org Git - factor.git/commitdiff
get parser-combinator code working with latest factor sequence changes
authorChris Double <chris.double@double.co.nz>
Wed, 18 May 2005 22:54:59 +0000 (22:54 +0000)
committerChris Double <chris.double@double.co.nz>
Wed, 18 May 2005 22:54:59 +0000 (22:54 +0000)
contrib/parser-combinators/lazy.factor
contrib/parser-combinators/parser-combinators.factor

index 226f1e06d2597732e89c0770354852aa316154a1..a85fb538824b0f829fe251dd437db424426988e0 100644 (file)
@@ -263,7 +263,7 @@ DEFER: list>llist
     drop lnil
   ] ifte ;
 
-M: lcons nth lnth ;
+M: lcons nth lnth ;
 
 : test1 
   [ 1 ] list>llist
index c80457566ee8638ea3d3cbc7a3b1b9ce1789ab48..d611c321a21c74d2a6ded7178f68483de323daf2 100644 (file)
@@ -50,7 +50,7 @@ GENERIC: ptail
 M: string ptail ( object -- tail )
   #! Polymorphic tail. Return the tail of the object.
   #! For a string this is everything but the first character.
-  1 swap string-tail ;
+  1 swap tail ;
 
 M: list ptail ( object -- tail )
   #! Polymorphic tail. Return the tail of the object.
@@ -96,7 +96,7 @@ M: list pempty? ( object -- bool )
   dup length pick < [
     2drop ""
   ] [
-    string-head
+    head
   ] ifte ;
 
 : (list-take) ( n list accum -- list )
@@ -131,7 +131,7 @@ M: list ptake ( n object -- object )
   dup length pick < [
     2drop "" 
   ] [
-    string-tail 
+    tail 
   ] ifte ;
 
 : list-drop ( n list -- list )