fixes on grammar - migrate to ebnf