Boost logo

Boost :

From: Christian Mazakas (christian.mazakas_at_[hidden])
Date: 2020-01-22 01:24:30


It's also worth mentioning, there are alternative URL parser
implementations available.

For example, here's Furi:
https://github.com/LeonineKing1199/furi

It's in essence of a port of the URI ABNF written in Boost.Spirit, more
specifically X3. There's also routines for percent encoding and decoding.

Instead of the proposed Boost.URL, this lib aims to be low-level but
composable. Because the entire ABNF set is exported, one could
theoretically re-compose a parser that'd handle any scenario.

The emphasis is on immutability and functional style of programming. The
main structure that users will interact with is really just a POD of
`std::string_view`s and parser combinators themselves are also very
FP-oriented.

Less than desirable aspects of the lib are that it only does Unicode in
UTF-32 but does give you easy methods of converting to it. This was done
for the sake of simplicity and also because that's how X3 does it.
Fortunately, most URLs are relatively small in practice so the storage
overhead is affordable in most scenarios.

The best way of verifying the parser are the various uri and uri_parts
tests. If you can think of a URL that'd break it, I'd love to try it! If
it's ABNF-correct, Furi will recognize it too!

- Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk