|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include <TrackParser.h>


Public Member Functions | |
| TrackParser () | |
| virtual | ~TrackParser () |
| virtual void | parse (Statement &) const |
| Parse and execute current statement. | |
| virtual Statement * | readStatement (TokenStream *) const |
| Read complete statement from a token stream. | |
| virtual void | run () const |
| Read current stream. | |
| virtual void | run (TokenStream *) const |
| Read given stream. | |
| void | stop () const |
| Set stop flag. | |
Static Public Member Functions | |
| static Token | readToken () |
| Return next input token. | |
Protected Member Functions | |
| virtual Object * | find (const std::string &) const |
| Find object by name in the track command directory. | |
| void | execute (Object *, const std::string &) const |
| Execute or check the current command. | |
| virtual void | parseAction (Statement &) const |
| Parse executable command. | |
| virtual void | parseAssign (Statement &) const |
| Parse assignment statement. | |
| virtual void | parseDefine (Statement &) const |
| Parse definition. | |
| virtual void | parseEnd (Statement &) const |
| Check for end of statement. | |
| virtual void | parseMacro (const std::string &name, Statement &) const |
| Parse macro definition or call. | |
| virtual void | printHelp (const std::string &) const |
| Print help on named command. | |
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 |
Definition at line 27 of file TrackParser.h.
| TrackParser::TrackParser | ( | ) |
Definition at line 25 of file TrackParser.cpp.
References Directory::insert(), and trackDirectory.

|
virtual |
Definition at line 30 of file TrackParser.cpp.
|
private |
|
protectedinherited |
Execute or check the current command.
Definition at line 118 of file OpalParser.cpp.
References OpalData::getInstance(), gmsg, Options::mtrace, Object::shouldTrace(), Object::shouldUpdate(), and OpalData::update().
Referenced by OpalParser::parseAction(), OpalParser::parseDefine(), and OpalParser::parseMacro().

|
protectedvirtual |
Find object by name in the track command directory.
Reimplemented from OpalParser.
Definition at line 32 of file TrackParser.cpp.
References Directory::find(), and trackDirectory.

|
staticprivateinherited |
Definition at line 621 of file OpalParser.cpp.
References AttributeHandler::COMMAND, AttributeHandler::ELEMENT, AttributeHandler::getOwner(), AttributeHandler::STATEMENT, and AttributeHandler::SUB_COMMAND.
Referenced by OpalParser::parse(), and OpalParser::parseAction().

|
private |
|
virtualinherited |
Parse and execute current statement.
Implements Parser.
Reimplemented in SequenceParser.
Definition at line 60 of file OpalParser.cpp.
References Statement::atEnd(), Statement::delimiter(), OpalParser::find(), Statement::getCurrent(), OpalParser::getHint(), OpalData::getInstance(), Token::getLex(), Statement::keyword(), Statement::mark(), OpalParser::parseAction(), OpalParser::parseAssign(), OpalParser::parseDefine(), OpalParser::parseMacro(), Expressions::parseString(), Statement::position(), Statement::print(), OpalParser::printHelp(), Statement::restore(), and Statement::start().

|
protectedvirtualinherited |
Parse executable command.
Definition at line 146 of file OpalParser.cpp.
References Object::clone(), Statement::delimiter(), OpalParser::execute(), OpalParser::find(), OpalParser::getHint(), Object::parse(), OpalParser::parseEnd(), Expressions::parseString(), OpalParser::printHelp(), Statement::start(), and OpalParser::stopFlag.
Referenced by OpalParser::parse().

|
protectedvirtualinherited |
Parse assignment statement.
Definition at line 179 of file OpalParser.cpp.
References Object::clone(), OpalData::define(), Statement::delimiter(), OpalParser::find(), OpalData::find(), Object::findAttribute(), OpalData::getInstance(), Object::isTreeMember(), Statement::keyword(), OpalData::makeDirty(), Expressions::parseDelimiter(), OpalParser::parseEnd(), Expressions::parseRealConst(), Expressions::parseString(), and Statement::start().
Referenced by OpalParser::parse().

|
staticprivateinherited |
Definition at line 438 of file OpalParser.cpp.
References Statement::append(), Token::isDel(), Token::isEOF(), OpalParser::parseBracketList(), and OpalParser::readToken().
Referenced by OpalParser::parseBracketList(), OpalParser::parseTokenList(), and OpalParser::readStatement().

|
protectedvirtualinherited |
Parse definition.
Definition at line 312 of file OpalParser.cpp.
References Object::clone(), OpalData::define(), Statement::delimiter(), OpalParser::execute(), OpalParser::find(), OpalData::getInstance(), Statement::keyword(), Object::makeInstance(), Object::parse(), OpalParser::parseEnd(), Expressions::parseString(), Object::setShared(), and Statement::start().
Referenced by OpalParser::parse().

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

|
protectedvirtualinherited |
Parse macro definition or call.
Definition at line 374 of file OpalParser.cpp.
References OpalData::define(), Statement::delimiter(), OpalParser::execute(), OpalParser::find(), Statement::getCurrent(), OpalData::getInstance(), OpalParser::inputStack, Object::makeInstance(), Object::makeTemplate(), Statement::mark(), Expressions::parseString(), and Statement::restore().
Referenced by OpalParser::parse().

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

|
protectedvirtualinherited |
Print help on named command.
Definition at line 428 of file OpalParser.cpp.
References OpalParser::find(), and gmsg.
Referenced by OpalParser::parse(), and OpalParser::parseAction().

|
virtualinherited |
Read complete statement from a token stream.
Implements Parser.
Definition at line 486 of file OpalParser.cpp.
References Statement::append(), Token::getFile(), Token::getLine(), gmsg, OpalParser::inputStack, Token::isDel(), Token::isEOF(), Token::isKey(), Token::isString(), Token::isWord(), OpalParser::parseBracketList(), OpalParser::parseTokenList(), OpalParser::readStatement(), TokenStream::readToken(), Statement::start(), and OpalException::what().
Referenced by OpalParser::readStatement(), and OpalParser::run().

|
staticinherited |
Return next input token.
Definition at line 478 of file OpalParser.cpp.
References OpalParser::inputStack, and Token::IS_EOF.
Referenced by OpalParser::parseBracketList(), and OpalParser::parseTokenList().
|
virtualinherited |
Read current stream.
Definition at line 585 of file OpalParser.cpp.
References Statement::execute(), OpalParser::inputStack, OpalParser::readStatement(), OpalParser::stopFlag, OpalException::what(), and OpalException::where().
Referenced by Call::execute(), TrackCmd::execute(), main(), SequenceTemplate::makeInstance(), Sequence::parse(), and OpalParser::run().

|
virtualinherited |
Read given stream.
Implements Parser.
Definition at line 613 of file OpalParser.cpp.
References OpalParser::inputStack, and OpalParser::run().

|
inherited |
Set stop flag.
Definition at line 619 of file OpalParser.cpp.
References OpalParser::stopFlag.
Referenced by TrackEnd::execute(), and SequenceParser::parse().
|
staticprivateinherited |
Definition at line 114 of file OpalParser.h.
Referenced by OpalParser::parseMacro(), OpalParser::readStatement(), OpalParser::readToken(), OpalParser::run(), and OpalParser::run().
|
mutableprivateinherited |
Definition at line 111 of file OpalParser.h.
Referenced by OpalParser::parseAction(), OpalParser::run(), and OpalParser::stop().
|
private |
Definition at line 42 of file TrackParser.h.
Referenced by find(), and TrackParser().