@@ -1,5 +1,7 @@
1module Text.Parser
1module Text.Parser
3+import public Control.Delayed
3%default total
5%default total
5-- TODO: Add some primitives for helping with error messages.
7-- TODO: Add some primitives for helping with error messages.
@@ -29,11 +31,6 @@ data Grammar : (tok : Type) -> (consumes : Bool) -> Type -> Type where
29 Grammar tok c1 ty -> Grammar tok c2 ty ->
31 Grammar tok c1 ty -> Grammar tok c2 ty ->
30 Grammar tok (c1 && c2) ty
32 Grammar tok (c1 && c2) ty
33−inf : Bool -> Type -> Type
37||| Sequence two grammars. If either consumes some input, the sequence is
34||| Sequence two grammars. If either consumes some input, the sequence is
38||| guaranteed to consume some input. If the first one consumes input, the
35||| guaranteed to consume some input. If the first one consumes input, the
39||| second is allowed to be recursive (because it means some input has been
36||| second is allowed to be recursive (because it means some input has been