- complain (&loc, complaint, _("only one %s allowed per rule"), "%prec");
- current_rule->ruleprec = precsym;
+ duplicate_directive ("%prec",
+ current_rule->ruleprec->location, loc);
+ else
+ current_rule->ruleprec = precsym;
+}
+
+/* Set %empty for the current rule. */
+
+void
+grammar_current_rule_empty_set (location loc)
+{
+ /* If %empty is used and -Wno-empty-rule is not, then enable
+ -Wempty-rule. */
+ if (warning_is_unset (Wempty_rule))
+ warning_argmatch ("empty-rule", 0, 0);
+ if (current_rule->percent_empty_loc.start.file)
+ duplicate_directive ("%empty",
+ current_rule->percent_empty_loc, loc);
+ else
+ current_rule->percent_empty_loc = loc;