(Exotic Dollars): Test for "nonterm: { $$ = 123; } { $$ = $1; };" bug.

This commit is contained in:
Paul Eggert
2002-10-13 08:39:31 +00:00
parent efcb44dd47
commit 0ff67d71d7

View File

@@ -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: