Merge pull request #556 from fosslinux/bison-update

Bison update
This commit is contained in:
Samuel Tyler 2025-12-26 10:08:36 +11:00 committed by GitHub
commit a9d0fdfc45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 836 additions and 168 deletions

View file

@ -1015,14 +1015,6 @@ This is an older version of bison required for the bison files in older perls.
We backwards-bootstrap this from 3.4.1, using 3.4.1 to compile the bison files
in 2.3. This parser works sufficiently well for perl 5.10.1.
bison 3.4.2
===========
Bison 3.4.1 is buggy and segfaults when perl is built. This is probably
because it was built with a hand-written makefile. We do not build the latest
bison because perl maybe requires bison <= 3.4.2.
This step could be improved, possibly.
dist 3.5
========
@ -1081,17 +1073,6 @@ zlib 1.2.13
zlib is a software library used for data compression and implements an abstraction of
DEFLATE algorithm that is also used in ``gzip``.
automake 1.16.3
===============
GNU Automake from 1.16 series that required newer Perl.
autoconf 2.71
=============
GNU Autoconf 2.71 is even newer version of autoconf. It does not build with miniperl,
so we postponed it until full perl was built.
patch 2.7.6
===========
@ -1165,6 +1146,30 @@ aforementioned cycle has to be broken with this version. Also, the development
versions seem to be reasonably buggy again. Many patches need to be added to
this version to allow any future perl to be built.
automake 1.16.3
===============
GNU Automake from 1.16 series that required newer Perl.
autoconf 2.71
=============
GNU Autoconf 2.71 is even newer version of autoconf. It does not build with miniperl,
so we postponed it until a sufficient version of perl was built.
bison 3.6.4
===========
With autoconf 2.71, we can build a newer version of Bison that is also less
buggy than the bootstrapped version. This is the newest version that can
(without very complicated patching) be built by Bison 3.4.
bison 3.7.6
===========
Again, a newer version of Bison -- the last version that can be built by
Bison 3.8 before running into obscure messages.
perl 5.22.4
===========
@ -1197,6 +1202,13 @@ number of new language features into the mk_invlists.pl script that are not
easily removed (there have been too many changes). 5.36 has enough support
of the new features.
bison 3.8.2
===========
The most recent release of Bison.
We put this here because the previous releases of Perl do not support this
Bison version.
perl 5.42.0
===========

View file

@ -23,13 +23,15 @@ c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6
86c58a6f3c68414ae4aa694831bd8326106c7d2dac6183470c875b0ac982be65 bash-5.2.15_0.tar.bz2
e5a0c306550ccfbea0b0e0a8ac121dfb1439759441916050778c448b02b8b301 bc-1.08.1_0.tar.bz2
6591838fbfcd64b88435cd948ebe6fcfd6c22b0993935bd0a19310e767da9e94 binutils-2.30_0.tar.bz2
c934b39be7232d27e13656ff8df628590917d2131b41a409426be00ce816624b binutils-2.41_0.tar.bz2
3c8d70021651ff8be3c9cdbfb207f4b4da47ca37d8edd4589ede5f6f68742ecc binutils-2.41_1.tar.bz2
a2b6a2d58245c3897b2335512915a5d0896fd948a8c5881faab7a6473e42cdb1 binutils-2.41_0.tar.bz2
1f63c355042804b86f694b8d3aa79ccf33a1b6e79f80e8b631a137aea25c3142 binutils-2.41_1.tar.bz2
5182bedc1c68f9908ed782dbb0a79c0a5b262fe8b1f9c6eea6d7e7186696827e bison-2.3_0.tar.bz2
81554c867db75101422797d227dd76c8a12c87246393126542ff92a0b97db6c1 bison-3.4.1_0.tar.bz2
f7437edc081071cc3ecd3384abf4c63f33183858b8cae6b4ac3105c66f88b3b6 bison-3.4.1_1.tar.bz2
8064a96c8ccfbab1245554ac30e68fcc73da24a3dd02f8450658fdb106c7f405 bison-3.4.1_2.tar.bz2
1d34d1576c5cf61c84929d212594e4187029339a5d37cbe0a69d73d6b2a29604 bison-3.4.2_0.tar.bz2
b3b99ebf348f4a3ff1af29e958cab745232d3400d6604ab6ef8450538f6a0738 bison-3.4.1_0.tar.bz2
7f738ec72f716db3e91de9a9d9b9b4d335b9e5b34d01e8a69f4dc931d977b670 bison-3.4.1_1.tar.bz2
0f9ae3236faf92452b36adeeee642a0c800e53b01ca45f11d7a8cb3913169a2f bison-3.4.1_2.tar.bz2
ffcd771ba0e4e38ff726cf8d819ac5c0281186ed99a72b5a9d69d5940438e942 bison-3.6.4_0.tar.bz2
0cb9cb64b4baac6c3568bdf05047b37ff42c661fe3f1e7ab1be7de0f44c4c677 bison-3.7.6_0.tar.bz2
a0156d06536936dee9e696cbf6fb41087eaa1ce5cbc5d6e0067d3fd952ba7060 bison-3.8.2_0.tar.bz2
e8271c1213b6cc7c9ae2ddb018cd093cbbd5f6e842548c0747ce95b13b6b9447 bzip2-1.0.8_0.tar.bz2
fd65c11422588984bc3a440b1fd9d022307a200de182cfedfe3387a09cbece98 ca-certificates-3.99_0.tar.bz2
982a3496ce3277c562acc896ba796939fe55a37432b2c76ab16b76e051a045a2 coreutils-5.0_0.tar.bz2
@ -49,19 +51,19 @@ f6c65eef86aa9f5317396a8443b25ed87a18f72d07dfd2231a594aa2c1a68942 findutils-4.2.
2ba6bfb20ab603787a95bf293742f36cfd8270c616073a880bc6d0c703e2c870 flex-2.5.33_0.tar.bz2
9e898068d570b5cfa016f0e14819d7f7a6577bae9177ef1e9bb62866d5b0f0b9 flex-2.6.4_0.tar.bz2
c925739472260498342ba6dc3263da937abf5237e7e9102622bf5657ec98094a gawk-3.0.4_0.tar.bz2
ce0a69589791196818d59ee49a76391741999ce9fcb6ab72bdbd6d5197df0cf3 gawk-5.3.0_0.tar.bz2
e119505fb6218deaaafbf5d31e0ce3dc1e60dae8475fe2a3f9230f9e9e8c7eaf gawk-5.3.0_0.tar.bz2
b4fafdabdbd8c1f9f7c96fc4677023a8151fe2afe0702e3dee920157b30deb98 gc-8.0.4_0.tar.bz2
1edee9931fd23d02bf3f706cb43de3c141fbd8f9d3a1bf636ed460acaac2c5eb gcc-10.5.0_0.tar.bz2
a2d4f9099ef92f8bd79f65a384764622a0aa50b5488826aef8a3afef8d57e46b gcc-15.2.0_0.tar.bz2
d34de902de6de9204abedb834c4c39fbb95b993e545fbb090de2b028fa1d4a61 gcc-4.0.4_0.tar.bz2
2f13b3306832d882536c97d0302f2ec1801193086dbbe62388f930858e5728a3 gcc-4.0.4_1.tar.bz2
c523aff079101ce282793efc00934cf2ca20de58109a42746002c112c526b65f gcc-4.7.4_0.tar.bz2
4791285848460b6645e1ece7d53d836900529d52af7cbab86978bddf687acfa2 gettext-0.21_0.tar.bz2
b1df809b03347ae8360162c512bd7589611e735638c795cc54f0f032a8439727 gettext-0.21_0.tar.bz2
96f33b53c24f5f46a23c2b9eef8147e684c796889a83bdd39254a73393594a49 gmp-6.2.1_0.tar.bz2
8138c02c4fef718c97827f1d6476e2fc83433ff06eff4820b53589b5419b7e15 gperf-3.1_0.tar.bz2
c1989fc2855dbb0350c4e5b677028306614a9f4b5cb6c01fd459c5e1abf592b9 grep-2.4_0.tar.bz2
69a57d4a696f3559f821b50b9d5d4174e81801767ed8d0d00f1f3234e92ec251 grep-3.7_0.tar.bz2
6988de155779ed22eab5fd5188dcf3e47b7a94effa7de260430f9cb4a84fc78c grub-2.06_0.tar.bz2
d7a28778c1199604ba7af0e706c56c65fa345cae7e80646956f1be71ae30b448 grub-2.06_0.tar.bz2
9d6732935e6eb800b03f54c37e173d6a862fa1008aad51b7bf95fb6018599eb7 guile-3.0.9_0.tar.bz2
893bb26efb8b1789702b8fd1a3ed72951990c8e38ab650c5220992405e79b96e gzip-1.13_0.tar.bz2
f27e1eaafa7ab198d2ed549aecfd8a1205d960f59a509789a159997565abd6d4 heirloom-devtools-070527_0.tar.bz2
@ -92,26 +94,26 @@ ded6ecc93cc194f5b22be26c6547c63a4b84959785212fded100440f71da1802 musl-1.1.24_2.
1e0e6ce38bf65dde7a222c68178805432a6ded658131f3a6076ce65c483a3dac musl-1.2.5_0.tar.bz2
f25c410403bef549d4ba37e500970480eaa649b582db9de9e21616257f9ecbcf musl-1.2.5_1.tar.bz2
3755dc16bfa1ff39a1c9309c2c03bb0e5dfc215ae4b1c242f3818fe07c1014e4 musl-1.2.5_2.tar.bz2
f629dad141a32b592e78e8ecf465bded45437601b3340520a8799331cfac0024 opendoas-6.8.2_0.tar.bz2
62d3091f09315ef0c01865d15068ee14e19a04bdb40c23f5490a01aa23dd5565 opendoas-6.8.2_0.tar.bz2
693806e3bccbea1f836893763128f6c3a6157c5e984a7cbc99d002b421161011 openssl-3.0.13_0.tar.bz2
f39330325296612d66427de568a030aff3a514aad567a88e1de432392a08abdd patch-2.7.6_0.tar.bz2
a69d77242ba2bfa97a40e633656703ecedbcd797de5ad29eb62bf93831ee6f25 patch-2.7.6_0.tar.bz2
44456a0635dc56351d34bf9701487e562c2c903393db2cc99f5c3a6d2ecf52d4 perl-5.000_0.tar.bz2
0b7ded1733433323c2056b1005828aaabb8aaca9505839333a8e80f12669f203 perl-5.003_0.tar.bz2
e8707f598b909ae01a5dc480fc9867ddb6254d22538f8f6cb65734294d92d728 perl5.004-05_0.tar.bz2
335cd8ac4424ff5506b1a733a0e1fd38ae360249ad224100f25cde82b7c2f4db perl5.005-03_0.tar.bz2
b707a9bcb3098008dbe1cfa831d3847aab38143e44c1ab206c02f04916fd28c3 perl-5.12.5_0.tar.bz2
35034f09b78483d09a893ee1e9ddc6cb38fe6a73ee6fe63261729faab424e31f perl-5.15.7_0.tar.bz2
90c4082c4019b2a045583ac338352173b9e64e51d945205378709ad76f1c25a5 perl-5.16.3_0.tar.bz2
9ef04af2574cf9518c9f36dfcd0bbc99b83c1a9d42b0505dd93c20330088aaea perl-5.17.2_0.tar.bz2
0611b81ed8e369e54e51c5a0ac36b76fc172a7602538397a00b6166e1275d50a perl-5.17.4_0.tar.bz2
af5238bb99a9d9d7403861ebd7290700050214e0e4a8300b874324b6b5307fe3 perl-5.18.4_0.tar.bz2
56811ae07f60abdbd345fcb56baa01ce7baa769d92ba8b6d2ff65c639a7b7ad5 perl-5.12.5_0.tar.bz2
059e58fa8e556c06936bef274917f1533e88f684a07f5196032cc0d2e3171640 perl-5.15.7_0.tar.bz2
48ef7a7c1c9d4a9a175f92cc951559edaf217c8345a736a8d6c4c3219c618cdb perl-5.16.3_0.tar.bz2
6a8cc1d436b808931de4879ba5c6b56bfc20e88ca1b14b516bcecabbc3ad4e1d perl-5.17.2_0.tar.bz2
cbdfcfc746e740ae747e5cd2de0fac801bcf77be89eb968b2d5c0294d203d2e7 perl-5.17.4_0.tar.bz2
a53996e36f4d9e07e01df2683d23c5250e0cda2f4a50d2b4d1218c221d2c6d88 perl-5.18.4_0.tar.bz2
2e4d36e9794d6646bec5c0ce4cd54932124476b451ff6d8ae7a6676e1770a19a perl-5.22.4_0.tar.bz2
dac25836819f6201c3f9f2db683dab299ac00719c3b241290270314250d81ab7 perl-5.24.4_0.tar.bz2
8ea27e2743262b5f263527fff9ab99b76cdc5b2ec83243f9b8f6a789d112e614 perl-5.30.3_0.tar.bz2
204b8b2b2e712e5b638a0ec18661d7a6e704a7d08c279666da7bf79658f9db14 perl-5.36.3_0.tar.bz2
3ee21bdc9460dc56fb6482b51c9427e2b65e74e2228e0153e9ab353272e38944 perl-5.42.0_0.tar.bz2
d73edc1fd83135b6ec46b936c2fab576b498d4c0afce6b0455460885920f1c96 perl-5.36.3_0.tar.bz2
4c34427868323ffdef085411418623203b2331b052def00e6c88eeef36c04cf6 perl-5.42.0_0.tar.bz2
2dc6823582071885b05deee81eb8053a7ad307dfc0b64a8438bfdecc1d64af29 perl-5.6.2_0.tar.bz2
95615d5576bad50dc60f308debab69224bb0efa8681522b82f624383533f70fd perl-5.8.9_0.tar.bz2
80b866cb7f9222f5d02909311365a7bd0aac66a90b202376225338e8336ec82a perl-5.8.9_0.tar.bz2
d4997499d4ae8eb6c1daf43d1f2fde962fc0080dd0a20ec55e1d91557dec35eb perl-Devel-Tokenizer-C-0.11_0.tar.bz2
f2566533cce1831a01d6d05ff9d34e68b0c9b6d6ed81b65894711b5600ff47e3 perl-Devel-Tokenizer-C-0.11_10.tar.bz2
ef1ed729ff58ca3f10fe6cb7d5d39d783d539e2aa2b88a70d39af1bffa30ed44 perl-Devel-Tokenizer-C-0.11_11.tar.bz2

View file

@ -4,4 +4,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#define LOCALEDIR "/usr/share/locale"
#define PKGDATADIR "/usr/share/bison"
#define PKGDATADIR "/usr/share/bison-3.4"

View file

@ -21,8 +21,8 @@ bison: src.a lib.a
FORCE:
install:
install -D bison $(DESTDIR)$(PREFIX)/bin/bison
rm -rf $(PREFIX)/share/bison
install -d $(DESTDIR)$(PREFIX)/share/bison
mv data/skeletons/ $(DESTDIR)$(PREFIX)/share/bison
mv data/m4sugar/ $(DESTDIR)$(PREFIX)/share/bison
install -D bison $(DESTDIR)$(PREFIX)/bin/bison-3.4
ln -s bison-3.4 $(DESTDIR)$(PREFIX)/bin/bison
install -d $(DESTDIR)$(PREFIX)/share/bison-3.4
mv data/skeletons/ $(DESTDIR)$(PREFIX)/share/bison-3.4
mv data/m4sugar/ $(DESTDIR)$(PREFIX)/share/bison-3.4

View file

@ -1,91 +0,0 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
#
# SPDX-License-Identifier: GPL-3.0-or-later
../gnulib-672663a/gnulib-tool --import --local-dir=gl \
--lib=libbison \
--source-base=lib \
--m4-base=m4 \
--po-base=gnulib-po \
--doc-base=doc \
--tests-base=tests \
--aux-dir=build-aux \
--makefile-name=gnulib.mk \
--conditional-dependencies \
--no-libtool \
--macro-prefix=gl \
--po-domain=bison \
argmatch \
array-list \
assert \
assure \
bitsetv \
c-strcase \
calloc-posix \
close \
closeout \
config-h \
configmake \
dirname \
error \
extensions \
fdl \
fopen-safer \
fprintf-posix \
getopt-gnu \
gettext-h \
git-version-gen \
gitlog-to-changelog \
gpl-3.0 \
inttypes \
isnan \
javacomp-script \
javaexec-script \
ldexpl \
libtextstyle-optional \
mbswidth \
non-recursive-gnulib-prefix-hack \
obstack \
obstack-printf \
perror \
printf-posix \
progname \
quote \
quotearg \
readme-release \
realloc-posix \
relocatable-prog \
relocatable-script \
rename \
snprintf-posix \
spawn-pipe \
sprintf-posix \
stdbool \
stpcpy \
strdup-posix \
strerror \
strverscmp \
timevar \
unistd \
unistd-safer \
unlink \
unlocked-io \
unsetenv \
update-copyright \
verify \
vsnprintf-posix \
vsprintf-posix \
warnings \
xalloc \
xalloc-die \
xconcat-filename \
xhash \
xlist \
xmemdup0 \
xstrndup
../gnulib-672663a/build-aux/prefix-gnulib-mk \
--lib-name=libbison \
lib/gnulib.mk

View file

@ -1,17 +0,0 @@
SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Again, same as bison 2.3. I cannot figure out what gnulib/bison are doing
that makes this required...
--- bison-3.4.2/Makefile.am 2021-04-15 12:18:34.371818904 +1000
+++ bison-3.4.2/Makefile.am 2021-04-15 12:18:39.055851647 +1000
@@ -63,6 +63,7 @@
check_SCRIPTS =
dist_TESTS =
noinst_LIBRARIES =
+lib_libbison_a_SOURCES =
include build-aux/local.mk
include data/local.mk

View file

@ -1,2 +0,0 @@
f http://mirrors.kernel.org/gnu/bison/bison-3.4.2.tar.xz 27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0
g https://https.git.savannah.gnu.org/git/gnulib.git~672663a _ 8cced51f89a950472473856f86e88f5daf97a2347756125ccdc8ee907deec570 gnulib-672663a.tar.gz

View file

@ -0,0 +1,96 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
#
# SPDX-License-Identifier: GPL-3.0-or-later
../gnulib-ffbb0ce/gnulib-tool --import --local-dir=gl \
--lib=libbison \
--source-base=lib \
--m4-base=m4 \
--po-base=gnulib-po \
--doc-base=doc \
--tests-base=tests \
--aux-dir=build-aux \
--makefile-name=gnulib.mk \
--conditional-dependencies \
--no-libtool \
--macro-prefix=gl \
--po-domain=bison \
argmatch \
array-list \
assert \
assure \
bitsetv \
c-strcase \
calloc-posix \
close \
closeout \
config-h \
configmake \
dirname \
error \
extensions \
fdl \
fopen-safer \
fprintf-posix \
fstrcmp \
getopt-gnu \
gettext-h \
git-version-gen \
gitlog-to-changelog \
gpl-3.0 \
intprops \
inttypes \
isnan \
javacomp-script \
javaexec-script \
ldexpl \
libtextstyle-optional \
malloc-gnu \
mbfile \
mbswidth \
non-recursive-gnulib-prefix-hack \
obstack \
obstack-printf \
perror \
printf-posix \
progname \
quote \
quotearg \
readline \
readme-release \
realloc-posix \
relocatable-prog \
relocatable-script \
rename \
snprintf-posix \
spawn-pipe \
sprintf-posix \
stdbool \
stpcpy \
strdup-posix \
strerror \
strverscmp \
timevar \
unistd \
unistd-safer \
unlink \
unlocked-io \
unsetenv \
update-copyright \
verify \
vsnprintf-posix \
vsprintf-posix \
warnings \
winsz-ioctl \
winsz-termios \
xalloc \
xalloc-die \
xconcat-filename \
xhash \
xlist \
xmemdup0 \
xstrndup
build-aux/prefix-gnulib-mk --lib-name=libbison lib/gnulib.mk

51
steps/bison-3.6.4/pass1.sh Executable file
View file

@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2021-22 Samuel Tyler <samuel@samuelt.me>
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# GRAM_error was added after Bison 3.4, and doesn't add anything
# other than some sanity checks.
sed -i '/GRAM_error/d' src/scan-gram.l
# Remove pre-generated flex/bison files
rm src/parse-gram.c src/parse-gram.h
rm src/scan-code.c
rm src/scan-gram.c
rm src/scan-skel.c
# Remove pregenerated info files
rm doc/bison.info*
# Remove gettext files
rm runtime-po/*.gmo
../../import-gnulib.sh
# pregenerated gperf files
for f in lib/iconv_open-*.gperf; do
touch "$(basename "$f" .gperf).h"
done
AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
}
src_configure() {
./configure --prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--disable-nls \
--program-suffix=-3.6 \
--datarootdir="${PREFIX}/share/bison-3.6"
}
src_compile() {
make -j1 MAKEINFO=true
}
src_install() {
make MAKEINFO=true DESTDIR="${DESTDIR}" install
ln -s bison-3.6 "${DESTDIR}${PREFIX}/bin/bison"
}

View file

@ -0,0 +1,118 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Revert "diagnostics: translate bison's own tokens"
This reverts commit 2cc361387c9790b387d205f5d862f493c148e424.
This format is not suppported by Bison 3.4.
---
src/parse-gram.y | 71 ++++++++++++++++++++++++++----------------------
1 file changed, 39 insertions(+), 32 deletions(-)
diff --git bison-3.6.4/src/parse-gram.y bison-3.6.1/src/parse-gram.y
index d09f49a7..0879ca41 100644
--- bison-3.6.4/src/parse-gram.y
+++ bison-3.6.4/src/parse-gram.y
@@ -140,26 +140,32 @@
boundary_set (&@$.end, grammar_file, 1, 1, 1);
}
-%token
- STRING _("string")
- TSTRING _("translatable string")
+/* Define the tokens together with their human representation. */
+%token GRAM_EOF 0 "end of file"
+%token STRING "string"
+ TSTRING "translatable string"
+
+%token PERCENT_TOKEN "%token"
+%token PERCENT_NTERM "%nterm"
- PERCENT_TOKEN "%token"
- PERCENT_NTERM "%nterm"
+%token PERCENT_TYPE "%type"
+%token PERCENT_DESTRUCTOR "%destructor"
+%token PERCENT_PRINTER "%printer"
- PERCENT_TYPE "%type"
- PERCENT_DESTRUCTOR "%destructor"
- PERCENT_PRINTER "%printer"
+%token PERCENT_LEFT "%left"
+%token PERCENT_RIGHT "%right"
+%token PERCENT_NONASSOC "%nonassoc"
+%token PERCENT_PRECEDENCE "%precedence"
- PERCENT_LEFT "%left"
- PERCENT_RIGHT "%right"
- PERCENT_NONASSOC "%nonassoc"
- PERCENT_PRECEDENCE "%precedence"
+%token PERCENT_PREC "%prec"
+%token PERCENT_DPREC "%dprec"
+%token PERCENT_MERGE "%merge"
- PERCENT_PREC "%prec"
- PERCENT_DPREC "%dprec"
- PERCENT_MERGE "%merge"
+/*----------------------.
+| Global Declarations. |
+`----------------------*/
+%token
PERCENT_CODE "%code"
PERCENT_DEFAULT_PREC "%default-prec"
PERCENT_DEFINE "%define"
@@ -185,23 +191,24 @@
PERCENT_TOKEN_TABLE "%token-table"
PERCENT_VERBOSE "%verbose"
PERCENT_YACC "%yacc"
+;
- BRACED_CODE "{...}"
- BRACED_PREDICATE "%?{...}"
- BRACKETED_ID _("[identifier]")
- CHAR _("character literal")
- COLON ":"
- EPILOGUE _("epilogue")
- EQUAL "="
- ID _("identifier")
- ID_COLON _("identifier:")
- PERCENT_PERCENT "%%"
- PIPE "|"
- PROLOGUE "%{...%}"
- SEMICOLON ";"
- TAG _("<tag>")
- TAG_ANY "<*>"
- TAG_NONE "<>"
+%token BRACED_CODE "{...}"
+%token BRACED_PREDICATE "%?{...}"
+%token BRACKETED_ID "[identifier]"
+%token CHAR "character literal"
+%token COLON ":"
+%token EPILOGUE "epilogue"
+%token EQUAL "="
+%token ID "identifier"
+%token ID_COLON "identifier:"
+%token PERCENT_PERCENT "%%"
+%token PIPE "|"
+%token PROLOGUE "%{...%}"
+%token SEMICOLON ";"
+%token TAG "<tag>"
+%token TAG_ANY "<*>"
+%token TAG_NONE "<>"
/* Experimental feature, don't rely on it. */
%code pre-printer {tron (yyo);}
@@ -224,7 +231,7 @@
%printer { fprintf (yyo, "%%%s", $$); } PERCENT_FLAG
%printer { fprintf (yyo, "<%s>", $$); } TAG tag
-%token <int> INT _("integer literal")
+%token <int> INT "integer"
%printer { fprintf (yyo, "%d", $$); } <int>
%type <symbol*> id id_colon string_as_id symbol token_decl token_decl_for_prec
--
2.52.0

View file

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Our version of bison does not have dangling-alias.
--- bison-3.6.4/Makefile.am 2025-12-15 22:03:53.093822507 +1100
+++ bison-3.6.4/Makefile.am 2025-12-15 22:04:07.336823714 +1100
@@ -42,7 +42,7 @@
BISON = $(top_builddir)/tests/bison
BISON_IN = $(top_srcdir)/tests/bison.in
YACC = $(BISON) -o y.tab.c
-AM_YFLAGS_WITH_LINES = --defines -Werror -Wall,dangling-alias --report=all
+AM_YFLAGS_WITH_LINES = --defines -Wall --report=all
AM_YFLAGS = $(AM_YFLAGS_WITH_LINES) --no-lines
# Initialization before completion by local.mk's.

View file

@ -0,0 +1,29 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
It is unclear _why_ this is necessary. Something gets broken with
iconv detection for this version.
--- bison-3.6.4/m4/gettext.m4 2025-12-15 23:14:05.683179597 +1100
+++ bison-3.6.4/m4/gettext.m4 2025-12-15 23:14:18.450180679 +1100
@@ -93,9 +93,6 @@
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
dnl documented, we avoid it.
- ifelse(gt_included_intl, yes, , [
- AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
- ])
dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
gt_INTL_MACOSX
@@ -174,9 +171,6 @@
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
dnl Sometimes libintl requires libiconv, so first search for libiconv.
- ifelse(gt_included_intl, yes, , [
- AM_ICONV_LINK
- ])
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL

View file

@ -5,8 +5,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
Why do they insist on using themselves to bootstrap themselves? It doesn't
exist...
--- bison-3.4.2/Makefile.am 2021-04-15 21:29:36.596205032 +1000
+++ bison-3.4.2/Makefile.am 2021-04-15 21:30:00.367365897 +1000
--- bison-3.6.4/Makefile.am 2021-04-15 21:29:36.596205032 +1000
+++ bison-3.6.4/Makefile.am 2021-04-15 21:30:00.367365897 +1000
@@ -39,7 +39,7 @@
## Running the bison from this tarball. To generate our own parser,
## but also to run the tests. Of course, you ought to keep a sane

View file

@ -0,0 +1,21 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
These are directives that don't exist for Bison 3.4.
diff --git bison-3.6.4/src/parse-gram.y bison-3.6.4/src/parse-gram.y
index d09f49a7..01b8dda9 100644
--- bison-3.6.4/src/parse-gram.y
+++ bison-3.6.4/src/parse-gram.y
@@ -122,10 +122,8 @@
%define api.header.include {"parse-gram.h"}
%define api.prefix {gram_}
%define api.pure full
-%define api.token.raw
%define api.value.type union
%define locations
-%define parse.error custom
%define parse.lac full
%define parse.trace
%defines

View file

@ -1,12 +1,12 @@
SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
We don't have network access at this stage to "Fetch PO files".
Can't fetch PO files, no network access.
--- gnulib-672663a/gnulib-tool 2021-04-15 21:07:04.538055553 +1000
+++ gnulib-672663a/gnulib-tool 2021-04-15 21:07:16.424135984 +1000
@@ -5564,16 +5564,6 @@
--- gnulib-ffbb0ce/gnulib-tool 2025-12-15 21:17:35.808587084 +1100
+++ gnulib-ffbb0ce/gnulib-tool 2025-12-15 21:17:55.399588744 +1100
@@ -5598,16 +5598,6 @@
fi
func_append added_files "$pobase/POTFILES.in$nl"
fi

View file

@ -0,0 +1,42 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
This was added with the addition of yypcontext_t -- it's the only use,
remove it. (Bison 3.4 doesn't know about yypcontext_t.)
diff --git bison-3.6.4/src/parse-gram.y bison-3.5.90/src/parse-gram.y
index d09f49a7..cf1a5bf4 100644
--- bison-3.6.4/src/parse-gram.y
+++ bison-3.6.4/src/parse-gram.y
@@ -798,28 +798,9 @@ epilogue.opt:
%%
int
-yyreport_syntax_error (const yypcontext_t *ctx)
+yyreport_syntax_error (const void *ctx)
{
- int res = 0;
- /* Arguments of format: reported tokens (one for the "unexpected",
- one per "expected"). */
- enum { ARGS_MAX = 5 };
- const char *argv[ARGS_MAX];
- int argc = 0;
- yysymbol_kind_t unexpected = yypcontext_token (ctx);
- if (unexpected != YYSYMBOL_YYEMPTY)
- {
- argv[argc++] = yysymbol_name (unexpected);
- yysymbol_kind_t expected[ARGS_MAX - 1];
- int nexpected = yypcontext_expected_tokens (ctx, expected, ARGS_MAX - 1);
- if (nexpected < 0)
- res = nexpected;
- else
- for (int i = 0; i < nexpected; ++i)
- argv[argc++] = yysymbol_name (expected[i]);
- }
- syntax_error (*yypcontext_location (ctx), argc, argv);
- return res;
+ return 0;
}

View file

@ -0,0 +1,2 @@
f http://mirrors.kernel.org/gnu/bison/bison-3.6.4.tar.xz 8b13473b31ca7fcf65e5e8a74224368ffd5df19275602a9c9567ba393f18577d
g https://https.git.savannah.gnu.org/git/gnulib.git~ffbb0ce _ 4c14c95b301e74804dd82d3993176b03cffedc18221bf573db35d21f2f8a930e gnulib-ffbb0ce.tar.gz

View file

@ -0,0 +1,103 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
#
# SPDX-License-Identifier: GPL-3.0-or-later
../gnulib-839ed05/gnulib-tool --import --local-dir=gl \
--lib=libbison \
--source-base=lib \
--m4-base=m4 \
--po-base=gnulib-po \
--doc-base=doc \
--tests-base=tests \
--aux-dir=build-aux \
--makefile-name=gnulib.mk \
--conditional-dependencies \
--no-libtool \
--macro-prefix=gl \
--po-domain=bison \
argmatch \
array-list \
assert \
assure \
attribute \
bitsetv \
c-strcase \
calloc-posix \
close \
closeout \
config-h \
configmake \
dirname \
error \
extensions \
fdl \
fopen-safer \
fprintf-posix \
fstrcmp \
getopt-gnu \
gettext-h \
git-version-gen \
gitlog-to-changelog \
gpl-3.0 \
intprops \
inttypes \
isnan \
javacomp-script \
javaexec-script \
ldexpl \
libtextstyle-optional \
linked-list \
malloc-gnu \
mbfile \
mbswidth \
non-recursive-gnulib-prefix-hack \
obstack \
obstack-printf \
perror \
printf-posix \
progname \
quote \
quotearg \
rbtreehash-list \
readline \
readme-release \
realloc-posix \
relocatable-prog \
relocatable-script \
rename \
snprintf-posix \
spawn-pipe \
sprintf-posix \
stdbool \
stpcpy \
stpncpy \
strdup-posix \
strerror \
strverscmp \
sys_ioctl \
termios \
timevar \
unicodeio \
unistd \
unistd-safer \
unlink \
unlocked-io \
unsetenv \
update-copyright \
verify \
vsnprintf-posix \
vsprintf-posix \
warnings \
winsz-ioctl \
winsz-termios \
xalloc \
xalloc-die \
xconcat-filename \
xhash \
xlist \
xmemdup0 \
xstrndup
build-aux/prefix-gnulib-mk --lib-name=libbison lib/gnulib.mk

View file

@ -13,17 +13,28 @@ src_prepare() {
rm src/scan-skel.c
# Remove pregenerated info files
rm doc/bison.info
rm doc/bison.info*
# Remove gettext files
rm runtime-po/*.gmo
../../import-gnulib.sh
# pregenerated gperf files
for f in lib/iconv_open-*.h; do
rm "$f"
touch "$f"
done
AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
}
src_configure() {
./configure --prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--disable-nls
--disable-nls \
--program-suffix=-3.7 \
--datarootdir="${PREFIX}/share/bison-3.7"
}
src_compile() {
@ -32,4 +43,6 @@ src_compile() {
src_install() {
make MAKEINFO=true DESTDIR="${DESTDIR}" install
ln -s bison-3.7 "${DESTDIR}${PREFIX}/bin/bison"
}

View file

@ -0,0 +1,18 @@
SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Why do they insist on using themselves to bootstrap themselves? It doesn't
exist...
--- bison-3.7.6/Makefile.am 2021-04-15 21:29:36.596205032 +1000
+++ bison-3.7.6/Makefile.am 2021-04-15 21:30:00.367365897 +1000
@@ -39,7 +39,7 @@
## Running the bison from this tarball. To generate our own parser,
## but also to run the tests. Of course, you ought to keep a sane
## version of Bison nearby...
-BISON = $(top_builddir)/tests/bison
+BISON = /usr/bin/bison
BISON_IN = $(top_srcdir)/tests/bison.in
YACC = $(BISON) -o y.tab.c
AM_YFLAGS_WITH_LINES = --defines -Werror -Wall --report=all

View file

@ -0,0 +1,25 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Can't fetch PO files, no network access.
--- gnulib-839ed05/gnulib-tool 2025-12-15 21:17:35.808587084 +1100
+++ gnulib-839ed05/gnulib-tool 2025-12-15 21:17:55.399588744 +1100
@@ -5598,16 +5598,6 @@
fi
func_append added_files "$pobase/POTFILES.in$nl"
fi
- # Fetch PO files.
- TP_URL="https://translationproject.org/latest/"
- if $doit; then
- echo "Fetching gnulib PO files from $TP_URL"
- (cd "$destdir"/$pobase \
- && wget --no-verbose --mirror --level=1 -nd -A.po -P . "${TP_URL}gnulib/"
- )
- else
- echo "Fetch gnulib PO files from $TP_URL"
- fi
# Create po/LINGUAS.
if $doit; then
func_dest_tmpfilename $pobase/LINGUAS

View file

@ -0,0 +1,2 @@
f http://mirrors.kernel.org/gnu/bison/bison-3.7.6.tar.xz 67d68ce1e22192050525643fc0a7a22297576682bef6a5c51446903f5aeef3cf
g https://https.git.savannah.gnu.org/git/gnulib.git~839ed05 _ bc96b5966e4651580ef69fee4a2dfed5ae3d3ab8af04bbe6f10dcd2dd010398e gnulib-839ed05.tar.gz

View file

@ -0,0 +1,107 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
#
# SPDX-License-Identifier: GPL-3.0-or-later
../gnulib-7818455/gnulib-tool --import --local-dir=gl \
--lib=libbison \
--source-base=lib \
--m4-base=m4 \
--po-base=gnulib-po \
--doc-base=doc \
--tests-base=tests \
--aux-dir=build-aux \
--makefile-name=gnulib.mk \
--conditional-dependencies \
--no-libtool \
--macro-prefix=gl \
--po-domain=bison \
argmatch \
array-list \
assert \
assure \
attribute \
bitsetv \
c-strcase \
calloc-posix \
close \
closeout \
config-h \
configmake \
dirname \
error \
execute \
extensions \
fdl \
fopen-safer \
fprintf-posix \
fstrcmp \
getopt-gnu \
gettext-h \
git-version-gen \
gitlog-to-changelog \
gpl-3.0 \
hash-map \
intprops \
inttypes \
isnan \
javacomp-script \
javaexec-script \
ldexpl \
libtextstyle-optional \
linked-list \
malloc-gnu \
mbfile \
mbswidth \
non-recursive-gnulib-prefix-hack \
obstack \
obstack-printf \
perror \
printf-posix \
progname \
quote \
quotearg \
rbtreehash-list \
readline \
readme-release \
realloc-posix \
relocatable-prog \
relocatable-script \
rename \
snprintf-posix \
spawn-pipe \
sprintf-posix \
stdbool \
stpcpy \
stpncpy \
strdup-posix \
strerror \
strtod \
strverscmp \
sys_ioctl \
termios \
timevar \
unicodeio \
unistd \
unistd-safer \
unlink \
unlocked-io \
unsetenv \
update-copyright \
verify \
vsnprintf-posix \
vsprintf-posix \
warnings \
winsz-ioctl \
winsz-termios \
xalloc \
xalloc-die \
xconcat-filename \
xhash \
xlist \
xmap \
xmemdup0 \
xstrndup
build-aux/prefix-gnulib-mk --lib-name=libbison lib/gnulib.mk

48
steps/bison-3.8.2/pass1.sh Executable file
View file

@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: 2021-22 Samuel Tyler <samuel@samuelt.me>
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Remove pre-generated flex/bison files
rm src/parse-gram.c src/parse-gram.h
rm src/scan-code.c
rm src/scan-gram.c
rm src/scan-skel.c
# Remove pregenerated info files
rm doc/bison.info*
# Remove gettext files
rm runtime-po/*.gmo
# pregenerated gperf files
for f in lib/iconv_open-*.h; do
rm "$f"
touch "$f"
done
../../import-gnulib.sh
AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.71 -fi
}
src_configure() {
./configure --prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--disable-nls \
--program-suffix=-3.8 \
--datarootdir="${PREFIX}/share/bison-3.8"
}
src_compile() {
make -j1 MAKEINFO=true
}
src_install() {
make MAKEINFO=true DESTDIR="${DESTDIR}" install
ln -s bison-3.8 "${DESTDIR}${PREFIX}/bin/bison"
}

View file

@ -0,0 +1,19 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Change %header to %defines, this was renamed in development cycle for 3.8.
diff --git bison-3.8.2/src/parse-gram.y bison-3.8.2/src/parse-gram.y
index 96e95ed1..10240483 100644
--- bison-3.8.2/src/parse-gram.y
+++ bison-3.8.2/src/parse-gram.y
@@ -152,7 +152,7 @@
%define parse.error custom
%define parse.lac full
%define parse.trace
-%header
+%defines
%expect 0
%verbose

View file

@ -0,0 +1,18 @@
SPDX-FileCopyrightText: 2021 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Why do they insist on using themselves to bootstrap themselves? It doesn't
exist...
--- bison-3.8.2/Makefile.am 2021-04-15 21:29:36.596205032 +1000
+++ bison-3.8.2/Makefile.am 2021-04-15 21:30:00.367365897 +1000
@@ -39,7 +39,7 @@
## Running the bison from this tarball. To generate our own parser,
## but also to run the tests. Of course, you ought to keep a sane
## version of Bison nearby...
-BISON = $(top_builddir)/tests/bison
+BISON = /usr/bin/bison
BISON_IN = $(top_srcdir)/tests/bison.in
YACC = $(BISON) -o y.tab.c
AM_YFLAGS_WITH_LINES = --defines -Werror -Wall --report=all

View file

@ -0,0 +1,25 @@
SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: GPL-3.0-or-later
Can't fetch PO files, no network access.
--- gnulib-7818455/gnulib-tool 2025-12-15 21:17:35.808587084 +1100
+++ gnulib-7818455/gnulib-tool 2025-12-15 21:17:55.399588744 +1100
@@ -5598,16 +5598,6 @@
fi
func_append added_files "$pobase/POTFILES.in$nl"
fi
- # Fetch PO files.
- TP_URL="https://translationproject.org/latest/"
- if $doit; then
- echo "Fetching gnulib PO files from $TP_URL"
- (cd "$destdir"/$pobase \
- && wget --no-verbose --mirror --level=1 -nd -A.po -P . "${TP_URL}gnulib/"
- )
- else
- echo "Fetch gnulib PO files from $TP_URL"
- fi
# Create po/LINGUAS.
if $doit; then
func_dest_tmpfilename $pobase/LINGUAS

View file

@ -0,0 +1,2 @@
f http://mirrors.kernel.org/gnu/bison/bison-3.8.2.tar.xz 9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2
g https://https.git.savannah.gnu.org/git/gnulib.git~7818455 _ 0e08a32ce38456238485cfefee0b8d0c43081c01c8e92a1d5e1e16002e4c6bcc gnulib-7818455.tar.gz

View file

@ -17,7 +17,13 @@ src_prepare() {
}
src_configure() {
./configure --prefix="${PREFIX}" --libdir="${LIBDIR}" --enable-static --disable-shared --disable-java
INTLBISON=bison-3.6 \
TOOLS_BISON=bison-3.6 \
./configure --prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--enable-static \
--disable-shared \
--disable-java
}
src_compile() {

View file

@ -154,7 +154,6 @@ build: mpfr-4.1.0
build: mpc-1.2.1
build: flex-2.5.33
build: bison-2.3
build: bison-3.4.2
build: zlib-1.2.13
build: dist-3.5
build: perl-Devel-Tokenizer-C-0.11
@ -171,6 +170,10 @@ build: perl-Devel-Tokenizer-C-0.11
build: perl-5.17.4
build: perl-Devel-Tokenizer-C-0.11
build: perl-5.18.4
build: automake-1.16.3
build: autoconf-2.71
build: bison-3.6.4
build: bison-3.7.6
build: perl-Devel-Tokenizer-C-0.11
build: perl-5.22.4
build: perl-Devel-Tokenizer-C-0.11
@ -179,6 +182,7 @@ build: perl-Devel-Tokenizer-C-0.11
build: perl-5.30.3
build: perl-Devel-Tokenizer-C-0.11
build: perl-5.36.3
build: bison-3.8.2
build: perl-Devel-Tokenizer-C-0.11
build: perl-5.42.0
uninstall: perl-5.6.2 perl-5.8.9
@ -186,8 +190,6 @@ build: libarchive-3.5.2
build: openssl-3.0.13
build: ca-certificates-3.99
build: curl-8.12.1
build: automake-1.16.3
build: autoconf-2.71
build: patch-2.7.6
build: gettext-0.21
build: texinfo-6.7