code: static <T> Parser<T> buildExpressionParser(
        final Parser<? extends T> term, final Operator... ops) {
      if (ops.length == 0) return term.cast();
      int begin = 0;
      int precedence = ops[0].precedence;
      Associativity associativity = ops[0].associativity;
      int end = 0;
      Parser<T> ret = term.cast();
      for (int i = 1; i < ops.length; i++) {
        Operator op = ops[i];
        end = i;
        if (op.precedence == precedence && op.associativity == associativity) {
          continue;
        }
        end = i;
        Parser<?> p = slice(ops, begin, end);
        ret = build(p, associativity, ret);
        begin = i;
        precedence = ops[i].precedence;
        associativity = ops[i].associativity;
      }
      if (end != ops.length) {
        end = ops.length;
        associativity = ops[begin].associativity;
        Parser<?> p = slice(ops, begin, end);
        ret = build(p, associativity, ret);
      }
      return ret;
    }
docs: Builds a {@link Parser} based on information described by {@link OperatorTable}.
  
  @param term parser for the terminals.
  @param ops the operators.
  @return the expression parser.