mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 22:33:03 +00:00
(Typed symbol aliases): New test.
This commit is contained in:
@@ -272,3 +272,28 @@ AT_PARSER_CHECK([./input], 0,
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## ---------------------- ##
|
||||
## Typed symbol aliases. ##
|
||||
## ---------------------- ##
|
||||
|
||||
AT_SETUP([Typed symbol aliases])
|
||||
|
||||
# Bison 2.0 broke typed symbol aliases - ensure they work.
|
||||
|
||||
AT_DATA_GRAMMAR([input.y],
|
||||
[[%union
|
||||
{
|
||||
int val;
|
||||
};
|
||||
%token <val> MY_TOKEN "MY TOKEN"
|
||||
%type <val> exp
|
||||
%%
|
||||
exp: "MY TOKEN";
|
||||
%%
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -o input.c input.y])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user