D Compiler as a Library

Jakob Ovrum jakobovrum at gmail.com
Fri Apr 13 08:25:08 PDT 2012


On Friday, 13 April 2012 at 13:08:51 UTC, deadalnix wrote:
> SDC have a lot of theses, and I proposed a similar stuff for 
> its evolution. I think it is easier for SDC than it is for dmd 
> considering the codebase of both.

I think we've got the lexer and parser completely separate from
most of the rest of the codebase (like the codegen), due to
repeated requests from people who wanted to use these parts for
IDEs and other tools.

I've yet to see anyone actually go through with using it though,
possibly because there is no documentation for a lot of it.
Documenting these parts fully into something of a public API and
then putting it online is definitely on the todo list. Perhaps
there would be more motivation to do this rather than work on
something else if someone actually tried using SDC in their
project instead of just talking about it, so it's kind of a
catch-22.

That said, the parser is currently evolving alongside the
codegen. When we want to start implementing new parts of the
language, we iteratively add it to the parser, hence it's not
complete. It's very easy to work with though and it's mostly a
menial task (although it's kind of fun to produce beautiful
parser errors :P).

Anyway, for anyone interested, you can find us on Github and
#d.sdc on FreeNode.


More information about the Digitalmars-d mailing list