/*============================================================================= 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 #include /////////////////////////////////////////////////////////////////////////////// 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 chset operator~(chset const& a); ////////////////////////////////// template chset operator|(chset const& a, chset const& b); ////////////////////////////////// template chset operator&(chset const& a, chset const& b); ////////////////////////////////// template chset operator-(chset const& a, chset const& b); ////////////////////////////////// template chset operator^(chset const& a, chset 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 chset operator|(chset const& a, range const& b); ////////////////////////////////// template chset operator&(chset const& a, range const& b); ////////////////////////////////// template chset operator-(chset const& a, range const& b); ////////////////////////////////// template chset operator^(chset const& a, range const& b); ////////////////////////////////// template chset operator|(range const& a, chset const& b); ////////////////////////////////// template chset operator&(range const& a, chset const& b); ////////////////////////////////// template chset operator-(range const& a, chset const& b); ////////////////////////////////// template chset operator^(range const& a, chset 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 chset operator|(chset const& a, chlit const& b); ////////////////////////////////// template chset operator&(chset const& a, chlit const& b); ////////////////////////////////// template chset operator-(chset const& a, chlit const& b); ////////////////////////////////// template chset operator^(chset const& a, chlit const& b); ////////////////////////////////// template chset operator|(chlit const& a, chset const& b); ////////////////////////////////// template chset operator&(chlit const& a, chset const& b); ////////////////////////////////// template chset operator-(chlit const& a, chset const& b); ////////////////////////////////// template chset operator^(chlit const& a, chset const& b); /////////////////////////////////////////////////////////////////////////////// // // negated_char_parser <--> 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 chset operator|(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator&(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator-(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator^(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator|(negated_char_parser > const& a, chset const& b); ////////////////////////////////// template chset operator&(negated_char_parser > const& a, chset const& b); ////////////////////////////////// template chset operator-(negated_char_parser > const& a, chset const& b); ////////////////////////////////// template chset operator^(negated_char_parser > const& a, chset const& b); /////////////////////////////////////////////////////////////////////////////// // // negated_char_parser <--> 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 chset operator|(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator&(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator-(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator^(chset const& a, negated_char_parser > const& b); ////////////////////////////////// template chset operator|(negated_char_parser > const& a, chset const& b); ////////////////////////////////// template chset operator&(negated_char_parser > const& a, chset const& b); ////////////////////////////////// template chset operator-(negated_char_parser > const& a, chset const& b); ////////////////////////////////// template chset operator^(negated_char_parser > const& a, chset 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 chset operator|(chset const& a, CharT b); ////////////////////////////////// template chset operator&(chset const& a, CharT b); ////////////////////////////////// template chset operator-(chset const& a, CharT b); ////////////////////////////////// template chset operator^(chset const& a, CharT b); ////////////////////////////////// template chset operator|(CharT a, chset const& b); ////////////////////////////////// template chset operator&(CharT a, chset const& b); ////////////////////////////////// template chset operator-(CharT a, chset const& b); ////////////////////////////////// template chset operator^(CharT a, chset 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 chset operator|(chset const& a, anychar_parser b); ////////////////////////////////// template chset operator&(chset const& a, anychar_parser b); ////////////////////////////////// template chset operator-(chset const& a, anychar_parser b); ////////////////////////////////// template chset operator^(chset const& a, anychar_parser b); ////////////////////////////////// template chset operator|(anychar_parser a, chset const& b); ////////////////////////////////// template chset operator&(anychar_parser a, chset const& b); ////////////////////////////////// template chset operator-(anychar_parser a, chset const& b); ////////////////////////////////// template chset operator^(anychar_parser a, chset 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 chset operator|(chset const& a, nothing_parser b); ////////////////////////////////// template chset operator&(chset const& a, nothing_parser b); ////////////////////////////////// template chset operator-(chset const& a, nothing_parser b); ////////////////////////////////// template chset operator^(chset const& a, nothing_parser b); ////////////////////////////////// template chset operator|(nothing_parser a, chset const& b); ////////////////////////////////// template chset operator&(nothing_parser a, chset const& b); ////////////////////////////////// template chset operator-(nothing_parser a, chset const& b); ////////////////////////////////// template chset operator^(nothing_parser a, chset const& b); /////////////////////////////////////////////////////////////////////////////// BOOST_SPIRIT_CLASSIC_NAMESPACE_END }} // namespace BOOST_SPIRIT_CLASSIC_NS #endif #include