Package-level declarations

Functions

Link copied to clipboard

Returns a Parser that consumes one ASCII punctuation character.

Link copied to clipboard
fun <U : Any> pBlankLine(): Parser<Char, Unit, U>

Returns a Parser that consumes zero or more space/tab characters followed by a line ending, succeeding with Unit.

Link copied to clipboard
fun <U : Any> pChar(character: Char, ignoreCase: Boolean = false): Parser<Char, Char, U>

Returns a Parser that consumes exactly one Char equal to character, and fails if the next character is different or the input is exhausted.

Link copied to clipboard
fun <U : Any> pDigit(): Parser<Char, Char, U>

Returns a Parser that consumes one decimal digit character (09).

Link copied to clipboard
fun <U : Any> pHexDigit(): Parser<Char, Char, U>

Returns a Parser that consumes one hexadecimal digit character (09, af, AF).

Link copied to clipboard
fun <U : Any> pIndent(n: Int): Parser<Char, List<Char>, U>

Returns a Parser that consumes exactly n space characters (' ').

Link copied to clipboard
fun <U : Any> pInt(): Parser<Char, Int, U>
Link copied to clipboard
fun <U : Any> pLetter(): Parser<Char, Char, U>

Returns a Parser that consumes one Unicode letter character (as determined by Char.isLetter).

Link copied to clipboard
fun <U : Any> pLineEnding(): Parser<Char, Char, U>

Returns a Parser that consumes a line ending (\n, \r\n, or \r not followed by \n) and always succeeds with the normalised newline character '\n'.

Link copied to clipboard

Returns a Parser that consumes all characters up to (but not including) the next line ending or end of input, succeeding with the matched String.

Link copied to clipboard
fun <U : Any> pSpace(): Parser<Char, Char, U>

Returns a Parser that consumes exactly one space character (' ').

Link copied to clipboard
fun <U : Any> pSpaceOrTab(): Parser<Char, Char, U>

Returns a Parser that consumes exactly one space (' ') or tab ('\t') character, whichever appears next in the input.

Link copied to clipboard
fun <U : Any> pString(string: String, ignoreCase: Boolean = false): Parser<Char, String, U>

Returns a Parser that consumes exactly the sequence of characters in string, and fails if the input does not match or is exhausted before the full string is consumed.

Link copied to clipboard
fun <U : Any> pTab(): Parser<Char, Char, U>

Returns a Parser that consumes exactly one tab character ('\t').

Link copied to clipboard
fun <U : Any> pTakeWhile(predicate: (Char) -> Boolean): Parser<Char, String, U>

Returns a Parser that consumes zero or more characters satisfying predicate, collecting them into a String. Always succeeds; returns an empty string when predicate is false for the first character or the input is exhausted.

Link copied to clipboard
fun <U : Any> pTakeWhile1(predicate: (Char) -> Boolean): Parser<Char, String, U>

Returns a Parser that consumes one or more characters satisfying predicate, collecting them into a String. Fails when predicate is false for the first character or the input is exhausted.

Link copied to clipboard

Returns a Parser that consumes one Unicode punctuation character.

Link copied to clipboard

Returns a Parser that consumes one Unicode whitespace character.

Link copied to clipboard

Returns a Parser that consumes 0–3 leading space characters (' '), succeeding with the list of matched spaces. Always succeeds.