PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::InstantiationTokenProvider Class Reference

#include <Puma/InstantiationTokenProvider.h>

+ Inheritance diagram for Puma::InstantiationTokenProvider:

Description

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. More...
 
- Public Member Functions inherited from Puma::TokenProvider
 TokenProvider (TokenSource &s)
 Constructor. More...
 
virtual ~TokenProvider ()
 Destructor. More...
 
void init ()
 Initialize the token provider by reading the first token. More...
 
TokenSourcesource () const
 Get the token source. More...
 
Tokennext ()
 Read the next token from the token source. More...
 
Tokencurrent () const
 Get the last token read from the token source. More...
 
void * current_context () const
 Get the context information for the current token. More...
 
State get_state ()
 Get the current read position. More...
 
void set_state (State restored_pos)
 Restore the read position. More...
 

Protected Member Functions

virtual TokenInfo read ()
 Read next token info. More...
 
- Protected Member Functions inherited from Puma::TokenProvider
virtual TokenInfo read ()
 Read next token. More...
 
Tokentoken () const
 Get the current token. More...
 

Additional Inherited Members

- Public Types inherited from Puma::TokenProvider
typedef TokenStore::Iterator State
 Read position. More...
 
- 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
 

Constructor & Destructor Documentation

◆ InstantiationTokenProvider()

Puma::InstantiationTokenProvider::InstantiationTokenProvider ( InstantiationTokenSource s)
inline

Constructor.

Parameters
sThe token source from which to read the tokens.

Member Function Documentation

◆ read()

virtual TokenInfo Puma::InstantiationTokenProvider::read ( )
protectedvirtual

Read next token info.

Reimplemented from Puma::TokenProvider.