Std.Text.Parse
69 public declarations
- andThen
fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(A) -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem]One parser after another, the second chosen by the first's value.
- anyCharacter
fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]Any one character at all.
- asText
fn(Std.Text.Parse.Input) -> Result[(Array[Char], Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The text a parser's characters spell.
- attempt
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser that consumes nothing when it fails, so `orElse` may try another.
- between
fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser between two others, keeping only the middle value.
- bigInteger
fn(Std.Text.Parse.Input) -> Result[(BigInt, Std.Text.Parse.Input), Std.Text.Parse.Problem]One or more digits as an arbitrary-precision whole number.
- blanks
fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]Space and tab, but never a line ending.
- both
fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[((A, B), Std.Text.Parse.Input), Std.Text.Parse.Problem]Two parsers in order, keeping both values.
- character
Char -> fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One particular character.
- choice
&Array[fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]] -> Str -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]The first parser that succeeds.
- count
Int -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]Exactly this many of a parser, and a problem if the input runs out first.
- digit
fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One ASCII decimal digit.
- endOfInput
fn(Std.Text.Parse.Input) -> Result[((), Std.Text.Parse.Input), Std.Text.Parse.Problem]The end of the input, consuming nothing.
- explain
&Std.Text.Parse.Problem -> StrA problem written for a person to read.
- explainIn
&Std.Text.Parse.Problem -> Str -> StrA problem written for a person reading a file, with the line and column.
- fail
Str -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser that consumes nothing and always fails.
- hexadecimal
fn(Std.Text.Parse.Input) -> Result[(Int, Std.Text.Parse.Input), Std.Text.Parse.Problem]A whole hexadecimal number, at least one digit.
- hexDigit
fn(Std.Text.Parse.Input) -> Result[(Int, Std.Text.Parse.Input), Std.Text.Parse.Problem]One hexadecimal digit's value.
- identifier
fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]A run of letters, digits, and underscores beginning with a letter.
- Input
What a parser has not read yet, and how far it has come.
- integer
fn(Std.Text.Parse.Input) -> Result[(Int, Std.Text.Parse.Input), Std.Text.Parse.Problem]One or more digits as an `Int`, the common case of `integerIn`.
- integerIn
N -> fn(Std.Text.Parse.Input) -> Result[(N, Std.Text.Parse.Input), Std.Text.Parse.Problem] where N: IntegerA whole number counted in the caller's own integer type.
- keepFirst
fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem]Two parsers in order, keeping the first's value.
- keepSecond
fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem]Two parsers in order, keeping the second's value.
- label
Str -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]Say what a parser wanted, in the reader's words rather than the grammar's.
- lazy
fn() -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser built only when it is run.
- letter
fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One ASCII letter.
- line
fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]One whole line, without its ending, and the ending consumed.
- lineAndColumn
Str -> Int -> (Int, Int)Where a position falls in the source, counted from one as a reader counts.
- lineEnd
fn(Std.Text.Parse.Input) -> Result[((), Std.Text.Parse.Input), Std.Text.Parse.Problem]A line ending, or the end of the input.
- literal
Str -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]A particular piece of text.
- lookAhead
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]Succeed exactly where the parser would, consuming nothing.
- many
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]Nought or more, until the parser stops.
- manyTill
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(E, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]Repeat a parser until the end parser succeeds, keeping what came before.
- map
fn(Std.Text.Parse.Input) -> Result[(A, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(A) -> B -> fn(Std.Text.Parse.Input) -> Result[(B, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser's value transformed.
- newline
fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]One line ending, however the file writes it.
- noneOf
Str -> fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One character not in a set.
- notFollowedBy
Str -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[((), Std.Text.Parse.Input), Std.Text.Parse.Problem]Succeed, consuming nothing, only where the parser would fail.
- oneOf
Str -> fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One character from a set.
- option
T -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser's value, or a fallback when it fails without consuming.
- optional
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Option[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser's value if it succeeds, and nothing if it fails without consuming.
- orElse
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]The first parser, or the second when the first consumed nothing.
- Parser
A parser: a function from input to a step.
- partial
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> Str -> Result[(T, Int), Std.Text.Parse.Problem]Run a parser over text, allowing input to remain.
- Problem
What a parser wanted where it stopped.
- pure
T -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser that consumes nothing and answers with a value.
- quoted
fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]Text between double quotes, with the usual escapes read.
- restOfLine
fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]Everything up to, but not including, the next line ending.
- run
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> Str -> Result[T, Std.Text.Parse.Problem]Run a parser over text, requiring it to consume all of it.
- satisfy
Str -> fn(Char) -> Bool -> fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One character the predicate accepts.
- separatedBy
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(S, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]Nought or more, separated by another parser.
- separatedSome
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(S, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]One or more, separated by another parser.
- sepEndBy
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(S, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]Items separated by, and optionally ended by, a separator.
- sepEndSome
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(S, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]The same, requiring at least one item.
- signed
fn(Std.Text.Parse.Input) -> Result[(N, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(N, Std.Text.Parse.Input), Std.Text.Parse.Problem] where N: IntegerAn optional sign, applied to a number.
- skipMany
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[((), Std.Text.Parse.Input), Std.Text.Parse.Problem]Run a parser and keep nothing, as many times as it succeeds.
- skipSome
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[((), Std.Text.Parse.Input), Std.Text.Parse.Problem]The same, requiring at least one.
- some
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(Array[T], Std.Text.Parse.Input), Std.Text.Parse.Problem]One or more.
- space
fn(Std.Text.Parse.Input) -> Result[(Char, Std.Text.Parse.Input), Std.Text.Parse.Problem]One space, tab, carriage return, or newline.
- spaces
fn(Std.Text.Parse.Input) -> Result[((), Std.Text.Parse.Input), Std.Text.Parse.Problem]Nought or more whitespace, discarded.
- Step
What one step of parsing produced: a value and what remains, or a problem.
- symbol
Str -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]A particular piece of text, with trailing whitespace discarded.
- takeNotOf
Str -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The longest run made of none of these characters, possibly none.
- takeNotOf1
Str -> Str -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The same, requiring at least one character.
- takeOf
Str -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The longest run made only of these characters, possibly none.
- takeOf1
Str -> Str -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The same, requiring at least one character.
- takeWhile
fn(Char) -> Bool -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The longest run of characters the predicate accepts, as text, possibly none.
- takeWhile1
Str -> fn(Char) -> Bool -> fn(Std.Text.Parse.Input) -> Result[(Str, Std.Text.Parse.Input), Std.Text.Parse.Problem]The same, requiring at least one character.
- token
fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem] -> fn(Std.Text.Parse.Input) -> Result[(T, Std.Text.Parse.Input), Std.Text.Parse.Problem]A parser with any whitespace after it discarded, which is what a token is.
