'Preprocesses the source with all extensions.  This is automatically
called for all parsing and compiling methods but *not* for :meth:`lex`
because there you usually only want the actual source tokenized.'

def preprocess(self, source, name=None, filename=None):

    return reduce((lambda s, e: e.preprocess(s, name, filename)), self.iter_extensions(), text_type(source))
