Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:40

0001 /*=============================================================================
0002     Boost.Wave: A Standard compliant C++ preprocessor library
0003 
0004     http://www.boost.org/
0005 
0006     Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
0007     Software License, Version 1.0. (See accompanying file
0008     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 =============================================================================*/
0010 
0011 #if !defined(BOOST_CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED)
0012 #define BOOST_CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED
0013 
0014 #include <boost/wave/wave_config.hpp>
0015 #include <boost/wave/language_support.hpp>
0016 
0017 #include <boost/spirit/include/classic_nil.hpp>
0018 #include <boost/spirit/include/classic_parse_tree.hpp>
0019 
0020 #include <boost/pool/pool_alloc.hpp>
0021 
0022 // this must occur after all of the includes and before any code appears
0023 #ifdef BOOST_HAS_ABI_HEADERS
0024 #include BOOST_ABI_PREFIX
0025 #endif
0026 
0027 // suppress warnings about dependent classes not being exported from the dll
0028 #ifdef BOOST_MSVC
0029 #pragma warning(push)
0030 #pragma warning(disable : 4251 4231 4660)
0031 #endif
0032 
0033 ///////////////////////////////////////////////////////////////////////////////
0034 namespace boost {
0035 namespace wave {
0036 namespace grammars {
0037 
0038 ///////////////////////////////////////////////////////////////////////////////
0039 //
0040 //  Here are the node id's of the different node of the cpp_grammar
0041 //
0042 ///////////////////////////////////////////////////////////////////////////////
0043 #define BOOST_WAVE_PP_STATEMENT_ID        1
0044 #define BOOST_WAVE_INCLUDE_FILE_ID        2
0045 #define BOOST_WAVE_SYSINCLUDE_FILE_ID     3
0046 #define BOOST_WAVE_MACROINCLUDE_FILE_ID   4
0047 #define BOOST_WAVE_PLAIN_DEFINE_ID        5
0048 #define BOOST_WAVE_MACRO_PARAMETERS_ID    6
0049 #define BOOST_WAVE_MACRO_DEFINITION_ID    7
0050 #define BOOST_WAVE_UNDEFINE_ID            8
0051 #define BOOST_WAVE_IFDEF_ID               9
0052 #define BOOST_WAVE_IFNDEF_ID             10
0053 #define BOOST_WAVE_IF_ID                 11
0054 #define BOOST_WAVE_ELIF_ID               12
0055 #define BOOST_WAVE_ELSE_ID               13
0056 #define BOOST_WAVE_ENDIF_ID              14
0057 #define BOOST_WAVE_LINE_ID               15
0058 #define BOOST_WAVE_ERROR_ID              16
0059 #define BOOST_WAVE_WARNING_ID            17
0060 #define BOOST_WAVE_PRAGMA_ID             18
0061 #define BOOST_WAVE_ILLFORMED_ID          19
0062 #define BOOST_WAVE_PPSPACE_ID            20
0063 #define BOOST_WAVE_PPQUALIFIEDNAME_ID    21
0064 #define BOOST_WAVE_REGION_ID             22
0065 #define BOOST_WAVE_ENDREGION_ID          23
0066 
0067 ///////////////////////////////////////////////////////////////////////////////
0068 //
0069 //  cpp_grammar_gen template class
0070 //
0071 //      This template helps separating the compilation of the cpp_grammar
0072 //      class from the compilation of the main pp_iterator. This is done to
0073 //      safe compilation time.
0074 //
0075 ///////////////////////////////////////////////////////////////////////////////
0076 
0077 template <typename LexIteratorT, typename TokenContainerT>
0078 struct BOOST_WAVE_DECL cpp_grammar_gen
0079 {
0080     typedef LexIteratorT                          iterator_type;
0081     typedef typename LexIteratorT::token_type     token_type;
0082     typedef TokenContainerT                       token_container_type;
0083     typedef typename token_type::position_type    position_type;
0084     typedef boost::spirit::classic::node_val_data_factory<
0085 //             boost::spirit::nil_t,
0086 //             boost::pool_allocator<boost::spirit::nil_t>
0087         > node_factory_type;
0088 
0089     //  parse the cpp_grammar and return the resulting parse tree
0090     static boost::spirit::classic::tree_parse_info<iterator_type, node_factory_type>
0091     parse_cpp_grammar (iterator_type const &first, iterator_type const &last,
0092         position_type const &act_pos, bool &found_eof,
0093         token_type &found_directive, token_container_type &found_eoltokens);
0094 };
0095 
0096 ///////////////////////////////////////////////////////////////////////////////
0097 }   // namespace grammars
0098 }   // namespace wave
0099 }   // namespace boost
0100 
0101 #ifdef BOOST_MSVC
0102 #pragma warning(pop)
0103 #endif
0104 
0105 // the suffix header occurs after all of the code
0106 #ifdef BOOST_HAS_ABI_HEADERS
0107 #include BOOST_ABI_SUFFIX
0108 #endif
0109 
0110 #endif // !defined(BOOST_CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED)