dot-parser 0.6.1

This library provides a parser for the DOT/Graphviz graph description language, as well as useful functions to transform those graphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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));
        }
        Err(e) => {
            println!("{}", e);
        }
    }
}