Esempio n. 1
0
def check_right(op, right_node):
    if is_operator(right_node):
        right = make_token(HORNET_FIXITIES, right_node.op)
        if op.rbp == right.lbp:
            raise parse_error(op.rbp, right_node, right.lbp)
Esempio n. 2
0
def check_left(op, left_node):
    if is_operator(left_node):
        left = make_token(HORNET_FIXITIES, left_node.op)
        if left.rbp == op.lbp:
            raise parse_error(left.rbp, op.node, op.lbp)