code: int matchLength(List<CharRange> prefix)
      {
          DFAState<T> state = this;
          int len = 0;
          for (CharRange range : prefix)
          {
              state = state.transit(range);
              if (state == null)
              {
                  break;
              }
              len++;
          }
          return len;
      }
docs: Returns true if dfa starting from this state can accept a prefix constructed from
  a list of ranges
  @param prefix
  @return