TokenStreamHiddenTokenFilter Class Reference
This object filters a token stream coming from a lexer or another TokenStream so that only certain token channels get transmitted to the parser. More...
#include <TokenStreamHiddenTokenFilter.hpp>
Inheritance diagram for TokenStreamHiddenTokenFilter:


Public Member Functions | |
TokenStreamHiddenTokenFilter (TokenStream &input) | |
This object filters a token stream coming from a lexer or another TokenStream so that only certain token channels get transmitted to the parser. | |
BitSet | getDiscardMask () const |
RefToken | getHiddenAfter (RefToken t) |
Return a ptr to the hidden token appearing immediately after token t in the input stream. | |
RefToken | getHiddenBefore (RefToken t) |
Return a ptr to the hidden token appearing immediately before token t in the input stream. | |
BitSet | getHideMask () const |
RefToken | getInitialHiddenToken () |
Return the first hidden token if one appears before any monitored token. | |
void | hide (int m) |
void | hide (const BitSet &mask) |
RefToken | nextToken () |
Return the next monitored token. | |
Protected Member Functions | |
void | consume () |
RefToken | LA (int i) |
Protected Attributes | |
BitSet | hideMask |
RefToken | lastHiddenToken |
track tail of hidden list emanating from previous monitored token | |
RefToken | firstHidden |
Private Member Functions | |
void | consumeFirst () |
Private Attributes | |
RefToken | nextMonitoredToken |
Detailed Description
This object filters a token stream coming from a lexer or another TokenStream so that only certain token channels get transmitted to the parser.Any of the channels can be filtered off as "hidden" channels whose tokens can be accessed from the parser.
Definition at line 25 of file TokenStreamHiddenTokenFilter.hpp.
Constructor & Destructor Documentation
|
This object filters a token stream coming from a lexer or another TokenStream so that only certain token channels get transmitted to the parser. Any of the channels can be filtered off as "hidden" channels whose tokens can be accessed from the parser. Definition at line 22 of file TokenStreamHiddenTokenFilter.cpp. |
Member Function Documentation
|
Definition at line 27 of file TokenStreamHiddenTokenFilter.cpp. References nextMonitoredToken, and TokenStream::nextToken(). Referenced by consumeFirst(), and nextToken(). |
|
Definition at line 32 of file TokenStreamHiddenTokenFilter.cpp. References consume(), firstHidden, RefCount< T >::get(), hideMask, LA(), lastHiddenToken, BitSet::member(), and RefToken. Referenced by nextToken(). |
|
Definition at line 58 of file TokenStreamHiddenTokenFilter.cpp. |
|
Return a ptr to the hidden token appearing immediately after token t in the input stream.
Definition at line 66 of file TokenStreamHiddenTokenFilter.cpp. References RefCount< T >::get(), and RefToken. |
|
Return a ptr to the hidden token appearing immediately before token t in the input stream.
Definition at line 74 of file TokenStreamHiddenTokenFilter.cpp. References RefCount< T >::get(), and RefToken. |
|
Definition at line 79 of file TokenStreamHiddenTokenFilter.cpp. |
|
Return the first hidden token if one appears before any monitored token.
Definition at line 87 of file TokenStreamHiddenTokenFilter.cpp. References RefToken. |
|
Definition at line 97 of file TokenStreamHiddenTokenFilter.cpp. References hideMask. |
|
Definition at line 92 of file TokenStreamHiddenTokenFilter.cpp. References BitSet::add(), and hideMask. |
|
Definition at line 102 of file TokenStreamHiddenTokenFilter.cpp. References RefToken. Referenced by consumeFirst(), and nextToken(). |
|
Return the next monitored token. Test the token following the monitored token. If following is another monitored token, save it for the next invocation of nextToken (like a single lookahead token) and return it then. If following is unmonitored, nondiscarded (hidden) channel token, add it to the monitored token. Note: EOF must be a monitored Token. Reimplemented from TokenStreamBasicFilter. Definition at line 117 of file TokenStreamHiddenTokenFilter.cpp. References consume(), consumeFirst(), RefCount< T >::get(), hideMask, LA(), lastHiddenToken, BitSet::member(), and RefToken. |
Member Data Documentation
|
Definition at line 39 of file TokenStreamHiddenTokenFilter.hpp. Referenced by consumeFirst(). |
|
Definition at line 28 of file TokenStreamHiddenTokenFilter.hpp. Referenced by consumeFirst(), hide(), and nextToken(). |
|
track tail of hidden list emanating from previous monitored token
Definition at line 37 of file TokenStreamHiddenTokenFilter.hpp. Referenced by consumeFirst(), and nextToken(). |
|
Definition at line 31 of file TokenStreamHiddenTokenFilter.hpp. Referenced by consume(). |
The documentation for this class was generated from the following files:
- lib/antlr/antlr/TokenStreamHiddenTokenFilter.hpp
- lib/antlr/src/TokenStreamHiddenTokenFilter.cpp