Rewrite of parseGeneric