On Wed, 29 Feb 2012 17:41:19 +0100, Timon Gehr <timon.g...@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.

Reply via email to