1 /*============================================================================= 2 Boost.Wave: A Standard compliant C++ preprocessor library 3 4 Sample: IDL oriented preprocessor 5 Explicit instantiation of the lex_functor generation function 6 7 http://www.boost.org/ 8 9 Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost 10 Software License, Version 1.0. (See accompanying file 11 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 12 =============================================================================*/ 13 14 #include "idl.hpp" 15 16 #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 17 18 #include <string> 19 20 #include <boost/wave/token_ids.hpp> 21 #include <boost/wave/cpplexer/cpp_lex_token.hpp> 22 23 #include "idllexer/idl_lex_iterator.hpp" 24 25 /////////////////////////////////////////////////////////////////////////////// 26 // The following file needs to be included only once throughout the whole 27 // program. 28 #include "idllexer/idl_re2c_lexer.hpp" 29 30 /////////////////////////////////////////////////////////////////////////////// 31 // 32 // If you've used another iterator type as std::string::iterator, you have to 33 // instantiate the new_lexer_gen<> template for this iterator type too. 34 // The reason is, that the library internally uses the new_lexer_gen<> 35 // template with a std::string::iterator. (You just have to undefine the 36 // following line.) 37 // 38 // This is moved into a separate compilation unit to decouple the compilation 39 // of the C++ lexer from the compilation of the other modules, which helps to 40 // reduce compilation time. 41 // 42 // The template parameter(s) supplied should be identical to the first 43 // parameter supplied while instantiating the boost::wave::context<> template 44 // (see the file cpp.cpp). 45 // 46 /////////////////////////////////////////////////////////////////////////////// 47 48 template struct boost::wave::idllexer::new_lexer_gen<std::string::iterator>; 49 50 #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 51