|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TokenStream
A stream of tokens accessing tokens from a TokenSource
| Method Summary | |
|---|---|
Token |
get(int i)
Get a token at an absolute index i; 0..n-1. |
TokenSource |
getTokenSource()
Where is this stream pulling tokens from? This is not the name, but the object that provides Token objects. |
Token |
LT(int k)
Get Token at current input pointer + i ahead where i=1 is next Token. |
int |
range()
How far ahead has the stream been asked to look? The return value is a valid index from 0..n-1. |
String |
toString(int start,
int stop)
Return the text of all tokens from start to stop, inclusive. |
String |
toString(Token start,
Token stop)
Because the user is not required to use a token with an index stored in it, we must provide a means for two token objects themselves to indicate the start/end location. |
| Methods inherited from interface org.antlr.runtime.IntStream |
|---|
consume, getSourceName, index, LA, mark, release, rewind, rewind, seek, size |
| Method Detail |
|---|
Token LT(int k)
int range()
Token get(int i)
TokenSource getTokenSource()
String toString(int start,
int stop)
String toString(Token start,
Token stop)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||