• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Boost.Wave: A Standard compliant C++ preprocessor library
3 
4     Sample: Collect token statistics
5             Explicit instantiation of the defined_grammar template
6 
7     http://www.boost.org/
8 
9     Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
10     Software License, Version 1.0. (See accompanying file
11     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
12 =============================================================================*/
13 
14 #include "token_statistics.hpp"
15 
16 #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
17 
18 #include <string>
19 
20 #include <boost/wave/token_ids.hpp>
21 #include <boost/wave/cpplexer/cpp_lex_token.hpp>
22 
23 #include "xlex_iterator.hpp"
24 
25 #include <boost/wave/grammars/cpp_defined_grammar.hpp>
26 
27 ///////////////////////////////////////////////////////////////////////////////
28 //
29 //  Explicit instantiation of the defined_grammar_gen template
30 //  with the correct token type. This instantiates the corresponding parse
31 //  function, which in turn instantiates the defined_grammar
32 //  object (see wave/grammars/cpp_defined_grammar.hpp)
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 typedef boost::wave::cpplexer::xlex::xlex_iterator<
37         boost::wave::cpplexer::lex_token<> >
38     lexer_type;
39 template struct boost::wave::grammars::defined_grammar_gen<lexer_type>;
40 
41 #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
42 
43