summaryrefslogtreecommitdiff
path: root/modules/CIAO/CCF/CCF/CompilerElements/Preprocessor.hpp
blob: 994c889a3f8d631d9b68965ade8168469009290d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// file      : CCF/CompilerElements/Preprocessor.hpp
// author    : Boris Kolpackov <boris@dre.vanderbilt.edu>
// cvs-id    : $Id$

#ifndef CCF_COMPILER_ELEMENTS_PREPROCESSOR_HPP
#define CCF_COMPILER_ELEMENTS_PREPROCESSOR_HPP

#include <memory>
#include <string>
#include <set>

#include "CCF/CompilerElements/TokenStream.hpp"
#include "CCF/CompilerElements/PreprocessorToken.hpp"

namespace CCF
{
  namespace CompilerElements
  {
    namespace CPP
    {
      typedef
      std::set<std::string>
      Symbols;

      class Preprocessor : public TokenStream<Token>
      {
      public:
        virtual
        ~Preprocessor ();

        Preprocessor (TokenStream<char>& is, Symbols const&);

        virtual Token
        next ();

      private:
        class PreprocessorImpl;

        std::auto_ptr<PreprocessorImpl> impl_;
      };
    }
  }
}

#endif  // CCF_COMPILER_ELEMENTS_PREPROCESSOR_HPP