def operator(self, lhs, min_precedence):
<EOL>while self.accept_operator(precedence=min_precedence):<EOL><INDENT>operator = self.tokens.matched.operator<EOL>if operator.suffix:<EOL><INDENT>rhs = self.expression()<EOL>self.tokens.expect(common_grammar.match_tokens(operator.suffix))<EOL>rhs.end = self.tokens.matched.end<EOL><DEDENT>elif operator.name == "<STR_LIT:.>":<EOL><INDENT>rhs = self.dot_rhs()<EOL><DEDENT>else:<EOL><INDENT>rhs = self.atom()<EOL><DEDENT>next_min_precedence = operator.precedence<EOL>if operator.assoc == "<STR_LIT:left>":<EOL><INDENT>next_min_precedence += <NUM_LIT:1><EOL><DEDENT>while self.tokens.match(grammar.infix):<EOL><INDENT>if (self.tokens.matched.operator.precedence<EOL>< next_min_precedence):<EOL><INDENT>break<EOL><DEDENT>rhs = self.operator(rhs,<EOL>self.tokens.matched.operator.precedence)<EOL><DEDENT>lhs = operator.handler(lhs, rhs, start=lhs.start, end=rhs.end,<EOL>source=self.original)<EOL><DEDENT>return lhs<EOL>
Climb operator precedence as long as there are operators.

        This function implements a basic precedence climbing parser to deal
        with binary operators in a sane fashion. The outer loop will keep
        spinning as long as the next token is an operator with a precedence
        of at least 'min_precedence', parsing operands as atoms (which,
        in turn, recurse into 'expression' which recurses back into 'operator').

        This supports both left- and right-associativity. The only part of the
        code that's not a regular precedence-climber deals with mixfix
        operators. A mixfix operator in DottySQL consists of an infix part
        and a suffix (they are still binary, they just have a terminator).