dot-parser 0.3.3

This library provides a parser for the DOT/Graphviz graph description language, as well as useful functions to transform those graphs.
Documentation
use dot_parser::*;

fn main() {
    let raw = ast::Graph::try_from(
        "digraph { // A simple graph with two nodes and a single edge
A -> /* The edge from A to B */ B
}",
    );
    match raw {
        Ok(graph) => {
            //println!("{:#?}", graph);
            //println!("{:#?}", canonical::Graph::from(graph));
            let petgraph: petgraph::graph::Graph<_, _> = canonical::Graph::from(graph).into();
            println!("{:#?}", petgraph);
        }
        Err(e) => {
            println!("{}", e);
        }
    }
}