chevrotain

Chevrotain is a high performance fault tolerant javascript parsing DSL for building recursive decent parsers

whence

Add context awareness to your apps and frameworks by safely evaluating user-defined conditional expressions. Useful for evaluating expressions in config files, prompts, key bindings, completions, templates, and many other user cases.