mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
`bison -v' segfaults. Reported by Piotr Gackiewicz, and fixed by Neil Booth. * tests/regression.m4: New file. Include the core of the sample provided by Piotr Gackiewicz. * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed properly.
27 lines
442 B
Plaintext
27 lines
442 B
Plaintext
# -*- Autoconf -*-
|
|
|
|
cat <<EOF
|
|
|
|
Regression tests.
|
|
|
|
EOF
|
|
|
|
AT_SETUP(Duplicate string)
|
|
|
|
AT_DATA([duplicate.y],
|
|
[[/* `Bison -v' used to dump core when two tokens are defined with the same
|
|
string, as LE and GE below. */
|
|
|
|
%token NUM
|
|
%token LE "<="
|
|
%token GE "<="
|
|
|
|
%%
|
|
exp: '(' exp ')' | NUM ;
|
|
%%
|
|
]])
|
|
|
|
AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
|
|
|
|
AT_CLEANUP(duplicate.*)
|