remove duplicate code in parser that is in buffer_emptier