instantiate_cpp_exprgrammar.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. Sample: List include dependencies of a given source file
  4. Explicit instantiation of the cpp_expression_grammar parsing
  5. function
  6. http://www.boost.org/
  7. Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
  8. Software License, Version 1.0. (See accompanying file
  9. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  10. =============================================================================*/
  11. #include "list_includes.hpp" // config data
  12. #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
  13. #include <string>
  14. #include <boost/wave/token_ids.hpp>
  15. #include <boost/wave/cpplexer/cpp_lex_token.hpp>
  16. #include <boost/wave/grammars/cpp_expression_grammar.hpp>
  17. ///////////////////////////////////////////////////////////////////////////////
  18. //
  19. // Explicit instantiation of the expression_grammar_gen template with the
  20. // correct token type. This instantiates the corresponding parse function,
  21. // which in turn instantiates the expression_grammar object (see
  22. // wave/grammars/cpp_expression_grammar.hpp)
  23. //
  24. ///////////////////////////////////////////////////////////////////////////////
  25. typedef boost::wave::cpplexer::lex_token<> token_type;
  26. template struct boost::wave::grammars::expression_grammar_gen<token_type>;
  27. #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0