'Parse a file and return the syntax tree.'

def parse_file(self, filename, debug=False):

    stream = open(filename)
    try:
        return self.parse_stream(stream, debug)
    finally:
        stream.close()
