) 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];")
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
nodes := sou :: !nodes ;
sou
in
- arcs := (sou,tar)::!arcs
+ arcs := (sou,tar,rest)::!arcs
else
print_endline line
done