mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-10-22 15:38:23 +00:00
rule actions cannot be typed
Make sure that we cannot apply a type to the (main) action of a rule. * src/reader.c (grammar_rule_check): Issue the warning. * tests/input.at (Cannot type action): Check the warning.
This commit is contained in:
1 parent
f18f71cfb0
commit
da8f4a2f5f
2 files changed
+26
-1
No files matched your search
@@ -351,6 +351,11 @@ grammar_rule_check (const symbol_list *r)
|
||||
&& !r->ruleprec->content->prec)
|
||||
complain (&r->location, Wother,
|
||||
_("token for %%prec is not defined: %s"), r->ruleprec->tag);
|
||||
|
||||
/* Check that the (main) action was not typed. */
|
||||
if (r->action_props.type)
|
||||
complain (&r->location, Wother,
|
||||
_("only midrule actions can be typed: %s"), r->action_props.type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user