private int parseText(String fullInput, int index, Token token) {
    String substring;
    substring = fullInput.substring(index, index + token.length);
    if (!token.string.equalsIgnoreCase(substring)) {
      throw new IllegalArgumentException(
          "Wrong input at index " + index + ": Expected: \"" + token.string + "\" but got: \""
              + substring + "\" for token: " + token);
    }
    return index + token.length;
  }
Parse the next separator(s). At least one separator character is expected. Separator
characters are interchangeable.

Caveat: If the last separator character in the separator substring is "-" and is immediately
    followed by a time zone hour (tzh) token, it's a negative sign and not counted as a
    separator, UNLESS this is the only separator character in the separator substring (in
    which case it is not counted as the negative sign).

@throws IllegalArgumentException if separator is missing or if FX is on and separator doesn't
match the expected separator pattern exactly
common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java