Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/wave/src/instantiate_re2c_lexer.cpp @ 20

Last change on this file since 20 was 12, checked in by landauf, 18 years ago

added boost

File size: 1.9 KB
Line 
1/*=============================================================================
2    Boost.Wave: A Standard compliant C++ preprocessor library
3    Explicit instantiation of the lex_functor generation function
4
5    http://www.boost.org/
6
7    Copyright (c) 2001-2005 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>          // configuration data
13
14#if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
15
16#include <string>
17
18#include <boost/wave/token_ids.hpp>
19#include <boost/wave/cpplexer/cpp_lex_token.hpp>
20#include <boost/wave/cpplexer/cpp_lex_iterator.hpp>
21
22///////////////////////////////////////////////////////////////////////////////
23//  The following file needs to be included only once throughout the whole
24//  program.
25#include <boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp>
26
27///////////////////////////////////////////////////////////////////////////////
28//
29//  This instantiates the correct 'new_lexer' function, which generates the
30//  C++ lexer used in this sample. You will have to instantiate the
31//  new_lexer_gen<> template with the same iterator type, as you have used for
32//  instantiating the boost::wave::context<> object.
33//
34//  This is moved into a separate compilation unit to decouple the compilation
35//  of the C++ lexer from the compilation of the other modules, which helps to
36//  reduce compilation time.
37//
38//  The template parameter(s) supplied should be identical to the first
39//  parameter supplied while instantiating the boost::wave::context<> template
40//  (see the file cpp.cpp).
41//
42///////////////////////////////////////////////////////////////////////////////
43
44template struct boost::wave::cpplexer::new_lexer_gen<
45    BOOST_WAVE_STRINGTYPE::iterator>;
46
47#endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
Note: See TracBrowser for help on using the repository browser.