grammar Dot rule graph space type:("graph" / "digraph") blank name:string space cluster:cluster space end rule cluster "{" content:(preference / node / edge / subgraph)* "}" end rule preference graph_preference / named_graph_preference / node_preference / edge_preference end rule graph_preference space key:name blank "=" blank value:string separator end rule named_graph_preference space "graph" blank options:options? separator end rule node_preference space "node" blank options:options? separator end rule edge_preference space "edge" blank options:options? separator end rule node space name:string blank options:options? separator end rule edge direct_edge / undirect_edge end rule direct_edge space node_one:string blank "->" blank node_two:string blank other_nodes:("->" blank next_node:string blank)* options:options? separator end rule undirect_edge space node_one:string blank "--" blank node_two:string blank other_nodes:("--" blank next_node:string blank)* options:options? separator end rule subgraph space "subgraph" blank name:string space cluster:cluster space end rule options "[" space (name blank "=" blank string comma space)* name blank "=" blank string space "]" end rule string name / quoted_string end rule comma space "," end rule separator blank ";" space end rule quoted_string '"' [^"]* '"' end rule name [a-zA-Z0-9_\.]+ end rule blank [\ \t]* end rule space [\s\n\r\t]* end rule newline CR LF end rule CR [\r]? end rule LF [\n]? end end