public class BaseTokenStream extends Object
Constructor and Description |
---|
BaseTokenStream(CompoundBaseToken token)
Constructor a new BaseTokenStream on the CompoundBaseToken.
|
Modifier and Type | Method and Description |
---|---|
BaseToken |
getCurrentToken()
Answer a current BaseToken base on the position of streaming
|
BaseTokenStream |
getLink()
Answer a BaseTokenStream that can become the target of streaming
|
boolean |
isEnd()
Answer a boolean indication as to whether the stream is at the end
|
BaseToken |
next()
Answer the next token in the stream or null if at end.
|
BaseToken |
peek()
Answer the next token in the stream or null if at end.
|
BaseToken[] |
peek2()
Answer the next two tokens in the stream or null(s) if at end.
|
void |
setLink(BaseTokenStream ts)
Remember a BaseTokenStream that can be the target of streaming
|
public BaseTokenStream(CompoundBaseToken token)
token
- the CompoundBaseToken to stream overpublic boolean isEnd()
public BaseToken getCurrentToken()
public BaseToken next()
public BaseToken peek()
public BaseToken[] peek2()
public void setLink(BaseTokenStream ts)
ts
- the remembered token streampublic BaseTokenStream getLink()