* src/symtab.h (SALIAS, SUNDEF): Rename as...

(USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
Adjust dependencies.
* src/output.c (token_definitions_output): Be sure not to output a
`#define 'a'' when fed with `%token 'a' "a"'.
* tests/regression.at (Token definitions): New.
This commit is contained in:
Akim Demaille
2002-05-04 08:48:04 +00:00
parent 8bb936e4f7
commit b87f8b2159
9 changed files with 89 additions and 68 deletions

View File

@@ -287,6 +287,32 @@ AT_CLEANUP
## ------------------- ##
## Token definitions. ##
## ------------------- ##
AT_SETUP([Token definitions])
# Bison managed, when fed with `%token 'f' "f"' to #define 'f'!
AT_DATA([input.y],
[[%token "end of file"
%token 'a' "a"
%token "b" 'b'
%token "c" c
%token d "d"
%token e 'e'
%token 'f' e
%%
exp: "a";
]])
AT_CHECK([bison input.y -o input.c])
AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -c])
AT_CLEANUP
## -------------- ##
## Web2c Report. ##
## -------------- ##