PUMA Library Reference Manual
|
#include <Puma/InstantiationTokenProvider.h>
Provides token infos (token pointer + context) from a syntax tree.
The context is set to the syntax tree node in which the token was found.
Public Member Functions | |
InstantiationTokenProvider (InstantiationTokenSource &s) | |
Constructor. | |
Public Member Functions inherited from Puma::TokenProvider | |
TokenProvider (TokenSource &s) | |
Constructor. | |
virtual | ~TokenProvider () |
Destructor. | |
void | init () |
Initialize the token provider by reading the first token. | |
TokenSource & | source () const |
Get the token source. | |
Token * | next () |
Read the next token from the token source. | |
Token * | current () const |
Get the last token read from the token source. | |
void * | current_context () const |
Get the context information for the current token. | |
State | get_state () |
Get the current read position. | |
void | set_state (State restored_pos) |
Restore the read position. | |
Protected Member Functions | |
virtual TokenInfo | read () |
Read next token info. | |
Protected Member Functions inherited from Puma::TokenProvider | |
Token * | token () const |
Get the current token. | |
Additional Inherited Members | |
Public Types inherited from Puma::TokenProvider | |
typedef TokenStore::Iterator | State |
Read position. | |
Protected Types inherited from Puma::TokenProvider | |
typedef BCList< TokenInfo, 8192 > | TokenStore |
Protected Attributes inherited from Puma::TokenProvider | |
TokenSource & | _source |
TokenStore | _tokens |
TokenStore::Iterator | _read_pos |
|
inline |
Constructor.
s | The token source from which to read the tokens. |
|
protectedvirtual |
Read next token info.
Reimplemented from Puma::TokenProvider.