help (true or false)

hello everybody, i need help or i idea in writeing a program
that read an input-file example:
t*f+f*t*t*f=t+f+f+t*t*t+t=.....

*  means AND
+ means OR

 the out put of my program will be
t * f + f * t * t * f = f
t + f + f +t * t * t + t = t

please remember that the AND is come befor the OR !!!
please help me
thanx
thanx
thanx

looni , nether-land

p.s please write-me the answer to h...@fiberia.com

thanx ;-)