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. The current ANTLR v3 is much more powerful than the previous version since it can handle LL(*) grammars instead of the classic LL(k) one [More on LL(*) at: http://www.antlr.org/papers/LL-star-PLDI11.pdf]. I had a quick look at the parse.c of dmd compiler. It's a recursive descent parser but honestly I don't know the grammar enough to understand if it is LL(k) but definitively it could be parsed efficiently with the LL(*) parsing strategy. I think that the essential aspects listed in the idea "ANTLR and Java based D parser for IDE usage" could be pursued in the given 3 months time-line. Could somebody tell me something more about the AST that should be generated as output of the parser? Luca Boasso On 3/23/11, Bruno Medeiros <brunodomedeiros+spam@com.gmail> wrote: > On 23/03/2011 14:59, spir wrote: >> On 03/23/2011 02:40 PM, Bruno Medeiros wrote: >>> The first two items (LexingandParsing, >>> ANTLRandJavabasedDparserforIDEusage) are fairly concrete ideas. >>> The last one, D Tools in D is far more general, and can involve a lot of >>> different things >> >> It is instead more specific: "The aim is to boost the production of >> fundamental tools for analysis of D source code in D: lexical, >> syntactic, at best first steps of semantic analysis; producing code >> representations as D data structures." >> >> Its usefulness /in the long term/ can be said more general in that it >> would enable *further* creation of D tools in D (*), potentially useful >> to all D programmers. Unlike eg a general-purpose parsing lib in D which >> is specific to the parsing domain; on the other hand, a general-purpose >> parsing lib does not parse only D code ;-). >> >> (*) See (again): >> http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DtoolsinD >> >> Denis > > Yeah, I agree that D tools are (generally speaking) much more useful > than a D parsing library. But that's not the point, the point is that > with the limited manpower we have available (not just in terms of GSoC, > but generally), it's very risky and unwise to embark on projects that > then remain incomplete and never see the light of day as part of > something useful. > It's like comparing a bicycle to a car engine. Yeah, the car engine can > allow to build a nice car but it's worthless on it's own and at least > the bicycle can get somewhere faster. Even a skate or roller-blades are > more useful. > How much development has it even been in any D tools in D lately (in the > last year or so)? > > > -- > Bruno Medeiros - Software Engineer >