change parser type and match <close> as a stream end