a + b + c
is evaluated as:
(a + b) + c
If you are after an operator which is right associative, consider that some programming languages allow
a = b = c
to stand for
b = c
a = b
and clearly the assignment to b must take place first.
Of course, there are tools, such as the Unix yacc utility, which have been available for decades, and automatically generate code for an LR1 grammar. In fact, there is a fairly oldish book by Kernighan and Pike, which describes a fully programmable calculator in great detail. The title is probably The Unix programming Environment, but the copy at the disposal of the site was not in the English language.
Finally, the site has tidied up some code and presents it, though it is not close to the versatility provided by the example in the book by any means. Here, the version shown accepts real numbers, possibly in scientific format, but not variables, and addition, subtraction, multiplication, division, power (^), bitwise And (&), Or (|) and Xor (x) or any combination thereof, but no parentheses. (Is it easy to add more operators.)
Unary minus is handled by a zero prefix. This implies that logical operations will not work when the leftmost operand is negative, since subtraction has higher precedence than them. (Note that the code is much shorter than the final output from yacc.) As this was not the main point of the exercise, the routine which converts strings to real numbers has not been built from scratch.