evaluation of expression in java
Hi All,
i have an infix format that would be read from textfile.i would like to know how to evaluate such expressions.
for example:
IF:X :>= :0.0 :AND:X: < :50.0:THEN :Y := :5000.0 :+ :CAL :ELSE : Y:=:20.0:EIF
where CAL is another format
IF:X :>= :300.0 :AND:X: < :350.0:THEN:CAL:=:(p1:*:2000:):+:(p2:*:10):EIF
anyother format could be given to check conditions for variables according to input?
Thanks in advance
|