Hi All, Please feel free to use my code for basic infix2postfix conversion and evaluation of the postfix from here, My site Please feel free to give any kind of responses to it here. I am already looking forward to once change- the way to easily handle new operators. for e.g. Max operator for Math operations. Currently we have to override the "whole" evaluate() method in MathPostfixEval object which doesn't make sense. So I am going to change the model to have "OperatorHandler" objects so we can easily add operators Regards Maulin
Hi Maulin, Thanks for posting this at your website. One thing I thing so far is that You are using split function to parse the input infix expression. the split has delimiter that doesnt work if there is more than one space between the operater and operand.Could you all possible operators as delimiter and parse the infix that way? Any way I am still evualting it and it looks good so far. Thanks, Ahmed
Maulin Vasavada
Ranch Hand
Joined: Nov 04, 2001
Posts: 1863
posted
0
Hi Bashir, Note taken I would gather all inputs and then would modify it at once. Meanwhile if you want to keep going ahead you can override split() method as far I remember. Thanks Maulin
subject: My Infix2Postfix conveter and evaluator API