instantiate_defined_grammar.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. Example: real_positions
  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 <boost/wave/wave_config.hpp>
  10. #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
  11. #include <string>
  12. #include <boost/wave/token_ids.hpp>
  13. #include "real_position_token.hpp" // token class
  14. #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer type
  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::lex_iterator<lex_token<> > lexer_type;
  25. template struct boost::wave::grammars::defined_grammar_gen<lexer_type>;
  26. #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0