On 03/24/2011 10:48 AM, Jacob Carlborg wrote:
On 2011-03-24 05:30, Andrei Alexandrescu wrote:
On 3/23/11 11:42 AM, Luca Boasso wrote:
Sorry for the late reply,
even tough I'm not an ANTLR expert, given my previous experience with
the tool
and having read most of the official book, I could help more on this GSOC
idea.

I have looked at http://www.antlr.org/grammar/list and on google and I
could not
find any recent ANTLR grammar for D.
In my opinion this project could be a good contribution for the D
community
while being practical and useful in the short term.

There are two aspects: writing an ANTLR grammar that parses D (which you
are referring to) and also adding to ANTLR the capability of generating
D. The latter would allow D users to create and use parsers for various
languages. It would also require close cooperation with the ANTLR people
for acceptance etc.

(Sticking with the former project for now.) This is a technically
interesting project. I'd need to hear more about the high-level
motivation. What is the "business" motivation? There is already a parser
for D written in C++ (the open-source front-end of dmd), so the project
would need to build a good case for the added value. Also there are
other D parser projects that people work on (ddmd comes to mind), so I'd
need to hear a lot more in the way of justifying the utility of such a
project.


Thanks,

Andrei

Isn't it obvious, to be able to create tools that needs to parse/lex D code. If
parser/lexer is included in Phobos that is basically a port of the C++ one in
DMD and DMD starts to use the D version it will be a huge win. The parser/lexer
in Phobos will always automatically be up to date with the one the compiler
uses because they are actually the same.

As far as I know DDMD cannot be easily used to build other tools that needs to
parse/lex D code in it's current state. That is a long term goal but not even
the short term goal, of being up to date with DMD and produce the same code as
DMD, has been reached yet.

Along with your motivations, Jacob, see also: http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DtoolsinD

Denis
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to