summaryrefslogtreecommitdiff
path: root/modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp
diff options
context:
space:
mode:
authorjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-29 21:15:18 +0000
committerjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-29 21:15:18 +0000
commitb71531b42b3325fd6079a7039aae8641262c8adf (patch)
treea5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp
parenta0f67cc97c0050d907145e312135b60c0125e56e (diff)
downloadATCD-DS-main.tar.gz
branching/taggingDS-main
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