mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
(Exotic Dollars): Test for "nonterm: { $$ = 123; } { $$ = $1; };" bug.
This commit is contained in:
@@ -103,18 +103,18 @@ AT_DATA([[input.y]],
|
||||
int val;
|
||||
};
|
||||
|
||||
%type <val> a_1 a_2 a_4 a_5
|
||||
%type <val> a_1 a_2 a_5
|
||||
sum_of_the_five_previous_values
|
||||
|
||||
%%
|
||||
exp: a_1 a_2 { $<val>$ = 3; } a_4 a_5 sum_of_the_five_previous_values
|
||||
exp: a_1 a_2 { $<val>$ = 3; } { $<val>$ = $<val>3 + 1; } a_5
|
||||
sum_of_the_five_previous_values
|
||||
{
|
||||
printf ("%d\n", $6);
|
||||
}
|
||||
;
|
||||
a_1: { $$ = 1; };
|
||||
a_2: { $$ = 2; };
|
||||
a_4: { $$ = 4; };
|
||||
a_5: { $$ = 5; };
|
||||
|
||||
sum_of_the_five_previous_values:
|
||||
|
||||
Reference in New Issue
Block a user