Idris2Doc : TyRE.Text.Parser

TyRE.Text.Parser

(source)
This is a slightly modified copy of the same module from `contrib` package.

Reexports

importpublic Data.Bool
importpublic Data.List
importpublic Data.List1
importpublic Data.Nat
importpublic Data.Vect
importpublic TyRE.Text.Parser.Core
importpublic TyRE.Text.Quantity
importpublic TyRE.Text.Token

Definitions

match : {auto{conArg:977} : (Eqk, TokenKindk)} -> (kind : k) ->Grammar (Tokenk) True (TokTypekind)
  Parse a terminal based on a kind of token.

Visibility: public export
option : a->Grammartokca->GrammartokFalsea
  Optionally parse a thing, with a default value if the grammar doesn't
match. May match the empty input.

Visibility: public export
optional : Grammartokca->GrammartokFalse (Maybea)
  Optionally parse a thing.
To provide a default value, use `option` instead.

Visibility: public export
choose : Grammartokc1a->Grammartokc2b->Grammartok (c1&& Delay c2) (Eitherab)
  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.

Visibility: public export
choiceMap : (a->Grammartokcb) ->Foldablet=>ta->Grammartokcb
  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.

Visibility: public export
choice : Foldablet=>t (Grammartokca) ->Grammartokca
  Try each grammar in a container until the first one succeeds.
Fails if the container is empty.

Visibility: public export
some : GrammartokTruea->GrammartokTrue (List1a)
  Parse one or more things

Visibility: public export
many : GrammartokTruea->GrammartokFalse (Lista)
  Parse zero or more things (may match the empty input)

Visibility: public export
some' : GrammartokTruea->GrammartokTrue (xs : Lista**NonEmptyxs)
  Parse one or more instances of `p`, returning the parsed items and proof
that the resulting list is non-empty.

Visibility: public export
count1 : Quantity->GrammartokTruea->GrammartokTrue (Lista)
Visibility: public export
count : (q : Quantity) ->GrammartokTruea->Grammartok (isSucc (minq)) (Lista)
  Parse `p`, repeated as specified by `q`, returning the list of values.

Visibility: public export
countExactly : (n : Nat) ->GrammartokTruea->Grammartok (isSuccn) (Vectna)
  Parse `p` `n` times, returning the vector of values.

Visibility: public export
someTill : Grammartokce->GrammartokTruea->GrammartokTrue (List1a)
  Parse one or more instances of `p` until `end` succeeds, returning the
list of values from `p`. Guaranteed to consume input.

Visibility: public export
manyTill : Grammartokce->GrammartokTruea->Grammartokc (Lista)
  Parse zero or more instances of `p` until `end` succeeds, returning the
list of values from `p`. Guaranteed to consume input if `end` consumes.

Visibility: public export
afterSome : GrammartokTrues->Grammartokca->GrammartokTruea
  Parse one or more instance of `skip` until `p` is encountered,
returning its value.

Visibility: public export
afterMany : GrammartokTrues->Grammartokca->Grammartokca
  Parse zero or more instance of `skip` until `p` is encountered,
returning its value.

Visibility: public export
sepBy1 : GrammartokTrues->Grammartokca->Grammartokc (List1a)
  Parse one or more things, each separated by another thing.

Visibility: public export
sepBy : GrammartokTrues->Grammartokca->GrammartokFalse (Lista)
  Parse zero or more things, each separated by another thing. May
match the empty input.

Visibility: public export
sepEndBy1 : GrammartokTrues->Grammartokca->Grammartokc (List1a)
  Parse one or more instances of `p` separated by and optionally terminated by
`sep`.

Visibility: public export
sepEndBy : GrammartokTrues->Grammartokca->GrammartokFalse (Lista)
  Parse zero or more instances of `p`, separated by and optionally terminated
by `sep`. Will not match a separator by itself.

Visibility: public export
endBy1 : GrammartokTrues->Grammartokca->GrammartokTrue (List1a)
  Parse one or more instances of `p`, separated and terminated by `sep`.

Visibility: public export
endBy : GrammartokTrues->Grammartokca->GrammartokFalse (Lista)
Visibility: public export
between : GrammartokTruel-> Inf (GrammartokTruer) -> Inf (Grammartokca) ->GrammartokTruea
  Parse an instance of `p` that is between `left` and `right`.

Visibility: public export