std.d.lexer requirements

Jonathan M Davis jmdavisProg at gmx.com
Thu Aug 2 20:08:43 PDT 2012


On Thursday, August 02, 2012 23:00:41 Andrei Alexandrescu wrote:
> On 8/2/12 10:40 PM, Walter Bright wrote:
> > To reiterate another point, since we are in the compiler business,
> > people will expect std.d.lexer to be of top quality, not some bag on the
> > side. It needs to be usable as a base for writing a professional quality
> > compiler. It's the reason why I'm pushing much harder on this than I do
> > for other modules.
> 
> The lexer must be configurable enough to tokenize other languages than
> D. I confess I'm very unhappy that there seem to be no less than three
> people determined to write lexers for D. We're wasting precious talent
> and resources doubly. Once, several people are working in parallel on
> the same product. Second, none of them is actually solving the problem
> that should be solved.

You're not going to get as fast a lexer if it's not written specifically for D. 
Writing a generic lexer is a different problem. It's also one that needs to be 
solved, but I think that it's a mistake to think that a generic lexer is going 
to be able to be as fast as one specifically optimized for D. And there are 
several people already working on the generic stuff (like Phillipe).

- Jonathan M Davis


More information about the Digitalmars-d mailing list