Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Boost.Wave: A Standard compliant C++ preprocessor library
|
Chris@16
|
3
|
Chris@16
|
4 http://www.boost.org/
|
Chris@16
|
5
|
Chris@16
|
6 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
|
Chris@16
|
7 Software License, Version 1.0. (See accompanying file
|
Chris@16
|
8 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
9 =============================================================================*/
|
Chris@16
|
10
|
Chris@16
|
11 #if !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED)
|
Chris@16
|
12 #define CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED
|
Chris@16
|
13
|
Chris@16
|
14 #include <boost/wave/wave_config.hpp>
|
Chris@16
|
15 #include <boost/wave/cpp_iteration_context.hpp>
|
Chris@16
|
16 #include <boost/wave/grammars/cpp_value_error.hpp>
|
Chris@16
|
17
|
Chris@16
|
18 #include <list>
|
Chris@16
|
19 #include <boost/pool/pool_alloc.hpp>
|
Chris@16
|
20
|
Chris@16
|
21 // this must occur after all of the includes and before any code appears
|
Chris@16
|
22 #ifdef BOOST_HAS_ABI_HEADERS
|
Chris@16
|
23 #include BOOST_ABI_PREFIX
|
Chris@16
|
24 #endif
|
Chris@16
|
25
|
Chris@16
|
26 // suppress warnings about dependent classes not being exported from the dll
|
Chris@16
|
27 #ifdef BOOST_MSVC
|
Chris@16
|
28 #pragma warning(push)
|
Chris@16
|
29 #pragma warning(disable : 4251 4231 4660)
|
Chris@16
|
30 #endif
|
Chris@16
|
31
|
Chris@16
|
32 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
33 namespace boost {
|
Chris@16
|
34 namespace wave {
|
Chris@16
|
35 namespace grammars {
|
Chris@16
|
36
|
Chris@16
|
37 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
38 //
|
Chris@16
|
39 // expression_grammar_gen template class
|
Chris@16
|
40 //
|
Chris@16
|
41 // This template helps separating the compilation of the
|
Chris@16
|
42 // expression_grammar class from the compilation of the main
|
Chris@16
|
43 // pp_iterator. This is done to safe compilation time.
|
Chris@16
|
44 //
|
Chris@16
|
45 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
46
|
Chris@16
|
47 template <typename TokenT>
|
Chris@16
|
48 struct BOOST_WAVE_DECL expression_grammar_gen {
|
Chris@16
|
49
|
Chris@16
|
50 typedef TokenT token_type;
|
Chris@16
|
51 typedef std::list<token_type, boost::fast_pool_allocator<token_type> >
|
Chris@16
|
52 token_sequence_type;
|
Chris@16
|
53
|
Chris@16
|
54 static bool evaluate(
|
Chris@16
|
55 typename token_sequence_type::const_iterator const &first,
|
Chris@16
|
56 typename token_sequence_type::const_iterator const &last,
|
Chris@16
|
57 typename token_type::position_type const &tok,
|
Chris@16
|
58 bool if_block_status, value_error &status);
|
Chris@16
|
59 };
|
Chris@16
|
60
|
Chris@16
|
61 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
62 } // namespace grammars
|
Chris@16
|
63 } // namespace wave
|
Chris@16
|
64 } // namespace boost
|
Chris@16
|
65
|
Chris@16
|
66 #ifdef BOOST_MSVC
|
Chris@16
|
67 #pragma warning(pop)
|
Chris@16
|
68 #endif
|
Chris@16
|
69
|
Chris@16
|
70 // the suffix header occurs after all of the code
|
Chris@16
|
71 #ifdef BOOST_HAS_ABI_HEADERS
|
Chris@16
|
72 #include BOOST_ABI_SUFFIX
|
Chris@16
|
73 #endif
|
Chris@16
|
74
|
Chris@16
|
75 #endif // !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED)
|