Module dot_parser::ast [−][src]
Expand description
This module implements an Abstract Syntax Tree for Dot graphs. The main
structure is Graph
, which corresponds to the graph
non-terminal in the
grammar.
Structs
A list of attributes. This corresponds to the a_list
non-terminal of the
grammar.
A list of AList
s, i.e. a list of list of attributes. This (strange)
indirection is induced by the grammar. This structure corresponds to the
attr_list
non-terminal of the grammar.
The Right hand side of an edge description. This corresponds to the
EdgeRHS
non-terminal of the grammar.
Notice that the grammar allows multiple EdgeRHS in sequence, to chain edges:
A -> B -> C
.
The description of an edge. This corresponds to the edge_stmt
non-terminal
of the grammar.
This structure is an AST for the DOT graph language. The generic A
denotes the type of attributes. By default (and when parsing), it is
(&'a str, &'a str)
, i.e. two strings, one for the key and one for the
value of the attribute. The library provides functions to map from one type
to an other.
This structure corresponds to the node_id
non-terminal of the grammar.
If contains the identifier of the node, and possibly a port.
This structure corresponds to the node_stmt
non-terminal of the grammar.
It is basically a node identifier attached to some attributes.
A list of statements. This corresponds to the stmt_list
non-terminal of the
grammar.
Enums
An attribute statement. This corresponds to the rule attr_stmt
non-terminal of the grammar.
An enum that corresponds to the compass_pt
non-terminal of the grammar.
This enum corresponds to the port
non-terminal of the grammar.
A statement of the graph. This corresponds to the stmt
non-terminal of the
grammar.