A Note About Parsing Graphviz DOT files

I've just released GraphViz2::Marpa V 2.03 and GraphViz2::Marpa::PathUtils V 2.00.

GraphViz2::Marpa parses DOT files and stores the result in a tree managed by Tree::DAG_Node.

It ships with a default rendering engine which simply re-creates the original DOT file, minus any comments, since comments are discarded by the grammar used to parse the file.

GraphViz2::Marpa ships with 101 standard tests and 269 author tests.

GraphViz2::Marpa::PathUtils (a subclass of GraphViz2::Marpa in a separate distro) processes that tree in 2 ways:

1: It finds clusters of nodes connected to each other but not connected to other clusters, and splits each cluster out into a separate DOT file, maintaining the original DOT file structure. This means node and edge class declarations ensure the look-and-feel of the nodes and edges in these separate files is identical to what it was in the original file.

2: It finds all fixed-length paths starting from a given node.

GraphViz2::Marpa::PathUtils ships with 6 standard tests and 3 author tests.

Demo page for GraphViz2::Marpa.

Demo page for GraphViz2::Marpa::PathUtils.

Marpa's homepage.

Leave a comment

About Ron Savage

user-pic I try to write all code in Perl, but find I end up writing in bash, CSS, HTML, JS, and SQL, and doing database design, just to get anything done...