Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/wave/src/instantiate_re2c_lexer.cpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 2.3 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-2007 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#define BOOST_WAVE_SOURCE 1
13#include <boost/wave/wave_config.hpp>          // configuration data
14
15#if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
16
17#include <string>
18
19#include <boost/wave/token_ids.hpp>
20#include <boost/wave/cpplexer/cpp_lex_token.hpp>
21#include <boost/wave/cpplexer/cpp_lex_iterator.hpp>
22
23///////////////////////////////////////////////////////////////////////////////
24//  The following file needs to be included only once throughout the whole
25//  program.
26#include <boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp>
27
28// this must occur after all of the includes and before any code appears
29#ifdef BOOST_HAS_ABI_HEADERS
30#include BOOST_ABI_PREFIX
31#endif
32
33///////////////////////////////////////////////////////////////////////////////
34//
35//  This instantiates the correct 'new_lexer' function, which generates the
36//  C++ lexer used in this sample. You will have to instantiate the
37//  new_lexer_gen<> template with the same iterator type, as you have used for
38//  instantiating the boost::wave::context<> object.
39//
40//  This is moved into a separate compilation unit to decouple the compilation
41//  of the C++ lexer from the compilation of the other modules, which helps to
42//  reduce compilation time.
43//
44//  The template parameter(s) supplied should be identical to the first
45//  parameter supplied while instantiating the boost::wave::context<> template
46//  (see the file cpp.cpp).
47//
48///////////////////////////////////////////////////////////////////////////////
49
50template struct boost::wave::cpplexer::new_lexer_gen<
51    BOOST_WAVE_STRINGTYPE::iterator>;
52template struct boost::wave::cpplexer::new_lexer_gen<
53    BOOST_WAVE_STRINGTYPE::const_iterator>;
54
55// the suffix header occurs after all of the code
56#ifdef BOOST_HAS_ABI_HEADERS
57#include BOOST_ABI_SUFFIX
58#endif
59
60#endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
Note: See TracBrowser for help on using the repository browser.