[dmd-internals] How important are the exact formats of __DATE__, __TIME__, and __TIMESTAMP___?

Jacob Carlborg doob at me.com
Wed Mar 9 09:28:05 PST 2011


On 9 mar 2011, at 05:52, Jonathan M Davis wrote:

> On Tuesday 08 March 2011 20:46:49 Andrei Alexandrescu wrote:
>> I understand. If I could, I'd kindly discourage you from working on it.
>> Its existence would stifle the impetus to work on general lexing and
>> parsing frameworks (a la highly integrated lex/yacc using D's
>> generational capabilities). Those in turn would push the compiler
>> forward and would help fixing bugs, and would offer the proverbial
>> fishing rod (tools for parsing any language) instead of fish (a lexer
>> and a parser for D itself).
> 
> Well, I fully support a generic lexer, but I also see value in a lexer which 
> closely follows what the front end is doing for D. But it's not like I've been 
> making huge progress on it and am about to submit it for review. I have too much 
> other stuff on my plate to blow through it like that.
> 
> Though honestly, if I were to be writing a lexer and/or parser for a compiler of 
> any kind, I'd just do it by hand. It's a lot more flexible that way. So, even if 
> a solid, generic D lexing tool existed, I'm not sure that I'd use it for 
> anything.
> 
> In any case, as I understood it, the result of that original discussion was that 
> we wanted to have a generic lexing solution (and presumably a corresponding 
> parsing solution following that) but that we still want a lexer and parser for D 
> which are close to what the C++ front end is doing. So, as requested, I've 
> slowly been working on that.
> 
> - Jonathan M Davis
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals


I completely agree with this, that we need a D lexer (preferably a whole frontend) written in D, included in the standard library. I even hope that one day DMD will use that lexer.

BTW, are basing your work on DDMD?

-- 
/Jacob Carlborg


More information about the dmd-internals mailing list