/usr/include/boost/spirit/home/qi/detail
Edit: /usr/include/boost/spirit/home/qi/detail/parse_auto.hpp (4087B)
/*=============================================================================
Copyright (c) 2001-2011 Hartmut Kaiser
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)
=============================================================================*/
#if !defined(BOOST_SPIRIT_DETAIL_PARSE_AUTO_DEC_02_2009_0426PM)
#define BOOST_SPIRIT_DETAIL_PARSE_AUTO_DEC_02_2009_0426PM
#if defined(_MSC_VER)
#pragma once
#endif
#include
#include
#include
#include
#include
namespace boost { namespace spirit { namespace qi { namespace detail
{
///////////////////////////////////////////////////////////////////////////
template
struct parse_impl
, mpl::not_ > >
>::type>
{
template
static bool call(Iterator& first, Iterator last, Expr& expr)
{
return qi::parse(first, last, create_parser(), expr);
}
template
static bool call(Iterator& first, Iterator last, Expr const& expr)
{
return qi::parse(first, last, create_parser()
, const_cast(expr));
}
};
///////////////////////////////////////////////////////////////////////////
template
struct phrase_parse_impl
, mpl::not_ > >
>::type>
{
template
static bool call(Iterator& first, Iterator last, Expr& expr
, Skipper const& skipper, BOOST_SCOPED_ENUM(skip_flag) post_skip)
{
return qi::phrase_parse(first, last, create_parser()
, skipper, post_skip, expr);
}
template
static bool call(Iterator& first, Iterator last, Expr const& expr
, Skipper const& skipper, BOOST_SCOPED_ENUM(skip_flag) post_skip)
{
return qi::phrase_parse(first, last, create_parser()
, skipper, post_skip, const_cast(expr));
}
};
}}}}
namespace boost { namespace spirit { namespace qi
{
///////////////////////////////////////////////////////////////////////////
template
inline bool
parse(
Iterator& first
, Iterator last
, Expr& expr)
{
// Make sure the iterator is at least a forward_iterator. If you got a
// compilation error here, then you are using an input_iterator while
// calling this function, you need to supply at least a
// forward_iterator instead.
BOOST_CONCEPT_ASSERT((ForwardIterator));
return detail::parse_impl::call(first, last, expr);
}
///////////////////////////////////////////////////////////////////////////
template
inline bool
phrase_parse(
Iterator& first
, Iterator last
, Expr& expr
, Skipper const& skipper
, BOOST_SCOPED_ENUM(skip_flag) post_skip = skip_flag::postskip)
{
// Make sure the iterator is at least a forward_iterator. If you got a
// compilation error here, then you are using an input_iterator while
// calling this function, you need to supply at least a
// forward_iterator instead.
BOOST_CONCEPT_ASSERT((ForwardIterator));
return detail::phrase_parse_impl::call(
first, last, expr, skipper, post_skip);
}
}}}
#endif