/* Write text on "out" that describes the rule "rp".  */
static void writeRuleText(FILE *out, struct rule *rp)
/* Write text on "out" that describes the rule "rp".  */
static void writeRuleText(FILE *out, struct rule *rp)
{
    struct symbol *sp = rp->rhs[j];
    if( sp->type!=MULTITERMINAL ){
      fprintf(out," %s", sp->name);
    }else{
      int k;
      fprintf(out," %s", sp->subsym[0]->name);
      for(k=1; k<sp->nsubsym; k++){
        fprintf(out,"|%s",sp->subsym[k]->name);
      }
    }
  }
}