Any usable parsers for D2 around?
Justin C Calvarese
jccalvarese at gmail.com
Thu Oct 28 11:47:11 PDT 2010
== Quote from Bruno Medeiros (brunodomedeiros+spam at com.gmail)'s article
> I so wished there was a ANTLR based parser for D, or at least an ANTLR
I remember seeing some talk in the D newsgroups over the years about the desire for an ANTLR file
for D. After a quick search of Wiki4D, I found this:
That lead me to the ANLTR-D project at dsource.org.
This was the most useful-looking file that I found in SVN:
/** A parser for D v1.
* It's a little loose in parsing declarations, as correctly discerning
* a function header is complicated, and it's a bit smarter than DMD in a few
* other places. It can pick out some expression/declaration ambiguities and
* mark them as such, and it allows mixins to begin expressions.
* Ambiguities between types and expressions are not caught, and always default
* to types.
(I don't know have any idea whether it's too out-of-date to be useful or whether something else
might be wrong with it.)
More information about the Digitalmars-d-learn