|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The LexerInterpreter
is responsible for handling "lexer
events". A lexer "event" is defined when then Lexer
has found a new character sequence that matches some
Token
type. The Lexer
passes the
Token
type and character sequence offset and length to
the LexerInterpreter
.
Method Summary | |
int |
error(int offset,
int length)
Notify an error starting at the given offset having the given length. |
Parser |
getParser()
Gets the Parser object which this LexerInterpreter
may relay Symbol events to. |
void |
match(int type,
int offset,
int length)
The match method is used by the Lexer
to inform the interpreter that a new token has been found at the
given offset with the given length. |
void |
setParser(Parser parser)
Sets the Parser object to which this
LexerInterpreter may relay Symbol events to. |
void |
stop()
Notify that the end of the Input has been reached. |
Methods inherited from interface org.inxar.syntacs.translator.lr.LRTranslationComponent |
getAuditor, getInput, getLRTranslatorGrammar, getProperties, initialize, reset, setAuditor, setInput, setLRTranslatorGrammar, setProperties |
Method Detail |
public void match(int type, int offset, int length) throws TranslationException
match
method is used by the Lexer
to inform the interpreter that a new token has been found at the
given offset with the given length.public int error(int offset, int length) throws TranslationException
public void stop() throws TranslationException
Input
has been reached.public void setParser(Parser parser)
Parser
object to which this
LexerInterpreter
may relay Symbol events to.public Parser getParser()
LexerInterpreter
may relay Symbol
events to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |