match : {auto {conArg:983} : TokenKind k} -> Eq k => (kind : k) -> Grammar state (Token k) True (TokType kind)
Parse a terminal based on a kind of token.
Totality: total
Visibility: exportoption : 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
Visibility: exportoptional : 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
Visibility: exportchoose : 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
Visibility: exportchoiceMap : (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
Visibility: exportchoice : 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
Visibility: exportsome : Grammar state tok True a -> Grammar state tok True (List1 a)
Parse one or more things
Totality: total
Visibility: exportmany : Grammar state tok True a -> Grammar state tok False (List a)
Parse zero or more things (may match the empty input)
Totality: total
Visibility: exportcount : (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
Visibility: exportsomeTill : 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
Visibility: exportmanyTill : 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
Visibility: exportafterSome : 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
Visibility: exportafterMany : 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
Visibility: exportsepBy1 : 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
Visibility: exportsepBy : 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
Visibility: exportsepEndBy1 : 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
Visibility: exportsepEndBy : 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
Visibility: exportendBy1 : 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
Visibility: exportendBy : Grammar state tok True s -> Grammar state tok c a -> Grammar state tok False (List a)
- Totality: total
Visibility: export 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
Visibility: exportlocation : Grammar state token False (Int, Int)
- Totality: total
Visibility: export endLocation : Grammar state token False (Int, Int)
- Totality: total
Visibility: export column : Grammar state token False Int
- Totality: total
Visibility: export when : Bool -> Lazy (Grammar state token False ()) -> Grammar state token False ()
- Totality: total
Visibility: public export