Basic javascript parser for mathematical expressions