std.d.lexer requirements

Walter Bright newshound2 at digitalmars.com
Fri Aug 3 00:35:32 PDT 2012


On 8/3/2012 12:11 AM, Jacob Carlborg wrote:
> On 2012-08-03 08:59, Walter Bright wrote:
>
>> You don't need to extract it to measure it. Just have it lex the source
>> files in a loop, and time that loop.
>
> Well, that's the problem. It's not like DMD has a single "lex" function that
> does all the job.
>
> Would it perhaps be possible to time Parser::parseModule and remove all things
> that doesn't seem related to lexing?
>
> Remove stuff like:
>
> a = new Identifiers();
> md = new ModuleDeclaration(a, id, safe);
>
> And similar.
>

Look in doc.c at highlightCode2() for how to call the lexer by itself.



More information about the Digitalmars-d mailing list