Mathmatical evaluation of text field input?

I am working on a converter that will convert between inches, picas and points. The converter consists of three text fields. The user inputs a value into 1 of the fields, the value is converted into the other two measurement types and the cooresponding text fields are updated.

I would like to be able to include mathmatical expressions within the input and have the program evaluate the expression and then convert it to the other measurement types.

I know that I could parse the input, but I hate to “re-invent the wheel” if a method already exists. Any thoughts?

Thanks,
Brad Bumgarner, CTA