This applet has been tested in Netscape 4.5 and Internet Explorer 4.0
I think it will properly parse any valid expression and print the correct results.
It will also flag the first error on invalid strings.