public static Cons extractGeneratorsClause(Cons tail, Object [] MV_returnarray) {
    { Cons generatorterm = null;
      Cons residue = null;
      Cons generatorsclause = null;

      { Object [] caller_MV_returnarray = new Object[1];

        generatorterm = Cons.extractOneGeneratorTerm(tail, caller_MV_returnarray);
        residue = ((Cons)(caller_MV_returnarray[0]));
      }
      if (!(residue.value == Stella.SYM_STELLA_COMMA)) {
        { Cons _return_temp = generatorterm;

          MV_returnarray[0] = residue;
          return (_return_temp);
        }
      }
      generatorsclause = Cons.cons(generatorterm, Cons.cons(Stella.SYM_STELLA_COMMA, Stella.NIL));
      while (residue.value == Stella.SYM_STELLA_COMMA) {
        { Object [] caller_MV_returnarray = new Object[1];

          generatorterm = Cons.extractOneGeneratorTerm(residue.rest, caller_MV_returnarray);
          residue = ((Cons)(caller_MV_returnarray[0]));
        }
        generatorsclause = Cons.cons(generatorterm, generatorsclause);
      }
      { Cons _return_temp = generatorsclause.reverse();

        MV_returnarray[0] = residue;
        return (_return_temp);
      }
    }
  }