Boost logo

Boost :

Subject: Re: [boost] Requesting a review of Metaparse
From: Abel Sinkovics (abel_at_[hidden])
Date: 2012-01-30 02:22:34


Hi Akira,

> I prefer Sprout.Weed as a compile-time syntax analysis library.
> https://github.com/bolero-MURAKAMI/Sprout/tree/master/sprout/weed
>
> Sprout.Weed support Boost.Spirit.Qi like syntax.
> Genya Murakami is an author, seems to be willing to propose to Boost.
> http://thread.gmane.org/gmane.comp.lib.boost.devel/227096/focus=227134
>
> If you think about this library?

I've seen this library. It parses using constexpr, while Metaparse uses
template metaprograms. I can't see how one could do the following using
constexpr:

- generate template metafunction classes as the result of parsing that
are immediately callable (build a DSL for metaprograms)
- printf argument verification (by parsing the format string) at
compile-time
- create types as the result of parsing

One of the examples of Metaparse (constexpr_parser) demonstrates how to
combine a parser based on constexpr functions with ones based on
template metaprogramming. It is a parser for an "a* b* a*" grammar and
parses the "a*" parts using metaprograms and the "b*" parts using
constexpr functions.

The documentation of Metaparse describes the difference as well
(http://abel.web.elte.hu/metaparse/metaparse/manual.html#_parsing_based_on_tt_constexpr_tt).

Regards,
   Abel


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