On 9 mar 2011, at 20:18, Jonathan M Davis wrote: > On Wednesday, March 09, 2011 09:28:05 Jacob Carlborg wrote: >> 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 >>> [email protected] >>> 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? > > No. I haven't looked at DDMD. Walter wanted a fairly direct port of the C++ > frontend (with appropriate tweaks for D, but he wants to make sure that it's > straightforward to port fixes from one to the other). So, I've just been > directly, porting the C++ frontend, adjusting it to be somewhat more > idiomatic D > as appropriate but generally keeping it fairly close to the C++ > implementation. > > - Jonathan M davis > _______________________________________________ > dmd-internals mailing list > [email protected] > http://lists.puremagic.com/mailman/listinfo/dmd-internals
Well, that exactly what DDMD does. -- /Jacob Carlborg _______________________________________________ dmd-internals mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-internals
