code: private static Segment parseSegment(final String path, final String token) {
  		int separator = token.indexOf(':');
  
  		String name;
  		String parameter;
  
  		if (separator == -1) {
  			name = token.trim();
  			parameter = null;
  		} else {
  			name = token.substring(0, separator).trim();
  			parameter = token.substring(separator + 1).trim();
  		}
  
  		if ("date".equals(name)) {
  			return new DateSegment(parameter == null ? DEFAULT_DATE_FORMAT_PATTERN : parameter);
  		} else if ("count".equals(name) && parameter == null) {
  			return new CountSegment();
  		} else if ("pid".equals(name) && parameter == null) {
  			return new ProcessIdSegment();
  		} else {
  			throw new IllegalArgumentException("Invalid token '" + token + "' in '" + path + "'");
  		}
  	}
docs: Parses a token from a pattern as a segment.
  
  @param path
  Full path with patterns
  @param token
  Token from a pattern
  @return Created segment that represents the passed token