|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SimpleLexer
A simple interface that can be used to manipulate
a lexer after its creation.
To use the lexer in pull mode, one will use the method run(),
in that case the underlying buffer used must implements the optional operation
LexerBuffer.read().
To use the lexer in push mode, on will use step() to proceed
all available characters of the buffer and close() when
the whole text has been read.
Lexer| Method Summary | |
|---|---|
void |
close()
Closes the lexing process. |
void |
run()
Does all the lexing in one shot. |
void |
step()
Proceed all available characters from the underlying buffer. |
| Method Detail |
|---|
void step()
step()
the developer must call close().
During the execution of this method, changing the buffer has
no effect on the current execution.
A next call to this method will used the newly set buffer.
close(),
LexerBuffer.hasRemaining()void run()
UnsupportedOperationException - if the optional operation
LexerBuffer.read()
is not supported by the underlying buffer.step()void close()
step().
Note that this method is likely to recognize some supplementary tokens
and thus to call LexerListener.ruleVerified(Object, int, Object).
during the lexing process, by example, if the lexer states doesn't accept
the end of file.
During the execution of this method, changing the buffer has
no effect on the current execution.
A next call to this method will used the newly set buffer.
step(),
run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||