def getOperand(self):
    isNegative = False
    isNot = False
    isBitNot = False
    operand = None
    char = self.current
    if (char == '-'):
        isNegative = True
        self.index += 1
        char = self.current
    elif (char == '~'):
        isBitNot = True
        self.index += 1
        char = self.current
    elif (char == '!'):
        isNot = True
        self.index += 1
        char = self.current
    if char.isalnum():
        value = self.getValue()
        if ((value == 'if') and (self.current == '(')):
            self.index += 1
            operand = self.getIfBlock()
        elif ((value == 'while') and (self.current == '(')):
            self.index += 1
            operand = self.getWhileBlock()
        elif ((not self.end) and (self.current == '(')):
            self.index += 1
            operand = self.getFunction(value)
        elif ((not self.end) and (self.current == '[')):
            self.index += 1
            operand = self.getIndexOperand(value)
        elif self.mgr.reInt.match(value):
            if isNegative:
                value = (int(value) * (- 1))
                isNegative = False
            elif isBitNot:
                value = (~ int(value))
                isBitNot = False
            else:
                value = int(value)
            operand = Constant(value, 'int')
        elif self.mgr.reFloat.match(value):
            if isNegative:
                value = (float(value) * (- 1))
                isNegative = False
            elif isBitNot:
                value = (~ float(value))
                isBitNot = False
            else:
                value = float(value)
            operand = Constant(value, 'float')
        elif (value == 'true'):
            operand = Constant(True, type(True))
        elif (value == 'false'):
            operand = Constant(False, type(False))
        elif self.mgr.isEnum(value):
            operand = self.getEnum(value)
        else:
            operand = Variable(value)
    elif ((char == "'") or (char == '"')):
        self.index += 1
        result = self.getString(char)
        operand = Constant(result, 'str')
    elif (char == '('):
        self.index += 1
        operand = self.getExpression(_break=')')
    elif (char == '{'):
        self.index += 1
        operand = self.getObject()
    elif (char == '['):
        self.index += 1
        elements = self.getArgs(end=']')
        operand = Array(elements)
    if ((not self.end) and (self.current == '.')):
        self.index += 1
        function = self.getOperand()
        function.operands.insert(0, operand)
        function.isChild = True
        operand = function
    if isNegative:
        operand = NegativeDecorator(operand)
    if isNot:
        operand = NotDecorator(operand)
    if isBitNot:
        operand = BitNot(operand)
    return operand
def getOperand(self):
    isNegative = False
    isNot = False
    isBitNot = False
    operand = None
    char = self.current
    if (char == '-'):
        isNegative = True
        self.index += 1
        char = self.current
    elif (char == '~'):
        isBitNot = True
        self.index += 1
        char = self.current
    elif (char == '!'):
        isNot = True
        self.index += 1
        char = self.current
    if char.isalnum():
        value = self.getValue()
        if ((value == 'if') and (self.current == '(')):
            self.index += 1
            operand = self.getIfBlock()
        elif ((value == 'while') and (self.current == '(')):
            self.index += 1
            operand = self.getWhileBlock()
        elif ((not self.end) and (self.current == '(')):
            self.index += 1
            operand = self.getFunction(value)
        elif ((not self.end) and (self.current == '[')):
            self.index += 1
            operand = self.getIndexOperand(value)
        elif self.mgr.reInt.match(value):
            if isNegative:
                value = (int(value) * (- 1))
                isNegative = False
            elif isBitNot:
                value = (~ int(value))
                isBitNot = False
            else:
                value = int(value)
            operand = Constant(value, 'int')
        elif self.mgr.reFloat.match(value):
            if isNegative:
                value = (float(value) * (- 1))
                isNegative = False
            elif isBitNot:
                value = (~ float(value))
                isBitNot = False
            else:
                value = float(value)
            operand = Constant(value, 'float')
        elif (value == 'true'):
            operand = Constant(True, type(True))
        elif (value == 'false'):
            operand = Constant(False, type(False))
        elif self.mgr.isEnum(value):
            operand = self.getEnum(value)
        else:
            operand = Variable(value)
    elif ((char == "'") or (char == '"')):
        self.index += 1
        result = self.getString(char)
        operand = Constant(result, 'str')
    elif (char == '('):
        self.index += 1
        operand = self.getExpression(_break=')')
    elif (char == '{'):
        self.index += 1
        operand = self.getObject()
    elif (char == '['):
        self.index += 1
        elements = self.getArgs(end=']')
        operand = Array(elements)
    if ((not self.end) and (self.current == '.')):
        self.index += 1
        function = self.getOperand()
        function.operands.insert(0, operand)
        function.isChild = True
        operand = function
    if isNegative:
        operand = NegativeDecorator(operand)
    if isNot:
        operand = NotDecorator(operand)
    if isBitNot:
        operand = BitNot(operand)
    return operand