| 1 |
graph = [ T_strict ] ( T_graph | T_digraph ) [ ID ] '{' stmt_list '}' |
| 2 |
stmt_list = [ stmt [ ';' ] stmt_list ] |
| 3 |
stmt = node_stmt | edge_stmt | attr_stmt | ID '=' ID | subgraph |
| 4 |
attr_stmt = ( T_graph | T_node | T_edge ) attr_list |
| 5 |
attr_list = '[' [ a_list ] ']' [ attr_list ] |
| 6 |
a_list = ID '=' ID [ ( ';' | ',' ) ] [ a_list ] |
| 7 |
edge_stmt = ( node_id | subgraph ) edgeRHS [ attr_list ] |
| 8 |
edgeRHS = edgeop ( node_id | subgraph ) [ edgeRHS ] |
| 9 |
node_stmt = node_id [ attr_list ] |
| 10 |
node_id = ID [ port ] |
| 11 |
port = ':' ID [ ':' compass_pt ] | ':' compass_pt |
| 12 |
subgraph = [ T_subgraph [ ID ] ] '{' stmt_list '}' |
| 13 |
compass_pt = ( T_n | T_ne | T_e | T_se | T_s | T_sw | T_w | T_nw | T_c | T__ ) |