diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-01-04 19:42:37 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2013-04-06 13:36:54 (GMT) |
commit | 3333ab69d62d1be7ae7dd7a4e56cc4bb608d3add (patch) | |
tree | 5ee630b666ae21dd4c4202703c158383de1faf91 /3rdParty/Boost/src/boost/spirit/home/classic/utility/chset_operators.hpp | |
parent | b9ef4566d31219d66a615b1eae042a01828c8b7d (diff) | |
download | swift-3333ab69d62d1be7ae7dd7a4e56cc4bb608d3add.zip swift-3333ab69d62d1be7ae7dd7a4e56cc4bb608d3add.tar.bz2 |
Add boost serialization library
We'll need it before too long
Change-Id: Ia34c7f26e1aedbc13a2fc10c980994cbcb7cb348
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/classic/utility/chset_operators.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/spirit/home/classic/utility/chset_operators.hpp | 402 |
1 files changed, 402 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/classic/utility/chset_operators.hpp b/3rdParty/Boost/src/boost/spirit/home/classic/utility/chset_operators.hpp new file mode 100644 index 0000000..d42b5fa --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/classic/utility/chset_operators.hpp @@ -0,0 +1,402 @@ +/*============================================================================= + Copyright (c) 2001-2003 Joel de Guzman + Copyright (c) 2001-2003 Daniel Nuffer + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef BOOST_SPIRIT_CHSET_OPERATORS_HPP +#define BOOST_SPIRIT_CHSET_OPERATORS_HPP + +/////////////////////////////////////////////////////////////////////////////// +#include <boost/spirit/home/classic/namespace.hpp> +#include <boost/spirit/home/classic/utility/chset.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { + +BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// +// chset free operators +// +// Where a and b are both chsets, implements: +// +// a | b, a & b, a - b, a ^ b +// +// Where a is a chset, implements: +// +// ~a +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator~(chset<CharT> const& a); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// range <--> chset free operators +// +// Where a is a chset and b is a range, and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, range<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, range<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, range<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, range<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(range<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(range<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(range<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(range<CharT> const& a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// chlit <--> chset free operators +// +// Where a is a chset and b is a chlit, and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, chlit<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, chlit<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, chlit<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, chlit<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chlit<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chlit<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chlit<CharT> const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chlit<CharT> const& a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// negated_char_parser<range> <--> chset free operators +// +// Where a is a chset and b is a range, and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, negated_char_parser<range<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, negated_char_parser<range<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, negated_char_parser<range<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, negated_char_parser<range<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(negated_char_parser<range<CharT> > const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(negated_char_parser<range<CharT> > const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(negated_char_parser<range<CharT> > const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(negated_char_parser<range<CharT> > const& a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// negated_char_parser<chlit> <--> chset free operators +// +// Where a is a chset and b is a chlit, and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, negated_char_parser<chlit<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, negated_char_parser<chlit<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, negated_char_parser<chlit<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, negated_char_parser<chlit<CharT> > const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(negated_char_parser<chlit<CharT> > const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(negated_char_parser<chlit<CharT> > const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(negated_char_parser<chlit<CharT> > const& a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(negated_char_parser<chlit<CharT> > const& a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// literal primitives <--> chset free operators +// +// Where a is a chset and b is a literal primitive, +// and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, CharT b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, CharT b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, CharT b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, CharT b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(CharT a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(CharT a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(CharT a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(CharT a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// anychar_parser <--> chset free operators +// +// Where a is chset and b is a anychar_parser, and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, anychar_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, anychar_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, anychar_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, anychar_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(anychar_parser a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(anychar_parser a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(anychar_parser a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(anychar_parser a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +// +// nothing_parser <--> chset free operators +// +// Where a is chset and b is nothing_parser, and vice-versa, implements: +// +// a | b, a & b, a - b, a ^ b +// +/////////////////////////////////////////////////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(chset<CharT> const& a, nothing_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(chset<CharT> const& a, nothing_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(chset<CharT> const& a, nothing_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(chset<CharT> const& a, nothing_parser b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator|(nothing_parser a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator&(nothing_parser a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator-(nothing_parser a, chset<CharT> const& b); + +////////////////////////////////// +template <typename CharT> +chset<CharT> +operator^(nothing_parser a, chset<CharT> const& b); + +/////////////////////////////////////////////////////////////////////////////// +BOOST_SPIRIT_CLASSIC_NAMESPACE_END + +}} // namespace BOOST_SPIRIT_CLASSIC_NS + +#endif + +#include <boost/spirit/home/classic/utility/impl/chset_operators.ipp> |