private boolean isSeparator(String candidate) {
    return candidate.length() == 1 && VALID_SEPARATORS.contains(candidate);
  }
Parse pattern to list of tokens.
common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java