- afterMany : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok c a
Parse zero or more instance of `skip` until `p` is encountered,
returning its value.
Totality: total- afterSome : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok True a
Parse one or more instance of `skip` until `p` is encountered,
returning its value.
Totality: total- between : Grammar state tok True l -> Grammar state tok True r -> Grammar state tok c a -> Grammar state tok True a
Parse an instance of `p` that is between `left` and `right`.
Totality: total- choice : Foldable t => t (Grammar state tok c a) -> Grammar state tok c a
Try each grammar in a container until the first one succeeds.
Fails if the container is empty.
Totality: total- choiceMap : (a -> Grammar state tok c b) -> Foldable t => t a -> Grammar state tok c b
Produce a grammar by applying a function to each element of a container,
then try each resulting grammar until the first one succeeds. Fails if the
container is empty.
Totality: total- choose : Grammar state tok c1 a -> Grammar state tok c2 b -> Grammar state tok (c1 && Delay c2) (Either a b)
Try to parse one thing or the other, producing a value that indicates
which option succeeded. If both would succeed, the left option
takes priority.
Totality: total- column : Grammar state token False Int
- Totality: total
- count : (q : Quantity) -> Grammar state tok True a -> Grammar state tok (isSucc (min q)) (List a)
Parse `p`, repeated as specified by `q`, returning the list of values.
Totality: total- endBy : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok False (List a)
- Totality: total
- endBy1 : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok True (List1 a)
Parse one or more instances of `p`, separated and terminated by `sep`.
Totality: total- endLocation : Grammar state token False (Int, Int)
- Totality: total
- location : Grammar state token False (Int, Int)
- Totality: total
- many : Grammar state tok True a -> Grammar state tok False (List a)
Parse zero or more things (may match the empty input)
Totality: total- manyTill : Grammar state tok c e -> Grammar state tok True a -> Grammar state tok c (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- match : {auto conArg : (Eq k, TokenKind k)} -> (kind : k) -> Grammar state (Token k) True (TokType kind)
Parse a terminal based on a kind of token.
Totality: total- option : a -> Grammar state tok c a -> Grammar state tok False a
Optionally parse a thing, with a default value if the grammar doesn't
match. May match the empty input.
Totality: total- optional : Grammar state tok c a -> Grammar state tok False (Maybe a)
Optionally parse a thing.
To provide a default value, use `option` instead.
Totality: total- sepBy : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok False (List a)
Parse zero or more things, each separated by another thing. May
match the empty input.
Totality: total- sepBy1 : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok c (List1 a)
Parse one or more things, each separated by another thing.
Totality: total- sepEndBy : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok False (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- sepEndBy1 : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok c (List1 a)
Parse one or more instances of `p` separated by and optionally terminated by
`sep`.
Totality: total- some : Grammar state tok True a -> Grammar state tok True (List1 a)
Parse one or more things
Totality: total- someTill : Grammar state tok c e -> Grammar state tok True a -> Grammar state tok True (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- when : Bool -> Lazy (Grammar state token False ()) -> Grammar state token False ()
- Totality: total