C expression parser in JavaScript