Java script parser for maths expressions