Example #1
0
 def _validate_transition_missing_symbols(self, start_state, paths):
     """Raise an error if the transition input_symbols are missing."""
     for input_symbol in self.input_symbols:
         if input_symbol not in paths:
             raise exceptions.MissingSymbolError(
                 'state {} is missing transitions for symbol {}'.format(
                     start_state, input_symbol))
Example #2
0
 def _read_input_symbol_subset(self):
     if not (self.input_symbols < self.tape_symbols):
         raise exceptions.MissingSymbolError(
             'The set of tape symbols is missing symbols from the input '
             'symbol set ({})'.format(self.tape_symbols -
                                      self.input_symbols))