public static Cons yieldArrayDimensionsTree(ParametricTypeSpecifier arraytype) {
    { List dimensions = arraytype.specifierDimensions;
      Cons result = Stella.NIL;

      if (dimensions == null) {
        return (null);
      }
      { Stella_Object dim = null;
        Cons iter000 = dimensions.theConsList;
        Cons collect000 = null;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          dim = iter000.value;
          if (collect000 == null) {
            {
              collect000 = Cons.cons(((dim == null) ? Stella.NIL : Cons.cons(dim, Stella.NIL)), Stella.NIL);
              if (result == Stella.NIL) {
                result = collect000;
              }
              else {
                Cons.addConsToEndOfConsList(result, collect000);
              }
            }
          }
          else {
            {
              collect000.rest = Cons.cons(((dim == null) ? Stella.NIL : Cons.cons(dim, Stella.NIL)), Stella.NIL);
              collect000 = collect000.rest;
            }
          }
        }
      }
      if (result.length() == 1) {
        return (((Cons)(result.value)));
      }
      else {
        return (result);
      }
    }
  }