'Internal parsing function used by `parse` and `compile`.'

def _parse(self, source, name, filename):

    if isinstance(filename, unicode):
        filename = filename.encode('utf-8')
    return Parser(self, source, name, filename).parse()
