token
Adds a TokenElement that matches tokens of type T.
Return
this RuleBuilder for chaining
Parameters
T
The token type to match
Adds a TokenElement that matches tokens produced by the specified lexeme.
Return
this RuleBuilder for chaining
Parameters
lexeme
The Lexeme whose tokens should be matched
Adds a TokenElement that matches tokens of type T satisfying the given predicate.
Return
this RuleBuilder for chaining
Parameters
T
The token type to match
predicate
A function that tests whether a token should be matched