www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Bison 3.5 is released, and features a D backend

reply Akim Demaille <akim.demaille gmail.com> writes:
Hi all!

GNU Bison 3.5 was released with a D backend
(https://savannah.gnu.org/forum/forum.php?forum_id=9639).  This 
backend is
functional, and you can get a sense of its current shape by 
looking at the
shipped example (a calculator, what did you expect?):
https://github.com/akimd/bison/blob/master/examples/d/calc.y.

Bison is an LR parser generator.  It supports not only Yacc's 
original
LALR(1) parsers, but also canonical LR and IELR(1) which are 
strictly more
powerful (meaning: they accept wider classes of languages).  It 
also
features Generalized LR, which can even parse ambiguous grammars.

The D backend currently does not support the full range of Bison 
features.
We desperately need some skilled D programmer(s) to support this 
backend.

It was first contributed by Oliver Mangold, based on Paolo 
Bonzini's Java
backend.  It was cleaned and improved thanks to H. S. Teoh, yet 
it's
certainly not yet fitting perfectly the D spirit.  Since the 
backend is
still experimental, there is flexibility: it can be changed and 
improved
until it meets the D community standards.

If you would like to contribute, please reach out to us via
bison-patches gnu.org, or help-bison gnu.org.

Best wishes for 2020.  Cheers!
Jan 01
next sibling parent Basile B. <b2.temp gmx.com> writes:
On Wednesday, 1 January 2020 at 09:47:11 UTC, Akim Demaille wrote:
 Hi all!

 GNU Bison 3.5 was released with a D backend
 (https://savannah.gnu.org/forum/forum.php?forum_id=9639).  This 
 backend is
 functional, and you can get a sense of its current shape by 
 looking at the
 shipped example (a calculator, what did you expect?):
 https://github.com/akimd/bison/blob/master/examples/d/calc.y.

 Bison is an LR parser generator.  It supports not only Yacc's 
 original
 LALR(1) parsers, but also canonical LR and IELR(1) which are 
 strictly more
 powerful (meaning: they accept wider classes of languages).  It 
 also
 features Generalized LR, which can even parse ambiguous 
 grammars.

 The D backend currently does not support the full range of 
 Bison features.
 We desperately need some skilled D programmer(s) to support 
 this backend.

 It was first contributed by Oliver Mangold, based on Paolo 
 Bonzini's Java
 backend.  It was cleaned and improved thanks to H. S. Teoh, yet 
 it's
 certainly not yet fitting perfectly the D spirit.  Since the 
 backend is
 still experimental, there is flexibility: it can be changed and 
 improved
 until it meets the D community standards.

 If you would like to contribute, please reach out to us via
 bison-patches gnu.org, or help-bison gnu.org.

 Best wishes for 2020.  Cheers!
nice, thanks
Jan 02
prev sibling parent reply Akim Demaille <akim.demaille gmail.com> writes:
On Wednesday, 1 January 2020 at 09:47:11 UTC, Akim Demaille wrote:
 Hi all!
[...]
 If you would like to contribute, please reach out to us via
 bison-patches gnu.org, or help-bison gnu.org.
Hi, There was no answer. Should I understand that there's no need for Bison in D?
Jan 28
next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Tue, Jan 28, 2020 at 07:03:51PM +0000, Akim Demaille via
Digitalmars-d-announce wrote:
 On Wednesday, 1 January 2020 at 09:47:11 UTC, Akim Demaille wrote:
 Hi all!
 [...]
 If you would like to contribute, please reach out to us via
 bison-patches gnu.org, or help-bison gnu.org.
Hi, There was no answer. Should I understand that there's no need for Bison in D?
I'd love to have it. But am entangled by legal issues and can't contribute. :-( T -- "The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."
Jan 28
prev sibling parent Manu <turkeyman gmail.com> writes:
On Tue, Jan 28, 2020 at 11:05 AM Akim Demaille via
Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:
 On Wednesday, 1 January 2020 at 09:47:11 UTC, Akim Demaille wrote:
 Hi all!
[...]
 If you would like to contribute, please reach out to us via
 bison-patches gnu.org, or help-bison gnu.org.
Hi, There was no answer. Should I understand that there's no need for Bison in D?
This is very interesting to me for one. I have some projects that glue Bison C output to my D applications, and that's a hassle to manage; a whole lot of little C shim's that call through to my D code. I wasn't aware Bison has attempted to emit D code, or I would have been using that! So, for what it's worth, I think this is definitely useful to the D community. That said, you appeared to be asking for contributors in your OP. As a Bison end-user, I just treat it like a black box, and I don't know anything about Bison's implementation, or really even very much about how it works beyond the fact that it just does. I read your post, but it didn't occur to me that I was the person you were looking for, so I didn't reply. It's possible there are many people with a similar thought? Depending on what you need, I may be able to offer some sort of help, most likely in terms of advice for how the D output presents and folds into the users project, and whether it works or not. I don't have time to become a Bison dev though; there'd be a huge learning curve for me, and I'm really time-poor as is. I don't think your take away should be that it's not useful to people, but finding contributors who can hack on Bison is a different question.
Jan 29