def parseFactor(self):
        """
        Parse a factor in an multiplicative expression (a * b, a / b, a % b)

        @return: the parsed factor
        @rtype: any scalar
        @raise ConfigFormatError: if a syntax error is found.
        """
        tt = self.token[0]
        if tt in [NUMBER, WORD, STRING, TRUE, FALSE, NONE]:
            rv = self.token[1]
            if tt != WORD:
                rv = eval(rv)
            self.match(tt)
        elif tt == LPAREN:
            self.match(LPAREN)
            rv = self.parseScalar()
            self.match(RPAREN)
        elif tt == DOLLAR:
            self.match(DOLLAR)
            rv = self.parseReference(DOLLAR)
        elif tt == BACKTICK:
            self.match(BACKTICK)
            rv = self.parseReference(BACKTICK)
            self.match(BACKTICK)
        elif tt == MINUS:
            self.match(MINUS)
            rv = -self.parseScalar()
        else:
            raise ConfigFormatError("%s: unexpected input: %r" %
               (self.location(), self.token[1]))
        return rv
dataset/ETHPy150Open twitterdev/twitter-for-bigquery/libs/config.py/ConfigReader.parseFactor/original