|
||||
File indexing completed on 2025-01-31 10:01:53
0001 /*============================================================================= 0002 Copyright (c) 2002-2003 Joel de Guzman 0003 Copyright (c) 2002-2003 Hartmut Kaiser 0004 http://spirit.sourceforge.net/ 0005 0006 Distributed under the Boost Software License, Version 1.0. (See accompanying 0007 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0008 =============================================================================*/ 0009 #if !defined(BOOST_SPIRIT_CLOSURE_CONTEXT_HPP) 0010 #define BOOST_SPIRIT_CLOSURE_CONTEXT_HPP 0011 0012 #include <boost/spirit/home/classic/namespace.hpp> 0013 0014 /////////////////////////////////////////////////////////////////////////////// 0015 namespace boost { namespace spirit { 0016 0017 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN 0018 0019 #if !defined(BOOST_SPIRIT_CLOSURE_CONTEXT_LINKER_DEFINED) 0020 #define BOOST_SPIRIT_CLOSURE_CONTEXT_LINKER_DEFINED 0021 0022 /////////////////////////////////////////////////////////////////////////////// 0023 // 0024 // closure_context_linker 0025 // { helper template for the closure extendability } 0026 // 0027 // This classes can be 'overloaded' (defined elsewhere), to plug 0028 // in additional functionality into the closure parsing process. 0029 // 0030 /////////////////////////////////////////////////////////////////////////////// 0031 0032 template<typename ContextT> 0033 struct closure_context_linker : public ContextT 0034 { 0035 template <typename ParserT> 0036 closure_context_linker(ParserT const& p) 0037 : ContextT(p) {} 0038 0039 template <typename ParserT, typename ScannerT> 0040 void pre_parse(ParserT const& p, ScannerT const& scan) 0041 { ContextT::pre_parse(p, scan); } 0042 0043 template <typename ResultT, typename ParserT, typename ScannerT> 0044 ResultT& 0045 post_parse(ResultT& hit, ParserT const& p, ScannerT const& scan) 0046 { return ContextT::post_parse(hit, p, scan); } 0047 }; 0048 0049 #endif // !defined(BOOST_SPIRIT_CLOSURE_CONTEXT_LINKER_DEFINED) 0050 0051 /////////////////////////////////////////////////////////////////////////////// 0052 BOOST_SPIRIT_CLASSIC_NAMESPACE_END 0053 0054 }} // namespace BOOST_SPIRIT_CLASSIC_NS 0055 0056 #endif // BOOST_SPIRIT_CLOSURE_CONTEXT_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |