Ok I know what is grammatical and what is not. But I can't explain it. I'm not sure how can I explain their interpretation.
Peter gave nothing to anyone. – “nothing” and “anyone” has negative polarity. And "anyone" has to be after "nothing". But sentence has positive pattern becouse we can make a question tag “doesn't he"?