def METHOD_NAME(self, mprec=1):
    # parse lhs
    self.parse_simple()
    # parse the rest
    while True:
        # no operator follows
        if not self.token:
            break
        # we're expecting an operator to be here
        # if it's not one, let the parent call handle it
        if self.token not in _opprec:
            break
        # deal with precedence
        oprec = _opprec[self.token]
        if oprec < mprec:
            break
        # expecting an rhs
        self.token = self.lex()
        if not self.token:
            raise RuntimeError("token expected")
        # for right associative this would be just oprec
        # we don't have any right associative operators here
        nprec = oprec + 1
        # parse rhs, repeat
        self.METHOD_NAME(nprec)