Validates an EBNF grammar