X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_notation%2FcicNotationParser.ml;h=b408e6e3bea60fdd718e5354691c987b875d8bd3;hb=7f72a2bf9a6f79c58048c594dc390265365face8;hp=d282e3d708f7bf406093625284cce6d548f744a8;hpb=5530db2f72548a8c579ae5f9868cbd38290eb065;p=helm.git diff --git a/helm/ocaml/cic_notation/cicNotationParser.ml b/helm/ocaml/cic_notation/cicNotationParser.ml index d282e3d70..b408e6e3b 100644 --- a/helm/ocaml/cic_notation/cicNotationParser.ml +++ b/helm/ocaml/cic_notation/cicNotationParser.ml @@ -565,25 +565,27 @@ EXTEND [ IDENT "with"; IDENT "precedence"; n = NUMBER -> int_of_string n ] ]; notation: [ - [ IDENT "notation"; - p1 = level1_pattern; + [ p1 = level1_pattern; assoc = OPT associativity; prec = OPT precedence; IDENT "for"; p2 = level2_pattern -> (p1, assoc, prec, p2) ] ]; interpretation: [ - [ IDENT "interpretation"; s = SYMBOL; args = LIST1 argument; IDENT "as"; + [ s = SYMBOL; args = LIST1 argument; SYMBOL "="; t = level3_term -> - () + (s, args, t) ] ]; (* }}} *) (* {{{ Top-level phrases *) phrase: [ [ IDENT "print"; p2 = level2_pattern; SYMBOL "." -> Print p2 - | (l1, assoc, prec, l2) = notation; SYMBOL "." -> + | IDENT "notation"; (l1, assoc, prec, l2) = notation; SYMBOL "." -> Notation (l1, assoc, prec, l2) + | IDENT "interpretation"; (symbol, args, l3) = interpretation; SYMBOL "." -> + Interpretation ((symbol, args), l3) + | IDENT "render"; u = URI; SYMBOL "." -> Render (UriManager.uri_of_string u) ] ]; (* }}} *)