+ | `Auto(a) -> `NodeSet(ignore (Automaton.BottomUp.accept a tree);
+ a.Automaton.result)
+ | `Contains(args) ->
+ begin
+ match args with
+ [ `Auto(a); `String(s) ] ->
+ let docs = Tree.Binary.contains tree s
+ in
+ let _ = Automaton.BottomUp.accept ~strings:(Some docs) a tree
+ in `NodeSet(a.Automaton.result)
+ | _ -> failwith "contains invalid"
+ end