make uturn parameter optional

This commit is contained in:
Dennis Luxen 2014-07-16 13:01:25 +02:00
parent ee1fdca52e
commit 6156bf0f9d

View File

@ -39,7 +39,7 @@ struct APIGrammar : qi::grammar<Iterator>
{ {
explicit APIGrammar(HandlerT * h) : APIGrammar::base_type(api_call), handler(h) explicit APIGrammar(HandlerT * h) : APIGrammar::base_type(api_call), handler(h)
{ {
api_call = qi::lit('/') >> string[boost::bind(&HandlerT::setService, handler, ::_1)] >> *(query) >> +(uturns); api_call = qi::lit('/') >> string[boost::bind(&HandlerT::setService, handler, ::_1)] >> *(query) >> -(uturns);
query = ('?') >> (+(zoom | output | jsonp | checksum | location | hint | u | cmp | language | instruction | geometry | alt_route | old_API)); query = ('?') >> (+(zoom | output | jsonp | checksum | location | hint | u | cmp | language | instruction | geometry | alt_route | old_API));
zoom = (-qi::lit('&')) >> qi::lit('z') >> '=' >> qi::short_[boost::bind(&HandlerT::setZoomLevel, handler, ::_1)]; zoom = (-qi::lit('&')) >> qi::lit('z') >> '=' >> qi::short_[boost::bind(&HandlerT::setZoomLevel, handler, ::_1)];