
16 Jan
2012
16 Jan
'12
9:03 p.m.
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/conste... 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