Compiling DMD parser?

Bill Baxter dnewsgroup at billbaxter.com
Sat Jul 12 21:58:27 PDT 2008


Markus Koskimies wrote:
> Hi,
> 
> I thought that I could play around a little bit with DMD parser. I have 
> DMD 1.030 parser sources, and I made a simple makefile for just compiling 
> those sources (with gcc 4.3.1).
> 
> ---
> Some questions:
> 
> - These are C++ sources, not C sources, although the suffix is .c and .h, 
> right? A little bit sad, I thought that I could wrap the parser to D :( I 
> have not much interest playing with C++ at freetime...
> 
> - Are these files meant to be compiled alone without making modifications 
> to files? For example:
> 
> - In "attrib.c", if linux is defined, it tries to include mem.h from "../
> root"; why not the one in the src/ directory?
> 
> - There is no such file that "id.h", which probably contains class/struct/
> enum "Id"
> 
> - init.h does not include "hdrgen.h", while uses HdrGenState
> 
> ---
> How these parser codes are meant to be used? Am I missing something?

They aren't.  They're just meant to be for anyone who is interested in 
taking them and trying to build a compiler or other tool out of them. 
They don't compile into anything useful as-is.

I think there's a project, DMDFE, based on those sources that is 
compileable though.  http://www.dsource.org/projects/dmdfe


--bb



More information about the Digitalmars-d mailing list