(Exotic Dollars): Test for "nonterm: { $$ = 123; } { $$ = $1; };" bug.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Oct 2002 08:39:31 +0000 (08:39 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Oct 2002 08:39:31 +0000 (08:39 +0000)
tests/actions.at

index ff23091..f26407f 100644 (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: