Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Evaluation of an expression  RSS feed

 
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: 13078
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
Boost this thread!