A string of numbers and letters joined together by mathematical operations such as \(+\) and \(-\) is called an algebraic expression, for example \(r + 2s\). Suppose that \({g}\) is the cost of ...
Parsing algebraic expressions is always a pain. If you need to compute, say, 2+4*2, the answer should be the same as (2 + (4 *2)), not ((2 + 4) * 2) — in other words, the right answer is 10 ...