35 Statement(
"", 0), then_block(0), else_block(0) {
44 while(! token.
isEOF()) {
47 if(token.
isDel(
'(')) {
49 }
else if(token.
isDel(
')')) {
67 "Invalid \"IF\" statement.");
83 condition.
parse(*
this,
false);
92 std::ostringstream oss;
94 ERRORMSG(
"Invalid IF condition '" + oss.str() +
"'");
bool isEOF() const
Test for end of file.
virtual void execute(const Parser &)
Execute.
Abstract interface for a stream of input tokens.
void update()
Update all objects.
virtual Statement * readStatement(TokenStream *ts) const =0
Read complete statement from token stream.
bool getBool(const Attribute &attr)
Return logical value.
Interface for abstract language parser.
static OpalData * getInstance()
virtual Token readToken()=0
Read single token from stream.
A representation of an Object attribute.
Interface for statements.
Representation of a single input token.
void start()
Return to start.
virtual void print(std::ostream &os) const
Print statement.
void putBack(const Token &token)
Put token back to stream.
void append(const Token &)
Append a token.
virtual void execute(const Parser &)=0
Execute.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
bool isKey(const char *key) const
Test for keyword.
bool isDel(char del) const
Test for delimiter.
void parse(Statement &stat, bool eval)
Parse attribute.