code: def _extract_alphabet(self, grammar):
          
          alphabet = set([])
          for terminal in grammar.Terminals:
              alphabet |= set([x for x in terminal])
          self.alphabet = list(alphabet)
docs: Extract an alphabet from the given grammar.