summaryrefslogtreecommitdiff
path: root/modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp')
-rw-r--r--modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp b/modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp
new file mode 100644
index 00000000000..5c82076a01c
--- /dev/null
+++ b/modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp
@@ -0,0 +1,58 @@
+// file : CCF/CompilerElements/PreprocessorToken.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef CCF_COMPILER_ELEMENTS_PREPROCESSOR_TOKEN_HPP
+#define CCF_COMPILER_ELEMENTS_PREPROCESSOR_TOKEN_HPP
+
+#include <string>
+
+//@@ It is probably a good idea to move preprocessor into a
+// separate library.
+//
+
+namespace CCF
+{
+ namespace CompilerElements
+ {
+ namespace CPP
+ {
+ class Token
+ {
+ public:
+ static Token const eos;
+
+ public:
+ Token (char c, unsigned long line);
+
+ class EOS {};
+
+ operator char () const throw (EOS);
+
+ unsigned long
+ line () const throw (EOS);
+
+ friend bool
+ operator== (Token const& a, Token const& b);
+
+ friend bool
+ operator!= (Token const& a, Token const& b);
+
+ private:
+ // Constructs eos token.
+ //
+ Token ();
+
+ private:
+ typedef
+ std::char_traits<char>
+ traits;
+
+ traits::int_type c_;
+ unsigned long line_;
+ };
+ }
+ }
+}
+
+#endif // CCF_COMPILER_ELEMENTS_PREPROCESSOR_TOKEN_HPP