fr.umlv.tatoo.runtime.lexer
Interface LexerListener<R,B>
- Type Parameters:
R
- type of rules.B
- type of buffers.
public interface LexerListener<R,B>
Interface defining an observer registered on a lexer that
receive notifications of rule recognized.
- Version:
- $Revision$
- Author:
- Remi Forax
- See Also:
Lexer.createLexer(LexerTable, fr.umlv.tatoo.runtime.buffer.LexerBuffer, LexerListener, RuleActivator, LifecycleHandler, LexerErrorRecoveryPolicy)
Method Summary |
void |
ruleVerified(R rule,
int lastTokenLength,
B buffer)
This method is called each time a token is recognized by the lexer. |
ruleVerified
void ruleVerified(R rule,
int lastTokenLength,
B buffer)
- This method is called each time a token is recognized by the lexer.
- Parameters:
rule
- the rule verifiedlastTokenLength
- the length of the token recognized by the rulebuffer
- the buffer containing the token to extract
- Throws:
RuntimeException
- the implementor of this interface could throw a runtime exception
to signal an error.