instantiate_cpp_literalgrs.cpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_literal_grammar_gen.hpp>
  16. #include <boost/wave/grammars/cpp_intlit_grammar.hpp>
  17. #include <boost/wave/grammars/cpp_chlit_grammar.hpp>
  18. ///////////////////////////////////////////////////////////////////////////////
  19. //
  20. // Explicit instantiation of the intlit_grammar_gen, chlit_grammar_gen and
  21. // floatlit_grammar_gen templates with the correct token type. This
  22. // instantiates the corresponding parse function, which in turn instantiates
  23. // the corresponding parser object.
  24. //
  25. ///////////////////////////////////////////////////////////////////////////////
  26. typedef lex_token<> token_type;
  27. template struct boost::wave::grammars::intlit_grammar_gen<token_type>;
  28. #if BOOST_WAVE_WCHAR_T_SIGNEDNESS == BOOST_WAVE_WCHAR_T_AUTOSELECT || \
  29. BOOST_WAVE_WCHAR_T_SIGNEDNESS == BOOST_WAVE_WCHAR_T_FORCE_SIGNED
  30. template struct boost::wave::grammars::chlit_grammar_gen<int, token_type>;
  31. #endif
  32. template struct boost::wave::grammars::chlit_grammar_gen<unsigned int, token_type>;
  33. #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0