Grammar structuring