code: private void consume() {
      curCharIndex++;
      curChar = (curCharIndex == pattern.length()) ? EOF : pattern.charAt(curCharIndex);
    }
docs: Advances the current character position without any error checking. Consuming beyond the
  end of the string can only happen if this parser contains a bug.