MatchedMatcherBuilder

class MatchedMatcherBuilder(val baseRecognizer: TokenRecognizer, matchesToTokenType: TokenType) : TokenMatcherBuilder

A simple builder for matchers, whose main purpose is to provide a way to select a "next state" for a matcher through the thenState function.

Constructors

Link copied to clipboard
constructor(baseRecognizer: TokenRecognizer, matchesToTokenType: TokenType)

Properties

Link copied to clipboard

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

Functions

Link copied to clipboard
open override 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: