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.
Re-exports§
pub use either;
Structs§
- A list of attributes. This corresponds to the
a_listnon-terminal of the grammar. - A list of
ALists, i.e. a list of list of attributes. This (strange) indirection is induced by the grammar. This structure corresponds to theattr_listnon-terminal of the grammar. - The Right hand side of an edge description. This corresponds to the
EdgeRHSnon-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_stmtnon-terminal of the grammar. - This structure is an AST for the DOT graph language. The generic
Adenotes 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_idnon-terminal of the grammar. If contains the identifier of the node, and possibly a port. - This structure corresponds to the
node_stmtnon-terminal of the grammar. It is basically a node identifier attached to some attributes. - A list of statements. This corresponds to the
stmt_listnon-terminal of the grammar. - A subgraph. This corresponds to the
subgraphnon-terminal of the grammar.
Enums§
- An attribute statement. This corresponds to the rule
attr_stmtnon-terminal of the grammar. - An enum that corresponds to the
compass_ptnon-terminal of the grammar. - An error that can occur when reading from a file.
- This enum type contains errors that can occur when using a DotParser. In principle, those errors should never occur, as all parsing errors should be caught by DotParser::parse. Therefore, if such error occurs, it is a bug, probably a missing feature.
- This enum corresponds to the
portnon-terminal of the grammar. - A statement of the graph. This corresponds to the
stmtnon-terminal of the grammar.
Type Aliases§
- Type for I/O related errors. Those may occur when reading a file for parsing.
- Type for errors that occur when parsing.