| java.lang.Object persistence.antlr.TokenStreamSelector
TokenStreamSelector | public class TokenStreamSelector implements TokenStream(Code) | | A token stream MUX (multiplexor) knows about n token streams
and can multiplex them onto the same channel for use by token
stream consumer like a parser. This is a way to have multiple
lexers break up the same input stream for a single parser.
Or, you can have multiple instances of the same lexer handle
multiple input streams; this works great for includes.
|
inputStreamNames | protected Hashtable inputStreamNames(Code) | | The set of inputs to the MUX
|
streamStack | protected Stack streamStack(Code) | | Used to track stack of input streams
|
TokenStreamSelector | public TokenStreamSelector()(Code) | | |
getCurrentStream | public TokenStream getCurrentStream()(Code) | | Return the stream from tokens are being pulled at
the moment.
|
retry | public void retry() throws TokenStreamRetryException(Code) | | Abort recognition of current Token and try again.
A stream can push a new stream (for include files
for example, and then retry(), which will cause
the current stream to abort back to this.nextToken().
this.nextToken() then asks for a token from the
current stream, which is the new "substream."
|
select | public void select(TokenStream stream)(Code) | | Set the stream without pushing old stream
|
|
|