public static List parseArrayDimensionsSpec(Stella_Object dimensionsspec) {
    { List dimensions = List.newList();

      if (dimensionsspec == null) {
        return (null);
      }
      if (!(Stella_Object.consP(dimensionsspec) &&
          (!(dimensionsspec == Stella.NIL)))) {
        dimensionsspec = Cons.cons(dimensionsspec, Stella.NIL);
      }
      { Stella_Object dimspec = null;
        Cons iter000 = ((Cons)(dimensionsspec));
        Cons collect000 = null;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          dimspec = iter000.value;
          if (Stella_Object.consP(dimspec)) {
            dimspec = ((Cons)(dimspec)).value;
          }
          if ((dimspec == null) ||
              (dimspec == Stella.SYM_STELLA_NULL)) {
            dimspec = null;
          }
          else if (Stella_Object.integerP(dimspec)) {
          }
          else {
            return (null);
          }
          if (collect000 == null) {
            {
              collect000 = Cons.cons(dimspec, Stella.NIL);
              if (dimensions.theConsList == Stella.NIL) {
                dimensions.theConsList = collect000;
              }
              else {
                Cons.addConsToEndOfConsList(dimensions.theConsList, collect000);
              }
            }
          }
          else {
            {
              collect000.rest = Cons.cons(dimspec, Stella.NIL);
              collect000 = collect000.rest;
            }
          }
        }
      }
      return (dimensions);
    }
  }