in_state.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2001-2011 Hartmut Kaiser
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #if !defined(BOOST_SPIRIT_LEX_IN_STATE_OCT_09_2007_0748PM)
  6. #define BOOST_SPIRIT_LEX_IN_STATE_OCT_09_2007_0748PM
  7. #if defined(_MSC_VER)
  8. #pragma once
  9. #endif
  10. #include <boost/proto/core.hpp>
  11. ///////////////////////////////////////////////////////////////////////////////
  12. namespace boost { namespace spirit { namespace qi
  13. {
  14. ///////////////////////////////////////////////////////////////////////////
  15. // The following is a helper template allowing to use the in_state()[] as
  16. // a skip parser
  17. ///////////////////////////////////////////////////////////////////////////
  18. template <typename Skipper, typename String = char const*>
  19. struct in_state_skipper
  20. : proto::subscript<
  21. typename proto::terminal<
  22. terminal_ex<tag::in_state, fusion::vector1<String> >
  23. >::type
  24. , Skipper
  25. >::type {};
  26. }}}
  27. #endif