[PATCH 0/4] yacc.c: provide the Bison version as an integral macro

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
Balazs Scheidler asked for the Bison version as a numeric macro in
https://github.com/akimd/bison/issues/55.  The series of patches
recycles the existing YYBISON from simply being `1`, to being the
current version, e.g. `30704`.

I used a scale of 100, which should not be a problem.  We could use a
scale of 1000, or even something not regular as Boost does (107400 is
1.74).

Paul, I'd appreciate your opinion on this scale, and time permitting,
a quick check on the way I used intprops to compute that version
integer.

Cheers!

Akim Demaille (4):
  %require: accept version numbers with three parts ("3.7.4")
  style: make conversion of version string to int public
  regen
  yacc.c: provide the Bison version as an integral macro

 NEWS                       |  6 ++++
 data/skeletons/bison.m4    |  2 +-
 data/skeletons/c.m4        |  8 ++---
 data/skeletons/d.m4        |  8 ++---
 data/skeletons/java.m4     |  8 ++---
 data/skeletons/location.cc |  2 +-
 data/skeletons/stack.hh    |  2 +-
 doc/bison.texi             |  6 ++++
 src/local.mk               |  2 ++
 src/muscle-tab.c           |  3 --
 src/output.c               |  4 +++
 src/parse-gram.c           | 67 ++++++++++----------------------------
 src/parse-gram.h           |  2 +-
 src/parse-gram.y           | 35 ++------------------
 src/strversion.c           | 67 ++++++++++++++++++++++++++++++++++++++
 src/strversion.h           | 28 ++++++++++++++++
 16 files changed, 149 insertions(+), 101 deletions(-)
 create mode 100644 src/strversion.c
 create mode 100644 src/strversion.h

-- 
2.29.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.