code: public void addError(Position pos, String message, Object... parameters) {
          getProblemCollector().add(ParseError.error(pos, String.format(message, parameters)));
      }
docs: Adds a parse error to the internal problem collector.
  <p>
  It is preferred to collect as much errors as possible and then fail with an exception instead of failing
  at the first problem. Often syntax errors can be worked out by the parser and we can report a set of
  errors at once.
  
  @param pos        the position of the error. Note that {@link Token} implements {@link Position}. Therefore the
  current token is often a good choice for this parameter.
  @param message    the message to describe the error. Can contain formatting parameters like %s or %d as defined
  by {@link String#format(String, Object...)}
  @param parameters Contains the parameters used to format the given message