code: def fill(self, term_dict, terms):
          # type: (Dict[int, Set[Type[Rule]]], Any) -> None
          
          for i in range(len(terms)):
              t = terms[i]
              self._field[0][i] += term_dict[hash(t)]
docs: Fill first row of the structure witch nonterminal directly rewritable to terminal.
          :param term_dict: Dictionary of rules directly rewritable to terminal.
          Key is hash of terminal, value is set of rules with key terminal at the right side.
          :param terms: Input sequence of terminal.