June 11, 2002
In article <ae3a7m$qt0$1@digitaldaemon.com>, Martin M. Pedersen says...
>
>"andy" <acoliver@apache.org> wrote in message news:3D04D8C5.50909@apache.org...
>
>> > Another option is to just grit my teeth and rewrite it all by hand into
>C, then
>> > hook it up to the GCC system.  That way, I can maintain much of Walter's elegance, and still get something working in a reasonable time.
>
>This was my first idea, because I would like a bison/C solution. However, I came to the conclusion that D cannot be specified as a LALR(1) grammar as required by bison. The problem I ran into was the deeply recursive Parser::is... methods. Other LALR(N) parser generators exists, but I have no experience with them.
>
>> > One option is a sort of awk scriptie C++ to C compiler.  It does not
>have to be
>> > a full-function compiler, because Walter does not use every possible C++ syntax in his code.  Still, it will have to properly handle all the
>non-C
>> > characteristics.  I have started this,  but it is coming along very
>slowly.
>> > On the nice side, it will only have to work on the released portion of
>DMD,
>> > which is, IIRC, about 27,000 lines of code.  Miniscule, really,
>considering
>> > what it does.
>
>Before trying to make it C code, we need it to compile as the C++ sources they are. That is not trivial either. Tonight I have had luck making "parse.c" and "lexer.c" compile MSVS6 using only automated changes using an AWK script (attached). One of the problems is that the source is incomplete. Until now I have been missing:
>
>    Id
>    StringTable
>    StringValue
>    lstring
>
>I expect I will run into more later. Only Walter knows why they are not part of the archive. Maybe it is just a mishap, or maybe he has his reasons not to publish them. But it is, BTW, also part of the reason I started out reimplementing the thing from scratch.
>
>> I kinda like this idea because we can sync up more easily later.
>
>That would be great. I guess that the parser is still open for major changes, so a mechanism that will allow us to easily keep the implementation in sync will be of great value. I don't know how difficult it would be, or if there are reasons for Walter not to do so, but it would be very helpful if Walter provided us with a package that was complete enough to compile and link - at least with DMC.
>
>Regards,
>Martin M. Pedersen
>
>
<snip>
Yeeahooo!  More Toys!

Andy Walker
June 11, 2002
</snip>

> I have A handle.  Whether it is good or not remains to be seen.  Walter's posts earlier today will be a big help.
> 
> Awk is ort of fun, really. I will be happy to give pointers and advice, if you
> are interested..  
> 

cool.  Yes, sounds good.

<snip/>

> 
> I am happy to share the awk scripts.  Once I get them working better, I will
> post them as "freely given to the public".  I am really not too concerned about adapting to release changes.  There will be some work, but not bad, and no matter where you go, there will be work related to release changes.
> 

Cool.  Don't worry about getting them finished, just conceptually ready.
I'll work on it.

> 
> It is just selfishness, but I do not want Walter to ever think about how he would change his coding practices to conform to my needs.  I love the help, but that Bright D front-end is just really pretty to me.  It does what it is
> supposed
> to do.  I would hate for Walter to muck it up, trying to adapt to some arbitrary
> format.  And for the record, GNU CC is one very arbitrary format.
>

Think I'm a GNU appologist or something?  Not really.  I don't like the premise of the GPL.

-Andy

> 
>>-andy
> 
> <snip>
> 
> Andy Walker


1 2
Next ›   Last »