Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:01:53

0001 /*=============================================================================
0002     Copyright (c) 1998-2003 Joel de Guzman
0003     Copyright (c) 2001 Daniel Nuffer
0004     Copyright (c) 2002 Hartmut Kaiser
0005     http://spirit.sourceforge.net/
0006 
0007     Use, modification and distribution is subject to the Boost Software
0008     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0009     http://www.boost.org/LICENSE_1_0.txt)
0010 =============================================================================*/
0011 #if !defined(BOOST_SPIRIT_INTERSECTION_IPP)
0012 #define BOOST_SPIRIT_INTERSECTION_IPP
0013 
0014 namespace boost { namespace spirit {
0015 
0016 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
0017 
0018     ///////////////////////////////////////////////////////////////////////////
0019     //
0020     //  intersection class implementation
0021     //
0022     ///////////////////////////////////////////////////////////////////////////
0023     template <typename A, typename B>
0024     inline intersection<A, B>
0025     operator&(parser<A> const& a, parser<B> const& b)
0026     {
0027         return intersection<A, B>(a.derived(), b.derived());
0028     }
0029     
0030     template <typename A>
0031     inline intersection<A, chlit<char> >
0032     operator&(parser<A> const& a, char b)
0033     {
0034         return intersection<A, chlit<char> >(a.derived(), b);
0035     }
0036     
0037     template <typename B>
0038     inline intersection<chlit<char>, B>
0039     operator&(char a, parser<B> const& b)
0040     {
0041         return intersection<chlit<char>, B>(a, b.derived());
0042     }
0043     
0044     template <typename A>
0045     inline intersection<A, strlit<char const*> >
0046     operator&(parser<A> const& a, char const* b)
0047     {
0048         return intersection<A, strlit<char const*> >(a.derived(), b);
0049     }
0050     
0051     template <typename B>
0052     inline intersection<strlit<char const*>, B>
0053     operator&(char const* a, parser<B> const& b)
0054     {
0055         return intersection<strlit<char const*>, B>(a, b.derived());
0056     }
0057     
0058     template <typename A>
0059     inline intersection<A, chlit<wchar_t> >
0060     operator&(parser<A> const& a, wchar_t b)
0061     {
0062         return intersection<A, chlit<wchar_t> >(a.derived(), b);
0063     }
0064     
0065     template <typename B>
0066     inline intersection<chlit<wchar_t>, B>
0067     operator&(wchar_t a, parser<B> const& b)
0068     {
0069         return intersection<chlit<wchar_t>, B>(a, b.derived());
0070     }
0071     
0072     template <typename A>
0073     inline intersection<A, strlit<wchar_t const*> >
0074     operator&(parser<A> const& a, wchar_t const* b)
0075     {
0076         return intersection<A, strlit<wchar_t const*> >(a.derived(), b);
0077     }
0078     
0079     template <typename B>
0080     inline intersection<strlit<wchar_t const*>, B>
0081     operator&(wchar_t const* a, parser<B> const& b)
0082     {
0083         return intersection<strlit<wchar_t const*>, B>(a, b.derived());
0084     }
0085 
0086 BOOST_SPIRIT_CLASSIC_NAMESPACE_END
0087 
0088 }} // namespace boost::spirit
0089 
0090 #endif