OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
TrackParser Class Reference

#include <TrackParser.h>

Inheritance diagram for TrackParser:
Inheritance graph
Collaboration diagram for TrackParser:
Collaboration graph

Public Member Functions

 TrackParser ()
 
virtual ~TrackParser ()
 
virtual void parse (Statement &) const
 Parse and execute current statement. More...
 
virtual StatementreadStatement (TokenStream *) const
 Read complete statement from a token stream. More...
 
virtual void run () const
 Read current stream. More...
 
virtual void run (TokenStream *) const
 Read given stream. More...
 
void stop () const
 Set stop flag. More...
 

Static Public Member Functions

static Token readToken ()
 Return next input token. More...
 

Protected Member Functions

virtual Objectfind (const std::string &) const
 Find object by name in the track command directory. More...
 
void execute (Object *, const std::string &) const
 Execute or check the current command. More...
 
virtual void parseAction (Statement &) const
 Parse executable command. More...
 
virtual void parseAssign (Statement &) const
 Parse assignment statement. More...
 
virtual void parseDefine (Statement &) const
 Parse definition. More...
 
virtual void parseEnd (Statement &) const
 Check for end of statement. More...
 
virtual void parseMacro (const std::string &name, Statement &) const
 Parse macro definition or call. More...
 
virtual void printHelp (const std::string &) const
 Print help on named command. More...
 

Private Member Functions

 TrackParser (const TrackParser &)
 
void operator= (const TrackParser &)
 

Static Private Member Functions

static void parseBracketList (char close, Statement &)
 
static void parseTokenList (Statement &)
 
static std::string getHint (const std::string &, const std::string &="attribute")
 

Private Attributes

Directory trackDirectory
 
bool stopFlag
 

Static Private Attributes

static std::vector< std::shared_ptr< TokenStream > > inputStack
 

Detailed Description

Definition at line 28 of file TrackParser.h.

Constructor & Destructor Documentation

◆ TrackParser() [1/2]

TrackParser::TrackParser ( )

Definition at line 25 of file TrackParser.cpp.

References Directory::insert(), and trackDirectory.

Here is the call graph for this function:

◆ ~TrackParser()

TrackParser::~TrackParser ( )
virtual

Definition at line 32 of file TrackParser.cpp.

◆ TrackParser() [2/2]

TrackParser::TrackParser ( const TrackParser )
private

Member Function Documentation

◆ execute()

void OpalParser::execute ( Object object,
const std::string &  name 
) const
protectedinherited

Execute or check the current command.

Definition at line 119 of file OpalParser.cpp.

References endl(), OpalData::getInstance(), gmsg, Options::mtrace, Object::shouldTrace(), Object::shouldUpdate(), and OpalData::update().

Referenced by OpalParser::parseAction(), OpalParser::parseDefine(), and OpalParser::parseMacro().

Here is the call graph for this function:

◆ find()

Object * TrackParser::find ( const std::string &  name) const
protectedvirtual

Find object by name in the track command directory.

Reimplemented from OpalParser.

Definition at line 36 of file TrackParser.cpp.

References Directory::find(), and trackDirectory.

Here is the call graph for this function:

◆ getHint()

std::string OpalParser::getHint ( const std::string &  name,
const std::string &  type = "attribute" 
)
staticprivateinherited

◆ operator=()

void TrackParser::operator= ( const TrackParser )
private

◆ parse()

◆ parseAction()

void OpalParser::parseAction ( Statement stat) const
protectedvirtualinherited

◆ parseAssign()

◆ parseBracketList()

void OpalParser::parseBracketList ( char  close,
Statement stat 
)
staticprivateinherited

◆ parseDefine()

void OpalParser::parseDefine ( Statement stat) const
protectedvirtualinherited

◆ parseEnd()

void OpalParser::parseEnd ( Statement stat) const
protectedvirtualinherited

Check for end of statement.

Definition at line 360 of file OpalParser.cpp.

References Statement::atEnd(), Statement::delimiter(), Statement::position(), and Statement::print().

Referenced by SequenceParser::parse(), OpalParser::parseAction(), OpalParser::parseAssign(), OpalParser::parseDefine(), and SequenceParser::parseMember().

Here is the call graph for this function:

◆ parseMacro()

void OpalParser::parseMacro ( const std::string &  name,
Statement stat 
) const
protectedvirtualinherited

◆ parseTokenList()

void OpalParser::parseTokenList ( Statement stat)
staticprivateinherited

Definition at line 458 of file OpalParser.cpp.

References Statement::append(), Token::isDel(), Token::isEOF(), OpalParser::parseBracketList(), and OpalParser::readToken().

Referenced by OpalParser::readStatement().

Here is the call graph for this function:

◆ printHelp()

void OpalParser::printHelp ( const std::string &  cmdName) const
protectedvirtualinherited

Print help on named command.

Definition at line 428 of file OpalParser.cpp.

References endl(), OpalParser::find(), and gmsg.

Referenced by OpalParser::parse(), and OpalParser::parseAction().

Here is the call graph for this function:

◆ readStatement()

Statement * OpalParser::readStatement ( TokenStream is) const
virtualinherited

◆ readToken()

Token OpalParser::readToken ( )
staticinherited

Return next input token.

Definition at line 479 of file OpalParser.cpp.

References OpalParser::inputStack, and Token::IS_EOF.

Referenced by OpalParser::parseBracketList(), and OpalParser::parseTokenList().

◆ run() [1/2]

void OpalParser::run ( ) const
virtualinherited

◆ run() [2/2]

void OpalParser::run ( TokenStream is) const
virtualinherited

Read given stream.

Implements Parser.

Definition at line 610 of file OpalParser.cpp.

References OpalParser::inputStack, and OpalParser::run().

Here is the call graph for this function:

◆ stop()

void OpalParser::stop ( ) const
inherited

Set stop flag.

Definition at line 616 of file OpalParser.cpp.

References OpalParser::stopFlag.

Referenced by TrackEnd::execute(), and SequenceParser::parse().

Member Data Documentation

◆ inputStack

std::vector< std::shared_ptr< TokenStream > > OpalParser::inputStack
staticprivateinherited

◆ stopFlag

bool OpalParser::stopFlag
mutableprivateinherited

Definition at line 116 of file OpalParser.h.

Referenced by OpalParser::parseAction(), OpalParser::run(), and OpalParser::stop().

◆ trackDirectory

Directory TrackParser::trackDirectory
private

Definition at line 47 of file TrackParser.h.

Referenced by find(), and TrackParser().


The documentation for this class was generated from the following files: