definition library

This package simplifies the creation of complicated recursive grammars.

Classes

GrammarDefinition<R>
Helper to conveniently define and build complex, recursive grammars using plain Dart code.
GrammarParser<T>
A (now pointless) helper to build a parser from a {@link GrammarDefinition}.

Functions

ref<R>(Function function, [dynamic arg1 = undefined, dynamic arg2 = undefined, dynamic arg3 = undefined, dynamic arg4 = undefined, dynamic arg5 = undefined, dynamic arg6 = undefined, dynamic arg7 = undefined, dynamic arg8 = undefined, dynamic arg9 = undefined]) Parser<R>
Creates a Parser from a function reference, possibly with the given arguments arg1, arg2, arg3, ...
ref0<R>(Parser<R> function()) Parser<R>
Creates a Parser from a function without arguments.
ref1<R, A1>(Parser<R> function(A1), A1 arg1) Parser<R>
Reference to a production function parametrized with 1 argument.
ref2<R, A1, A2>(Parser<R> function(A1, A2), A1 arg1, A2 arg2) Parser<R>
Reference to a production function parametrized with 2 arguments.
ref3<R, A1, A2, A3>(Parser<R> function(A1, A2, A3), A1 arg1, A2 arg2, A3 arg3) Parser<R>
Reference to a production function parametrized with 3 arguments.
ref4<R, A1, A2, A3, A4>(Parser<R> function(A1, A2, A3, A4), A1 arg1, A2 arg2, A3 arg3, A4 arg4) Parser<R>
Reference to a production function parametrized with 4 arguments.
ref5<R, A1, A2, A3, A4, A5>(Parser<R> function(A1, A2, A3, A4, A5), A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) Parser<R>
Reference to a production function parametrized with 5 arguments.
ref6<R, A1, A2, A3, A4, A5, A6>(Parser<R> function(A1, A2, A3, A4, A5, A6), A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6) Parser<R>
Reference to a production function parametrized with 6 arguments.
ref7<R, A1, A2, A3, A4, A5, A6, A7>(Parser<R> function(A1, A2, A3, A4, A5, A6, A7), A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, A7 arg7) Parser<R>
Reference to a production function parametrized with 7 arguments.
ref8<R, A1, A2, A3, A4, A5, A6, A7, A8>(Parser<R> function(A1, A2, A3, A4, A5, A6, A7, A8), A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, A7 arg7, A8 arg8) Parser<R>
Reference to a production function parametrized with 8 arguments.
ref9<R, A1, A2, A3, A4, A5, A6, A7, A8, A9>(Parser<R> function(A1, A2, A3, A4, A5, A6, A7, A8, A9), A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6, A7 arg7, A8 arg8, A9 arg9) Parser<R>
Reference to a production function parametrized with 9 arguments.
resolve<R>(Parser<R> parser) Parser<R>
Resolves all parser references reachable through parser. Returns an optimized parser graph that inlines all references directly.