data Res : Bool -> (t : Type) -> List (Bounded t) -> Type -> Type -> Type -> Type Result of running a parser.
Totality: total
Visibility: public export
Constructors:
Fail : Bool -> List1 (Bounded (InnerError e)) -> Res b t ts state e a Succ : state -> Bounded a -> (toks : List (Bounded t)) -> Suffix b toks ts -> Res b t ts state e a
Hint: FailParse (Res b t ts state e) e
merge : Bounded z -> Res b t ts s e a -> Res b t ts s e a- Totality: total
Visibility: public export succ : Res b t ts s e a -> Suffix True ts ts' -> Res b1 t ts' s e a- Totality: total
Visibility: export 0 inf : Bool -> Type -> Type- Totality: total
Visibility: public export data Grammar : Bool -> Type -> Type -> Type -> Type -> Type- Totality: total
Visibility: public export
Constructors:
Lift : (state -> (ts : List (Bounded t)) -> Res b t ts state e a) -> Grammar b state t e a AppEat : Grammar True state t e (a -> b) -> Inf (Grammar b2 state t e a) -> Grammar True state t e b App : Grammar b1 state t e (a -> b) -> Grammar b2 state t e a -> Grammar (b1 || Delay b2) state t e b BindEat : Grammar True state t e a -> Inf (a -> Grammar b2 state t e b) -> Grammar True state t e b (>>=) : Grammar b1 state t e a -> (a -> Grammar b2 state t e b) -> Grammar (b1 || Delay b2) state t e b ThenEat : Grammar True state t e a -> Inf (Grammar b2 state t e b) -> Grammar True state t e b (>>) : Grammar b1 state t e a -> Grammar b2 state t e b -> Grammar (b1 || Delay b2) state t e b Alt : Grammar b1 state t e a -> Lazy (Grammar b2 state t e a) -> Grammar (b1 && Delay b2) state t e a Bounds : Grammar b state t e a -> Grammar b state t e (Bounded a) Try : Grammar b state t e a -> Grammar b state t e a
Hints:
FailParse (Grammar b state t e) e Functor (Grammar b s t e)
(<|>) : Grammar b1 state t e a -> Lazy (Grammar b2 state t e a) -> Grammar (b1 && Delay b2) state t e a- Totality: total
Visibility: public export
Fixity Declaration: infixr operator, level 2 pure : a -> Grammar False state t e a- Totality: total
Visibility: public export (<*>) : Grammar b1 state t e (a -> b) -> inf b1 (Grammar b2 state t e a) -> Grammar (b1 || Delay b2) state t e b- Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3 (*>) : Grammar b1 state t e a -> Grammar b2 state t e b -> Grammar (b1 || Delay b2) state t e b- Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3 (<*) : Grammar b1 state t e a -> Grammar b2 state t e b -> Grammar (b1 || Delay b2) state t e a- Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3 nextIs : Lazy e -> (t -> Bool) -> Grammar False s t e t Check whether the next token satisfies a predicate
Totality: total
Visibility: public exportpeek : Grammar False s t e t Look at the next token in the input
Totality: total
Visibility: public exportreadHead : (t -> Either (InnerError e) a) -> Grammar True s t e a Look at the next token in the input
Totality: total
Visibility: public exportterminal : Interpolation t => (t -> Maybe a) -> Grammar True s t e a Look at the next token in the input
Totality: total
Visibility: public exportis : Interpolation t => Eq t => t -> Grammar True s t e () Look at the next token in the input
Totality: total
Visibility: public exportoption : a -> Grammar b state t e a -> Grammar False state t e a Optionally parse a thing, with a default value if the grammar doesn't
match. May match the empty input.
Totality: total
Visibility: exportoptional : Grammar b state t e a -> Grammar False state t e (Maybe a) Optionally parse a thing, with a default value if the grammar doesn't
match. May match the empty input.
Totality: total
Visibility: exportsome : Grammar True s t e a -> Grammar True s t e (List1 a)- Totality: total
Visibility: public export many : Grammar True s t e a -> Grammar False s t e (List a)- Totality: total
Visibility: public export someTill : Grammar b s t e x -> Grammar True s t e a -> Grammar True s t e (List1 a) Parse one or more instances of `p` until `end` succeeds, returning the
list of values from `p`. Guaranteed to consume input.
Totality: total
Visibility: exportmanyTill : Grammar b s t e x -> Grammar True s t e a -> Grammar b s t e (List a) Parse zero or more instances of `p` until `end` succeeds, returning the
list of values from `p`. Guaranteed to consume input if `end` consumes.
Totality: total
Visibility: exportafterSome : Grammar True s t e x -> Grammar b s t e a -> Grammar True s t e a Parse one or more instance of `skip` until `p` is encountered,
returning its value.
Totality: total
Visibility: exportafterMany : Grammar True s t e x -> Grammar b s t e a -> Grammar b s t e a Parse zero or more instance of `skip` until `p` is encountered,
returning its value.
Totality: total
Visibility: exportsepBy1 : Grammar True s t e s -> Grammar b s t e a -> Grammar b s t e (List1 a) Parse one or more things, each separated by another thing.
Totality: total
Visibility: exportsepBy : Grammar True s t e s -> Grammar b s t e a -> Grammar False s t e (List a) Parse zero or more things, each separated by another thing. May
match the empty input.
Totality: total
Visibility: exportsepEndBy1 : Grammar True s t e s -> Grammar b s t e a -> Grammar b s t e (List1 a) Parse one or more instances of `p` separated by and optionally terminated by
`sep`.
Totality: total
Visibility: exportsepEndBy : Grammar True s t e s -> Grammar b s t e a -> Grammar False s t e (List a) Parse zero or more instances of `p`, separated by and optionally terminated
by `sep`. Will not match a separator by itself.
Totality: total
Visibility: exportendBy1 : Grammar True s t e s -> Grammar b s t e a -> Grammar True s t e (List1 a) Parse one or more instances of `p`, separated and terminated by `sep`.
Totality: total
Visibility: exportendBy : Grammar True s t e s -> Grammar b s t e a -> Grammar False s t e (List a)- Totality: total
Visibility: export between : Grammar True s t e l -> Grammar True s t e r -> Grammar b s t e a -> Grammar True s t e a Parse an instance of `p` that is between `left` and `right`.
Totality: total
Visibility: exportparse : Grammar b state t e a -> state -> List (Bounded t) -> Either (List1 (Bounded (InnerError e))) (state, (a, List (Bounded t)))- Totality: total
Visibility: export lexFull : Interpolation t => Origin -> Tokenizer e t -> (t -> Bool) -> String -> Either (Bounded (InnerError e)) (List (Bounded t)) Given a tokenizer and an input string, return a list of recognised tokens.
This fails with an error if not the whole input is consumed.
Totality: total
Visibility: exportlexAndParse : Interpolation t => Origin -> Tokenizer e t -> (t -> Bool) -> Grammar b state t e a -> state -> String -> Either (List1 (FileContext, InnerError e)) (state, a)- Totality: total
Visibility: export