S-expression parser in JavaScript