The moose likes Blatant Advertising and the fly likes My Infix2Postfix conveter and evaluator API Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other » Blatant Advertising
Reply Bookmark "My Infix2Postfix conveter and evaluator API" Watch "My Infix2Postfix conveter and evaluator API" New topic
Author

My Infix2Postfix conveter and evaluator API

Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1863
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


1. Have fun @ http://faq.javaranch.com/java/JavaRaq
2. Looking for simple infix2postfix conversion and postfix evaluation package? Click here
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 23395

Moving to "Blatant Advertising."


[Jess in Action][AskingGoodQuestions]
Ahmed Basheer
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
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
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
 
Threads others viewed
But is my API really useful?
Want to remove debug information
what to put in Class Diagram?
RMI from start to finish
Java Problem
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture