simplify parser code