Remus
Dmitry Olshansky
dmitry.olsh at gmail.com
Tue Oct 30 15:00:08 PDT 2012
10/30/2012 8:09 AM, Philippe Sigaud пишет:
>> 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.
>
Cool. Reminds myself that I need to find some more time to play with it
(and the source).
--
Dmitry Olshansky
More information about the Digitalmars-d-announce
mailing list