46 while (!token.
isEOF()) {
49 if (token.
isDel(
'(')) {
51 }
else if (token.
isDel(
')')) {
62 throw ParseError(
"WhileStatement::WhileStatement()",
"Invalid \"WHILE\" statement.");
77 condition.
parse(*
this,
false);
85 std::ostringstream oss;
87 *
ippl::Error <<
"Invalid WHILE condition '" + oss.str() +
"'";
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
bool getBool(const Attribute &attr)
Return logical value.
std::unique_ptr< Inform > Error
A representation of an Object attribute.
void parse(Statement &stat, bool eval)
Parse attribute.
void update()
Update all objects.
static OpalData * getInstance()
Interface for abstract language parser.
virtual Statement * readStatement(TokenStream *ts) const =0
Read complete statement from token stream.
Interface for statements.
void append(const Token &)
Append a token.
virtual void execute(const Parser &)=0
Execute.
virtual void print(std::ostream &os) const
Print statement.
Representation of a single input token.
bool isDel(char del) const
Test for delimiter.
bool isEOF() const
Test for end of file.
bool isKey(const char *key) const
Test for keyword.
Abstract interface for a stream of input tokens.
virtual Token readToken()=0
Read single token from stream.
virtual void execute(const Parser &)
Execute.
virtual ~WhileStatement()