]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/wave/samples/real_positions/instantiate_cpp_grammar.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / wave / samples / real_positions / instantiate_cpp_grammar.cpp
1 /*=============================================================================
2 Boost.Wave: A Standard compliant C++ preprocessor library
3 Example: real_positions
4
5 Explicit instantiation of the cpp_grammar parsing function
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 <boost/wave/wave_config.hpp>
15
16 #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
17
18 #include <string>
19 #include <list>
20
21 #include <boost/wave/token_ids.hpp>
22
23 #include "real_position_token.hpp" // token class
24 #include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer type
25
26 #include <boost/wave/grammars/cpp_grammar.hpp>
27
28 ///////////////////////////////////////////////////////////////////////////////
29 //
30 // Explicit instantiation of the cpp_grammar_gen template with the correct
31 // token type. This instantiates the corresponding pt_parse function, which
32 // in turn instantiates the cpp_grammar object
33 // (see wave/grammars/cpp_grammar.hpp)
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36
37 typedef lex_token<> token_type;
38 typedef boost::wave::cpplexer::lex_iterator<token_type> lexer_type;
39 typedef std::list<token_type, boost::fast_pool_allocator<token_type> >
40 token_sequence_type;
41
42 template struct boost::wave::grammars::cpp_grammar_gen<lexer_type, token_sequence_type>;
43
44 #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0
45