in
let pc = if !max_round == 0 then 1. else float_of_int last_round /. float_of_int !max_round in
let scolor, tcolor =
- let { sat ; todo; _ } = List.hd(M.find last_round m) in
- let c = (last_round, sat, todo) in color c, text_color c
+ let { sat ; todo; _ } =
+ match M.find last_round m with
+ [] -> { sat = StateSet.empty; todo= StateSet.empty; msg = "ERROR" }
+ | [ e ] -> e
+ | l -> List.hd (List.tl (List.rev l))
+ in
+ let c = (last_round, StateSet.union sat todo, StateSet.empty) in color c, text_color c
in
let tag = QName.to_string (T.tag tree node) in
let lbox = (String.length tag + 2) * 10 in
Text -> pp fmt "%s" "text()"
| Element | Attribute ->
pp fmt "%s" begin
- if ts == star then "*"
- else QName.to_string (QName.remove_prefix (QNameSet.choose ts))
+ if QNameSet.is_finite ts then
+ QName.to_string (QName.remove_prefix (QNameSet.choose ts))
+ else "*"
end
| Comment -> pp fmt "%s" "comment()"
| ProcessingInstruction ->
| Preceding -> Following
| Following -> Preceding
;;
-
holds.
*)
-let compile_axis_test axis (test,kind) phi trans states=
+let compile_axis_test axis (test,kind) phi trans states =
let q = State.make () in
let phi = match kind with
Tree.NodeKind.Node -> phi
test:
NODE { node, NodeKind.Node }
| TEXT { text, NodeKind.Text }
-| STAR { star, NodeKind.Element }
+| STAR { node, NodeKind.Element }
| COMMENT { QNameSet.singleton(QName.comment),
NodeKind.Comment
}