instantiate_cpp_exprgrammar.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. Example: real_positions
  4. Explicit instantiation of the cpp_expression_grammar parsing function
  5. http://www.boost.org/
  6. Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
  7. Software License, Version 1.0. (See accompanying file
  8. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. =============================================================================*/
  10. #include <boost/wave/wave_config.hpp>
  11. #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
  12. #include <string>
  13. #include <boost/wave/token_ids.hpp>
  14. #include "real_position_token.hpp" // token class
  15. #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer type
  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 lex_token<> token_type;
  26. template struct boost::wave::grammars::expression_grammar_gen<token_type>;
  27. #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0