xpression-peg-grammar">
  /*
   * Complex Arithmetic Grammar
   * (Utilizes http://pegjs.org/ to build a parser based on this grammar)
   */

  {
    function combine(first, rest, combiners) {
      var result = first, i;
      for (i = 0; i < rest.length; i++) {
        result = combiners[rest[i][1]](result, rest[i][3]);
      }
      return result;
    }
  }

  Expression
    = first:Term rest:(_ ("+" / "-") _ Term)* _ {
        return combine(first, rest, {
          "+": function(left, right) { return '