Hi, On 2013-11-11 21:59, Christof Donat wrote:
The downside is, that metaparse has a configurable maximum string length and increasing it also increases compile times. I am not sure, weather it would be possible to have reasonable compile times with SQL strings as they exist in real world applications. If it turns out to be too slow, a constexpr/template metaprogram combined approach might help. For example constexpr functions could be used to tokenise the input. There is an example showing that constexpr and metaprogram parsers can be combined:
https://github.com/sabel83/mpllibs/tree/master/libs/metaparse/example/conste... It parses "a*b*a*", where the "a*" parts are parsed with metaprograms while the "b*" parts are parsed with constexpr. Regards, Ábel