'term ::= factor { (\'*\'|\'/\') factor }*'

def term(self):

    termval = self.factor()
    while (self._accept('TIMES') or self._accept('DIVIDE')):
        op = self.tok.type
        right = self.factor()
        if (op == 'TIMES'):
            termval *= right
        elif (op == 'DIVIDE'):
            termval /= right
    return termval
