It's a JavaScript-based but using language design principles like tokenizing and parsing. We chose recursive descent parser becuase of it simplicity and it affords us the opportunity to calculae on-fly.
Only two functions are exposed via CALC object-- Tokenizer and Parser.
vartest2="12 + 90 + (23 -9) + sin(0.3) + pi";vartk2=newCALC.Tokenizer(test2);varparse2=newCALC.Parser(tk2.tokens,tk2.inbuiltfn);parse2.calc();