public static MRInstruction[] parseMixedInstructions(String str)
      throws DMLUnsupportedOperationException, DMLRuntimeException {
    if (str == null || str.isEmpty()) return null;

    Instruction[] inst = InstructionParser.parseMixedInstructions(str);
    MRInstruction[] mrinst = new MRInstruction[inst.length];
    for (int i = 0; i < inst.length; i++) {
      mrinst[i] = (MRInstruction) inst[i];
    }

    return mrinst;
  }
  public static DataGenMRInstruction[] parseDataGenInstructions(String str)
      throws DMLUnsupportedOperationException, DMLRuntimeException {
    DataGenMRInstruction[] inst = null;
    if (str != null && !str.isEmpty()) {
      String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
      inst = new DataGenMRInstruction[strlist.length];

      for (int i = 0; i < strlist.length; i++) {
        inst[i] = (DataGenMRInstruction) InstructionParser.parseSingleInstruction(strlist[i]);
      }
    }
    return inst;
  }