Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
December 25, 2003 Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Has anyone used this in their project ? Im looking for a way to parse out variables and their types , I havent actually looked at it yet was wondering if anyone has done work with it. Thanks, C |
December 25, 2003 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles | I tried to compile it a while back but it's missing a few key ingredients. Maybe Walter cleared some of that up (some of it was my own misunderstanding) (You pretty much need to make a wrapper around his backend, which you don't have the source or even the interface to.) Otherwise it's pretty clean C-style C++, should be pretty easy to work with. Sean "Charles" <sanders-consulting@comcast.net> wrote in message news:bsffca$1k95$1@digitaldaemon.com... > Has anyone used this in their project ? Im looking for a way to parse out variables and their types , I havent actually looked at it yet was wondering > if anyone has done work with it. > > Thanks, > C |
December 25, 2003 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | Cool, maybe Walter has a makefile for it ? <nudge,nudge > :) C "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:bsfkac$1s6a$1@digitaldaemon.com... > I tried to compile it a while back but it's missing a few key ingredients. Maybe Walter cleared some of that up (some of it was my own misunderstanding) > > (You pretty much need to make a wrapper around his backend, which you don't > have the source or even the interface to.) > > Otherwise it's pretty clean C-style C++, should be pretty easy to work with. > > Sean > > "Charles" <sanders-consulting@comcast.net> wrote in message news:bsffca$1k95$1@digitaldaemon.com... > > Has anyone used this in their project ? Im looking for a way to parse out > > variables and their types , I havent actually looked at it yet was > wondering > > if anyone has done work with it. > > > > Thanks, > > C > > |
December 25, 2003 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | Sean L. Palmer wrote: > I tried to compile it a while back but it's missing a few key ingredients. > Maybe Walter cleared some of that up (some of it was my own > misunderstanding) It misses critical header files, which belong to back-end. > (You pretty much need to make a wrapper around his backend, which you don't > have the source or even the interface to.) The good ol' DLI fills the gap. Theoretically. There would still be a lot to do. > Otherwise it's pretty clean C-style C++, should be pretty easy to work with. But it's HUGE. I'd say it might rather make sense to write a grammar for a OO parser generator such as Antlr. I was going to hack up some basic back-end for D like C output, but i give up. I simply don't have the time. -eye |
December 26, 2003 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles | Charles wrote:
> Cool, maybe Walter has a makefile for it ? <nudge,nudge > :)
>
> C
Don't be a wimp! The problem is not the makefile. With such an attitude, you will definately not draw any wisdom from the front-end.
-eye
|
December 27, 2003 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | True I'm lazy :P. I actually think it will be easier to write my own, thats probably the route Ill go. Aren't you involved with the GNU port ? How's that going ? C "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:bsha8o$1jjd$1@digitaldaemon.com... > Charles wrote: > > Cool, maybe Walter has a makefile for it ? <nudge,nudge > :) > > > > C > > Don't be a wimp! The problem is not the makefile. With such an attitude, you will definately not draw any wisdom from the front-end. > > -eye > |
December 27, 2003 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles | Not that anyone is currently involved with a GNU port. ;) Jan has no time, myself neither. I had made the first year of studies too simple for myself, and now i'm in trouble.
The first step would be to write a simple dumper, which would show that i have gained enough of understanding the DMD front-end. This would allow to create the first D->C compiler, which should be enough for the first. And also stuff like interpreters. The "real" GCC connection comes with the next enthusiastic generation of D users. ;)
For the code analyser you definately need much less of the frontend. I have not read the parser source, so i cannot tell you whether it makes sense to reuse it or not. Anyway, since it's a recursive descent, even if you would be putting your own grammar together, the source should give a lot of clues as to how the BNF should look. It definately makes sense to use LL(inf) generator, which will make sure the grammar will be fairly valid.
-eye
Charles wrote:
> True I'm lazy :P. I actually think it will be easier to write my own, thats
> probably the route Ill go.
>
> Aren't you involved with the GNU port ? How's that going ?
>
> C
|
January 02, 2004 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | LL(inf) ? lex & yacc is ll(1) right ? Do you know of any parser generators for LL(inifty?) ? C "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:bsjj0h$2f0t$1@digitaldaemon.com... > Not that anyone is currently involved with a GNU port. ;) Jan has no time, myself neither. I had made the first year of studies too simple for myself, and now i'm in trouble. > > The first step would be to write a simple dumper, which would show that i have gained enough of understanding the DMD front-end. This would allow to create the first D->C compiler, which should be enough for the first. And also stuff like interpreters. The "real" GCC connection comes with the next enthusiastic generation of D users. ;) > > For the code analyser you definately need much less of the frontend. I have not read the parser source, so i cannot tell you whether it makes sense to reuse it or not. Anyway, since it's a recursive descent, even if you would be putting your own grammar together, the source should give a lot of clues as to how the BNF should look. It definately makes sense to use LL(inf) generator, which will make sure the grammar will be fairly valid. > > -eye > > Charles wrote: > > True I'm lazy :P. I actually think it will be easier to write my own, thats > > probably the route Ill go. > > > > Aren't you involved with the GNU port ? How's that going ? > > > > C > |
January 03, 2004 Re: Using the front end for DMD | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | Antlr is LL(k) (effectively infinity) http://www.antlr.org/ lex & yacc are LALR Sean "C" <dont@respond.com> wrote in message news:bt4q7k$r15$1@digitaldaemon.com... > LL(inf) ? lex & yacc is ll(1) right ? Do you know of any parser generators > for LL(inifty?) ? |
Copyright © 1999-2021 by the D Language Foundation