Last change
on this file since 1 was
1,
checked in by lnalod, 15 years ago
|
Initial import of YAO sources
|
File size:
1.0 KB
|
Line | |
---|
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: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamBasicFilter.hpp#2 $ |
---|
9 | */ |
---|
10 | |
---|
11 | #include <antlr/config.hpp> |
---|
12 | #include <antlr/BitSet.hpp> |
---|
13 | #include <antlr/TokenStream.hpp> |
---|
14 | |
---|
15 | #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE |
---|
16 | namespace 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 | */ |
---|
23 | class ANTLR_API TokenStreamBasicFilter : public TokenStream { |
---|
24 | /** The set of token types to discard */ |
---|
25 | protected: |
---|
26 | BitSet discardMask; |
---|
27 | |
---|
28 | /** The input stream */ |
---|
29 | protected: |
---|
30 | TokenStream* input; |
---|
31 | |
---|
32 | public: |
---|
33 | TokenStreamBasicFilter(TokenStream& input_); |
---|
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__ |
---|
Note: See
TracBrowser
for help on using the repository browser.