First stage of grammar verification and rule logging.