Compile Time D Expression Parser?

kenji hara at
Sun Feb 26 03:07:42 PST 2012

Hisayuki Mima's ctpg is compile-time parser generater, and the
generated parser works in compile time!

Kenji Hara

2012/2/26 d coder <dlang.coder at>:
>> How different is what you want to do from CTFE?
> I do not want to evaluate the expression in the string at compile time. I
> want to parse it at compile time and later at run time, I am required to
> process the parse tree and evaluate it in a different fashion (using binary
> decision diagrams).
> In summary, I need CTFE to parse the expression and create a parse tree from
> it. I think this requires a string mixin that takes the expression string as
> input and outputs code that builds the corresponding parse tree.
> Regards
> - Puneet

More information about the Digitalmars-d mailing list