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