def eval_cor_pattern(self, pattern):
        pattern = pattern.strip()
        complex_node = False
        for char in '()+&|,':
            if char in pattern:
                complex_node = True
        node = ComplexExpressionNode()
        if not complex_node:
            if pattern.startswith('!'):
                node.not_value = True
                pattern = pattern[1:]
            node.operand = self.ctx
            node.leaf = True
            obj, error = self.find_object(pattern)
            if obj is not None:
                node.content = obj
            else:
                node.configuration_errors.append(error)
            return node
        in_par = False
        tmp = ''
        stacked_par = 0
        for char in pattern:
            if char in (',', '|'):
                if in_par:
                    tmp += char
                else:
                    tmp = tmp.strip()
                    node.operand = '|'
                    if tmp != '':
                        son = self.eval_cor_pattern(tmp)
                        node.sons.append(son)
                    tmp = ''
            elif char in ('&', '+'):
                if in_par:
                    tmp += char
                else:
                    tmp = tmp.strip()
                    node.operand = '&'
                    if tmp != '':
                        son = self.eval_cor_pattern(tmp)
                        node.sons.append(son)
                    tmp = ''
            elif char == '(':
                stacked_par += 1
                in_par = True
                tmp = tmp.strip()
                if stacked_par == 1 and tmp != '':
                    print("ERROR : bad expression near", tmp)
                    continue
                if stacked_par > 1:
                    tmp += char
            elif char == ')':
                stacked_par -= 1
                if stacked_par < 0:
                    print("Error : bad expression near", tmp, "too much ')'")
                    continue
                if stacked_par == 0:
                    tmp = tmp.strip()
                    son = self.eval_cor_pattern(tmp)
                    node.sons.append(son)
                    in_par = False
                    tmp = ''
                    continue
                tmp += char
            else:
                tmp += char
        tmp = tmp.strip()
        if tmp != '':
            son = self.eval_cor_pattern(tmp)
            node.sons.append(son)
        return node