From 093051690f7ecc9b56ff52dbaca915516fc41dee Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Thu, 7 Mar 2013 14:13:02 +0100 Subject: [PATCH 1/2] Simplify context demo. --- libs/spirit/workbench/context.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/spirit/workbench/context.cpp b/libs/spirit/workbench/context.cpp index 5c0905a972..c52b9a55ba 100644 --- a/libs/spirit/workbench/context.cpp +++ b/libs/spirit/workbench/context.cpp @@ -4,10 +4,9 @@ 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) =============================================================================*/ -#include +#include #include -using boost::spirit::context; using boost::spirit::make_context; using boost::spirit::get; From af423eda0055699827b4653f7d0b993f97a4b58d Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Thu, 7 Mar 2013 14:13:48 +0100 Subject: [PATCH 2/2] get_info support for x3::symbols. --- boost/spirit/home/x3/string/symbols.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boost/spirit/home/x3/string/symbols.hpp b/boost/spirit/home/x3/string/symbols.hpp index ace633b807..9afda9ac10 100644 --- a/boost/spirit/home/x3/string/symbols.hpp +++ b/boost/spirit/home/x3/string/symbols.hpp @@ -307,6 +307,18 @@ namespace boost { namespace spirit { namespace x3 shared_ptr lookup; std::string name_; }; + + template + struct get_info> + { + typedef std::string result_type; + result_type operator()(symbols< Char, T + , Lookup, Filter + > const& symbols) const + { + return symbols.name(); + } + }; }}} #if defined(BOOST_MSVC)