def parse_dot_data(data):

    global top_graphs
    
    top_graphs = list()

    if data.startswith(codecs.BOM_UTF8):
        data = data.decode( 'utf-8' )
        
    try:
    
        graphparser = graph_definition()
        
        if pyparsing_version >= '1.2':
            graphparser.parseWithTabs()
            
        tokens = graphparser.parseString(data)

        if len(tokens) == 1:
            return tokens[0]
        else:
            return [g for g in tokens]
        
    except ParseException, err:
    
        print err.line
        print " "*(err.column-1) + "^"
        print err
        return None
dataset/ETHPy150Open erocarrera/pydot/dot_parser.py/parse_dot_data/original