[build2] Yacc module?

Boris Kolpackov boris at codesynthesis.com
Sat Aug 31 11:03:19 UTC 2019


Joachim Kuebart <joachim.kuebart at gmail.com> writes:

> I'm trying to write a build2 build system for a project which uses yacc
> (weird I know). I didn't find an existing yacc module either shipped with
> build2 or on cppget.
> 
> I'm not disinclined to write a module myself for the platforms I use, just
> wanted to make sure it's not a waste of effort, and perhaps ask for some
> expert guidance on where best to start ;)

Good timing: support for external build system modules was added to
build2 about a week ago (so it's currently only available in the
staged version[1]).

There is a very basic (a stub, really) module implementation here:

https://github.com/boris-kolpackov/libbuild2-hello

I am also planning to write something more realistic so that it can
be used as an example. Using yacc did cross my mind.

So, if you are interested, I can sketch the initial implementation
out and maybe you can contribute/take over?

If that sounds like a plan, it would be good to get more information
on your requirements. I did a bit of background reading[2] (it's been
a while since I used lex/yacc) and there are some variances, like
yacc vs bison, output file set and naming, C vs C++, etc. Not that
it's problematic (the reason we write build2 modules in C++ is to be
able to handle stuff like this), we just need to decide what we are
going to start with.

[1] https://build2.org/community.xhtml#stage

[2] https://www.freebsd.org/cgi/man.cgi?query=yacc
    https://pubs.opengroup.org/onlinepubs/009695399/utilities/yacc.html
    MacOS X yacc(1): "On Darwin, yacc is a wrapper for bison(1)"
    



More information about the users mailing list