The most famous parsing algorithm specifically for math expression parsing is the Shunting-yard algorithm by Dijkstra,

http://en.wikipedia.org/wiki/Shunting-yard_algorithm