def stack_input(self, input="", file=None, filename=None):
        """Temporarily parse from a second file."""

        # Already reading from somewhere else: Go on top of that, please.
        if self.stack:
            # autogenerate a recursion-level-identifying filename
            if not filename:
                filename = 1
            else:
                try:
                    filename += 1
                except TypeError:
                    pass
                # now pass off to the include file
            self.stack.stack_input(input,file,filename)
        else:

            try:
                filename += 0
            except TypeError:
                pass
            else:
                filename = "<str_%d>" % filename

#			self.stack = object.__new__(self.__class__)
#			Scanner.__init__(self.stack,self.patterns,self.ignore,input,file,filename, stacked=True)

            # Note that the pattern+ignore are added by the generated
            # scanner code
            self.stack = self.__class__(input,file,filename, stacked=True)
dataset/ETHPy150Open smurfix/yapps/yapps/runtime.py/Scanner.stack_input/original