Removing alternatives from generated grammars