digitalmars.D - DMDFE on dsource
- Brad Beveridge (9/9) Jun 10 2005 Hi all,
- Mike Parker (7/15) Jun 10 2005 No, that's not what it's for. DMDFE is for parsing D source, not for
- Brad Beveridge (4/11) Jun 10 2005 Thanks for that. I'm talking about automatically generating Lua
- Ben Hinkle (12/19) Jun 10 2005 I need to put the code up there. I'll try to do that today. For the time...
- Brad Beveridge (18/23) Jun 10 2005 Perhaps DMDFE isn't quite what I want to start with then. Yes, what I
- Ben Hinkle (1/4) Jun 12 2005 Just a quick follow-up. I added dmdfe for dmd.126 to the svn tree.
- Brad Beveridge (14/22) Jun 13 2005 Thanks for that. I spent a couple of hours over the weekend building a
Hi all, I notice that there is a DMDFE project on dsource.org, but there doesn't appear to be any downloads & the SVN tree is empty. Is dsource the proper place to look for the latest DMDFE? I am planning on using DMDFE to try and generate D to Lua bindings automatically - am I correct in assuming that DMDFE is suitable for this purpose? Thanks Brad
Jun 10 2005
Brad Beveridge wrote:Hi all, I notice that there is a DMDFE project on dsource.org, but there doesn't appear to be any downloads & the SVN tree is empty. Is dsource the proper place to look for the latest DMDFE?http://home.comcast.net/~benhinkle/dmdfe/I am planning on using DMDFE to try and generate D to Lua bindings automatically - am I correct in assuming that DMDFE is suitable for this purpose?No, that's not what it's for. DMDFE is for parsing D source, not for generating D bindings to C libraries. It's the same code that's in your dmd\src\dmd directory, but with the calls to the backend stubbed out. As to the Lua binding, Clay Smith already created one. Look in the trunk of the Bindings project at dsource.
Jun 10 2005
Mike Parker wrote:No, that's not what it's for. DMDFE is for parsing D source, not for generating D bindings to C libraries. It's the same code that's in your dmd\src\dmd directory, but with the calls to the backend stubbed out. As to the Lua binding, Clay Smith already created one. Look in the trunk of the Bindings project at dsource.Thanks for that. I'm talking about automatically generating Lua wrappers from D code, so that your embedded Lua code can call into D. Brad
Jun 10 2005
"Brad Beveridge" <brad somewhere.net> wrote in message news:d8cd6v$1ekm$1 digitaldaemon.com...Hi all, I notice that there is a DMDFE project on dsource.org, but there doesn't appear to be any downloads & the SVN tree is empty. Is dsource the proper place to look for the latest DMDFE?I need to put the code up there. I'll try to do that today. For the time being the original site http://home.comcast.net/~benhinkle/dmdfe/ (plus some changes to get it built on Linux) has the port for dmd.121 (old, I know!)I am planning on using DMDFE to try and generate D to Lua bindings automatically - am I correct in assuming that DMDFE is suitable for this purpose?I'm not sure what you have in mind. DMDFE will parse D source code into the parse tree the compiler uses, runs the compiler's semantic analysis phases and then quits. It is useful for tools that want to parse and manipulate D source code. Are you thinking your tool would take some D code and spit out some Lua wrappers? It might be better to check out SWIG.
Jun 10 2005
Ben Hinkle wrote:I'm not sure what you have in mind. DMDFE will parse D source code into the parse tree the compiler uses, runs the compiler's semantic analysis phases and then quits. It is useful for tools that want to parse and manipulate D source code. Are you thinking your tool would take some D code and spit out some Lua wrappers? It might be better to check out SWIG.Perhaps DMDFE isn't quite what I want to start with then. Yes, what I ultimately want to do is parse D code and generate Lua wrappers for public functions. This will involve having to generate intermediate C wrappers for the D functions (I think). I was hoping to use DMDFE to parse out the function definitions and work from there, but considering how simple the D grammer is I may be able to write a simple parser that can extract functions without using DMDFE. I don't think that SWIG will suit me, as I understand it SWIG is basically a C/C++ parser that can generate wrappers that allow other languages to interface to existing C code. I want to make a tool that takes existing D code and allows Lua to call D functions (by first calling C functions). Perhaps a good first step will be making a tool that wraps C functions around D functions. Does anyone have thoughts on this? Thanks Brad
Jun 10 2005
I notice that there is a DMDFE project on dsource.org, but there doesn't appear to be any downloads & the SVN tree is empty. Is dsource the proper place to look for the latest DMDFE?Just a quick follow-up. I added dmdfe for dmd.126 to the svn tree.
Jun 12 2005
Ben Hinkle wrote:Thanks for that. I spent a couple of hours over the weekend building a cheap D parser that is simply interested in extracting variable/class declarations and function signatures. It wasn't too hard (or too many lines of code) to get something reasonable working. Personally, I am just going to stick with my simple code - I don't think that I'll need the full syntax parse. If/when I get my program generating C wrapper code I'll put it up on dsource. (Note - I know I said before that I am going to generate Lua callable code, but I need to generate C code as a first step toward this) As an aside, should Phobos perhaps have a Tokenizer class that can act on streams? I wrote a crappy one & it would have been nice to have a full featured on in the standard library. BradI notice that there is a DMDFE project on dsource.org, but there doesn't appear to be any downloads & the SVN tree is empty. Is dsource the proper place to look for the latest DMDFE?Just a quick follow-up. I added dmdfe for dmd.126 to the svn tree.
Jun 13 2005