X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2FcicTextualParser2.ml;h=76f62b4171947473da8d3ab844f3049da5e730ec;hb=9226222b139844ebae3bddd6aef489d60e41e27a;hp=f530a31beb30906e3dbc8f450299c6b87c53bcb4;hpb=de34baf0da4b2d4e50eba307e86d518bb3a071cc;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/cicTextualParser2.ml b/helm/ocaml/cic_disambiguation/cicTextualParser2.ml index f530a31be..76f62b417 100644 --- a/helm/ocaml/cic_disambiguation/cicTextualParser2.ml +++ b/helm/ocaml/cic_disambiguation/cicTextualParser2.ml @@ -40,6 +40,13 @@ type tactical = (CicAst.term, string) TacticAst.tactic TacticAst.tactical 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 choice_of_uri (uri: string) = let cic = HelmLibraryObjects.term_of_uri (UriManager.uri_of_string uri) in (uri, (fun _ _ _ -> cic)) @@ -175,13 +182,14 @@ EXTEND ] | "add" LEFTA [ (* nothing here by default *) ] | "mult" LEFTA [ (* nothing here by default *) ] + | "power" LEFTA [ (* nothing here by default *) ] | "inv" NONA [ (* nothing here by default *) ] | "simple" NONA [ sort = sort -> CicAst.Sort sort | n = substituted_name -> return_term loc n | PAREN "("; head = term; args = LIST1 term; PAREN ")" -> return_term loc (CicAst.Appl (head :: args)) - | i = NUM -> return_term loc (CicAst.Num (i, 0)) + | i = NUM -> return_term loc (CicAst.Num (i, (fresh_num_instance ()))) | IMPLICIT -> return_term loc CicAst.Implicit | m = META; substs = [