Added back deprecated parseConstant. Warning: it has bugs.