Small refactor in grammar.