From: Claudio Sacerdoti Coen Date: Sun, 28 Oct 2001 22:46:32 +0000 (+0000) Subject: BUG Fixed: arcs with attributes were not processed in the right way. X-Git-Tag: v0_1_3~28 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=53ae76208da0cf33862c64e60b76a441e1d78863;p=helm.git BUG Fixed: arcs with attributes were not processed in the right way. --- diff --git a/helm/graphs/tools/simplify_deps/simplify_deps.ml b/helm/graphs/tools/simplify_deps/simplify_deps.ml index c924218cb..0763d6149 100644 --- a/helm/graphs/tools/simplify_deps/simplify_deps.ml +++ b/helm/graphs/tools/simplify_deps/simplify_deps.ml @@ -26,11 +26,11 @@ let reachable target source_arcs = ) false source_arcs ;; -let consider_arc (source,target) = +let consider_arc (source,target,rest) = let Node (source_name,source_arcs) = source in let Node (target_name,_) = target in if not (reachable target !source_arcs) then - print_endline (source_name ^ " -> " ^ target_name) + print_endline (source_name ^ " -> " ^ target_name ^ rest ^ ";") else if debug then print_endline (source_name ^ " -> " ^ target_name ^ " [color=green];") @@ -55,9 +55,10 @@ let parse () = try while true do let line = read_line () in - if Str.string_match (Str.regexp " \([^ ]*\) -> \(.*\);") line 0 then + if Str.string_match (Str.regexp " \([^ ]*\) -> \([^ ;]*\)\(\( \[.*\]\)?\);") line 0 then let source = Str.matched_group 1 line in let target = Str.matched_group 2 line in + let rest = Str.matched_group 3 line in let tar = try search_node target @@ -79,7 +80,7 @@ let parse () = nodes := sou :: !nodes ; sou in - arcs := (sou,tar)::!arcs + arcs := (sou,tar,rest)::!arcs else print_endline line done