Represents a parsing expectation for error reporting.
Expected values are either a sequence of expected tokens (in which case
Label == null && Tokens != null),
a custom-named parser (
Label != null && Tokens == null),
or the end of the input stream (
Label == null && Tokens == null)
Constructor functions, extension methods and utilities for working with Maybe<T>
Represents a single possibly absent value. Like
Nullable but works for reference types as well as value types.
Represents an error encountered during parsing.
Thrown when a parse error is encountered during parsing
Constructor functions, extension methods and utilities for Parser<TToken, T>. This class is intended to be imported statically ("using static Pidgin.Parser").
Constructor functions, extension methods and utilities for Parser<TToken, T> This class is intended to be imported statically, with the type parameter set to the type of tokens in your input stream ("using static Pidgin.Parser<char>").
Represents a parser which consumes a stream of values of type
TToken and returns a value of type
A parser can either succeed, and return a value of type
T, or fail and return a ParseError<TToken>.
Extension methods for running parsers
Represents the state of a parsing process. Includes functionality managing and buffering the input stream, reporting errors, and computing source positions.
For efficiency, this object is implemented as a mutable struct and is intended to be passed by reference.
WARNING: This API is unstable and subject to change in future versions of the library.
A version of List<T> which uses an array pool.
For efficiency, PooledList<T> is implemented as a mutable struct. It's intended to be passed by reference.
A function which computes a result from a ReadOnlySpan<T> and an additional argument.
Represents the result of parsing. A parse result may be successful (Success == true), in which case it contains a value, or it may be a failure, in which case it contains an error
Represents a (line, col) position in an input stream
Represents a difference in textual lines and columns corresponding to a region of an input stream.
An uninteresting type with only one value (Value) and no fields.
void, but valid as a type parameter
An interface for streams of
TToken, which can be consumed by Parser<TToken, T>s.