code: public List<Match<E>> findAll(List<E> tokens) {
          List<Match<E>> results = new ArrayList<Match<E>>();
  
          int start = 0;
          Match<E> match;
          do {
              match = this.find(tokens, start);
  
              if (match != null) {
                  start = match.endIndex();
  
                  // match may be empty query string has all optional parts
                  if (!match.isEmpty()) {
                      results.add(match);
                  }
              }
          } while (match != null);
  
          return results;
      }
docs: Find all non-overlapping matches of the regular expression against tokens.
  
  @param tokens
  @return an list of objects representing the match.