typeof.hpp 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*=============================================================================
  2. Copyright (c) 2006 Tobias Schwinger
  3. http://spirit.sourceforge.net/
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. =============================================================================*/
  7. #if !defined(BOOST_SPIRIT_DYNAMIC_TYPEOF_HPP)
  8. #define BOOST_SPIRIT_DYNAMIC_TYPEOF_HPP
  9. #include <boost/typeof/typeof.hpp>
  10. #include <boost/spirit/home/classic/namespace.hpp>
  11. #include <boost/spirit/home/classic/core/typeof.hpp>
  12. #include <boost/spirit/home/classic/dynamic/stored_rule_fwd.hpp>
  13. namespace boost { namespace spirit {
  14. BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
  15. // if.hpp
  16. template <class ParsableT, typename CondT> struct if_parser;
  17. template <class ParsableTrueT, class ParsableFalseT, typename CondT>
  18. struct if_else_parser;
  19. // for.hpp
  20. namespace impl {
  21. template<typename InitF, typename CondT, typename StepF, class ParsableT>
  22. struct for_parser;
  23. }
  24. // while.hpp
  25. template<typename ParsableT, typename CondT, bool is_do_parser>
  26. struct while_parser;
  27. // lazy.hpp
  28. template<typename ActorT> struct lazy_parser;
  29. // rule_alias.hpp
  30. template <typename ParserT> class rule_alias;
  31. // switch.hpp
  32. template <typename CaseT, typename CondT> struct switch_parser;
  33. template <int N, class ParserT, bool IsDefault> struct case_parser;
  34. // select.hpp
  35. template <typename TupleT, typename BehaviourT, typename T>
  36. struct select_parser;
  37. BOOST_SPIRIT_CLASSIC_NAMESPACE_END
  38. }} // namespace BOOST_SPIRIT_CLASSIC_NS
  39. #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
  40. // if.hpp
  41. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::if_parser,2)
  42. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::if_else_parser,3)
  43. // for.hpp
  44. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::impl::for_parser,4)
  45. // while.hpp
  46. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::while_parser,(class)(class)(bool))
  47. // lazy.hpp
  48. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::lazy_parser,1)
  49. // stored_rule.hpp (has forward header)
  50. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::stored_rule,(typename)(typename)(typename)(bool))
  51. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::stored_rule,3)
  52. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::stored_rule,2)
  53. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::stored_rule,1)
  54. BOOST_TYPEOF_REGISTER_TYPE(BOOST_SPIRIT_CLASSIC_NS::stored_rule<>)
  55. // rule_alias.hpp
  56. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::rule_alias,1)
  57. // switch.hpp
  58. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::switch_parser,2)
  59. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::case_parser,(int)(class)(bool))
  60. // select.hpp
  61. BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::select_parser,3)
  62. #endif