warn about typed mid-rule actions in Yacc mode

* src/reader.c (grammar_current_rule_action_append): Warn.
* tests/input.at (AT_CHECK_UNUSED_VALUES): Check.
This commit is contained in:
Akim Demaille
2018-08-05 10:18:52 +02:00
parent 11548b8e68
commit f18f71cfb0
2 changed files with 25 additions and 0 deletions

View File

@@ -528,6 +528,9 @@ grammar_current_rule_action_append (const char *action, location loc,
{
if (current_rule->action_props.code)
grammar_midrule_action ();
if (type)
complain (&loc, Wyacc,
_("POSIX Yacc does not support typed midrule actions"));
/* After all symbol declarations have been parsed, packgram invokes
code_props_translate_code. */
code_props_rule_action_init (&current_rule->action_props, action, loc,