Lexer and parser generators using CTFE

Martin Nowak dawg at dawgfoto.de
Wed Feb 29 10:28:48 PST 2012

On Wed, 29 Feb 2012 17:41:19 +0100, Timon Gehr <timon.gehr at gmx.ch> wrote:

> On 02/28/2012 07:46 PM, Martin Nowak wrote:
>> https://gist.github.com/1255439 - lexer generator
>> https://gist.github.com/1262321 - complete and fast D lexer
> Well, it is slower at lexing than DMD at parsing. What is the bottleneck?

No, it's as fast as dmd's lexer.

Writing the tokens to stdout takes a lot of time though.
Just disable the "writeln(tok);" in the main loop.
There is also an --echo option which recreates the complete
source from the tokens.

More information about the Digitalmars-d mailing list