Arithmetic expression parsing framework