Allow generic types in grammar