grammar_current_rule_begin (symbol *lhs, location loc,
                            named_ref *lhs_name)
{
  /* Start a new rule and record its lhs.  */
  ++nrules;
  previous_rule_end = grammar_end;

  current_rule = grammar_symbol_append (lhs, loc);
  if (lhs_name)
    assign_named_ref (current_rule, named_ref_copy (lhs_name));

  /* Mark the rule's lhs as a nonterminal if not already so.  */
  if (lhs->content->class == unknown_sym || lhs->content->class == pct_type_sym)
    symbol_class_set (lhs, nterm_sym, empty_loc, false);
  else if (lhs->content->class == token_sym)
    complain (&loc, complaint, _("rule given for %s, which is a token"),
              lhs->tag);
}
grammar_current_rule_begin (symbol *lhs, location loc,
                            named_ref *lhs_name)
{
   
  ++nrules;
  previous_rule_end = grammar_end;

  current_rule = grammar_symbol_append (lhs, loc);
  if (lhs_name)
    assign_named_ref (current_rule, named_ref_copy (lhs_name));

   
  if (lhs->content->class == unknown_sym || lhs->content->class == pct_type_sym)
    symbol_class_set (lhs, nterm_sym, empty_loc, false);
  else if (lhs->content->class == token_sym)
    complain (&loc, complaint, _("rule given for %s, which is a token"),
              lhs->tag);
}