diff options
Diffstat (limited to 'TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp')
-rw-r--r-- | TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp deleted file mode 100644 index a157cfeb71b..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef TOKEN_STREAM_HPP -#define TOKEN_STREAM_HPP - -#include <string> -#include <istream> - -namespace CCF -{ - template <typename Token> - class TokenStream - { - public: - virtual Token - next () = 0; - }; - - - template <> - class TokenStream<char> - { - public: - typedef std::char_traits<char> traits; - - typedef traits::int_type int_type; - typedef traits::char_type char_type; - - public: - virtual int_type - next () = 0; - - char_type - to_char_type (int_type i) - { - return traits::to_char_type (i); - } - - bool - eos (int_type i) - { - return i == traits::eof (); - } - }; - - class InputStreamAdapter : public TokenStream<char> - { - public: - InputStreamAdapter (std::istream& is) - : is_ (is) - { - } - - public: - - virtual int_type - next () - { - return is_.get (); - } - - private: - std::istream& is_; - }; -} - -#endif //TOKEN_STREAM_HPP |