A single frame of the parser call stack
An internal mirror of the Parsed classes, except it contains far more data and is mutable to maximize performance
Things which get passed through the entire parse run, but almost never get changed in the process.
Things which get passed through the entire parse run, but almost never get changed in the process.
The string that is currently being parsed
How many logging statements we're within, used to properly
indent log output. Set to -1
to disable logging
Whether or not to perform full tracing to improve error
reporting. -1
disables tracing, and any other number
enables recording of stack-traces and
Result of a parse, whether successful or failed.
A single, self-contained, immutable parser.
A single, self-contained, immutable parser. The primary method is
parse
, which returns a T on success and a stack trace on failure.
Some small optimizations are performed in-line: collapsing parsers.Combinators.Either cells into large ones and collapsing parsers.Combinators.Sequence cells into parsers.Combinators.Sequence.Flats. These optimizations together appear to make things faster but any 10%, whether or not you activate tracing.
Convenience methods to be used internally inside Parsers
Something which contains an operator precedence, which can be used to correctly wrap other things which contain lower precedences in parentheses when stringifying.
Container for all the type-level logic around appending things
to tuples or flattening collection.Seq[Unit]
s into Unit
s.
Container for all the type-level logic around appending things
to tuples or flattening collection.Seq[Unit]
s into Unit
s.
Some of these implicits make liberal use of mutable state, so as to minimize allocations while parsing.
All the level of operator precedence in Scala
A single frame of the parser call stack
The index at which point this parse frame started
The parser which was attempted at this index