Hey guys, i'm making a program that will read in a simple formula, decompose it into it's subformals, work out the truth values of these and then print out the results. Most of this I can do without any problem but i'm struggling decomposing the damn formulas. A basic example of a formula would be a(b(a,b)). I need to be able to split this down to a, b, (a,b) and b(a,b) and store those four values into an array. The storing i can do fine but I can't get the string to split up accurately. I've played around with stringTokenizer and streamTokenizer but i'm not sure if that's really the way to go. Any ideas? Any advice will be much appreciated and if I could, i'd give you all some cake.