OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
CompoundStatement.h
Go to the documentation of this file.
1#ifndef OPALX_CompoundStatement_HH
2#define OPALX_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 <iosfwd>
22#include <memory>
25
26class TokenStream;
27class Parser;
28
29// class CompoundStatement
30// ------------------------------------------------------------------------
32// A statement of the form "{ <statement>; <statement>; }"
33// (may be used for FOR, IF, or WHILE blocks).
34// The compound statement is stored as a MacroStream which is sent to
35// the parser for execution.
36
38public:
40 // Parse the statement on the given token stream.
42
43 virtual ~CompoundStatement();
44
46 // Use the given parser to execute the contained statements.
47 virtual void execute(const Parser&);
48
49private:
50 // Not implemented.
54
55 // Token list contained in this compound.
56 std::shared_ptr<MacroStream> tokens;
57};
58
59#endif // OPALX_CompoundStatement_HH
Compound statement.
void operator=(const CompoundStatement &)
CompoundStatement(const CompoundStatement &)
std::shared_ptr< MacroStream > tokens
virtual void execute(const Parser &)
Execute.
Interface for abstract language parser.
Definition Parser.h:30
Interface for statements.
Definition Statement.h:37
Abstract interface for a stream of input tokens.
Definition TokenStream.h:30