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

The parser for SEQUENCE members. More...

#include <SequenceParser.h>

Inheritance diagram for SequenceParser:
Inheritance graph
Collaboration diagram for SequenceParser:
Collaboration graph

Classes

struct  Reference
 

Public Member Functions

 SequenceParser (Sequence *)
 Constructor. More...
 
virtual ~SequenceParser ()
 
virtual void parse (Statement &) const
 Parse sequence member. 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

void execute (Object *, const std::string &) const
 Execute or check the current command. More...
 
virtual Objectfind (const std::string &) const
 Find object by name in the main directory. 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 Types

typedef std::list< ReferenceRefList
 
typedef Sequence::TLine TLine
 

Private Member Functions

 SequenceParser ()
 
 SequenceParser (const SequenceParser &)
 
void operator= (const SequenceParser &)
 
void fillPositions () const
 
void findFromPositions () const
 
void findNeighbourPositions () const
 
void parseMember (Statement &) const
 
void parsePosition (Statement &, Object &, bool defined) const
 

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

SequenceitsSequence
 
bool okFlag
 
RefList references
 
TLine itsLine
 
bool stopFlag
 

Static Private Attributes

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

Detailed Description

The parser for SEQUENCE members.

Definition at line 40 of file SequenceParser.h.

Member Typedef Documentation

◆ RefList

typedef std::list<Reference> SequenceParser::RefList
private

Definition at line 71 of file SequenceParser.h.

◆ TLine

Definition at line 74 of file SequenceParser.h.

Constructor & Destructor Documentation

◆ SequenceParser() [1/3]

SequenceParser::SequenceParser ( Sequence seq)

Constructor.

Definition at line 38 of file SequenceParser.cpp.

◆ ~SequenceParser()

SequenceParser::~SequenceParser ( )
virtual

Definition at line 43 of file SequenceParser.cpp.

◆ SequenceParser() [2/3]

SequenceParser::SequenceParser ( )
private

◆ SequenceParser() [3/3]

SequenceParser::SequenceParser ( const SequenceParser )
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:

◆ fillPositions()

void SequenceParser::fillPositions ( ) const
private

Definition at line 86 of file SequenceParser.cpp.

References SequenceMember::ABSOLUTE, findFromPositions(), findNeighbourPositions(), and references.

Referenced by parse().

Here is the call graph for this function:

◆ find()

Object * OpalParser::find ( const std::string &  name) const
protectedvirtualinherited

Find object by name in the main directory.

Reimplemented in TrackParser.

Definition at line 143 of file OpalParser.cpp.

References OpalData::find(), and OpalData::getInstance().

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

Here is the call graph for this function:

◆ findFromPositions()

void SequenceParser::findFromPositions ( ) const
private

Definition at line 118 of file SequenceParser.cpp.

References Sequence::findNamedPosition(), itsLine, itsSequence, and references.

Referenced by fillPositions().

Here is the call graph for this function:

◆ findNeighbourPositions()

◆ getHint()

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

◆ operator=()

void SequenceParser::operator= ( const SequenceParser )
private

◆ parse()

void SequenceParser::parse ( Statement stat) const
virtual

◆ 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 parse(), OpalParser::parseAction(), OpalParser::parseAssign(), OpalParser::parseDefine(), and parseMember().

Here is the call graph for this function:

◆ parseMacro()

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

◆ parseMember()

◆ parsePosition()

◆ 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 parse().

Member Data Documentation

◆ inputStack

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

◆ itsLine

TLine SequenceParser::itsLine
mutableprivate

◆ itsSequence

Sequence* SequenceParser::itsSequence
private

Definition at line 97 of file SequenceParser.h.

Referenced by findFromPositions(), findNeighbourPositions(), parse(), and parseMember().

◆ okFlag

bool SequenceParser::okFlag
mutableprivate

Definition at line 100 of file SequenceParser.h.

Referenced by parse().

◆ references

RefList SequenceParser::references
mutableprivate

◆ stopFlag

bool OpalParser::stopFlag
mutableprivateinherited

Definition at line 116 of file OpalParser.h.

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


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