Added a function def for grammar.