Convert shorthand to MathML

In the Harriot online project, a simple syntax for expressing math was used following these conventions. This script converts the formulas to valid MathML.
The script is a slightly adapted version of the perl port of Douglas Woodall's LaTeXMathML.