Remus

Philippe Sigaud philippe.sigaud at gmail.com
Tue Oct 30 01:09:46 PDT 2012


> It would be really awesome if you could play around with making the AST
> available during compilation so we can alter it using ctfe.

I have a compile-time parser and code generator project here:

https://github.com/PhilippeSigaud/Pegged

We are adding a D grammar in there and there is a compile-time D
parser (some current transatlantic cable problem make github act
erratically from Europe, but it's transitory).
Pegged gives you a compile-time parse tree, which can then be
manipulated with CTFE and transformed back into other code (the last
part is not implemented for D specifically, but I have other
tree-transformation function and they work alright at compile-time.

Next step (2013?) would be to have a working macro system for D.

Philippe


More information about the Digitalmars-d-announce mailing list