StateBuilder
This classed is used to build a lexer state (LexerState) using a DSL, and is used inside a lambda-with receiver. It also defines high level functions for constructing matchers, such as anyOf or matches, and using custom matchers with the + operator.
States themselves are only constructed when calling build, since LexerState objects are immutable and the goal of the DSL is to provide a way to configure them.
Types
Functions
Link copied to clipboard
Link copied to clipboard
Add a matcher to this state that matches the recognizer (or pseudo-recognizer) on the left to the token type on the right.
Link copied to clipboard
Create a recognizer that recognizes the given regular expression. Use this before isToken to create a matcher that matches against a regular expression.
Link copied to clipboard
Add an already defined matcher to this state