instantiate_defined_grammar.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 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 "cpp_tokens.hpp" // config data
  9. #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
  10. #include <string>
  11. #include <boost/wave/token_ids.hpp>
  12. #include "slex_token.hpp"
  13. #include "slex_iterator.hpp"
  14. #include <boost/wave/grammars/cpp_defined_grammar.hpp>
  15. ///////////////////////////////////////////////////////////////////////////////
  16. //
  17. // Explicit instantiation of the defined_grammar_gen template
  18. // with the correct token type. This instantiates the corresponding parse
  19. // function, which in turn instantiates the defined_grammar
  20. // object (see wave/grammars/cpp_defined_grammar.hpp)
  21. //
  22. ///////////////////////////////////////////////////////////////////////////////
  23. typedef boost::wave::cpplexer::slex::slex_iterator<
  24. boost::wave::cpplexer::slex_token<> >
  25. lexer_type;
  26. template struct boost::wave::grammars::defined_grammar_gen<lexer_type>;
  27. #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0