refactor Parser.preprocess_step