* tests/regression.m4 (%union and --defines): New test,

demonstrating a current bug in the obstack implementation.
This commit is contained in:
Akim Demaille
2000-11-17 11:08:03 +00:00
parent a35f64eade
commit 4c50eae6a0
2 changed files with 27 additions and 19 deletions

View File

@@ -1,3 +1,8 @@
2000-11-17 Akim Demaille <akim@epita.fr>
* tests/regression.m4 (%union and --defines): New test,
demonstrating a current bug in the obstack implementation.
2000-11-17 Akim Demaille <akim@epita.fr>
* src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New

View File

@@ -6,7 +6,13 @@ Regression tests.
EOF
AT_SETUP(Duplicate string)
## ------------------ ##
## Duplicate string. ##
## ------------------ ##
AT_SETUP([Duplicate string])
AT_DATA([duplicate.y],
[[/* `Bison -v' used to dump core when two tokens are defined with the same
@@ -23,30 +29,27 @@ exp: '(' exp ')' | NUM ;
AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
AT_CLEANUP(duplicate.*)
# -*- Autoconf -*-
AT_CLEANUP([duplicate.*])
cat <<EOF
Regression tests.
EOF
## ---------------------- ##
## %union and --defines. ##
## ---------------------- ##
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 "<="
AT_SETUP([%union and --defines])
AT_DATA([union.y],
[%union
{
int integer;
char *string ;
}
%%
exp: '(' exp ')' | NUM ;
%%
]])
exp: {};
])
AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
AT_CHECK([bison --defines union.y])
AT_CLEANUP(duplicate.*)
AT_CLEANUP([union.*])