TokenMatcherBuilder

abstract class TokenMatcherBuilder(val baseRecognizer: TokenRecognizer) : Buildable<TokenMatcher>

An abstract builder for token matchers. This is used for supporting .ignored, thenState, etc.

Inheritors

Constructors

Link copied to clipboard
constructor(baseRecognizer: TokenRecognizer)

Functions

Link copied to clipboard
abstract fun build(): TokenMatcher
Link copied to clipboard
infix fun thenState(default: StateBuilder.Default)

Specifies that, once a match is found, the lexer should go to the default state.

infix fun thenState(next: StateLabel)

Specifies that, once a match is found, the lexer should use the given state next. Valid values are:

Properties

Link copied to clipboard

The original recognizer that should be used by the matcher that will be built