code: public static ParseError error(Position pos, String msg) {
          String message = msg;
          if (pos.getLine() > 0) {
              message = String.format("%3d:%2d: %s", pos.getLine(), pos.getPos(), msg);
          }
          return new ParseError(pos, message, Severity.ERROR);
      }
docs: Creates a new error for the given position with the given message.
  <p>
  If no position is available {@link Position#UNKNOWN} can be used
  
  @param pos the position where the error occurred
  @param msg the message explaining the error
  @return a new ParseError containing the error