Remove duplicated code in SoftParser