definition library

This package simplifies the creation of complicated recursive grammars.

Classes

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