String visitor_name = "visit" + type_id;
String visitor_name = prefix + "visit" + type_id;
  private void genSortVisitors(API api)  {    Iterator types = api.typeIterator();    printFoldOpen(header, "sort visitors");    printFoldOpen(source, "sort visitors");    while (types.hasNext()) {      Type type = (Type)types.next();      String type_id   = buildId(type.getId());      String type_name = buildTypeName(type);      StringBuffer decl_buf = new StringBuffer();      String visitor_name = "visit" + type_id;      decl_buf.append(type_name);      decl_buf.append(" ");      decl_buf.append(visitor_name);      decl_buf.append("(");      decl_buf.append(type_name);      decl_buf.append(" arg");      Iterator fields = type.fieldIterator();      while (fields.hasNext()) {	Field field = (Field)fields.next();	if (!field.getType().equals(type.getId())) {	  decl_buf.append(", ");	  decl_buf.append(genAcceptor(field));	}      }      decl_buf.append(")");      String decl = decl_buf.toString();      header.println(decl + ";");      printFoldOpen(source, decl);      source.println(decl);      source.println("{");      Iterator alts = type.alternativeIterator();      while (alts.hasNext()) {	Alternative alt = (Alternative)alts.next();	genSortVisitorAltImpl(type, alt);      }      source.println("  ATabort(\"not a " + type_id + ": %t\\n\", arg);");      source.println("  return (" + type_name + ")NULL;");      source.println("}");      printFoldClose(source);    }    printFoldClose(source);    printFoldClose(header);  }