mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
maint: don’t use \] in BREs and EREs
* .travis.yml (jobs): * doc/local.mk ($(top_srcdir)/%D%/bison.help): * tests/regression.at (Web2c Actions, Useless Tokens): * tests/scanner.at (Token numbers: $1): Use plain ], not \], in a POSIX regular expression, as POSIX says the interpretation of \] is undefined.
This commit is contained in:
@@ -45,7 +45,7 @@ jobs:
|
|||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
# As of 2021-08, we don't have Autoconf 2.71 on Ubuntu.
|
# As of 2021-08, we don't have Autoconf 2.71 on Ubuntu.
|
||||||
- sed -i 's/AC_PREREQ(\[2\.71\])/AC_PREREQ([2.69])/g' configure.ac
|
- sed -i 's/AC_PREREQ(\[2\.71])/AC_PREREQ([2.69])/g' configure.ac
|
||||||
- ./bootstrap
|
- ./bootstrap
|
||||||
- ./configure --enable-gcc-warnings || { cat config.log && false; }
|
- ./configure --enable-gcc-warnings || { cat config.log && false; }
|
||||||
- make -j2
|
- make -j2
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ $(top_srcdir)/%D%/bison.help: src/bison$(EXEEXT)
|
|||||||
$(AM_V_at) LC_ALL=C tests/bison --version >%D%/bison.help.tmp
|
$(AM_V_at) LC_ALL=C tests/bison --version >%D%/bison.help.tmp
|
||||||
$(AM_V_at) LC_ALL=C tests/bison --help | \
|
$(AM_V_at) LC_ALL=C tests/bison --help | \
|
||||||
## Avoid depending on the path to Bison.
|
## Avoid depending on the path to Bison.
|
||||||
sed -e 's,^Usage: .*/bison \[OPTION\],Usage: bison [OPTION],g' \
|
sed -e 's,^Usage: .*/bison \[OPTION],Usage: bison [OPTION],g' \
|
||||||
## Avoid variations in the output depending on whether we are
|
## Avoid variations in the output depending on whether we are
|
||||||
## on a glibc system.
|
## on a glibc system.
|
||||||
-e '/translation bugs/d' >>%D%/bison.help.tmp
|
-e '/translation bugs/d' >>%D%/bison.help.tmp
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ else: "else" statement;
|
|||||||
AT_BISON_CHECK([-v -o input.c input.y])
|
AT_BISON_CHECK([-v -o input.c input.y])
|
||||||
|
|
||||||
# Check only the tables.
|
# Check only the tables.
|
||||||
[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p;/#define YY.*NINF/p' input.c >tables.c]
|
[sed -n 's/ *$//;/^static const.*\[] =/,/^}/p;/#define YY.*NINF/p' input.c >tables.c]
|
||||||
|
|
||||||
AT_CHECK([[cat tables.c]], 0,
|
AT_CHECK([[cat tables.c]], 0,
|
||||||
[[static const yytype_int8 yytranslate[] =
|
[[static const yytype_int8 yytranslate[] =
|
||||||
@@ -777,8 +777,8 @@ AT_CLEANUP
|
|||||||
#
|
#
|
||||||
# LC_ALL=C /usr/local/stow/bison-3.7.5/bin/bison input.y -o old.c &&
|
# LC_ALL=C /usr/local/stow/bison-3.7.5/bin/bison input.y -o old.c &&
|
||||||
# LC_ALL=C bison input.y -o new.c &&
|
# LC_ALL=C bison input.y -o new.c &&
|
||||||
# sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' old.c >old.tables &&
|
# sed -n 's/ *$//;/^static const.*\[] =/,/^}/p' old.c >old.tables &&
|
||||||
# sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' new.c >new.tables &&
|
# sed -n 's/ *$//;/^static const.*\[] =/,/^}/p' new.c >new.tables &&
|
||||||
# diff old.tables new.tables
|
# diff old.tables new.tables
|
||||||
#
|
#
|
||||||
# The following Ruby script normalizes token and nterm names.
|
# The following Ruby script normalizes token and nterm names.
|
||||||
@@ -912,7 +912,7 @@ n84: T46 T88 T89;
|
|||||||
AT_BISON_CHECK([-Wno-other -o input.c input.y])
|
AT_BISON_CHECK([-Wno-other -o input.c input.y])
|
||||||
|
|
||||||
# Check only the tables.
|
# Check only the tables.
|
||||||
[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p;/#define YY.*NINF/p' input.c >tables.c]
|
[sed -n 's/ *$//;/^static const.*\[] =/,/^}/p;/#define YY.*NINF/p' input.c >tables.c]
|
||||||
|
|
||||||
AT_CHECK([[cat tables.c]], 0,
|
AT_CHECK([[cat tables.c]], 0,
|
||||||
[[static const yytype_int8 yytranslate[] =
|
[[static const yytype_int8 yytranslate[] =
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ AT_FULL_COMPILE([input])
|
|||||||
# lalr1.cc uses 'translate_table' (and yytranslate_).
|
# lalr1.cc uses 'translate_table' (and yytranslate_).
|
||||||
# lalr1.d uses 'byte[] translate_table =' (and yytranslate_).
|
# lalr1.d uses 'byte[] translate_table =' (and yytranslate_).
|
||||||
# lalr1.java uses 'byte[] translate_table_ =' (and yytranslate_).
|
# lalr1.java uses 'byte[] translate_table_ =' (and yytranslate_).
|
||||||
AT_CHECK([[$EGREP -c 'yytranslate\[\]|translate_table\[\]|translate_table =|translate_table_ =' input.]AT_LANG_EXT],
|
AT_CHECK([[$EGREP -c 'yytranslate\[]|translate_table\[]|translate_table =|translate_table_ =' input.]AT_LANG_EXT],
|
||||||
[ignore],
|
[ignore],
|
||||||
[AT_D_IF([AT_TOKEN_RAW_IF([0], [0])],
|
[AT_D_IF([AT_TOKEN_RAW_IF([0], [0])],
|
||||||
[AT_TOKEN_RAW_IF([0], [1])])[
|
[AT_TOKEN_RAW_IF([0], [1])])[
|
||||||
|
|||||||
Reference in New Issue
Block a user