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:
Akim Demaille
2018-08-05 08:51:19 +02:00
parent b79b889de5
commit 11548b8e68
3 changed files with 88 additions and 6 deletions

View File

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