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