Switch to hand-crafted parser. Add a few test cases.