Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Members list
Type members
Types
Shorthand for P[Unit]
Shorthand for P[Unit]
Attributes
Value members
Concrete methods
Parses a single character, any character, as long as there is at least one character for it to parse (i.e. the input isn't at its end)
Parses a single character, any character, as long as there is at least one character for it to parse (i.e. the input isn't at its end)
Attributes
Parser that is only successful at the end of the input. Useful to ensure your parser parses the whole file.
Parser that is only successful at the end of the input. Useful to ensure your parser parses the whole file.
Attributes
No-op parser that always fails, consuming zero characters
No-op parser that always fails, consuming zero characters
Attributes
No-op parser with a custom error message that always fails, consuming zero characters
No-op parser with a custom error message that always fails, consuming zero characters
Attributes
Parses a string value case-insensitively
Parses a string value case-insensitively
Attributes
Parser that always succeeds and returns the current index into the parsed input. Useful for e.g. capturing source locations so when downstream valiation raises errors you can tell the user where in the input the error originated from
Parser that always succeeds and returns the current index into the parsed input. Useful for e.g. capturing source locations so when downstream valiation raises errors you can tell the user where in the input the error originated from
Attributes
Allows backtracking regardless of whether cuts happen within the wrapped parser; this is useful for re-using an existing parser with cuts within it, in other parts of your grammar where backtracking is necessary and unavoidable.
Allows backtracking regardless of whether cuts happen within the wrapped parser; this is useful for re-using an existing parser with cuts within it, in other parts of your grammar where backtracking is necessary and unavoidable.
Attributes
Wraps a parser and ensures that none of the parsers within it leave failure traces in terminalMsgs, though unlike ByNameOps.opaque if there is a failure within the wrapped parser the failure's location and error message will still be shown
Wraps a parser and ensures that none of the parsers within it leave failure traces in terminalMsgs, though unlike ByNameOps.opaque if there is a failure within the wrapped parser the failure's location and error message will still be shown
Useful for wrapping things like whitespace, code-comment, etc. parsers which can be applied everywhere and are not useful to display to the user as part of the error message.
Attributes
No-op parser that always succeeds, consuming zero characters
No-op parser that always succeeds, consuming zero characters
Attributes
No-op parser that always succeeds with the given value, consuming zero characters
No-op parser that always succeeds with the given value, consuming zero characters
Attributes
Like AnyChar, but returns the single character it parses. Useful
together with EagerOps.flatMapX to provide one-character-lookahead
style parsing: SingleChar consumes the single character, and then
EagerOps.flatMapX can match
on that single character and decide
which downstream parser you wish to invoke
Like AnyChar, but returns the single character it parses. Useful
together with EagerOps.flatMapX to provide one-character-lookahead
style parsing: SingleChar consumes the single character, and then
EagerOps.flatMapX can match
on that single character and decide
which downstream parser you wish to invoke
Attributes
Parser that is only successful at the start of the input.
Parser that is only successful at the start of the input.
Attributes
Parses the given input ParserInput using the given parser and returns a Parsed result containing the success value or failure metadata.
Parses the given input ParserInput using the given parser and returns a Parsed result containing the success value or failure metadata.
Can take either a String, an Iterator or strings or a fastparse.ParserInput object
Attributes
- input
the input to parse
- instrument
Callbacks that get run before and after every named
P(...)
parser- parser
the parser method to use to parse the input
- startIndex
where in the input to start parsing
- verboseFailures
enable this to show a more detailed error message if a parser fails, without needing to run
.traced.trace
. Defaults tofalse
as it slows down parsing considerably