def set_source(self, in_source): StreamParser.set_source(self, in_source) if in_source.get_output_type() != self._type_in: raise errors.ParserInitException()
def set_source(self, in_source): StreamParser.set_source(self, in_source) if in_source.get_output_type() != 'named_token_set': raise errors.ParserInitException()
def set_source(self, in_source): if not isinstance(in_source, StreamParser): raise errors.ParserInitException() self._source = in_source