lexer_builder_runtime library

Types needed at runtime by lexers generated by lexer_builder. See the lexer_builder example for information on how to use generated lexers, and the documentation for the classes here.


Marker annotation for a lexer class.
LexerBase<T extends Token>
Base class for generated lexers. The lexer gets a List of rule lists, ordered by priority. The highest priority rule that matches is chosen, if only one in the list matches. If multiple rules in a list match, the longest match is used.
LexerRule<T extends Token>
Rule representation used internally by the generated code.
Annotation for a lexer rule.
Base class for all Tokens.
TokenResponse<T extends Token>
Return type for rule methods. Use the constructors to affect the behaviour of the lexer.


The kinds of token responses.

Exceptions / Errors

Base class for Lexer exceptions. If you throw exceptions in the rules, you should use a subclass of this.
No rule matched for the string starting at index.