OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
While statement. More...
#include <WhileStatement.h>
Public Member Functions | |
WhileStatement (const Parser &, TokenStream &) | |
Constructor. More... | |
virtual | ~WhileStatement () |
virtual void | execute (const Parser &) |
Execute. More... | |
Public Member Functions inherited from Statement | |
Statement (const std::string &name, int line) | |
Constructor. More... | |
Statement (const std::string &name, TokenList &) | |
Constructor. More... | |
virtual | ~Statement () |
void | append (const Token &) |
Append a token. More... | |
bool | atEnd () const |
Test for end of command. More... | |
bool | boolean (bool &value) |
Return boolean value. More... | |
bool | delimiter (char c) |
Test for delimiter. More... | |
bool | delimiter (const char *s) |
Test for delimiter choice. More... | |
virtual void | execute (const Parser &)=0 |
Execute. More... | |
Token & | getCurrent () |
Return current token and skip it. More... | |
bool | integer (int &value) |
Return signed integer. More... | |
bool | integer (unsigned &value) |
Return unsigned integer. More... | |
bool | keyword (const char *s) |
Test for keyword. More... | |
bool | real (double &value) |
Return real value. More... | |
bool | str (std::string &value) |
Return string value. More... | |
bool | word (std::string &value) |
Return word value. More... | |
void | mark () |
Mark position in command. More... | |
void | restore () |
Return to marked position. More... | |
void | start () |
Return to start. More... | |
void | skip () |
Skip. More... | |
unsigned int | position () const |
Return current character number in line. More... | |
virtual void | print (std::ostream &os) const |
Print statement. More... | |
virtual void | printWhere (Inform &msg, bool withToken) const |
Print position. More... | |
std::string | str () const |
Private Member Functions | |
WhileStatement () | |
WhileStatement (const WhileStatement &) | |
void | operator= (const WhileStatement &) |
Private Attributes | |
Statement * | while_block |
Additional Inherited Members | |
Public Types inherited from Statement | |
typedef std::list< Token > | TokenList |
The type of the enclosed token list. More... | |
Protected Attributes inherited from Statement | |
int | stat_line |
std::string | buffer_name |
TokenList | tokens |
TokenList::iterator | curr |
TokenList::iterator | keep |
While statement.
Definition at line 35 of file WhileStatement.h.
WhileStatement::WhileStatement | ( | const Parser & | parser, |
TokenStream & | is | ||
) |
Constructor.
Definition at line 36 of file WhileStatement.cpp.
References Statement::append(), Token::isDel(), Token::isEOF(), Token::isKey(), Parser::readStatement(), TokenStream::readToken(), and while_block.
|
virtual |
Definition at line 67 of file WhileStatement.cpp.
References while_block.
|
private |
|
private |
|
virtual |
Execute.
Implements Statement.
Definition at line 72 of file WhileStatement.cpp.
References Statement::curr, ERRORMSG, Statement::execute(), Attributes::getBool(), OpalData::getInstance(), Statement::keep, Attributes::makeBool(), Attribute::parse(), Statement::print(), Statement::tokens, OpalData::update(), and while_block.
|
private |
|
private |
Definition at line 56 of file WhileStatement.h.
Referenced by execute(), WhileStatement(), and ~WhileStatement().