mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* 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:
@@ -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. ##
|
||||
## -------------- ##
|
||||
|
||||
Reference in New Issue
Block a user