|
Boost : |
Subject: Re: [boost] compile time parser generator
From: Ábel Sinkovics (abel_at_[hidden])
Date: 2012-01-16 16:03:56
Hi,
It looks like constexpr-based compile-time parsers can be integrated
into TMP-based ones (like Metaparse). I've created an example parser
parsing a*b*a* in a way that the a* parts are parsed using TMP while b*
in the middle is parsed using a constexpr function. Here is the code:
https://github.com/sabel83/mpllibs/tree/master/libs/metaparse/example/constexpr_parser
Parsers based on constexpr can return values only while parsers based on
TMP can return types (typelists, metafunction classes, etc). Based on
the above example parts of the TMP-based parsers could be implemented
using constexpr - a lexer for example? (just an idea)
Regards,
Ábel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk