+/* Attach dynamic precedence DPREC to the current rule. */
+
+void
+grammar_current_rule_dprec_set (int dprec, location_t location)
+{
+ if (! glr_parser)
+ warn_at (location, _("%%dprec affects only GLR parsers"));
+ if (dprec <= 0)
+ complain_at (location, _("%%dprec must be followed by positive number"));
+ else if (current_rule->dprec != 0)
+ complain_at (location, _("only one %%dprec allowed per rule"));
+ current_rule->dprec = dprec;
+}
+
+/* Attach a merge function NAME with argument type TYPE to current
+ rule. */
+
+void
+grammar_current_rule_merge_set (const char* name, location_t location)
+{
+ if (! glr_parser)
+ warn_at (location, _("%%merge affects only GLR parsers"));
+ if (current_rule->merger != 0)
+ complain_at (location, _("only one %%merge allowed per rule"));
+ current_rule->merger =
+ get_merge_function (name, current_rule->sym->type_name, location);
+}
+