> > > > On Wednesday, February 29, 2012 02:16:12 Christopher Bergqvist wrote: > > > I agree that the current direction of D in this area is impressive. > > > However, I fail to see a killer-feature in generating a lexer-parser > > > generator at compile-time instead of run-time. > > > >
CTFE parsing is especially useful for DSEL (Domain Specific Embedded Languages) or internal DSLs. The advantages are: 1. Syntactic errors (in the parsed constructs) are given out at compile time. 2. D reflections are available only at compile time. Referencing the variables/identifiers in the parsed subset of DSL with the mainstream D code is impossible without reflections in place. Regards - Puneet