Each parseEach(final Arguments arguments, final String input, final boolean preprocess) {

    final String trimmedInput = input.trim();

    final String preprocessedInput =
        (preprocess ? preprocess(arguments, trimmedInput) : trimmedInput);

    final Each cachedEach = CACHE.getEachFromCache(arguments.getConfiguration(), preprocessedInput);
    if (cachedEach != null) {
      return cachedEach;
    }

    final Each each = Each.parse(preprocessedInput);

    if (each == null) {
      throw new TemplateProcessingException("Could not parse as each: \"" + input + "\"");
    }

    CACHE.putEachIntoCache(arguments.getConfiguration(), preprocessedInput, each);

    return each;
  }