1 /*=============================================================================
2 Copyright (c) 1998-2003 Joel de Guzman
3 Copyright (c) 2001 Daniel Nuffer
4 Copyright (c) 2002 Hartmut Kaiser
5 http://spirit.sourceforge.net/
7 Use, modification and distribution is subject to the Boost Software
8 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9 http://www.boost.org/LICENSE_1_0.txt)
10 =============================================================================*/
11 #if !defined(BOOST_SPIRIT_SEQUENTIAL_AND_IPP)
12 #define BOOST_SPIRIT_SEQUENTIAL_AND_IPP
14 namespace boost { namespace spirit {
16 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
18 ///////////////////////////////////////////////////////////////////////////
20 // sequential-and operators implementation
22 ///////////////////////////////////////////////////////////////////////////
23 template <typename A, typename B>
25 operator&&(parser<A> const& a, parser<B> const& b)
27 return sequence<A, B>(a.derived(), b.derived());
31 inline sequence<A, chlit<char> >
32 operator&&(parser<A> const& a, char b)
34 return sequence<A, chlit<char> >(a.derived(), b);
38 inline sequence<chlit<char>, B>
39 operator&&(char a, parser<B> const& b)
41 return sequence<chlit<char>, B>(a, b.derived());
45 inline sequence<A, strlit<char const*> >
46 operator&&(parser<A> const& a, char const* b)
48 return sequence<A, strlit<char const*> >(a.derived(), b);
52 inline sequence<strlit<char const*>, B>
53 operator&&(char const* a, parser<B> const& b)
55 return sequence<strlit<char const*>, B>(a, b.derived());
59 inline sequence<A, chlit<wchar_t> >
60 operator&&(parser<A> const& a, wchar_t b)
62 return sequence<A, chlit<wchar_t> >(a.derived(), b);
66 inline sequence<chlit<wchar_t>, B>
67 operator&&(wchar_t a, parser<B> const& b)
69 return sequence<chlit<wchar_t>, B>(a, b.derived());
73 inline sequence<A, strlit<wchar_t const*> >
74 operator&&(parser<A> const& a, wchar_t const* b)
76 return sequence<A, strlit<wchar_t const*> >(a.derived(), b);
80 inline sequence<strlit<wchar_t const*>, B>
81 operator&&(wchar_t const* a, parser<B> const& b)
83 return sequence<strlit<wchar_t const*>, B>(a, b.derived());
86 BOOST_SPIRIT_CLASSIC_NAMESPACE_END
88 }} // namespace boost::spirit
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams