Michael Krasnyk
e2e8104864
Addition to fix #2356
...
Updated unit tests for the Hint parser and
added emplacement of empty hints.
2016-05-07 09:47:32 +02:00
Patrick Niklaus
1bb88b374e
Make hint values optional, fixes issue 2356
2016-05-04 15:24:48 +02:00
Michael Krasnyk
5186b9490d
Fix syntax error position indicators in parameters queries
...
To fix #2193 prefix_length member variable has been added to ParsedURL
that is set to the length of "/service/version/profile/" prefix
when the prefix is accepted by the parser.
Also BOOST_FUSION_ADAPT_STRUCT for osrm::server::api::ParsedURL
has been moved from header to url_parser.cpp to speed up compilation
of CUs that do not use the fusion adaption.
2016-04-27 19:52:23 +02:00
Michael Krasnyk
dac2f93383
Refactoring of parameter garammars
...
* signature changed from void() to void(engine::api::Parameters&)
* performance increase due to use "static const GrammarT" and avoid
construction and destruction of grammars during parsing
* removed code duplication in inherited grammars
* rule unlimited changed to qi::lit
* added rule size_t_
* parser accepts "&geometries=" and "&overview=" and fails at "foo"
instead of "&geometries=foo" and &overview=foo
* added expectations checks for derived grammars
* changed rules qi::list(".") to character rules '.'
2016-04-23 21:15:21 +02:00
Patrick Niklaus
82df0ca766
Fix parser tests and destinations=all / sources=all
2016-04-22 11:01:15 +02:00
Patrick Niklaus
589767fe6d
uturns -> continue_straight
2016-04-12 23:16:02 +02:00
Daniel J. Hofmann
d6407e5095
Fixes regression introduced in 8ff8dc.
...
References:
- 8ff8dc7200
2016-04-12 21:12:08 +02:00
Patrick Niklaus
8ff8dc7200
Try ulong_long, requires ifdef
2016-04-12 18:11:08 +02:00
Daniel J. Hofmann
8a2bd09fd0
Adapts all grammars to use expectation parsers without backtracking.
...
Sequence parsers using `>>` allow for backtracking, expectation parsers
`>` do not. This allows us to properly report the position where parsing
failed, by catching the expectation_failure exception and adapting the
iterator ourselves.
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2188
- https://github.com/Project-OSRM/osrm-backend/issues/2168
- http://www.boost.org/doc/libs/1_55_0/libs/spirit/doc/html/spirit/qi/reference/operator/expect.html
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
def89ac079
Conform to v5 spec and support "unlimited" as radiuses value.
...
Supersedes: https://github.com/Project-OSRM/osrm-backend/pull/2231
Thanks to Michael Krasnyk (@oxidase) for figuring out the reason for the
segfault earlier:
> https://github.com/Project-OSRM/osrm-backend/pull/2231#issuecomment-207114226
2016-04-08 21:03:50 +02:00
Michael Krasnyk
fe08726387
Fix BOOST_FUSION_ADAPT_STRUCT parameters for ParsedURL
...
Fix build error: macro "BOOST_FUSION_ADAPT_STRUCT" passed 5 arguments, but takes just 2
https://travis-ci.org/Project-OSRM/osrm-backend/builds/121406444
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
9bb4a68599
Fixes grammar includes and formats them
2016-04-08 21:03:50 +02:00
Michael Krasnyk
58ebadd7b3
Fix #2173 with a no_trailing_dot_policy
...
no_trailing_dot_policy rejects parsing exp, exp_n, nan, inf
and rejects parsing a fractional part if detects ".Fmt".
For Fmt = 'j', 's', 'o', 'n':
42.foo rule parses 42.
42.json rule parses 42
42..json rule parses 42.
Reference:
- https://github.com/Project-OSRM/osrm-backend/pull/2222#issuecomment-206206239
2016-04-08 21:03:50 +02:00
Michael Krasnyk
cae06ba2c1
Fix type "osrm::server::api::ParsedURL ()"
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
0274afa0f7
Allow 4.json and 4.3.json format; needs -lit(".") >> -lit("json") hack^Wworkaround
...
Rainer Deyke's workaround without the need to do ugly backtracking.
References:
- http://lists.boost.org/boost-users/2016/03/85960.php
- https://github.com/Project-OSRM/osrm-backend/issues/2173#issuecomment-204342785
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
d3dbca374d
Do not modify the end iterator for parameter parsing, too
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
6f0b6a8158
Re-factor URL parser: make grammar stateless
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
b25cd6aaf2
Moving from references is a bad idea in parameter parsers, too
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
891ff7dd80
Do not modify the end iterator, make const
2016-04-08 21:03:50 +02:00
Moritz Kobitzsch
dfd180a292
fixing unit tests
2016-04-08 11:21:14 +02:00
Daniel J. Hofmann
09931d7ad8
Removes server-side support for POST requests.
2016-04-05 22:59:14 +02:00
Patrick Niklaus
e10e8910f3
Use global uturns parameter.
...
Instead of previously per-via settings like uturns=true;false;true;; it
now only supports a global setting uturns=true.
2016-04-05 22:58:32 +02:00
Patrick Niklaus
5f457bff12
Rename alternative -> alternatives
2016-04-05 22:58:32 +02:00
Patrick Niklaus
a8fc95d4e4
Move bearing to public namespace
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7c30ea32bf
Runs scripts/format.sh
2016-04-05 22:58:32 +02:00
Patrick Niklaus
58fb633df3
Add support for tile plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
804816f014
Fix table parameter parsing
2016-04-05 22:58:32 +02:00
Patrick Niklaus
d9d4742130
First round of lat,lng -> lng,lat switcheroo
2016-04-05 22:58:32 +02:00
Patrick Niklaus
14c36bc405
Finish the nearest plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
8378d95588
Add trip plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
b34f9b1795
Hook up map matching
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
4d20dea271
Service skeletons for nearest, trip, match
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
c59647ad2f
Fix grammar constraint and enable all plugin links
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
e466cbe0ce
Plugin grammar skeletons
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
a24de2d22a
Enforce parameter and grammar type to catch subtle bugs
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
f452a3025d
Link parameters to grammars
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
3c58eaf49f
Require a BaseParameters type at compile time via enable_if
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7bec75b709
Semantic action handler requires passing optional by value and fusion::vector2
2016-04-05 22:58:32 +02:00
Patrick Niklaus
56ea24b03b
Add tests for bearing parsing
2016-04-05 22:58:32 +02:00
Patrick Niklaus
277829c280
Add table service
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
c895848061
Optional<T> semantic action handler takes T argument
2016-04-05 22:58:32 +02:00
Patrick Niklaus
64e5ebb55f
Fix parameter parsing tests
2016-04-05 22:58:32 +02:00
Patrick Niklaus
f3e72623e9
Add viaroute suport for new API
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
b1c84b598f
Print the _local_ endpoint Boost ASIO assigns a port to, fixes #2097
2016-03-18 12:09:28 +01:00
Patrick Niklaus
0eaa393065
Limit tile zoomlevel to 12+
2016-03-02 19:59:49 +01:00
Daniel Patterson
6d749777fc
Using bind<T> in this case causes ambiguity with GCC 5.2.1 (see http://www.boost.org/doc/libs/develop/libs/bind/doc/html/bind.html#bind.faq.Q_forms ). Remove template and let the type be deduced automatically.
2016-03-02 09:54:08 -08:00
Daniel J. Hofmann
aeee565115
Formats all the files we touch..
2016-03-01 23:51:25 +01:00
Daniel Patterson
5dc7b79bb6
Implements a vector tileserver so you can see what's going on inside
...
OSRM.
2016-03-01 23:51:25 +01:00
Patrick Niklaus
a0b4fcc05a
Remove last bits of GPX support code
2016-03-01 23:44:07 +01:00
karenzshea
f5c12ec433
comments
2016-01-29 23:49:09 +01:00