Check in a broken, defeated piece of code.  I will submit to shunting-yard and reverse polish notation.
Renaming arithmetic.js to arithmetic_broken.js
Correctly parse a formula into reverse polish notation (RPN)
It works. Parse RPN (including parentheses) to calculate a single value, recursively.