factored parser to unwind from errors