Structs
Enums
Functions
Attempts several parsers.
Returns true if at least one succeeds.
Applies optional parsers in sequence.
Returns the first that succeeds.
If none succeeds, aborts.
Monadic
force_there_take_exact
.Monadic
here_end
.Monadic ‘here_take_exact’.
Monadic here_peek_head.
Monadic ‘here_take_exact’.
Monadic here_take_head.
Monadic skip.
Monadic skip_comment.
Monadic skip_spaces.
Monadic
there_end
.Monadic ‘there_peek_exact’.
Monadic peek_symol.
Monadic ‘there_take_exact’.
Monadic there_take_head.
Evaluates a parser and returns its result, but reverts its effect.
Perform
there_take_exact
. Abort if not possible.Checks if a dry-run of the first parser returns
true
.
If so, applies the second parser and returns Some
.
If no, returns None
.Maybe gets the current character.
Returns
true
if cursor will be at the end of the file.Parses a name right after the parsing cursor.
Attempts to match a string right after the cursor.
Returns
true
if successful. Doesn’t consume it.Returns, without consuming, the next char, or ‘\0’.
Attempts to match a string right after the cursor.
Returns
true
if successful. Consumes string.Returns and consumes the next char, or ‘\0’.
Evaluates a list-like parser, with an opener, separator, and closer.
Takes a parser that can abort, and transforms it into a non abortive parser
that returns Some if it succeeds, and None if it fails.
Skips comments and whitespace.
Skips C-like comments, starting with ‘//’.
Skips whitespaces.
Skips characters until a condition is false.
Skips the current character.
Skip, then
here_end
.Parses a name after skipping comments and whitespace.
Parses a non-empty name after skipping.
Skip, then ‘here_peek_exact’.
Skip, then here_peek_head.
Skip, then ‘here_take_exact’.
Skip, then here_take_head.
Evaluates a parser until a condition is met. Returns an array of results.