]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/wave/samples/token_statistics/instantiate_xlex_lexer.cpp
1 /*=============================================================================
2 Boost.Wave: A Standard compliant C++ preprocessor library
4 Sample: Explicit instantiation of the xlex_functor generation function
8 Copyright (c) 2001-2010 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 =============================================================================*/
13 #include <boost/wave.hpp>
15 #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
19 #include <boost/wave/token_ids.hpp>
21 #include <boost/wave/cpplexer/cpp_lex_token.hpp>
23 ///////////////////////////////////////////////////////////////////////////////
24 // The following file needs to be included only once throughout the whole
26 #include "xlex/xlex_lexer.hpp"
28 ///////////////////////////////////////////////////////////////////////////////
30 // This instantiates the correct 'new_lexer' function, which generates the
31 // C++ lexer used in this sample.
33 // This is moved into a separate compilation unit to decouple the compilation
34 // of the C++ lexer from the compilation of the other modules, which helps to
35 // reduce compilation time.
37 // The template parameter(s) supplied should be identical to the parameters
38 // supplied while instantiating the context<> template.
40 ///////////////////////////////////////////////////////////////////////////////
42 template struct boost::wave::cpplexer::xlex::new_lexer_gen
<std::string::iterator
>;
44 #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0