Introduced some checks (BnfDefParser) and added more comments.