Parser
Justin C Calvarese
technocrat7 at gmail.com
Tue Feb 6 14:26:44 PST 2007
Michiel wrote:
> I want to write a parser in D. Is there a D library like lex/yacc/bison with
> which I can do syntax-directed translation?
One of the projects listed on this page
(http://www.prowiki.org/wiki4d/wiki.cgi?GrammarParsers)
may be useful to you.
Many of these projects are probably inactive, but Enki
(http://www.dsource.org/projects/ddl/wiki/Enki)
is one of the most recent options.
As BCS mentioned, his Dparser
(http://www.dsource.org/projects/scrapple/browser/trunk/dparser/dparse.d)
is a recent effort in parsing.
I've been interested in "The Language Machine"
(http://languagemachine.sourceforge.net/),
but I've never tried it myself and it might need some work to get it to
compile with the latest version of D.
> The digitalmars site said that the D parser has also been written in D. How
> did they build the parser?
I'm not sure which project you're referring to but they probably used a
combination of automation and hand-editing to convert the C++ source
into D (the front end of DMD has been open-sourced).
Perhaps you're thinking of an effort that's in the Bindings project
(http://www.dsource.org/projects/bindings)?
Files: demangle.d, dfilter.d, dlexer.d, dparse.d, dsymextract.d,
dtypes.d
--
jcc7
More information about the Digitalmars-d
mailing list