Subject: Re: [boost] compile time parser generator
From: MURAKAMI Genya (bolero.murakami+cpp_at_[hidden])
Date: 2012-01-08 09:01:16
2012/1/7 Martin Bidlingmaier <Martin.Bidlingmaier_at_[hidden]>:
> with c++11's constexpr it got possible to parse strings in c++ at compile time. I've written a parser generator to create an AST for a given EBNF syntax at compile time, which can be traversed at both run time and compile time (actually, parsing can take place at run time, too, but it's probably rather slow). At the moment, the only compiler I know of that implements enough of c++11 features is gcc (version >= 4.6). Is refining my implementation worth the effort, has such a library a chance to make it into boost? Is maybe somebody already working on this?
I also working on library for constexpr based parsing (the parser combinators).
It's undocumented, but you can browse the source here.
Example: UUID string parsing
This is currently not building AST, has been designed to retrieve data
from a string.
Interface has to resemble the Spirit.Qi, can be described as pseudo EBNF.
If constexpr based parser combinators libraries (such as Spirit.Qi)
when they are added to the Boost, I think need more discussion to be
done about constexpr based design:
(The design of the string class, and ExpressionTemplate, etc...)
I'm not a native speaker, So I apologize if this is hard to read.