X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.ml;h=be39556d8502fb59826083c753232a1e60148107;hb=f9abd21eb0d26cf9b632af4df819225be4d091e3;hp=91086b46d71027bd15b550132fb0fad379c2a52f;hpb=5832735b721c0bd8567c8f0be761a9136363a2a6;p=helm.git diff --git a/matita/components/grafite_parser/grafiteParser.ml b/matita/components/grafite_parser/grafiteParser.ml index 91086b46d..be39556d8 100644 --- a/matita/components/grafite_parser/grafiteParser.ml +++ b/matita/components/grafite_parser/grafiteParser.ml @@ -23,7 +23,7 @@ * http://helm.cs.unibo.it/ *) -(* $Id$ *) +(* $Id: grafiteParser.ml 13176 2016-04-18 15:29:33Z fguidi $ *) module N = NotationPt module G = GrafiteAst @@ -500,7 +500,7 @@ EXTEND index: [[ b = OPT SYMBOL "-" -> match b with None -> true | _ -> false ]]; source: [[ - src = OPT IDENT "implied" -> + src = OPT [ IDENT "implied" ] -> match src with None -> `Provided | _ -> `Implied ]]; @@ -526,7 +526,9 @@ EXTEND G.NObj (loc, N.Theorem(name, N.Implicit `JustOne, Some body, attrs), true) - | src = source; IDENT "axiom"; i = index; name = IDENT; SYMBOL ":"; typ = term -> + | src = source; IDENT "axiom"; i = index; name = IDENT; + params = LIST0 protected_binder_vars; SYMBOL ":"; typ = term -> (* FG: params added *) + let typ = shift_params `Forall params typ in let attrs = src, `Axiom, `Regular in G.NObj (loc, N.Theorem (name, typ, None, attrs),i) | src = source; IDENT "inductive"; spec = inductive_spec -> @@ -556,8 +558,9 @@ EXTEND paramspec = OPT inverter_param_list ; outsort = OPT [ SYMBOL ":" ; outsort = term -> outsort ] -> G.NInverter (loc,name,indty,paramspec,outsort) - | IDENT "universe"; IDENT "constraint"; u1 = tactic_term; + | IDENT "universe"; cyclic = OPT [ IDENT "cyclic" -> () ] ; IDENT "constraint"; u1 = tactic_term; SYMBOL <:unicode> ; u2 = tactic_term -> + let acyclic = match cyclic with None -> true | Some () -> false in let urify = function | NotationPt.AttributedTerm (_, NotationPt.Sort (`NType i)) -> NUri.uri_of_string ("cic:/matita/pts/Type"^i^".univ") @@ -565,7 +568,7 @@ EXTEND in let u1 = urify u1 in let u2 = urify u2 in - G.NUnivConstraint (loc,u1,u2) + G.NUnivConstraint (loc,acyclic,u1,u2) | IDENT "unification"; IDENT "hint"; n = int; t = tactic_term -> G.UnificationHint (loc, t, n) | IDENT "coercion"; name = IDENT;