Node JS formula parser recursive decent

Available for download at:  BitBucket

Javascript based formula elevator that does not require use of eval.   I wrote this code to test some ideas about how to use function pointers to completely decouple the implementation from class specification.

I used the function pointer style of the command pattern rather than inheritance because I originally intended to use this problem as an experiment in GO and RUST where function pointers are first class citizens.

Once I started playing with ideas in JavaScript the rest just kind of fell out. I don’t like the recursive descent mechanism in JavaScript due to the stack overhead but it would be great for languages that do a better job of tail recursion optimization like Scala.

It works but I would modify to remove recursion before heavier use. Other TODO are in the Readme file at bitbucket.

Continue reading “Node JS formula parser recursive decent”