PUMA Library Reference Manual
Puma::PreprocessorParser Class Reference

#include <PreprocessorParser.h>

+ Inheritance diagram for Puma::PreprocessorParser:

Public Types

enum  PreMode {
  INITIAL,
  DEFINING,
  MAYBEMACRO,
  ASSERT,
  TOKENLIST,
  DIRECTIVE,
  MACRO
}
 

Public Member Functions

Array< PreMacro * > * macroStack () const
 
PreLevelStatelevelState () const
 
PreParserStateparserState () const
 
PreMacroManagermacroManager () const
 
PreFileIncluderfileIncluder () const
 
PrePredicateManagerpredicateManager () const
 
UnitManagerunitManager () const
 
UnitManagerlocals () const
 
PreMode pre_mode () const
 
bool supportGNU () const
 
CScannercscanner () const
 
const char * importHandler () const
 
void macroManager (PreMacroManager *m)
 
void fileIncluder (PreFileIncluder *f)
 
void predicateManager (PrePredicateManager *p)
 
PreTreesyntaxTree () const
 
 PreprocessorParser (ErrorStream *, UnitManager *, UnitManager *, std::ostream &out=std::cout, int max_depth=400)
 
 ~PreprocessorParser ()
 
void reset (ErrorStream *, UnitManager *, UnitManager *, std::ostream &out=std::cout, int max_depth=400)
 
void freeSyntaxTree ()
 
void configure (const Config &, bool=true)
 
Tokennext ()
 Get the next token. More...
 
TokenStreamscanner () const
 
void stream (TokenStream *s)
 
int map_token (Token *token, bool &parse)
 
void parse ()
 
void silentMode (bool mode=true)
 
void defMacro (const char *, const char *=(const char *) 0, char=0) const
 
void defUndefinedMacro (const char *, const char *=(const char *) 0, char=0) const
 
void undefMacro (const char *) const
 
void defPredicate (const char *, const char *) const
 
void undefPredicate (const char *) const
 
void addInclPath (const char *) const
 
void addSysInclPath (const char *) const
 
void supportGNU (bool)
 
- Public Member Functions inherited from Puma::TokenSource
virtual ~TokenSource ()
 Destructor. More...
 

Member Enumeration Documentation

Enumerator
INITIAL 
DEFINING 
MAYBEMACRO 
ASSERT 
TOKENLIST 
DIRECTIVE 
MACRO 

Constructor & Destructor Documentation

Puma::PreprocessorParser::PreprocessorParser ( ErrorStream ,
UnitManager ,
UnitManager ,
std::ostream &  out = std::cout,
int  max_depth = 400 
)
Puma::PreprocessorParser::~PreprocessorParser ( )

Member Function Documentation

void Puma::PreprocessorParser::addInclPath ( const char *  ) const
void Puma::PreprocessorParser::addSysInclPath ( const char *  ) const
void Puma::PreprocessorParser::configure ( const Config ,
bool  = true 
)
CScanner& Puma::PreprocessorParser::cscanner ( ) const
inline
void Puma::PreprocessorParser::defMacro ( const char *  ,
const char *  = (const char *) 0,
char  = 0 
) const
void Puma::PreprocessorParser::defPredicate ( const char *  ,
const char *   
) const
void Puma::PreprocessorParser::defUndefinedMacro ( const char *  ,
const char *  = (const char *) 0,
char  = 0 
) const
PreFileIncluder* Puma::PreprocessorParser::fileIncluder ( ) const
inline
void Puma::PreprocessorParser::fileIncluder ( PreFileIncluder f)
inline
void Puma::PreprocessorParser::freeSyntaxTree ( )
const char* Puma::PreprocessorParser::importHandler ( ) const
inline
PreLevelState* Puma::PreprocessorParser::levelState ( ) const
inline
UnitManager* Puma::PreprocessorParser::locals ( ) const
inline
PreMacroManager* Puma::PreprocessorParser::macroManager ( ) const
inline
void Puma::PreprocessorParser::macroManager ( PreMacroManager m)
inline
Array<PreMacro*>* Puma::PreprocessorParser::macroStack ( ) const
inline
int Puma::PreprocessorParser::map_token ( Token token,
bool &  parse 
)
Token* Puma::PreprocessorParser::next ( )
virtual

Get the next token.

Returns
The next token from the source, or NULL if no more tokens.

Implements Puma::TokenSource.

void Puma::PreprocessorParser::parse ( )
PreParserState* Puma::PreprocessorParser::parserState ( ) const
inline
PreMode Puma::PreprocessorParser::pre_mode ( ) const
inline
PrePredicateManager* Puma::PreprocessorParser::predicateManager ( ) const
inline
void Puma::PreprocessorParser::predicateManager ( PrePredicateManager p)
inline
void Puma::PreprocessorParser::reset ( ErrorStream ,
UnitManager ,
UnitManager ,
std::ostream &  out = std::cout,
int  max_depth = 400 
)
TokenStream* Puma::PreprocessorParser::scanner ( ) const
inline
void Puma::PreprocessorParser::silentMode ( bool  mode = true)
inline
void Puma::PreprocessorParser::stream ( TokenStream s)
inline
bool Puma::PreprocessorParser::supportGNU ( ) const
inline
void Puma::PreprocessorParser::supportGNU ( bool  )
PreTree* Puma::PreprocessorParser::syntaxTree ( ) const
void Puma::PreprocessorParser::undefMacro ( const char *  ) const
void Puma::PreprocessorParser::undefPredicate ( const char *  ) const
UnitManager* Puma::PreprocessorParser::unitManager ( ) const
inline