def load_all(stream):
    """
    Parse all YAML documents in a stream
    and produce corresponding YAMLDict objects.
    """
    loader = YAMLDictLoader(stream)
    try:
        while loader.check_data():
            yield loader.get_data()
    finally:
        loader.dispose()