Question from Bison's maintainer on the D backend

Manu turkeyman at gmail.com
Mon Nov 19 06:41:29 UTC 2018


I use Bison in a D project, but since it emits C/C++, I use an
elaborate extern(C++) based solution to interact with the Bison
output.
The binding layer is hard to maintain, and I don't work on the project
much because of the friction.

I evaluated the native D parsers, but quickly switched back to Bison
because it just works, and works very well.
I was also motivated by the fact the parser also had C++ output, since
writing any project exclusively in D is a risk, and reverting to C++
is always a possibility in the event D fails.

I can say for certain, if Bison emit D output, I would use it, and get
much value from it!

On Sun, Nov 18, 2018 at 8:00 AM Andrei Alexandrescu via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> Hello, Akim Demaille, the maintainer of the famed GNU Bison parser
> generator, reached out to me with the following (published with his accord):
>
> ====
> I’m the maintainer of GNU Bison, which is a parser generator for C/C++
> and Java.  A few years ago someone contributed a D backend for Bison,
> but at that time, the investment in Bison was low.  Now I’m spending
> time on it, and Richard Stallman asked me to contact the « D community »
> to know whether there would be interest for such a backend.
>
> Bison is a LALR(1), LR(1), IELR(1) and GLR parser generator.  It’s based
> on ye olde yacc, by it features several interesting properties.
>
> Of course the D world already features several parser generators, some
> being even embedded in the language and benefiting from compile time
> function evaluation.  So it’s very unclear to me if Bison would get some
> interest.
>
> What would you think about that?
> ====
>
> I wrote back that Bison is currently much more sophisticated than the
> present alternatives in the D community, and that we'd be interested in
> continued maintenance of the D backend for Bison. Further discussion
> revealed:
>
> ====
> I would say that my first and foremost worry would be to integrate
> something which is not used, and not maintained.  And I am not a D
> programmer, so I would not be able to decide whether his work was good
> or not, have it evolve with Bison and releases of D.
>
> Also, something that somewhat worries me is that the D parser was based
> on the Java parser, not the C++ one.
> ====
>
> More thoughts and reports from the community would be helpful. If you
> are a current or former Bison user with the D backend, or if you have an
> interest in contributing reviews and patches for it,  please chime in.
>
>
> Thanks,
>
> Andrei



More information about the Digitalmars-d mailing list