Commit 8e3eea08 authored by bguillaum's avatar bguillaum
Browse files

version 0.35.2: remove void dependencies in dep output (for sequoia_deep in grew web)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@9054 7838e531-6607-4d57-9587-6c381814729c
parent d3207c3a
......@@ -56,6 +56,7 @@ module G_edge = struct
| Ast.Pos_list _ -> Error.build "Only atomic edge values are allowed in graphs%s" (Loc.to_string loc)
| Ast.Regexp _ -> Error.build "Regexp are not allowed in graphs%s" (Loc.to_string loc)
let is_void label_domain t = Label.is_void label_domain t
let to_dep label_domain ?(deco=false) t = Label.to_dep label_domain ~deco t
let to_dot label_domain ?(deco=false) t = Label.to_dot label_domain ~deco t
......
......@@ -39,6 +39,7 @@ module G_edge: sig
val build: Domain.t -> Ast.edge -> t
val is_void: Domain.t -> t -> bool
val to_dot: Domain.t -> ?deco:bool -> t -> string
val to_dep: Domain.t -> ?deco:bool -> t -> string
end (* module G_edge *)
......
......@@ -733,8 +733,10 @@ module G_graph = struct
(fun gid elt ->
Massoc_gid.iter
(fun tar g_edge ->
let deco = List.mem (gid,g_edge,tar) deco.G_deco.edges in
bprintf buff "N_%s -> N_%s %s\n" (Gid.to_string gid) (Gid.to_string tar) (G_edge.to_dep domain ~deco g_edge)
if not (G_edge.is_void domain g_edge)
then
let deco = List.mem (gid,g_edge,tar) deco.G_deco.edges in
bprintf buff "N_%s -> N_%s %s\n" (Gid.to_string gid) (Gid.to_string tar) (G_edge.to_dep domain ~deco g_edge)
) (G_node.get_next elt)
) graph.map;
......
......@@ -288,6 +288,10 @@ module Label = struct
let get_style (_,styles) i = styles.(i)
let is_void (label_domain,_) t =
let style = get_style label_domain t in
style.Label_domain.text = "void"
let to_dep (label_domain,_) ?(deco=false) t =
let style = get_style label_domain t in
Label_domain.to_dep ~deco style
......
......@@ -124,6 +124,8 @@ module Label : sig
val to_string: Domain.t -> t -> string
val is_void: Domain.t -> t -> bool
val to_dep: Domain.t -> ?deco:bool -> t -> string
val to_dot: Domain.t -> ?deco:bool -> t -> string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment