|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IntStream
A simple stream of integers used when all I care about is the char or token type sequence (such as interpretation).
Method Summary | |
---|---|
void |
consume()
|
java.lang.String |
getSourceName()
Where are you getting symbols from? Normally, implementations will pass the buck all the way to the lexer who can ask its input stream for the file name or whatever. |
int |
index()
Return the current input symbol index 0..n where n indicates the last symbol has been read. |
int |
LA(int i)
Get int at current input pointer + i ahead where i=1 is next int. |
int |
mark()
Tell the stream to start buffering if it hasn't already. |
void |
release(int marker)
You may want to commit to a backtrack but don't want to force the stream to keep bookkeeping objects around for a marker that is no longer necessary. |
void |
rewind()
Rewind to the input position of the last marker. |
void |
rewind(int marker)
Reset the stream so that next call to index would return marker. |
void |
seek(int index)
Set the input cursor to the position indicated by index. |
int |
size()
Only makes sense for streams that buffer everything up probably, but might be useful to display the entire stream or for testing. |
Method Detail |
---|
void consume()
int LA(int i)
int mark()
int index()
void rewind(int marker)
void rewind()
void release(int marker)
void seek(int index)
int size()
java.lang.String getSourceName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |