diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-03-18 22:23:37 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-03-18 22:23:37 +0000 |
commit | 06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b (patch) | |
tree | 8815ce3b3a85c3c4285429295f338e00ea4497f4 /CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp | |
parent | d66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de (diff) | |
download | ATCD-06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b.tar.gz |
Diffstat (limited to 'CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp')
-rw-r--r-- | CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp b/CIAO/CCF/CCF/CompilerElements/PreprocessorToken.hpp new file mode 100644 index 00000000000..5c82076a01c --- /dev/null +++ b/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 |