function Parser() {
    if (!(this instanceof Parser)) {
      throw new SyntaxError('Constructor must be called with the new operator');
    }

    this.scope = {};
  }
@constructor Parser
Parser contains methods to evaluate or parse expressions, and has a number
of convenience methods to get, set, and remove variables from memory. Parser
keeps a scope containing variables in memory, which is used for all
evaluations.

Methods:
   const result = parser.eval(expr)  // evaluate an expression
   const value = parser.get(name)    // retrieve a variable from the parser
   const values = parser.getAll()    // retrieve all defined variables
   parser.set(name, value)           // set a variable in the parser
   parser.remove(name)               // clear a variable from the
                                     // parsers scope
   parser.clear()                    // clear the parsers scope

Example usage:
   const parser = new Parser()
   // Note: there is a convenience method which can be used instead:
   // const parser = new math.parser()

   // evaluate expressions
   parser.eval('sqrt(3^2 + 4^2)')         // 5
   parser.eval('sqrt(-4)')                // 2i
   parser.eval('2 inch in cm')            // 5.08 cm
   parser.eval('cos(45 deg)')             // 0.7071067811865476

   // define variables and functions
   parser.eval('x = 7 / 2')               // 3.5
   parser.eval('x + 3')                   // 6.5
   parser.eval('function f(x, y) = x^y')  // f(x, y)
   parser.eval('f(2, 3)')                 // 8

   // get and set variables and functions
   const x = parser.get('x')              // 7
   const f = parser.get('f')              // function
   const g = f(3, 2)                      // 9
   parser.set('h', 500)
   const i = parser.eval('h / 2')         // 250
   parser.set('hello', function (name) {
       return 'hello, ' + name + '!'
   })
   parser.eval('hello("user")')           // "hello, user!"

   // clear defined functions and variables
   parser.clear()