sequential_and.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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/
  6. Distributed under the Boost Software License, Version 1.0. (See accompanying
  7. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. =============================================================================*/
  9. #if !defined(BOOST_SPIRIT_SEQUENTIAL_AND_HPP)
  10. #define BOOST_SPIRIT_SEQUENTIAL_AND_HPP
  11. #include <boost/spirit/home/classic/namespace.hpp>
  12. #include <boost/spirit/home/classic/core/parser.hpp>
  13. #include <boost/spirit/home/classic/core/primitives/primitives.hpp>
  14. #include <boost/spirit/home/classic/core/composite/composite.hpp>
  15. #include <boost/spirit/home/classic/meta/as_parser.hpp>
  16. namespace boost { namespace spirit {
  17. BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
  18. ///////////////////////////////////////////////////////////////////////////
  19. //
  20. // sequential-and operators
  21. //
  22. // Handles expressions of the form:
  23. //
  24. // a && b
  25. //
  26. // Same as a >> b.
  27. //
  28. ///////////////////////////////////////////////////////////////////////////
  29. template <typename A, typename B>
  30. sequence<A, B>
  31. operator&&(parser<A> const& a, parser<B> const& b);
  32. template <typename A>
  33. sequence<A, chlit<char> >
  34. operator&&(parser<A> const& a, char b);
  35. template <typename B>
  36. sequence<chlit<char>, B>
  37. operator&&(char a, parser<B> const& b);
  38. template <typename A>
  39. sequence<A, strlit<char const*> >
  40. operator&&(parser<A> const& a, char const* b);
  41. template <typename B>
  42. sequence<strlit<char const*>, B>
  43. operator&&(char const* a, parser<B> const& b);
  44. template <typename A>
  45. sequence<A, chlit<wchar_t> >
  46. operator&&(parser<A> const& a, wchar_t b);
  47. template <typename B>
  48. sequence<chlit<wchar_t>, B>
  49. operator&&(wchar_t a, parser<B> const& b);
  50. template <typename A>
  51. sequence<A, strlit<wchar_t const*> >
  52. operator&&(parser<A> const& a, wchar_t const* b);
  53. template <typename B>
  54. sequence<strlit<wchar_t const*>, B>
  55. operator&&(wchar_t const* a, parser<B> const& b);
  56. BOOST_SPIRIT_CLASSIC_NAMESPACE_END
  57. }} // namespace BOOST_SPIRIT_CLASSIC_NS
  58. #endif
  59. #include <boost/spirit/home/classic/core/composite/impl/sequential_and.ipp>