code: public static AsciiSet fromPattern(String pattern) {
      final boolean[] members = new boolean[128];
      final int n = pattern.length();
      for (int i = 0; i < n; ++i) {
        final char c = pattern.charAt(i);
        if (c >= members.length) {
          throw new IllegalArgumentException("invalid pattern, '" + c + "' is not ascii");
        }
  
        final boolean isStartOrEnd = i == 0 || i == n - 1;
        if (isStartOrEnd || c != '-') {
          members[c] = true;
        } else {
          final char s = pattern.charAt(i - 1);
          final char e = pattern.charAt(i + 1);
          for (char v = s; v <= e; ++v) {
            members[v] = true;
          }
        }
      }
      return new AsciiSet(members);
    }
docs: Create a set containing ascii characters using a simple pattern. The pattern is similar
  to a character set in regex. For example, {@code ABC} would contain the characters
  {@code A}, {@code B}, and {@code C}. Ranges are supported so all uppercase letters could
  be specified as {@code A-Z}. The dash, {@code -}, will be included as part of the set if
  it is at the start or end of the pattern.
  
  @param pattern
  String specification of the character set.
  @return
  Set containing the characters specified in {@code pattern}.