OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
SimpleStatement.h
Go to the documentation of this file.
1 #ifndef CLASSIC_SimpleStatement_HH
2 #define CLASSIC_SimpleStatement_HH 1
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: SimpleStatement.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Statement
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Parser
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:37 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "Parser/Statement.h"
24 
25 
26 // class SimpleStatement
27 // ------------------------------------------------------------------------
29 // The statement is stored as a list of Token's.
30 
31 class SimpleStatement: public Statement {
32 
33 public:
34 
36  // Stores the name of the input stream and the line at which
37  // the statement begins.
38  SimpleStatement(const std::string &streamName, int streamLine);
39 
41  // Stores a name (e.g. for a macro) and the token list.
42  SimpleStatement(const std::string &streamName, TokenList &list);
43 
45  virtual ~SimpleStatement();
46 
48  // This method provides a hook for structured statement execution.
49  // It is called by the parser, and may be overridden to execute
50  // e.g. a conditional or a loop statement.
51  virtual void execute(const Parser &);
52 };
53 
54 #endif // CLASSIC_SimpleStatement_HH
Interface for abstract language parser.
Definition: Parser.h:31
std::list< Token > TokenList
The type of the enclosed token list.
Definition: Statement.h:43
Interface for statements.
Definition: Statement.h:38
virtual void execute(const Parser &)
Execute statement.
virtual ~SimpleStatement()
Destructor.
A simple input statement in token form.
SimpleStatement(const std::string &streamName, int streamLine)
Constructor.