Changed Grammar constructors to be compatible with earlier version