| [ IDENT "normalize" ] -> `Normalize ]
];
pattern_spec: [
- [ hyp_paths =
- OPT [
- paths = LIST1 [ id = IDENT ; SYMBOL ":" ; path = term -> (id,path) ]
- SEP SYMBOL ";";
- SYMBOL <:unicode<vdash>> ->
- paths ];
- goal_path = OPT term ->
- let hyp_paths = match hyp_paths with None -> [] | Some l -> l in
+ [ "in";
+ hyp_paths =
+ LIST0
+ [ id = IDENT ;
+ path = OPT [SYMBOL ":" ; path = term -> path ] ->
+ (id,match path with Some p -> p | None -> CicAst.UserInput) ]
+ SEP SYMBOL ";";
+ goal_path = OPT [ SYMBOL <:unicode<vdash>>; term = term -> term ] ->
(hyp_paths, goal_path) ]
];
direction: [
where = IDENT ; SYMBOL <:unicode<def>> ; t = tactic_term ->
TacticAst.LetIn (loc, t, where)
| kind = reduction_kind;
- p = OPT [ "in" ; p = pattern_spec -> p ] ->
+ p = OPT [ pattern_spec ] ->
let p = match p with None -> [], None | Some p -> p in
TacticAst.Reduce (loc, kind, p)
+ | IDENT "generalize"; t = tactic_term; p = OPT [ pattern_spec ] ->
+ let p = match p with None -> [], None | Some p -> p in
+ TacticAst.Generalize (loc,t,p)
| [ IDENT "reflexivity" ] ->
TacticAst.Reflexivity loc
| [ IDENT "replace" ];
t1 = tactic_term; "with"; t2 = tactic_term ->
TacticAst.Replace (loc, t1, t2)
| IDENT "rewrite" ; d = direction; t = term ;
- p = OPT [ "in"; p = pattern_spec -> p ] ->
+ p = OPT [ pattern_spec ] ->
let p = match p with None -> [], None | Some p -> p in
TacticAst.Rewrite (loc, d, t, p)
| [ IDENT "right" ] -> TacticAst.Right loc