module Odot: sig
.. end
Parsing and printing graphviz dot files.
Version
val version : string
Representation of dot graphs
type
graph_kind =
type
id =
| |
Simple_id of string |
| |
Html_id of string |
| |
Double_quoted_id of string |
type
attr = id * id option
type
compass_pt =
| |
N |
| |
NE |
| |
E |
| |
SE |
| |
S |
| |
SW |
| |
W |
| |
NW |
type
port = id * compass_pt option
type
node_id = id * port option
type
edge_stmt_point =
type
edge_stmt = edge_stmt_point * edge_stmt_point list * attr list
type
attr_stmt =
| |
Attr_graph of attr list |
| |
Attr_node of attr list |
| |
Attr_edge of attr list |
type
stmt =
type
subgraph = {
|
mutable sub_id : id option ; |
|
mutable sub_stmt_list : stmt list ; |
}
type
graph = {
|
mutable strict : bool ; |
|
mutable kind : graph_kind ; |
|
mutable id : id option ; |
|
mutable stmt_list : stmt list ; |
}
Parsing
exception Parse_error of int * int
Raised on parse error, indicating the position
as line, character on line
.
val parse_file : string -> graph
val parse_string : string -> graph
Printing
val string_of_graph_kind : graph_kind -> string
val string_of_id : id -> string
val string_of_attr : id * id option -> string
val string_of_attr_list : (id * id option) list -> string
val string_of_compass_pt : compass_pt -> string
val string_of_node_id : id * (id * compass_pt option) option -> string
val string_of_edge_stmt_point : graph_kind -> edge_stmt_point -> string
val string_of_edge_stmt : graph_kind -> edge_stmt -> string
val string_of_attr_stmt : attr_stmt -> string
val string_of_stmt : graph_kind -> stmt -> string
val string_of_stmt_list : graph_kind -> stmt list -> string
val string_of_subgraph : graph_kind -> subgraph -> string
val string_of_graph : graph -> string
val print : Stdlib.out_channel -> graph -> unit
val print_file : string -> graph -> unit
- Raises
Sys_error
if the file cannot be open for writing.
Useful functions
val attr_value : id -> attr list -> id option
val node_id : ?port:id -> ?comp:compass_pt -> id -> node_id
val simple_node_id : string -> node_id
val dblq_node_id : string -> node_id
val html_node_id : string -> node_id