remove comment and package spec from grammar