I prefer using finite state machines to accomplish something like this, coupled with a fundamental language and recursive descent parsing; this results in much cleaner code. But, hey, if it works, don't knock it.
|
Java
Shunting Yard Algorithm Calculator - Parses and solves math expressions |
|
|
