[ 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)
]
];
(* }}} *)