parsing an input express creating an expression tree with the tokens, then use a postorder tree transversal to extrace a postifx expression
Posted on 2010-11-29
Trying to do this program but after all my research on expression trees I am still drawing a blank. Can anyone get me started in the right direction. First of all I need a class to use for the tree.
And then some hints if not outright direction on how to proceed. I have code from other programs I have done to evaluate the infix expression for validity, but then I need to build the tree. I understand the basic concept for building a tree (graphically in that I can trace the logic on paper), but not how to do it programatically(?). I have search EE for this and there are 10 hits, but they did not help me.
Thanks in advance for your assistance. I will be glad to break this into several questions for additional points if desired.