1 #ifndef MAD_Statement_HH
2 #define MAD_Statement_HH 1
121 bool real(
double &value);
130 bool str(std::string &value);
139 bool word(std::string &value);
162 virtual void print(std::ostream &os)
const;
169 std::string
str()
const;
192 std::ostringstream msg;
193 statement.
print(msg);
199 #endif // MAD_Statement_HH
constexpr double c
The velocity of light in m/s.
void append(const Token &)
Append a token.
void start()
Return to start.
Statement(const std::string &name, int line)
Constructor.
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
virtual void print(std::ostream &os) const
Print statement.
bool atEnd() const
Test for end of command.
unsigned int position() const
Return current character number in line.
void mark()
Mark position in command.
void restore()
Return to marked position.
std::string::iterator iterator
Token & getCurrent()
Return current token and skip it.
bool boolean(bool &value)
Return boolean value.
bool word(std::string &value)
Return word value.
Representation of a single input token.
Interface for statements.
bool delimiter(char c)
Test for delimiter.
virtual void execute(const Parser &)=0
Execute.
virtual void printWhere(Inform &msg, bool withToken) const
Print position.
bool real(double &value)
Return real value.
bool keyword(const char *s)
Test for keyword.
bool integer(int &value)
Return signed integer.
Interface for abstract language parser.
std::list< Token > TokenList
The type of the enclosed token list.