Any usable parsers for D2 around?

Justin C Calvarese jccalvarese at
Thu Oct 28 11:47:11 PDT 2010

== Quote from Bruno Medeiros (brunodomedeiros+spam at's article
> I so wished there was a ANTLR based parser for D, or at least an ANTLR
> grammar.

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

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 mailing list