Namespace Pidgin
Classes
Maybe
Constructor functions, extension methods and utilities for working with Maybe<T>
ParseError<TToken>
Represents an error encountered during parsing.
ParseException
Thrown when a parse error is encountered during parsing
Parser
Constructor functions, extension methods and utilities for Parser<TToken, T>. This class is intended to be imported statically ("using static Pidgin.Parser").
Parser<TToken>
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>").
Parser<TToken, T>
Represents a parser which consumes a stream of values of type TToken
and returns a value of type T
.
A parser can either succeed, and return a value of type T
, or fail and return a ParseError<TToken>.
ParserExtensions
Extension methods for running parsers
Result<TToken, T>
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
Unit
An uninteresting type with only one value (Value) and no fields.
Like void
, but valid as a type parameter
Structs
Expected<TToken>
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
)
Maybe<T>
Represents a single possibly absent value. Like Nullable
but works for reference types as well as value types.
SourcePos
Represents a (line, col) position in an input stream