Grammar tree update