Leonardo de Moura
e3540a5d8f
chore: remove high builtin parser
...
It doesn't allow us to use `high` at `Prelude.lean` because
the macro expander for it is only defined at `Notation.lean`
2020-12-16 06:42:52 -08:00
Leonardo de Moura
16747d3986
chore: remove attrParam syntax category
2020-12-15 21:47:24 -08:00
Leonardo de Moura
901e58b131
fix: priority
2020-12-15 20:57:00 -08:00
Leonardo de Moura
ed87480093
refactor: move to attr syntax category
2020-12-15 20:22:04 -08:00
Leonardo de Moura
095a27c197
feat: add missing attribute parsers
2020-12-15 20:18:26 -08:00
Leonardo de Moura
eeac7fb9f4
feat: declare builtin attr parsers for builtin attributes
...
@Kha I believe this is the minimal set for covering the attributes we
have right now. The parser `simple` covers most of them, and the
dispatch is performed using the identifier.
Otherwise, the dispatch will be based on the node kind.
The `simple` parser is a bit hackish, but it is quite covenient for
simple attributes that do not require complex parameters.
2020-12-15 17:20:28 -08:00
Leonardo de Moura
6100ed9283
feat: add LeadingIdentBehavior type
...
Different strategies for handling the leading identifier in the
`Pratt` parser loop.
2020-12-15 16:45:14 -08:00
Leonardo de Moura
9e3b3b2495
refactor: move attribute related parsers to separate file
2020-12-15 16:13:11 -08:00
Leonardo de Moura
c9f766af5a
feat: we don't want attribute names as keywords
2020-12-15 15:59:48 -08:00
Leonardo de Moura
3ee6aec466
feat: add attr parser category
2020-12-15 15:44:46 -08:00
Leonardo de Moura
6985223a55
chore: switch to attrParam
2020-12-14 17:52:28 -08:00
Leonardo de Moura
69e8385f8d
refactor: move prioParser to Term.lean
2020-12-14 17:33:38 -08:00
Leonardo de Moura
0004196977
feat: add attrParam builtin parsers
2020-12-14 17:27:28 -08:00
Leonardo de Moura
a3fe907a28
feat: add attrParam syntax category
...
cc @Kha
2020-12-14 16:45:05 -08:00
Leonardo de Moura
abe7481453
feat: elaborate prio DSL
2020-12-14 16:25:10 -08:00
Leonardo de Moura
acba8d4a4a
chore: cleanup
2020-12-14 16:01:52 -08:00
Leonardo de Moura
a46505cb8b
feat: use new precedence syntax
2020-12-14 15:14:03 -08:00
Leonardo de Moura
f95a450894
feat: add builtin prec/prio parsers
2020-12-14 15:05:39 -08:00
Leonardo de Moura
216d34e178
feat: add prio parser category
2020-12-14 13:24:56 -08:00
Leonardo de Moura
c5e201bce6
feat: add prec syntax category
2020-12-14 13:09:27 -08:00
Leonardo de Moura
ac692bfc79
feat: add new static quotations
...
For users that are writing (not-trivial) macros without `import Lean`.
cc @Kha
2020-12-14 09:21:26 -08:00
Leonardo de Moura
c7a8fa2629
chore: expose a few auxiliary command parsers
2020-12-14 09:15:26 -08:00
Sebastian Ullrich
314c5c9d41
feat: run single non-category quotation under interpreter as well
2020-12-14 17:13:59 +01:00
Sebastian Ullrich
a9bdb2f70a
feat: prefer interpreter for running builtin parsers in quotations
2020-12-14 16:45:32 +01:00
Leonardo de Moura
0862df9ade
fix: missing ppSpace at set_option parser
2020-12-13 15:52:03 -08:00
Leonardo de Moura
3b6d65c3c3
chore: use deriving Inhabited
2020-12-13 10:09:20 -08:00
Leonardo de Moura
8fd6870931
fix: optDeriving parser
2020-12-12 18:58:44 -08:00
Leonardo de Moura
01ec581617
chore: update deriving instance syntax
2020-12-12 16:48:12 -08:00
Leonardo de Moura
3743f877f4
feat: add deriving parsers
2020-12-12 15:33:36 -08:00
Sebastian Ullrich
9e06680541
chore: remove old antiquotations splice syntax
2020-12-12 14:57:14 +01:00
Sebastian Ullrich
a13f129312
feat: antiquotation suffix splices such as $x:k,*
...
/cc @leodemoura
2020-12-12 14:57:14 +01:00
Leonardo de Moura
76fb1799fe
chore: goodies for deriving command
2020-12-11 18:08:50 -08:00
Sebastian Ullrich
bf63c4c0d0
feat: make sure dynamic quotations can only be used for parsers of arity 1
2020-12-11 21:34:30 +01:00
Leonardo de Moura
f2ea45e68a
feat: expose doSeq and termBeforeDo parsers
...
Users can use them to extend the `do` DSL.
2020-12-10 19:10:25 -08:00
Leonardo de Moura
1977b66573
feat: proper node for optional .. at structInst
2020-12-10 11:56:37 -08:00
Leonardo de Moura
28feed9c45
feat: proper node for structInstLVal
2020-12-10 11:50:12 -08:00
Leonardo de Moura
ffefd8db36
chore: remove weird syntax sugar from macro command
...
Before this commit,
```
macro term x:term : term => `($x)
```
would generate the notation
```
syntax "term" term : term
```
2020-12-10 08:09:47 -08:00
Leonardo de Moura
4d79c00846
feat: add double quoted name literal parser
2020-12-09 17:27:45 -08:00
Sebastian Ullrich
4dfa7e1187
feat: use actual separator in sepBy antiquotation scope
2020-12-09 17:48:05 +01:00
Sebastian Ullrich
fd1f74c421
feat: extend sepBy syntax syntax
2020-12-09 17:36:29 +01:00
Sebastian Ullrich
00e167b2f0
feat: match_syntax ~> match
2020-12-08 17:20:36 +01:00
Sebastian Ullrich
32eeac88c8
fix: ensure matchAlts have same shape with and without optionalFirstBar
2020-12-08 17:13:32 +01:00
Leonardo de Moura
ae5aa51712
chore: add explicit discard
2020-12-08 06:18:18 -08:00
Leonardo de Moura
1c0943ad82
feat: add #reduce command parser
2020-12-06 09:32:25 -08:00
Leonardo de Moura
f0372f724c
chore: remove unused attribute
2020-12-05 16:28:58 -08:00
Leonardo de Moura
fdc2c9f281
feat: process local instance ... and scoped instance ... commands
2020-12-05 15:46:25 -08:00
Leonardo de Moura
d27770ea0e
chore: prepare to add scoped and local instances
2020-12-05 15:36:23 -08:00
Leonardo de Moura
1faed06dc1
feat: new attrKind syntax
2020-12-05 13:59:08 -08:00
Leonardo de Moura
f1f8c2482f
feat: prepare to change attrKind parser
...
We want to add a proper node and kind.
2020-12-05 13:49:59 -08:00
Leonardo de Moura
32d5ef8b78
feat: scoped and local unification hints
2020-12-05 13:49:36 -08:00