def p_expression_binop(p):
    result, arg1, op, arg2 = p
    if op == '==':
        result = lambda: arg1() == arg2()
    elif op == '!=':
        result = lambda: arg1() != arg2()
    elif op == 'or':
        result = lambda: arg1() or arg2()
    elif op == 'and':
        result = lambda: arg1() and arg2()
    elif op == 'in':
        result = lambda: arg1() in arg2()
    p[0] = SubexpressionWrapper(result)
expression : expression EQUALS expression
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/expression/expression_parser.py/p_expression_binop