Fix escape notation in the grammar + add tests