| [ IDENT "replace" ];
t1 = tactic_term; "with"; t2 = tactic_term ->
TacticAst.Replace (loc, t1, t2)
- (* TODO Rewrite *)
+ | [ IDENT "rewrite" ; IDENT "left" ] ; t = term ->
+ TacticAst.Rewrite (loc,`Left, t, None)
+ | [ IDENT "rewrite" ; IDENT "right" ] ; t = term ->
+ TacticAst.Rewrite (loc,`Right, t, None)
(* TODO Replace_pattern *)
| [ IDENT "right" ] -> TacticAst.Right loc
| [ IDENT "ring" ] -> TacticAst.Ring loc
| [ IDENT "check" ]; t = term ->
TacticAst.Check (loc, t)
| [ IDENT "hint" ] -> TacticAst.Hint loc
- | [ IDENT "pmatch" ] ; t = term -> TacticAst.Match (loc,t)
+ | [ IDENT "whelp"; "match" ] ; t = term ->
+ TacticAst.Match (loc,t)
+ | [ IDENT "whelp"; IDENT "instance" ] ; t = term ->
+ TacticAst.Instance (loc,t)
| [ IDENT "print" ]; name = QSTRING -> TacticAst.Print (loc, name)
]];
TacticAst.Alias (loc, spec)
]];
- statement: [
+ executable: [
[ cmd = command; SYMBOL "." -> TacticAst.Command (loc, cmd)
| tac = tactical; SYMBOL "." -> TacticAst.Tactical (loc, tac)
| mac = macro; SYMBOL "." -> TacticAst.Macro (loc, mac)
]
];
+
+ comment: [
+ [ BEGINCOMMENT ; ex = executable ; ENDCOMMENT ->
+ TacticAst.Code (loc, ex)
+ | str = NOTE ->
+ TacticAst.Note (loc, str)
+ ]
+ ];
+
+ statement: [
+ [ ex = executable -> TacticAst.Executable (loc,ex)
+ | com = comment -> TacticAst.Comment (loc, com)
+ ]
+ ];
END
let exc_located_wrapper f =