instantiate_defined_grammar.cpp 1.5 KB

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