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_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED)
|
Chris@16
|
12 #define CPP_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED
|
Chris@16
|
13
|
Chris@16
|
14 #include <boost/wave/wave_config.hpp>
|
Chris@16
|
15 #include <boost/wave/grammars/cpp_value_error.hpp>
|
Chris@16
|
16
|
Chris@16
|
17 // this must occur after all of the includes and before any code appears
|
Chris@16
|
18 #ifdef BOOST_HAS_ABI_HEADERS
|
Chris@16
|
19 #include BOOST_ABI_PREFIX
|
Chris@16
|
20 #endif
|
Chris@16
|
21
|
Chris@16
|
22 // suppress warnings about dependent classes not being exported from the dll
|
Chris@16
|
23 #ifdef BOOST_MSVC
|
Chris@16
|
24 #pragma warning(push)
|
Chris@16
|
25 #pragma warning(disable : 4251 4231 4660)
|
Chris@16
|
26 #endif
|
Chris@16
|
27
|
Chris@16
|
28 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
29 namespace boost {
|
Chris@16
|
30 namespace wave {
|
Chris@16
|
31 namespace grammars {
|
Chris@16
|
32
|
Chris@16
|
33 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
34 //
|
Chris@16
|
35 // cpp_intlit_grammar_gen template class
|
Chris@16
|
36 //
|
Chris@16
|
37 // This template helps separating the compilation of the intlit_grammar
|
Chris@16
|
38 // class from the compilation of the expression_grammar. This is done
|
Chris@16
|
39 // to safe compilation time.
|
Chris@16
|
40 //
|
Chris@16
|
41 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
42 template <typename TokenT>
|
Chris@16
|
43 struct BOOST_WAVE_DECL intlit_grammar_gen {
|
Chris@16
|
44
|
Chris@16
|
45 static uint_literal_type evaluate(TokenT const &tok, bool &is_unsigned);
|
Chris@16
|
46 };
|
Chris@16
|
47
|
Chris@16
|
48 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
49 //
|
Chris@16
|
50 // cpp_chlit_grammar_gen template class
|
Chris@16
|
51 //
|
Chris@16
|
52 // This template helps separating the compilation of the chlit_grammar
|
Chris@16
|
53 // class from the compilation of the expression_grammar. This is done
|
Chris@16
|
54 // to safe compilation time.
|
Chris@16
|
55 //
|
Chris@16
|
56 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
57 template <typename IntegralResult, typename TokenT>
|
Chris@16
|
58 struct BOOST_WAVE_DECL chlit_grammar_gen {
|
Chris@16
|
59
|
Chris@16
|
60 static IntegralResult evaluate(TokenT const &tok, value_error& status);
|
Chris@16
|
61 };
|
Chris@16
|
62
|
Chris@16
|
63 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
64 } // namespace grammars
|
Chris@16
|
65 } // namespace wave
|
Chris@16
|
66 } // namespace boost
|
Chris@16
|
67
|
Chris@16
|
68 #ifdef BOOST_MSVC
|
Chris@16
|
69 #pragma warning(pop)
|
Chris@16
|
70 #endif
|
Chris@16
|
71
|
Chris@16
|
72 // the suffix header occurs after all of the code
|
Chris@16
|
73 #ifdef BOOST_HAS_ABI_HEADERS
|
Chris@16
|
74 #include BOOST_ABI_SUFFIX
|
Chris@16
|
75 #endif
|
Chris@16
|
76
|
Chris@16
|
77 #endif // !defined(CPP_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED)
|