Refine arithmetic expression parsing.