combinator library

Classes

ListParser<T>
A Parser that produces Lists of a type T.
ParseArgs
Parser<T>
A parser combinator, which can parse very complicated grammars in a manageable manner.
ParseResult<T>
The result generated by a Parser.
Reference<T>
Trampoline
Prevents stack overflow in recursive parsers.

Functions

any<T>(Iterable<Parser<T>> parsers, {bool backtrack = true, dynamic errorMessage, SyntaxErrorSeverity severity}) Parser<T>
Matches any one of the given parsers. [...]
chain<T>(Iterable<Parser<T>> parsers, {bool failFast = true, SyntaxErrorSeverity severity}) ListParser<T>
Expects to parse a sequence of parsers. [...]
longest<T>(Iterable<Parser<T>> parsers, {Object errorMessage, SyntaxErrorSeverity severity}) Parser<T>
Matches any one of the given parsers. [...]
match<T>(Pattern pattern, {String errorMessage, SyntaxErrorSeverity severity}) Parser<T>
Expects to match a given pattern. If it is not matched, you can provide a custom errorMessage.
reference<T>() Reference<T>
tuple2<A, B>(Parser<A> a, Parser<B> b) Parser<Tuple2<A, B>>
A typed parser that parses a sequence of 2 values of different types.
tuple3<A, B, C>(Parser<A> a, Parser<B> b, Parser<C> c) Parser<Tuple3<A, B, C>>
A typed parser that parses a sequence of 3 values of different types.
tuple4<A, B, C, D>(Parser<A> a, Parser<B> b, Parser<C> c, Parser<D> d) Parser<Tuple4<A, B, C, D>>
A typed parser that parses a sequence of 4 values of different types.
tuple5<A, B, C, D, E>(Parser<A> a, Parser<B> b, Parser<C> c, Parser<D> d, Parser<E> e) Parser<Tuple5<A, B, C, D, E>>
A typed parser that parses a sequence of 5 values of different types.
tuple6<A, B, C, D, E, F>(Parser<A> a, Parser<B> b, Parser<C> c, Parser<D> d, Parser<E> e, Parser<F> f) Parser<Tuple6<A, B, C, D, E, F>>
A typed parser that parses a sequence of 6 values of different types.
tuple7<A, B, C, D, E, F, G>(Parser<A> a, Parser<B> b, Parser<C> c, Parser<D> d, Parser<E> e, Parser<F> f, Parser<G> g) Parser<Tuple7<A, B, C, D, E, F, G>>
A typed parser that parses a sequence of 7 values of different types.

Enums

SyntaxErrorSeverity

Exceptions / Errors

SyntaxError