I hope I am understanding your question correctly. It seems to me that what you want to do is to evaluate an expression? If that is the case
The expression as it stands is merely a string.
The technique for doing this is called Recursive Descent Parsing. I guess there is Pascal code for this somewhere out there.
My personal preference would be to convert the expression to Reverse Polish Notation and then evaluate that. This is a great deal more elegant - and faster. I have an RPN evaluator written up some where - if I can dig it up I'll post a copy here.