1 /*============================================================================= 2 Boost.Wave: A Standard compliant C++ preprocessor library 3 4 http://www.boost.org/ 5 6 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost 7 Software License, Version 1.0. (See accompanying file 8 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 =============================================================================*/ 10 11 #if !defined(BOOST_CPP_HAS_INCLUDE_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED) 12 #define BOOST_CPP_HAS_INCLUDE_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED 13 14 #include <boost/wave/wave_config.hpp> 15 16 #include <list> 17 18 #include <boost/spirit/include/classic_parser.hpp> 19 #include <boost/pool/pool_alloc.hpp> 20 21 #include <boost/wave/util/unput_queue_iterator.hpp> 22 23 // this must occur after all of the includes and before any code appears 24 #ifdef BOOST_HAS_ABI_HEADERS 25 #include BOOST_ABI_PREFIX 26 #endif 27 28 // suppress warnings about dependent classes not being exported from the dll 29 #ifdef BOOST_MSVC 30 #pragma warning(push) 31 #pragma warning(disable : 4251 4231 4660) 32 #endif 33 34 /////////////////////////////////////////////////////////////////////////////// 35 namespace boost { 36 namespace wave { 37 namespace grammars { 38 39 template <typename LexIteratorT> 40 struct BOOST_WAVE_DECL has_include_grammar_gen 41 { 42 typedef typename LexIteratorT::token_type token_type; 43 typedef std::list<token_type, boost::fast_pool_allocator<token_type> > 44 token_sequence_type; 45 46 // The parse_operator_has_include function is instantiated manually twice to 47 // simplify the explicit specialization of this template. This way the user 48 // has only to specify one template parameter (the lexer iterator type) to 49 // correctly formulate the required explicit specialization. 50 // This results in no code overhead, because otherwise the function would be 51 // generated by the compiler twice anyway. 52 53 typedef boost::wave::util::unput_queue_iterator< 54 typename token_sequence_type::iterator, token_type, token_sequence_type> 55 iterator1_type; 56 57 typedef boost::wave::util::unput_queue_iterator< 58 LexIteratorT, token_type, token_sequence_type> 59 iterator2_type; 60 61 // parse the operator has_include and return the found qualified name 62 static boost::spirit::classic::parse_info<iterator1_type> 63 parse_operator_has_include (iterator1_type const &first, 64 iterator1_type const &last, token_sequence_type &found_qualified_name, 65 bool &is_quoted_filename, bool &is_system); 66 67 static boost::spirit::classic::parse_info<iterator2_type> 68 parse_operator_has_include (iterator2_type const &first, 69 iterator2_type const &last, token_sequence_type &found_qualified_name, 70 bool &is_quoted_filename, bool &is_system); 71 }; 72 73 /////////////////////////////////////////////////////////////////////////////// 74 } // namespace grammars 75 } // namespace wave 76 } // namespace boost 77 78 #ifdef BOOST_MSVC 79 #pragma warning(pop) 80 #endif 81 82 // the suffix header occurs after all of the code 83 #ifdef BOOST_HAS_ABI_HEADERS 84 #include BOOST_ABI_SUFFIX 85 #endif 86 87 #endif // !defined(BOOST_CPP_HAS_INCLUDE_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED) 88