 processCSISequence() {
    while (myEndOffset < myBuffer.length() && isInRange(myBuffer.charAt(myEndOffset), (char)0x30, (char)0x3F)) {
        myEndOffset++;
    }
    while (myEndOffset < myBuffer.length() && isInRange(myBuffer.charAt(myEndOffset), (char)0x20, (char)0x2F)) {
        myEndOffset++;
    }
    if (myEndOffset == myBuffer.length()) {
      incompleteSequence();
      return;
    }

    char lastChar = myBuffer.charAt(myEndOffset);
    myEndOffset++;
    if (lastChar == SGR_SUFFIX) {
      myElementType = SGR;
    }
    else if (0x40 <= lastChar && lastChar <= 0x7E) {
      myElementType = CONTROL;
    }
    else {
      // broken seqeuence, considering as a text
      advanceToEscape();
    }
  }

  private 
 processCSISequence() {
    while