public static List collectFeatureList(Stella_Object tree) {
    if (Stella_Object.safePrimaryType(tree) == Stella.SGT_STELLA_CONS) {
      { Cons tree000 = ((Cons)(tree));

        { List result = null;

          if (tree000.length() > 0) {
            result = List.newList();
          }
          { Stella_Object feature = null;
            Cons iter000 = tree000;
            Cons collect000 = null;

            loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              feature = iter000.value;
              if (!Stella_Object.isaP(feature, Stella.SGT_STELLA_GENERALIZED_SYMBOL)) {
                { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    Stella.signalTranslationError();
                    if (!(Stella.suppressWarningsP())) {
                      Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                      {
                        Stella.STANDARD_ERROR.nativeStream.println();
                        Stella.STANDARD_ERROR.nativeStream.println(" Ignoring illegal feature `" + Stella_Object.deUglifyParseTree(feature) + "' in feature list: `" + Stella_Object.deUglifyParseTree(tree000) + "'.");
                      }
;
                    }

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
                  }
                }
                continue loop000;
              }
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(feature.permanentify(), Stella.NIL);
                  if (result.theConsList == Stella.NIL) {
                    result.theConsList = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(result.theConsList, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(feature.permanentify(), Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
          return (result);
        }
      }
    }
    else {
      { Object old$PrintreadablyP$001 = Stella.$PRINTREADABLYp$.get();

        try {
          Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
          Stella.signalTranslationError();
          if (!(Stella.suppressWarningsP())) {
            Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
            {
              Stella.STANDARD_ERROR.nativeStream.println();
              Stella.STANDARD_ERROR.nativeStream.println(" Illegal atomic feature list: `" + Stella_Object.deUglifyParseTree(tree) + "'.");
            }
;
          }

        } finally {
          Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
        }
      }
      return (null);
    }
  }