From 4e209a820d68ae8883b6eb7540570c55678a4b84 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 29 Apr 2004 13:55:31 +0000 Subject: [PATCH] - added a configuration variable for selecting between fresh instances for numbers or not (set by default to a single instance) --- helm/ocaml/cic_disambiguation/cicTextualParser2.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/helm/ocaml/cic_disambiguation/cicTextualParser2.ml b/helm/ocaml/cic_disambiguation/cicTextualParser2.ml index 8bb732a58..f0de0b521 100644 --- a/helm/ocaml/cic_disambiguation/cicTextualParser2.ml +++ b/helm/ocaml/cic_disambiguation/cicTextualParser2.ml @@ -31,6 +31,10 @@ let debug_print s = prerr_endline "" end + (** if set to true each number will have a different insance number and can + * thus be interpreted differently than others *) +let use_fresh_num_instances = false + open Printf exception Parse_error of string @@ -41,11 +45,11 @@ type command = CicAst.term CommandAst.command type script = CicAst.term CommandAst.Script.script let fresh_num_instance = - let n = ref 0 in - function () -> - incr n; - !n -;; + let n = ref 0 in + if use_fresh_num_instances then + (fun () -> incr n; !n) + else + (fun () -> 0) let choice_of_uri (uri: string) = let cic = HelmLibraryObjects.term_of_uri (UriManager.uri_of_string uri) in -- 2.39.2