46 while(! token.
isEOF()) {
49 if(token.
isDel(
'(')) {
51 }
else if(token.
isDel(
')')) {
61 throw ParseError(
"WhileStatement::WhileStatement()",
62 "Invalid \"WHILE\" statement.");
78 condition.
parse(*
this,
false);
86 std::ostringstream oss;
88 ERRORMSG(
"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.
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()