cherry-pick from #46 . Adds GrammarCollection