Extract an alphabet from the given grammar.

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