'Requires:
line --the line to parse
Returns:
nothing
Logic:
This function is called when a toc or index entry is found. The opening
bracket count is stored in the beginning bracket count. The state
is changed to \'toc_index.\''

def __found_toc_index_func(self, line, tag):

    self.__beg_bracket_count = self.__ob_count
    self.__cb_count = 0
    self.__state = 'toc_index'
    self.__tag = tag
