Want to help DMD bugfixing? Write a simple utility.

Jonathan M Davis jmdavisProg at gmx.com
Wed Mar 23 14:18:13 PDT 2011


> On 3/23/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > That would require a full-blown D lexer and parser.
> > 
> > - Jonathan M Davis
> 
> Isn't DDMD written in D? I'm not sure about how finished it is though.

Yes, but the lexer and parser in ddmd are not only GPL (which would be a 
problem for some stuff but not others - for something like Don's utility, it 
wouldn't be a problem), and more importantly, it is tied to the compiler code. 
It's not designed to be used by an arbitrary program. For that, you would need 
a lexer and parser which were designed with an API such that an arbitrary D 
program could use them. For instance, the lexer could produce a range of 
tokens to be processed, and a program which wants to use the lexer can then 
process that range.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list