Tag grammar translation method