|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.umlv.tatoo.runtime.tools.ParserForwarder<T,B>
public class ParserForwarder<T,B extends LexerBuffer>
This class implements a lexer error forwarder and a lexer lifecycle handler.
The lexer error forwarder part forwards error to the parser branching mechanism
(see SimpleParser.branchOnError(Object, String)) or
the error recovery mechanism.
The lifecycle handler part forwards the close (resp.
reset) event in order to
close (resp. reset)
the parser.
| Constructor Summary | |
|---|---|
ParserForwarder(SimpleParser<T> parser)
Creates a parser forwarder. |
|
| Method Summary | |
|---|---|
ForwardReturn |
forwardUnexpectedCharacter(Lexer<B> lexer)
Forwards unexpected character found during the lexing process. |
void |
forwardUnexpectedEndOfFile(Lexer<B> lexer)
Forwards unexpected end of file during the lexing process. |
void |
lexerClosed(Lexer<B> lexer)
Called after the lexer is closed. |
void |
lexerReset(Lexer<B> lexer)
Called after the lexer is reset. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParserForwarder(SimpleParser<T> parser)
parser - the parser that will be notified| Method Detail |
|---|
public ForwardReturn forwardUnexpectedCharacter(Lexer<B> lexer)
SimpleParser.branchOnError(Object, String)
forwardUnexpectedCharacter in interface LexerErrorForwarder<B extends LexerBuffer>lexer - the buffer that push the character
DISCARD if lexer must discard input or RETRY otherwisepublic void forwardUnexpectedEndOfFile(Lexer<B> lexer)
SimpleParser.branchOnError(Object, String).
forwardUnexpectedEndOfFile in interface LexerErrorForwarder<B extends LexerBuffer>lexer - the bufferpublic void lexerReset(Lexer<B> lexer)
lexerReset in interface LifecycleHandler<B extends LexerBuffer>Lexer.reset(fr.umlv.tatoo.runtime.buffer.LexerBuffer)public void lexerClosed(Lexer<B> lexer)
lexerClosed in interface LifecycleHandler<B extends LexerBuffer>SimpleLexer.close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||