(self, exp_first)
return exp_first
Parse the recursive part of a binary-op expression.

        exp_binop ::= binop exp_term exp_binop | <empty>

        Args:
          exp_first: The already-made first argument to the operator.

        Returns:
          ExpBinOp(exp_first, binop, exp_term, exp_binop)
          exp_first
Parse the recursive part of a binary-op expression.
Parse the recursive part of a binary - op expression .
def _exp_binop(self, exp_first):
        """Parse the recursive part of a binary-op expression.

        exp_binop ::= binop exp_term exp_binop | <empty>

        Args:
          exp_first: The already-made first argument to the operator.

        Returns:
          ExpBinOp(exp_first, binop, exp_term, exp_binop)
          exp_first
        """
        pos = self._pos

        # TODO: rewrite binary expression parsing so that the AST captures
        # associativity:
        #   or
        #   and
        #   < > <= >= ~= != ==
        #   .. (right associative)
        #   + -
        #   * / %
        #   not # - (unary)
        #   ^ (right associative)

        for pat in BINOP_PATS:
            binop = self._accept(pat)
            if binop is not None:
                exp_second = self._assert(self._exp_term(), 'exp2 in binop')
                this_binop = ExpBinOp(exp_first, binop, exp_second,
                                      start=pos, end=self._pos)
                return self._exp_binop(this_binop)

        self._pos = pos
        return exp_first
def _exp_binop ( self , exp_first ) : pos = self . _pos # TODO: rewrite binary expression parsing so that the AST captures # associativity: #   or #   and #   < > <= >= ~= != == #   .. (right associative) #   + - #   * / % #   not # - (unary) #   ^ (right associative) for pat in BINOP_PATS : binop = self . _accept ( pat ) if binop is not None : exp_second = self . _assert ( self . _exp_term ( ) , 'exp2 in binop' ) this_binop = ExpBinOp ( exp_first , binop , exp_second , start = pos , end = self . _pos ) return self . _exp_binop ( this_binop ) self . _pos = pos return exp_first