persistence.antlr
Class TokenStreamBasicFilter
java.lang.Object
persistence.antlr.TokenStreamBasicFilter
- All Implemented Interfaces:
- TokenStream
- Direct Known Subclasses:
- TokenStreamHiddenTokenFilter
public class TokenStreamBasicFilter
- extends java.lang.Object
- implements TokenStream
This object is a TokenStream that passes through all
tokens except for those that you tell it to discard.
There is no buffering of the tokens.
Field Summary |
protected persistence.antlr.collections.impl.BitSet |
discardMask
The set of token types to discard |
protected TokenStream |
input
The input stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
discardMask
protected persistence.antlr.collections.impl.BitSet discardMask
- The set of token types to discard
input
protected TokenStream input
- The input stream
TokenStreamBasicFilter
public TokenStreamBasicFilter(TokenStream input)
discard
public void discard(int ttype)
discard
public void discard(persistence.antlr.collections.impl.BitSet mask)
nextToken
public Token nextToken()
throws TokenStreamException
- Specified by:
nextToken
in interface TokenStream
- Throws:
TokenStreamException