code: def input(self, str, filename=''):
          
          self.filestack.append([filename, 1, self.lex, self.input_data])
  
          self.input_data = str
          self.lex = lex.lex(object=self)
          self.lex.input(self.input_data)
docs: Defines input string, removing current lexer.