Lexer and parser generators using CTFE
bncrbme at jadamspam.pl
Tue Feb 28 17:30:56 PST 2012
Jonathan M Davis wrote:
> 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
>> A run-time generator would benefit from not having to execute
>> within the limited CTFE environment and would always be on-par in
>> that respect. A compile time generator would internalize the
>> generation and compilation of the result (with possible
>> glue-code), simplifying the build process somewhat.
>> What am I failing to pick up on?
> Well, one cool thing would be that a compiler could effectively compile itself
> - or at least the lexer and parser would compile themselves. You wouldn't have
> to run a program to generate them. It could be self-contained.
CTFE code can be much slower than native one, and I would like to see
some kind of compiler cache for such code.
More information about the Digitalmars-d