X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fmain.ml;h=2349ad17b7a621aafedfb86b8e1d9b14dc676b44;hb=ecec752325cb3d207894a4f8d772936bd7ad9f4a;hp=fa16737c5a90c15dc167e1ca284ff62a9ab456b5;hpb=071e25c710e9a48116f66ddf51bfdca25e20502b;p=SXSI%2Fxpathcomp.git diff --git a/src/main.ml b/src/main.ml index fa16737..2349ad1 100644 --- a/src/main.ml +++ b/src/main.ml @@ -78,7 +78,7 @@ let main v query_string output = let module R = ResJIT.Count in let module M = Runtime.Make(R) in (* mk_runtime run auto doc arg count print outfile *) - mk_runtime M.top_down_run auto v Tree.root R.NS.length R.NS.serialize None + mk_runtime M.twopass_top_down_run auto v Tree.root R.NS.length R.NS.serialize None else let module R = ResJIT.Mat in let module M = Runtime.Make(R) in @@ -126,10 +126,16 @@ let _ = Gc.compact(); Gc.set (tuned_gc); let runtime = - let module R = ResJIT.Count in + if !Options.count_only then + let module R = ResJIT.Make(NodeSet.Partial(NodeSet.Count)) in let module M = Runtime.Make(R) in (* mk_runtime run auto doc arg count print outfile *) mk_runtime M.grammar_run auto (Obj.magic g) () R.NS.length (Obj.magic R.NS.serialize) None + else + let module R = ResJIT.Mat in + let module M = Runtime.Make(R) in + (* mk_runtime run auto doc arg count print outfile *) + mk_runtime M.grammar_run auto (Obj.magic g) () R.NS.length (Obj.magic R.NS.serialize) None in runtime (); exit 0