30#include "Utility/IpplInfo.h"
44 token = is.readToken();
46 while (!token.isEOF()) {
49 if (token.isDel(
'(')) {
51 } else if (token.isDel(
')')) {
57 token = is.readToken();
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.
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.
Statement(const std::string &name, int line)
Constructor.
virtual void print(std::ostream &os) const
Print statement.
Representation of a single input token.
bool isDel(char del) const
Test for delimiter.
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()