modify grammar and link