Added support for simple grammars.