Replaced temporary grammar text writing with DefaultGrammarTextWriter