1 /*=============================================================================
2 Copyright (c) 2001-2014 Joel de Guzman
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_X3_CALC7_ERROR_HANDLER_HPP)
8 #define BOOST_SPIRIT_X3_CALC7_ERROR_HANDLER_HPP
10 #include <boost/spirit/home/x3.hpp>
12 namespace client { namespace calculator_grammar
14 ////////////////////////////////////////////////////////////////////////////
16 ////////////////////////////////////////////////////////////////////////////
17 namespace x3 = boost::spirit::x3;
22 template <typename Iterator, typename Exception, typename Context>
23 x3::error_handler_result
24 on_error(Iterator&, Iterator const& last, Exception const& x, Context const& context)
27 << "Error! Expecting: "
30 << std::string(x.where(), last)
34 return x3::error_handler_result::fail;