X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_notation%2FgrafiteParser.ml;h=c138fce2787ff3baced04c691c3a1e865b98eac2;hb=3535b8c86ed85f10ae9b25ad449e1d0aaeccc90a;hp=056e595e7ed8b8fc5eaf3867a47a1072e53058f9;hpb=d43002dfc61afac676ea14bc6a1418e5ec0e3e9c;p=helm.git diff --git a/helm/ocaml/cic_notation/grafiteParser.ml b/helm/ocaml/cic_notation/grafiteParser.ml index 056e595e7..c138fce27 100644 --- a/helm/ocaml/cic_notation/grafiteParser.ml +++ b/helm/ocaml/cic_notation/grafiteParser.ml @@ -52,10 +52,11 @@ EXTEND [ tactic_terms = LIST1 tactic_term SEP SYMBOL "," -> tactic_terms ] ]; reduction_kind: [ - [ IDENT "reduce" -> `Reduce + [ IDENT "normalize" -> `Normalize + | IDENT "reduce" -> `Reduce | IDENT "simplify" -> `Simpl - | IDENT "whd" -> `Whd - | IDENT "normalize" -> `Normalize ] + | IDENT "unfold"; t = OPT term -> `Unfold t + | IDENT "whd" -> `Whd ] ]; sequent_pattern_spec: [ [ hyp_paths = @@ -364,7 +365,7 @@ EXTEND [ "with"; IDENT "precedence"; n = NUMBER -> int_of_string n ] ]; notation: [ - [ s = QSTRING; + [ dir = OPT direction; s = QSTRING; assoc = OPT associativity; prec = OPT precedence; IDENT "for"; p2 = @@ -385,9 +386,11 @@ EXTEND | None -> default_precedence | Some prec -> prec in - (add_raw_attribute ~text:s - (CicNotationParser.parse_level1_pattern (Stream.of_string s)), - assoc, prec, p2) + let p1 = + add_raw_attribute ~text:s + (CicNotationParser.parse_level1_pattern (Stream.of_string s)) + in + (dir, p1, assoc, prec, p2) ] ]; level3_term: [ @@ -402,7 +405,7 @@ EXTEND ] ]; interpretation: [ - [ s = CSYMBOL; args = LIST1 argument; SYMBOL "="; t = level3_term -> + [ s = CSYMBOL; args = LIST0 argument; SYMBOL "="; t = level3_term -> (s, args, t) ] ]; @@ -458,8 +461,8 @@ EXTEND | IDENT "default" ; what = QSTRING ; uris = LIST1 URI -> let uris = List.map UriManager.uri_of_string uris in GrafiteAst.Default (loc,what,uris) - | IDENT "notation"; (l1, assoc, prec, l2) = notation -> - GrafiteAst.Notation (loc, l1, assoc, prec, l2) + | IDENT "notation"; (dir, l1, assoc, prec, l2) = notation -> + GrafiteAst.Notation (loc, dir, l1, assoc, prec, l2) | IDENT "interpretation"; id = QSTRING; (symbol, args, l3) = interpretation -> GrafiteAst.Interpretation (loc, id, (symbol, args), l3)