Compiling DMD parser?

Bill Baxter dnewsgroup at billbaxter.com
Sat Jul 12 22:31:29 PDT 2008


Markus Koskimies wrote:
> On Sun, 13 Jul 2008 13:58:27 +0900, Bill Baxter wrote:
> 
>> I think there's a project, DMDFE, based on those sources that is
>> compileable though.  http://www.dsource.org/projects/dmdfe
> 
> Yes, that worked, thanks!
> 
> Next I'll try to figure out, how to easily import the parsed results to 
> D... Hmmh, I might have an idea; if I modify that DMDFE to output the 
> parse tree in some kind of ASCII stream, I might be able to construct it 
> in D; hmmh, that sounds somewhat silly... Well, I try to figure out 
> something. Again, thanks for that link! :D

No need to go ascii.  Just wrap up the data in some structs and add some 
extern(C) functions that you can call from D which return those structs.

Or if you're doing D2.0, then there's that extern(C++) thing that may work.

--bb



More information about the Digitalmars-d mailing list