This is a simple recursive descent parser for mathematical expressions written in JavaScript. This was a learning project and thus has no significant practical applications, however I believe the code is quite clean so feel free to study it.
The parser supports the four basic operations and parentheses, though it can be easily expanded to support more. The expression to be parsed and calculated is hardcoded into the global variable "expr", and the result is shown on screen with document.write