-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathdot.mli
More file actions
62 lines (48 loc) · 2.32 KB
/
dot.mli
File metadata and controls
62 lines (48 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(**************************************************************************)
(* *)
(* Ocamlgraph: a generic graph library for OCaml *)
(* Copyright (C) 2004-2010 *)
(* Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles *)
(* *)
(* This software is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Library General Public *)
(* License version 2.1, with the special exception on linking *)
(* described in file LICENSE. *)
(* *)
(* This software is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *)
(* *)
(**************************************************************************)
(** Parser for DOT file format. *)
open Dot_ast
val parse_dot_ast : string -> Dot_ast.file
val get_string : Dot_ast.id -> string
type clusters_hash = (string, attr list) Hashtbl.t
type graph = {
sg_nodes : string list;
sg_attr : attr list;
sg_parent : string option;
}
type graph_hash = (string option, graph) Hashtbl.t
(** Provide a parser for DOT file format. *)
module Parse
(B : Builder.S)
(L : sig
val node : node_id -> attr list -> B.G.V.label
(** How to build the node label out of the set of attributes *)
val edge : attr list -> B.G.E.label
(** How to build the edge label out of the set of attributes *)
end) :
sig
(** Parses a dot file *)
val parse : string -> B.G.t
(** Parses a dot file and returns the graph, its bounding box and
a hash table from clusters to dot attributes *)
val parse_all :
string -> B.G.t * clusters_hash * graph_hash
(** Parses a dot file and returns the graph, its bounding box and
a hash table from clusters to dot attributes *)
val parse_bounding_box_and_clusters :
string -> B.G.t * string * clusters_hash
end