Lexer
The Lexer transforms raw character input into a stream of tokens based on defined lexemes.
A Lexer processes input sequentially, attempting to match each Lexeme, in declaration order, at the current position. When a Lexeme produces a match, the corresponding Token is emitted and the Lexer advances. If no Lexeme matches at the current position, a LexerException is thrown.
A Lexer may include a definable map of factory overrides for any Lexeme declared in lexemes; if a particular Lexeme has a factory override defined, it will be used to generate Tokens for each match of that Lexeme, with precedence over Lexeme.defaultFactory (but not over factories individually specified by LexemeMatch.factory).
See also
Constructors
Types
Exception thrown when lexing fails.
Properties
An optional Map of Lexemes to a factory override which produces Tokens, given the CharSequence which captures the Token (equal to Token.value)