Compiling DMD parser?

Markus Koskimies markus at reaaliaika.net
Sat Jul 12 23:10:33 PDT 2008


On Sun, 13 Jul 2008 14:31:29 +0900, Bill Baxter wrote:

> 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.

Yes, I thought that, too, but I thought that it could be quite an effort. 
Maybe later :) I thought that if I put the dmdfe dumping info from 
parsing, the same can be used for importing the tree to D. But I'll play 
around for awhile to find a suitable way of doing it.

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

Does it work with g++? I haven't yet used D2.0, but maybe it is time to 
try it out, too :)



More information about the Digitalmars-d mailing list