parserFactory
can be used to generate TDOP/Pratt parsers. The reason for using this style of parsing is that it's much easier to change the precedence and add new operators that it would be other parser types.
https://github.com/douglascrockford/TDOP adapted for NodeJS