diff --git a/include/mapnik/json/json_grammar_config.hpp b/include/mapnik/json/json_grammar_config.hpp index b6fba2962..b00c4d73f 100644 --- a/include/mapnik/json/json_grammar_config.hpp +++ b/include/mapnik/json/json_grammar_config.hpp @@ -60,9 +60,6 @@ constexpr char const* wkn_to_string(well_known_names val) } } -struct keys_tag; -struct transcoder_tag; -struct feature_tag; using keys_map = boost::bimap, boost::bimaps::set_of>; @@ -82,21 +79,42 @@ inline keys_map get_keys() namespace grammar { +struct keys_tag; +struct transcoder_tag; +struct feature_tag; + namespace x3 = boost::spirit::x3; using space_type = x3::standard::space_type; using iterator_type = char const*; + +using phrase_parse_context_type = x3::phrase_parse_context::type; using context_type = x3::with_context const, - x3::phrase_parse_context::type>::type; + phrase_parse_context_type>::type; using geometry_context_type = x3::with_context const, - x3::phrase_parse_context::type>::type; + phrase_parse_context_type>::type; using feature_context_type = x3::with_context const, geometry_context_type>::type; +// our spirit x3 grammars needs this one with changed order of feature_impl and transcoder (??) +using feature_context_const_type = x3::with_context const, + x3::with_context const, + phrase_parse_context_type>::type>::type; + +// helper macro +#define BOOST_SPIRIT_INSTANTIATE_UNUSED(rule_type, Iterator, Context) \ + template bool parse_rule( \ + rule_type rule_ \ + , Iterator& first, Iterator const& last \ + , Context const& context, boost::spirit::x3::unused_type const& ); \ + /***/ + }}} #endif // MAPNIK_JSON_GRAMMAR_CONFIG_HPP