123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402 |
- /*=============================================================================
- 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>
|