type and grammar