I am trying to make a calculator in C or Objective-C that accepts a string along the lines of
8/2+4(3*9)^2
and returns the answer 2920. I would prefer not to use a generator like Lex or Yacc, so I want to code it from the ground up. How should I go about doing this? Other than the Dragon book, are there any recommended texts that cover this subject matter?
If I remember correctly, you can solve this problem with two stacks, one for the operators, the other for the operands.