Leonardo de Moura
6fdcb1c192
chore: prepare to remove addMacroScopeExt
2020-01-23 12:02:45 -08:00
Leonardo de Moura
0c1c4ea9cc
chore: update expected output
2020-01-23 11:52:03 -08:00
Leonardo de Moura
aef998af72
chore: update stage0
2020-01-23 11:47:07 -08:00
Leonardo de Moura
4ef8aa347a
feat: missing case
2020-01-23 11:46:29 -08:00
Leonardo de Moura
981d4733f3
chore: update stage0
2020-01-23 11:33:36 -08:00
Leonardo de Moura
fab256d4cc
feat: improve macroscope encoding
2020-01-23 11:33:35 -08:00
Leonardo de Moura
87d002bb43
feat: extend MacroM
...
It now has access to `mainModule` and a name generator.
2020-01-23 09:48:37 -08:00
Leonardo de Moura
98ee6e9734
refactor: move NameGenerator to LeanInit
2020-01-23 08:49:58 -08:00
Leonardo de Moura
670243400b
chore: update stage0
2020-01-22 20:15:29 -08:00
Leonardo de Moura
67535441ad
fix: macroTail issue
...
cc @Kha
2020-01-22 20:14:09 -08:00
Leonardo de Moura
083999d337
chore: update stage0
2020-01-22 17:33:25 -08:00
Leonardo de Moura
764b854742
fix: bug at longestMatchStep
...
@Kha I found the bug by accident when I was playing with the
bigop.lean
2020-01-22 17:31:54 -08:00
Leonardo de Moura
3f24b31286
chore: remove leftover
2020-01-22 16:50:05 -08:00
Leonardo de Moura
1ff7950a77
feat: use truncateTrailing at error messages
2020-01-22 16:19:07 -08:00
Leonardo de Moura
ae84270226
feat: include result of sequence of macro expansions
...
@Kha I added this feature to help debugging macros.
I was using `set_option trace.Elab true` as a workaround, but it is
too verbose.
For example, in the following buggy code
```
new_frontend
macro "foo" x:term : term => `(x + 1)
macro "bla" x:term : term => `(foo $x)
```
We get the error message
```
<input>:6:11: error: unknown identifier 'x.15'
with resulting expansion
x + 1
while expanding
foo 1
while expanding
bla 1
```
Perhaps we should preserve the macroscopes at "with resulting
expansion". Anyway, I think it is better than the previous error.
```
<input>:6:11: error: unknown identifier 'x.15'
while expanding
foo 1
while expanding
bla 1
```
2020-01-22 16:08:07 -08:00
Leonardo de Moura
4c53dfa8a7
chore: typo
2020-01-22 14:24:32 -08:00
Leonardo de Moura
c9e9208ea2
feat: cleanup bigop example
2020-01-22 14:22:34 -08:00
Leonardo de Moura
c9474c1883
feat: add more examples
...
cc @Kha
2020-01-22 14:09:45 -08:00
Leonardo de Moura
37e83651f0
fix: postpone synthesizeUsingDefault
2020-01-22 14:09:05 -08:00
Leonardo de Moura
e57289f98e
feat: handle new HasOfNat.ofNat at evalNat
2020-01-22 13:55:13 -08:00
Leonardo de Moura
c1861765aa
fix: workaround for new_frontend keyword
2020-01-22 13:34:02 -08:00
Leonardo de Moura
53e64e4e44
test: bigop test
2020-01-22 13:22:29 -08:00
Leonardo de Moura
a7a36f80bb
feat: add termIdToAntiquot
2020-01-22 13:18:09 -08:00
Leonardo de Moura
ff43704411
chore: update stage0
2020-01-22 12:59:33 -08:00
Leonardo de Moura
5193ce45e4
refactor: move Syntax helper functions to LeanInit
2020-01-22 12:58:06 -08:00
Leonardo de Moura
a5bcebb07f
feat: add antiquotation support for strLit, numLit and charLit
2020-01-22 12:57:28 -08:00
Leonardo de Moura
0be31c14ec
fix: workaround for term parser antiquotation issue
...
@Kha this is a temporary workaround. We should discuss how to cleanup
in the next Dev meeting.
2020-01-22 12:05:12 -08:00
Leonardo de Moura
642850efb2
fix: antiquotation for all categories
2020-01-22 11:52:08 -08:00
Leonardo de Moura
e8c54ad1bf
fix: use nonReservedSymbol when defining tactic new syntax
2020-01-21 14:37:29 -08:00
Leonardo de Moura
4f0dc252ae
test: add extensible macro example
2020-01-21 14:05:21 -08:00
Leonardo de Moura
a83487ca5f
chore: simplify toParserDescr
2020-01-21 14:00:29 -08:00
Leonardo de Moura
14347456d7
feat: extensible tactics
2020-01-21 13:25:45 -08:00
Leonardo de Moura
6f9f581566
feat: add Syntax.identToAtom
2020-01-21 13:25:20 -08:00
Leonardo de Moura
2b63aa27d3
chore: use new_frontend in the whole test
2020-01-21 09:16:38 -08:00
Leonardo de Moura
35383bf862
chore: update stage0
2020-01-21 09:16:38 -08:00
Leonardo de Moura
8fb710c31e
chore: remove simple parser kind
...
Now, the previous commit makes sure pratt's parsers subsume simple parsers
2020-01-21 09:16:38 -08:00
Leonardo de Moura
f3c1928d2d
feat: improve prattParser tables
...
We can delete the simple category after this change
cc @Kha
2020-01-21 09:16:38 -08:00
Leonardo de Moura
206fd38540
chore: update stage0
2020-01-21 09:16:38 -08:00
Leonardo de Moura
67fb63c9fd
feat: use mpz_pow_ui to implement Nat.pow
2020-01-21 09:16:38 -08:00
Leonardo de Moura
cb8f68b407
fix: put limit on Nat.pow constant folding
2020-01-21 09:16:38 -08:00
Sebastian Ullrich
458eed730f
chore: fix confusing indentation
2020-01-21 11:16:04 +01:00
Leonardo de Moura
2a120f66f0
chore: update stage0
2020-01-20 22:27:13 -08:00
Leonardo de Moura
7e61315e6d
chore: fix tests
2020-01-20 22:26:07 -08:00
Leonardo de Moura
b279433236
feat: improve checkNoWsBefore (skip None nodes)
2020-01-20 22:24:01 -08:00
Leonardo de Moura
47c85cc351
fix: bug at ParserDescr.ident
2020-01-20 21:55:16 -08:00
Leonardo de Moura
1dbfc4b337
fix: add checkNoWsBefore before option * in mkAntiquot
...
@kha we need it, otherwise we can't process rules such as
```
| `(FOO $t >>> $r) => `($t * $r)
```
without adding parenthesis at `(($t) * $r)
2020-01-20 21:48:40 -08:00
Leonardo de Moura
0725d966e9
chore: remove unnecessary parser!
2020-01-20 21:25:31 -08:00
Leonardo de Moura
27545124a5
chore: update stage0
2020-01-20 20:56:57 -08:00
Leonardo de Moura
98033f298f
feat: add support for simple category
2020-01-20 20:55:54 -08:00
Leonardo de Moura
6d8ca3ed62
feat: allow user to specify the kind of parser used to implement a new categoy
2020-01-20 20:14:18 -08:00