A Note About Parsing Graphviz DOT files
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.