Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wish: GNU Bison #22

Open
helmesjo opened this issue Aug 23, 2022 · 3 comments
Open

wish: GNU Bison #22

helmesjo opened this issue Aug 23, 2022 · 3 comments

Comments

@helmesjo
Copy link

helmesjo commented Aug 23, 2022

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

@helmesjo helmesjo mentioned this issue Aug 23, 2022
@boris-kolpackov
Copy link
Contributor

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 helmesjo mentioned this issue Aug 23, 2022
@helmesjo
Copy link
Author

@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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants