Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: markup/graphical/dot/rascal/comment/extracted
Source used for this grammar: Bert Lisser, lang::dot::syntax::Dot
, 2011–2012 [GitHub]
graph
, stmt_list
, stmt
, attr_stmt
, attr_list
, a_list
, edge_stmt
, edgeRHS
, node_stmt
, node_id
, port
, subgraph
, compass_pt
), 0 root (—), 1 top (graph
), 2 bottom (edgeop
, ID
8).graph ::= "strict" "graph""digraph" ID "{" stmt_list "}"
stmt_list ::= ";" stmt_liststmt
stmt ::=
node_stmt
edge_stmt
attr_stmt
ID "=" ID
subgraph
attr_stmt ::= "graph""node""edge" attr_list
attr_list ::= "[" a_list "]" attr_list
a_list ::= ID "=" ID "," a_list
edge_stmt ::=node_id subgraph edgeRHS attr_list
edgeRHS ::= edgeopnode_id subgraph edgeRHS
node_stmt ::=
node_id attr_list
node_id ::=
ID port
port ::= ":" ID ":" compass_pt ":" compass_pt
subgraph ::= "{" stmt_list "}"subgraph ID
compass_pt ::= "n" "ne" "e" "se" "s" "sw" "w" "nw" "c" "_"