def __extract_from_token(self, token):
    if (not hasattr(token, 'tokens')):
        return
    table_name_preceding_token = False
    for item in token.tokens:
        if (item.is_group and (not self.__is_identifier(item))):
            self.__extract_from_token(item)
        if (item.ttype in Keyword):
            if SupersetQuery.__precedes_table_name(item.value.upper()):
                table_name_preceding_token = True
                continue
        if (not table_name_preceding_token):
            continue
        if (item.ttype in Keyword):
            if SupersetQuery.__is_result_operation(item.value):
                table_name_preceding_token = False
                continue
            break
        if isinstance(item, Identifier):
            self.__process_identifier(item)
        if isinstance(item, IdentifierList):
            for token in item.tokens:
                if SupersetQuery.__is_identifier(token):
                    self.__process_identifier(token)
def __extract_from_token(self, token):
    if (not hasattr(token, 'tokens')):
        return
    table_name_preceding_token = False
    for item in token.tokens:
        if (item.is_group and (not self.__is_identifier(item))):
            self.__extract_from_token(item)
        if (item.ttype in Keyword):
            if SupersetQuery.__precedes_table_name(item.value.upper()):
                table_name_preceding_token = True
                continue
        if (not table_name_preceding_token):
            continue
        if (item.ttype in Keyword):
            if SupersetQuery.__is_result_operation(item.value):
                table_name_preceding_token = False
                continue
            break
        if isinstance(item, Identifier):
            self.__process_identifier(item)
        if isinstance(item, IdentifierList):
            for token in item.tokens:
                if SupersetQuery.__is_identifier(token):
                    self.__process_identifier(token)