/**
   * Marks the lig/kern instructions which are really a part of some lig/kern program (active),
   * counts the final number of lig/kern instructions, creates the blank final lig/kern table and
   * checks for errors. Uses <code>activity</code> field of LigKern for marking the activity. It
   * supposes that the first instructions of programs are already marked active. TFtoPL[70]
   */
  private void promoteActivity() {

    int ligKernLength = 0;
    for (int i = 0; i < ligkerncommand.length; i++) {
      TfmLigKernCommand lkc = ligkerncommand[i];
      if (lkc.getActivity() == TfmLigKernCommand.ACCESSIBLE) {
        if (!lkc.meansStop()) {
          int next = lkc.nextIndex(i);
          if (next < ligkerncommand.length) {
            ligkerncommand[next].setActivity(TfmLigKernCommand.ACCESSIBLE);
          } else {
            lkc.makeStop();
          }
        }
      }
      if (lkc.getActivity() != TfmLigKernCommand.PASSTHROUGH) {
        ligKernLength++;
      }
    }
    ligKernTable = new TfmLigKern[ligKernLength];
  }