avoid repeated grammar creation