1 /*============================================================================= 2 Boost.Wave: A Standard compliant C++ preprocessor library 3 4 Sample: prints out the preprocessed tokens returned by the pp iterator 5 6 http://www.boost.org/ 7 8 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost 9 Software License, Version 1.0. (See accompanying file 10 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 11 =============================================================================*/ 12 13 #include "cpp_tokens.hpp" // config data 14 15 #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 16 17 #include <string> 18 19 #include <boost/wave/token_ids.hpp> 20 21 #include "slex_token.hpp" 22 #include "slex_iterator.hpp" 23 24 #include <boost/wave/grammars/cpp_literal_grammar_gen.hpp> 25 #include <boost/wave/grammars/cpp_intlit_grammar.hpp> 26 #include <boost/wave/grammars/cpp_chlit_grammar.hpp> 27 28 /////////////////////////////////////////////////////////////////////////////// 29 // 30 // Explicit instantiation of the intlit_grammar_gen, chlit_grammar_gen and 31 // floatlit_grammar_gen templates with the correct token type. This 32 // instantiates the corresponding parse function, which in turn instantiates 33 // the corresponding parser object. 34 // 35 /////////////////////////////////////////////////////////////////////////////// 36 37 typedef boost::wave::cpplexer::slex_token<> token_type; 38 39 template struct boost::wave::grammars::intlit_grammar_gen<token_type>; 40 #if BOOST_WAVE_WCHAR_T_SIGNEDNESS == BOOST_WAVE_WCHAR_T_AUTOSELECT || \ 41 BOOST_WAVE_WCHAR_T_SIGNEDNESS == BOOST_WAVE_WCHAR_T_FORCE_SIGNED 42 template struct boost::wave::grammars::chlit_grammar_gen<int, token_type>; 43 #endif 44 template struct boost::wave::grammars::chlit_grammar_gen<unsigned int, token_type>; 45 46 #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 47 48