instantiate_lexertl_lexer.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. #include "list_includes.hpp" // config data
  9. #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
  10. #include <string>
  11. #include <boost/wave/token_ids.hpp>
  12. #include <boost/wave/cpplexer/cpp_lex_token.hpp>
  13. #include "lexertl_iterator.hpp"
  14. ///////////////////////////////////////////////////////////////////////////////
  15. // The following file needs to be included only once throughout the whole
  16. // program.
  17. #include "lexertl/lexertl_lexer.hpp"
  18. ///////////////////////////////////////////////////////////////////////////////
  19. //
  20. // This instantiates the correct 'new_lexer' function, which generates the
  21. // C++ lexer used in this sample.
  22. //
  23. // This is moved into a separate compilation unit to decouple the compilation
  24. // of the C++ lexer from the compilation of the other modules, which helps to
  25. // reduce compilation time.
  26. //
  27. // The template parameter(s) supplied should be identical to the parameters
  28. // supplied while instantiating the context<> template.
  29. //
  30. ///////////////////////////////////////////////////////////////////////////////
  31. template struct boost::wave::cpplexer::lexertl::new_lexer_gen<
  32. BOOST_WAVE_STRINGTYPE::iterator>;
  33. #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0