Commit graph

72 commits

Author SHA1 Message Date
Leonardo de Moura
93b5b74b36 feat: modify notation for providing motive in "match" expressions 2022-02-14 15:36:14 -08:00
Gabriel Ebner
5d25df1a69 fix: indenting of match arms in declValEqns 2021-12-15 11:42:38 +00:00
Sebastian Ullrich
585fba69e8 refactor: remove redundancy from common register_parser_alias case
/cc @leodemoura
2021-09-20 13:20:23 +02:00
Leonardo de Moura
1c23d68c6a feat: add (generalizing := true/false) optional attribute to match 2021-04-15 17:04:25 -07:00
Leonardo de Moura
164577d94e chore: remove parser! and tparser!
The new macros are called "leading_parser` and `trailing_parser`.

cc @Kha
2021-03-11 09:36:58 -08:00
Leonardo de Moura
90c5f35702 refactor: implement decide and nativeDecide as tactics
TODO: update stage0 and activate
2021-03-11 07:50:54 -08:00
Leonardo de Moura
c5673b6025 feat: auxiliary tactic for erasing auxiliary discriminants 2021-02-17 16:59:21 -08:00
Leonardo de Moura
7d1e493531 chore: reactivate tactic match and introMatch 2020-12-22 07:15:47 -08:00
Leonardo de Moura
f34bf82e0f chore: move tactic parsers introMatch and match to Lean/Parser/Tactic 2020-12-22 07:11:06 -08:00
Leonardo de Moura
a05ca020f4 chore: prepare to move tactic match parser back to Lean/Parser/Tactic 2020-12-22 06:52:41 -08:00
Leonardo de Moura
a13c036181 chore: remove tactic builtin parsers 2020-11-17 13:34:05 -08:00
Leonardo de Moura
e737de3384 chore: cleanup induction/cases notation 2020-11-17 11:48:55 -08:00
Leonardo de Moura
dfa0b97916 chore: remove notSymbol hacks 2020-11-17 10:45:55 -08:00
Leonardo de Moura
360fa1638f chore: rename Parser.try to Parser.atomic
Reason: `try` is a keyword.

cc @Kha
2020-11-17 08:25:01 -08:00
Leonardo de Moura
22ff6bb125 chore: process indent' without underscore hack 2020-11-12 12:05:00 -08:00
Leonardo de Moura
9c331c92d8 chore: prepare to remove underscore hack 2020-11-12 11:50:02 -08:00
Leonardo de Moura
49d7a83934 chore: tacticSeq as a parser alias 2020-11-12 11:32:18 -08:00
Leonardo de Moura
98d86bd902 chore: remove induction h:e
Users should use `cases h:e` instead
2020-11-03 17:20:52 -08:00
Leonardo de Moura
c88d0c8a8c feat: populate builtinTacticSeqParser with tacticSeq 2020-11-03 17:20:52 -08:00
Leonardo de Moura
7654fa34e0 feat: add tacticSeq
@Kha This is a small hack to allow users to use `tacticSeq` in
`syntax` command. Example:
```
syntax "repeat" tacticSeq : tactic
```
2020-11-03 17:20:52 -08:00
Leonardo de Moura
cdd79ac170 feat: add evalCasesUsing 2020-11-03 17:20:52 -08:00
Leonardo de Moura
9494552d82 chore: remove unnecessary group 2020-11-03 17:20:52 -08:00
Leonardo de Moura
73903267a5 feat: extend cases tactic syntax 2020-11-02 16:46:33 -08:00
Leonardo de Moura
f64bd9e1e3 chore: remove unnecessary with at induction/cases tactics 2020-11-02 13:30:54 -08:00
Leonardo de Moura
b880181cee feat: add let rec tactic parser 2020-10-30 14:58:17 -07:00
Leonardo de Moura
0a56057db1 feat: better error message for "unknown" tactic
@Kha The hack I posted at Zulip didn't really work
```
macro x:ident : tactic => throw $ Lean.Macro.Exception.error x s!"unknown tactic '{x.getId}'"
```

For example, we would still get a weird error message at
```
theorem ex3 (x : Nat) : x = x → x = x :=
  have x = x by foo (aaa bbb) -- The error would be at `bbb`
  fun h => h
```
There were other minor issues that could be fixed, but this one was bad.
2020-10-30 14:58:17 -07:00
Leonardo de Moura
956a646a9c chore: admit as a macro 2020-10-29 18:58:29 -07:00
Leonardo de Moura
6670378907 fix: withIds parser 2020-10-29 18:50:08 -07:00
Leonardo de Moura
13c2a8ff51 chore: remove #lang lean4 header 2020-10-25 09:54:07 -07:00
Leonardo de Moura
9e181f5d91 fix: location parser 2020-10-24 16:46:30 -07:00
Leonardo de Moura
24d41b9518 chore: move to new frontend 2020-10-21 12:16:30 -07:00
Sebastian Ullrich
e8cf086641 fix: synthesize pretty printers early 2020-10-20 09:50:54 +02:00
Leonardo de Moura
60e4f4fee1 feat: improve notFollowedBy error messages 2020-10-15 17:01:10 -07:00
Sebastian Ullrich
5d76a981b0 chore: adjust pp spacing 2020-10-07 09:44:04 +02:00
Leonardo de Moura
e1ad5a948b feat: add focus tactic parser 2020-09-28 17:11:00 -07:00
Leonardo de Moura
2755972447 fix: missing checkColGt and tests 2020-09-28 17:10:59 -07:00
Leonardo de Moura
f45fa34cba feat: optional ; at tacticSeq1Indented 2020-09-28 17:10:59 -07:00
Leonardo de Moura
cb55ffae94 chore: add new tactic syntax kind 2020-09-28 17:10:58 -07:00
Leonardo de Moura
6f211d3449 chore: adjust tactic parser 2020-09-28 17:10:57 -07:00
Leonardo de Moura
93090baa82 chore: cleanup tactic syntax 2020-09-28 17:10:57 -07:00
Leonardo de Moura
6ddec22763 refactor: simplify withPosition combinator
Add `checkColGt`
2020-09-28 17:10:56 -07:00
Leonardo de Moura
caa624c936 chore: cleanup 2020-09-19 09:24:50 -07:00
Leonardo de Moura
d1c3ab3797 feat: many1Unbox and nodeSepBy1Unbox parser combinators
@Kha I removed the dummy parenthesizer/formatter for `withResultOf`,
and add proper ones for `many1Unbox` and `nodeSepBy1Unbox`.
2020-09-17 13:17:46 -07:00
Leonardo de Moura
2dafdec000 feat: use withResultOf combinator instead of unboxSingleton parameter 2020-09-17 12:12:12 -07:00
Leonardo de Moura
56f8103e66 chore: improve error message for rw [] 2020-09-17 10:55:51 -07:00
Leonardo de Moura
9d1f2b644f chore: rwRuleSeq ; => , 2020-09-17 08:15:58 -07:00
Leonardo de Moura
a2e8a41f33 feat: rewrite tactic parser 2020-09-16 17:43:44 -07:00
Leonardo de Moura
c620a2a59d feat: refine parser location 2020-09-16 17:28:09 -07:00
Leonardo de Moura
3fa7e61b26 feat: add done and admit syntax 2020-09-15 10:46:40 -07:00
Leonardo de Moura
e66f6cdd6c feat: using indentation 2020-09-14 16:12:23 -07:00