Any usable parsers for D2 around?
Jonathan M Davis
jmdavisProg at gmx.com
Fri Oct 15 10:01:59 PDT 2010
On Thursday, October 14, 2010 15:47:28 Andrej Mitrovic wrote:
> I've been looking for a D2 parser.. there seems to be a few D1 lexers,
> parsers, and even some minimal semantic analysis tools but I can't find
> much of anything for D2. Perhaps Goldie will be D2 compatible some day
> soon. :)
> There's a "CodeAnalyzer" lexer/parser with some minimal semantics, but it's
> D1 only and kind of dead for some years. The Poseidon author added some D2
> support for it in his editor, so I have kept an eye on that. But
> interfacing with D1 code from D2 is kind of complicated, and I need to use
> it from D2. (I guess I could get away with writing a DLL with a simple
> interface for D2 or something..).
> I had a visit on the prowiki site and most of the parser projects there are
> either D1-only or dead. So is there anything usable for D2? Specifically I
> need these tools for use with an editor/IDE, which is something I'm
> working on for fun atm. But working on a parser is probably a ton of work,
> + the whole thing screams NIH to me. Luckily enough I don't have to
> reinvent a GUI and an editing control, there's DFL and Scintilla which are
> pretty awesome for my needs.
> Maybe I should take a look at how Descent/DDT and VisualD do their
> parsing.. :)
It has periodically been suggested that a parser for D be put in Phobos, but
that obviously hasn't been done yet. There is obviously some level of need for
it though. And if an appropriate parsere _were_ put into Phobos, then at least
it would be standard.
- Jonathan M Davis
More information about the Digitalmars-d-learn