OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
TokenStreamBasicFilter.hpp
1#ifndef INC_TokenStreamBasicFilter_hpp__
2#define INC_TokenStreamBasicFilter_hpp__
3
4/* ANTLR Translator Generator
5 * Project led by Terence Parr at http://www.jGuru.com
6 * Software rights: http://www.antlr.org/license.html
7 *
8 * $Id$
9 */
10
11#include <antlr/config.hpp>
12#include <antlr/BitSet.hpp>
13#include <antlr/TokenStream.hpp>
14
15#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
16namespace antlr {
17#endif
18
19/** This object is a TokenStream that passes through all
20 * tokens except for those that you tell it to discard.
21 * There is no buffering of the tokens.
22 */
23class ANTLR_API TokenStreamBasicFilter : public TokenStream {
24 /** The set of token types to discard */
25protected:
27
28 /** The input stream */
29protected:
31
32public:
34
35 void discard(int ttype);
36
37 void discard(const BitSet& mask);
38
39 RefToken nextToken();
40};
41
42#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
43}
44#endif
45
46#endif //INC_TokenStreamBasicFilter_hpp__
A BitSet to replace java.util.BitSet.
Definition BitSet.hpp:40
This object is a TokenStream that passes through all tokens except for those that you tell it to disc...
BitSet discardMask
The set of token types to discard.
TokenStream * input
The input stream.
This interface allows any object to pretend it is a stream of tokens.