X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.ml;h=83e9d10d879904456952cfacf10bb03f60becd69;hb=34d2f477be65e3fd26bfb6d43a3dd0807274549b;hp=24d1b3feb441b864d977807b931196e1c3ea33f5;hpb=ca2a604c2817deb118d595611b94a0d77978eab6;p=helm.git diff --git a/helm/software/components/grafite_parser/grafiteParser.ml b/helm/software/components/grafite_parser/grafiteParser.ml index 24d1b3feb..83e9d10d8 100644 --- a/helm/software/components/grafite_parser/grafiteParser.ml +++ b/helm/software/components/grafite_parser/grafiteParser.ml @@ -170,8 +170,8 @@ EXTEND let idents = match idents with None -> [] | Some idents -> idents in GrafiteAst.Decompose (loc, idents) | IDENT "demodulate" -> GrafiteAst.Demodulate loc - | IDENT "destruct"; t = tactic_term -> - GrafiteAst.Destruct (loc, t) + | IDENT "destruct"; xt = OPT [ t = tactic_term -> t ] -> + GrafiteAst.Destruct (loc, xt) | IDENT "elim"; what = tactic_term; using = using; pattern = OPT pattern_spec; (num, idents) = intros_spec -> @@ -246,8 +246,6 @@ EXTEND GrafiteAst.Ring loc | IDENT "split" -> GrafiteAst.Split loc - | IDENT "subst" -> - GrafiteAst.Subst loc | IDENT "symmetry" -> GrafiteAst.Symmetry loc | IDENT "transitivity"; t = tactic_term -> @@ -459,7 +457,8 @@ EXTEND in let prefix = match prefix with None -> "" | Some prefix -> prefix in GrafiteAst.Inline (loc,style,suri,prefix) - | [ IDENT "hint" ] -> GrafiteAst.Hint loc + | [ IDENT "hint" ]; rew = OPT (IDENT "rewrite") -> + if rew = None then GrafiteAst.Hint (loc, false) else GrafiteAst.Hint (loc,true) | IDENT "auto"; params = auto_params -> GrafiteAst.AutoInteractive (loc,params) | [ IDENT "whelp"; "match" ] ; t = term -> @@ -638,9 +637,11 @@ EXTEND ind_types in GrafiteAst.Obj (loc, Ast.Inductive (params, ind_types)) - | IDENT "coercion" ; suri = URI ; arity = OPT int -> + | IDENT "coercion" ; suri = URI ; arity = OPT int ; saturations = OPT int -> let arity = match arity with None -> 0 | Some x -> x in - GrafiteAst.Coercion (loc, UriManager.uri_of_string suri, true, arity) + let saturations = match saturations with None -> 0 | Some x -> x in + GrafiteAst.Coercion + (loc, UriManager.uri_of_string suri, true, arity, saturations) | IDENT "record" ; (params,name,ty,fields) = record_spec -> GrafiteAst.Obj (loc, Ast.Record (params,name,ty,fields)) | IDENT "default" ; what = QSTRING ; uris = LIST1 URI ->