|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LexerBuffer
A LexerBuffer represents a character stream on which
a Lexer can operate.
Methods of this interface are internally used by the lexer
Lexer| Method Summary | |
|---|---|
void |
discard()
Discards all characters already recognized by the lexer. |
LocationProvider |
getLocationProvider()
Returns a location provider. |
boolean |
hasRemaining()
Returns true if more characters are availables in the buffer. |
int |
lastChar()
Returns last read char or -1 if not available. |
int |
next()
Reads the next character from the buffer. |
boolean |
previousWasNewLine()
Determines if the last unwinded character was an end of line. |
boolean |
read()
Reads at some bytes from the stream. |
void |
reset()
Moves current position back to first non unwinded character. |
void |
restart()
Moves current position back to first non discarded character. |
void |
unwind(int count)
Unwinds count characters from the buffer. |
| Method Detail |
|---|
LocationProvider getLocationProvider()
void unwind(int count)
count characters from the buffer.
count must not be 0.
count - the number of characters to unwindvoid reset()
tokenizer.
UnsupportedOperationException - if this operation is not supported by
the current buffer.void restart()
SimpleParser.push(Object)
for me details.
UnsupportedOperationException - if this operation is not supported by
the current buffer.boolean previousWasNewLine()
true if the last unwinded character was an end of line;
false otherwiseint lastChar()
int next()
IllegalStateException - when called while hasRemaining returns falseboolean hasRemaining()
boolean read()
throws IOException
SimpleLexer.run().
false at end of stream
IOException - if an i/o operation failed.
UnsupportedOperationException - if this operation is not supported by
the current buffer.void discard()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||