Recursive descent parser for arithmetic: expr → term (('+'|'-') term)* term → factor (('*'|'/') factor)* factor → num | '(' expr ')'