mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
tests: check typed mid-rule actions
* tests/input.at (_AT_UNUSED_VALUES_DECLARATIONS): Check typed mid-rule actions. * tests/report.at (Reports): Check that types of typed mid-rule actions are reported. * tests/actions.at (Typed mid-rule actions): Check that the values of typed mid-rule actions are correct.
This commit is contained in:
@@ -53,7 +53,7 @@ id:
|
||||
"identifier";
|
||||
|
||||
exp:
|
||||
"incr" exp { $<int>$ = 1; } { $<int>$ = 10; } exp { $$ = $2 + $<int>3 + $<int>4 + $5; }
|
||||
"incr" exp <int>{ $$ = 1; } <int>{ $$ = 10; } exp { $$ = $2 + $3 + $4 + $5; }
|
||||
| "(" exp ")" { std::swap ($$, $2); }
|
||||
| "identifier" { $$ = driver.variables[$1]; }
|
||||
| "number" { std::swap ($$, $1); };
|
||||
@@ -113,9 +113,9 @@ id <std::string> (13)
|
||||
on left: 5, on right: 4
|
||||
exp <int> (14)
|
||||
on left: 8 9 10 11, on right: 1 4 8 9
|
||||
@1 (15)
|
||||
@1 <int> (15)
|
||||
on left: 6, on right: 8
|
||||
@2 (16)
|
||||
@2 <int> (16)
|
||||
on left: 7, on right: 8
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user