Remove dependency to CPP: add function to report problems while parsing