OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
MacroStream.h
Go to the documentation of this file.
1 #ifndef CLASSIC_MacroStream_HH
2 #define CLASSIC_MacroStream_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: MacroStream.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: MacroStream
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:43 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "Parser/TokenStream.h"
22 #include "Parser/Token.h"
23 #include <list>
24 
25 
26 // Class MacroStream
27 // ------------------------------------------------------------------------
29 // This list of tokens stores a macro template or instantiation.
30 
31 class MacroStream: public TokenStream {
32 
33 public:
34 
36  // Assign the macro name as a buffer name.
37  MacroStream(const std::string &);
38 
39  virtual ~MacroStream();
40 
42  void append(Token &);
43 
45  virtual Token readToken();
46 
48  void start();
49 
50 private:
51 
52  // Not implemented.
55  void operator=(const MacroStream &);
56 
57  // The list of tokens.
58  typedef std::list<Token> TokenList;
61 };
62 
63 #endif // CLASSIC_MacroStream_HH
std::string::iterator iterator
Definition: MSLang.h:16
Representation of a single input token.
Definition: Token.h:33
Abstract interface for a stream of input tokens.
Definition: TokenStream.h:33
An input buffer for macro commands.
Definition: MacroStream.h:31
TokenList::iterator curr
Definition: MacroStream.h:60
virtual ~MacroStream()
Definition: MacroStream.cpp:32
void append(Token &)
Append a token to the stream.
Definition: MacroStream.cpp:36
MacroStream(const MacroStream &)
void operator=(const MacroStream &)
void start()
Reset stream to start.
Definition: MacroStream.cpp:53
std::list< Token > TokenList
Definition: MacroStream.h:58
TokenList body
Definition: MacroStream.h:59
virtual Token readToken()
Read a token from the stream.
Definition: MacroStream.cpp:41