Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Evaluation of an expression

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want a suggestion regarding this problem.

The user can enter an expression in the textbox..

At the server side I have to evaluate whether the expression entered by the

user is a valid expression....(infix/postfix/prefix)

Can u suggest me a solution for this..how should i go about this problem.

Thanks in advance.
ARKumar
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me that is essentially the problem solved by a compiler so you should look for tutorials on compiler writing. To give you a start, you will need some way to recognize/distinguish between operators and operands.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic