Package-level declarations
Types
Implementation of StateCallbackBuilder that recursively composes itself to build a StateCallback
Builder for the description of a node. This typically should be used like this:
The builder for a single branch. This is the receiver type of every either branch.
The builder for the entire either construct. This is different from a single branch.
An expectation receiver is the receiver type for all expect
DSL constructs. Use this if you want your own DSL to be able to have expect
called on it.
A builder for state callbacks that get added to an expectation.
Builder class for the content of a repeated block
A DSL builder for ExpectedLookahead. Used by lookahead.
DSL builder for a Niwen parser.
Builder class for an optional expectation.
Builder class for ExpectedRepeated.
A builder for composing StateCallbacks.
Functions
Add a branch to this builder. The branch is first initialized through the branchInit argument.
Build an "either" construct, with different branches the parsing process can take.
Adds an expectation that always succeeds and emits the provided value.
Adds an expectation to this node descriptor based on a node
Adds an expectation to this node descriptor based on a token type.
Expect the end-of-file to be reached at this point.
Create a lookahead expectation.
Main entry-point for the Niwen Parser DSL. A parser might typically look like this
Create an optional branch. If the optional branch matches, what it stores will is passed transparently, just like if the optional { }
was not there. If the optional branch does not match, nothing happens, just like if the entire optional branch was not there.
Adds a branch to the either
construct. or
can be used multiple times to get more than two branches, like so:
Add an expectation directly instead of a builder. This is a shortcut for this += Buildable.of(expectation)
Repeatedly runs the provided expectations without storing anything.
Used with storeIn self()
, provides the actual value of a node declaration that is implemented with by subtype()
Properties
Used with storeIn
, allows placing some state as the item of the output list.