build2-packaging / WISHLIST

Packaging wishlist
The Unlicense
2 stars 0 forks source link

wish: GNU Bison #22

Open helmesjo opened 2 years ago

helmesjo commented 2 years ago

https://www.gnu.org/software/bison/ | https://github.com/akimd/bison

Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.

Should be implemented as a build system module if I understand the documentation correctly.

Build prerequisites

boris-kolpackov commented 2 years ago

I looked into this and it's not going to be straightforward because it requires gnulib which is deeply integrated with autotools. It (or flex, I don't remember exactly) also requires m4 though I think it doesn't have to be GNU m4, just reasonably compatible.

What I did is package byacc (Berkley yacc) and reflex (a flex fork) which are reasonably compatible with GNU versions (there is also openbsd-m4). I used them instead of bison/flex in liblkc for example: https://github.com/build2-packaging/kconfig/blob/master/liblkc/liblkc/buildfile

Regarding the build system module, we may want to do it one day but it feels like using an ad hoc recipe/rule is a lighter-weight solution for most projects.

helmesjo commented 2 years ago

@boris-kolpackov These are for packaging thrift, but if the two suggested already packaged alternatives work for this then that'd be great! I'm planning to start packaging thrift myself, so if ok I'll keep these issues alive and close if it all works out without them.

boris-kolpackov commented 2 years ago

I think let's keep it open even if things work out for thrift -- we will need to package bison and flex sooner of later.