X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=src%2Fyard.dcl;h=38ce3688f62aa3023d51cdd0714b7243a0dc2e8a;hb=3d1c57710eb0b86f13df392f03131157aec22c21;hp=cedf0dfc497155405c8119d6a974ce3e82f9a3f0;hpb=f56458569930a95ddb04c0d166af574535b493d4;p=cc1516.git diff --git a/src/yard.dcl b/src/yard.dcl index cedf0df..38ce368 100644 --- a/src/yard.dcl +++ b/src/yard.dcl @@ -6,6 +6,7 @@ from StdClass import class Eq from Data.Functor import class Functor from Control.Monad import class Monad from Control.Applicative import class Applicative, class Alternative +import Data.Void :: Error = ParseError | LexError String | Unexpected String Int :: Parser a b = Parser ([a] -> (Either Error b, [a])) @@ -24,5 +25,7 @@ top :: Parser a a peek :: Parser a a satisfy :: (a -> Bool) -> Parser a a check :: (a -> Bool) -> Parser a a +until :: (Parser a b) (Parser a c) -> Parser a [b] item :: a -> Parser a a | Eq a list :: [a] -> Parser a [a] | Eq a +eof :: Parser a Void