From 7a1cc786fca999bdcfe9a56530da65b191a7833a Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 23 Sep 2014 15:12:22 +0100 Subject: [PATCH] position_grammar - re-order rules to allow expectation operators --- include/mapnik/json/positions_grammar_impl.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mapnik/json/positions_grammar_impl.hpp b/include/mapnik/json/positions_grammar_impl.hpp index 0c1a5b789..d90843c0d 100644 --- a/include/mapnik/json/positions_grammar_impl.hpp +++ b/include/mapnik/json/positions_grammar_impl.hpp @@ -49,15 +49,15 @@ positions_grammar::positions_grammar() using qi::fail; using qi::on_error; - coords = pos[set_position(_val,_1)] | ring[_val = _1] | rings [_val = _1] | rings_array[_val = _1] + coords = rings_array[_val = _1] | rings [_val = _1] | ring[_val = _1] | pos[set_position(_val,_1)] ; - pos = lit('[') >> -(double_ >> lit(',') >> double_) >> omit[*(lit(',') >> double_)] >> lit(']') + pos = lit('[') > -(double_ > lit(',') > double_) > omit[*(lit(',') > double_)] > lit(']') ; - ring = lit('[') >> pos[push_position(_val,_1)] % lit(',') >> lit(']') + ring = lit('[') >> pos[push_position(_val,_1)] % lit(',') > lit(']') ; - rings = lit('[') >> ring % lit(',') >> lit(']') + rings = lit('[') >> ring % lit(',') > lit(']') ; - rings_array = lit('[') >> rings % lit(',') >> lit(']') + rings_array = lit('[') >> rings % lit(',') > lit(']') ; coords.name("Coordinates"); pos.name("Position");