43 "This object defines a beamsequence list with arguments.\n"
60 "You cannot use this object without attributes.");
74 "Inconsistent number of macro arguments.");
81 while(! token.
isEOF()) {
84 std::string word = token.
getWord();
85 for(std::vector<std::string>::size_type i = 0;
88 std::vector<Token> act =
actuals[i];
97 if(! found) expansion->
append(token);
107 parser.
run(&*expansion);
128 bool isSequence = statement.
keyword(
"SEQUENCE");
138 while(! token.
isEOF()) {
140 if(token.
isKey(
"ENDSEQUENCE")) {
143 while(! token.
isEOF()) {
145 if(token.
isDel(
';'))
break;
The base class for all OPAL objects.
const std::string & getOpalName() const
Return object name.
void copyAttributes(const Object &)
Copy attributes from another object.
virtual void parse(Statement &)
Parse the object.
Object * find(const std::string &name)
Find entry.
static OpalData * getInstance()
Interface for abstract language parser.
Interface for statements.
bool keyword(const char *s)
Test for keyword.
Representation of a single input token.
bool isDel(char del) const
Test for delimiter.
bool isWord() const
Test for word.
bool isEOF() const
Test for end of file.
std::string getWord() const
Return word value.
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 Sequence * clone(const std::string &name)
Make clone.
The parser for SEQUENCE members.
virtual SequenceTemplate * clone(const std::string &name)
Make clone.
void parseTemplate(TokenStream &, Statement &)
Parse the sequence template.
virtual Object * makeInstance(const std::string &name, Statement &, const Parser *)
Make line instance.
virtual ~SequenceTemplate()
virtual Object * makeTemplate(const std::string &name, TokenStream &, Statement &)
Make a sequence template.
Abstract base class for macros.
virtual void parseFormals(Statement &)
Parse formal arguments.
std::vector< std::string > formals
The formal argument list.
std::vector< std::vector< Token > > actuals
The actual argument list.
virtual void parseActuals(Statement &)
Parse actual arguments.
An input buffer for macro commands.
void append(Token &)
Append a token to the stream.
void start()
Reset stream to start.
virtual Token readToken()
Read a token from the stream.
virtual void run() const
Read current stream.