NiwenParserBuilder

DSL builder for a Niwen parser.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun build(): NiwenParser<T>

Build this parser

Link copied to clipboard
infix fun String.group(block: NiwenParserBuilder<T>.() -> Unit)

Provides a way to group declaration together.

Link copied to clipboard
operator fun <T> ParserNodeDeclaration<T>.invoke(block: DescribedTypeBuilder<T>.() -> Unit)

Creates a node declaration for the given node type with the given block as its descriptor.

Link copied to clipboard

Set the root node of this parser.

Link copied to clipboard

Similar to invoke, but also signals that this node is the root node of the constructed tree.