Lexer and parser generators using CTFE
dlang.coder at gmail.com
Tue Feb 28 18:13:38 PST 2012
> > 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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Digitalmars-d