OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
CompoundStatement.h
Go to the documentation of this file.
1 #ifndef CLASSIC_CompoundStatement_HH
2 #define CLASSIC_CompoundStatement_HH 1
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: CompoundStatement.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: CompoundStatement
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:43 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "Parser/Statement.h"
22 #include "OpalParser/MacroStream.h"
24 #include <iosfwd>
25 
26 class TokenStream;
27 class Parser;
28 
29 
30 // class CompoundStatement
31 // ------------------------------------------------------------------------
33 // A statement of the form "{ <statement>; <statement>; }"
34 // (may be used for FOR, IF, or WHILE blocks).
35 // The compound statement is stored as a MacroStream which is sent to
36 // the parser for execution.
37 
39 
40 public:
41 
43  // Parse the statement on the given token stream.
45 
46  virtual ~CompoundStatement();
47 
49  // Use the given parser to execute the contained statements.
50  virtual void execute(const Parser &);
51 
52 private:
53 
54  // Not implemented.
58 
59  // Token list contained in this compound.
61 };
62 
63 #endif // CLASSIC_CompoundStatement_HH
Interface for abstract language parser.
Definition: Parser.h:31
Interface for statements.
Definition: Statement.h:38
Abstract interface for a stream of input tokens.
Definition: TokenStream.h:33
Compound statement.
void operator=(const CompoundStatement &)
CompoundStatement(const CompoundStatement &)
Pointer< MacroStream > tokens
virtual void execute(const Parser &)
Execute.