Recursive parser for sum expressions