Basic calculator
Evaluate an arithmetic expression string with non-negative integers, +, -, *, / (integer division toward zero) and spaces, respecting operator precedence, without eval. State the grammar you accept before you write the evaluator.
No answer yet. Write the first one; the best answer gets endorsed.

