Leonardo de Moura
09d438ca1d
chore: enforce notation parameter naming convention
2021-04-19 18:54:09 -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
Sebastian Ullrich
1c31240ebb
feat: token antiquotations in macro
2020-12-22 13:11:04 +01:00
Leonardo de Moura
0642a62848
chore: prepare to add scoped macro and elab commands
2020-12-21 16:50:29 -08:00
Leonardo de Moura
4fc06bfcca
feat: add optional (priority := <prio>) to instance command
2020-12-21 10:02:12 -08:00
Leonardo de Moura
43284cc5fa
feat: improve notation for setting parser names and priorities
2020-12-21 09:11:12 -08:00
Leonardo de Moura
97642bd000
fix: prio issue
2020-12-16 07:44:48 -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
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
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
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
Sebastian Ullrich
fd1f74c421
feat: extend sepBy syntax syntax
2020-12-09 17:36:29 +01:00
Leonardo de Moura
bcf4ffdd1a
feat: local modifier at @[...]
2020-12-05 07:24:55 -08:00
Leonardo de Moura
c6ab0b4d2c
feat: allow local modifier at infix, notation, and syntax commands
2020-12-05 07:00:06 -08:00
Leonardo de Moura
5a772c6cae
feat: expand scoped notation into scoped attribute modifier
2020-12-04 11:39:00 -08:00
Leonardo de Moura
4d523e3b8c
chore: prepare to add optional "scoped" at syntax, infix, and notation commands
2020-12-04 11:20:48 -08:00
Leonardo de Moura
e9069b6965
feat: expand optional priority at notation and mixfix commands
2020-11-29 08:22:47 -08:00
Leonardo de Moura
ee5679c77c
chore: prepare to add optional priorities to the notation and mixfix commands
2020-11-29 08:05:26 -08:00
Leonardo de Moura
8751bbe2a8
fix: notation for non reserved symbols
2020-11-17 11:25:04 -08:00
Leonardo de Moura
af8d616d5a
feath: improve unary and binary parsers
2020-11-17 08:39:56 -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
bd76458210
feat: add support for nonReservedSymbol at syntax command
2020-11-12 07:32:18 -08:00
Leonardo de Moura
6fbaea6563
feat: simplify syntax command syntax
2020-11-12 07:01:20 -08:00
Leonardo de Moura
029510d4f5
feat: syntax for setting allowTrailingSep
...
@Kha This commit allows us to set `allowTrailingSep` for `sepBy` and
`sepBy1` from the `syntax` command.
```lean
syntax "[" (sepBy (allowTrailingSep := true) term ",") "]" : term
```
The new syntax is a bit verbose :)
What do you think? Any suggestions?
2020-11-08 08:12:54 -08:00
Leonardo de Moura
231b20c4fb
feat: add syntax parsers for withPosition and checkCol
2020-11-08 07:02:14 -08:00
Leonardo de Moura
f20a4244e4
chore: use named argument
2020-11-03 17:20:52 -08:00
Leonardo de Moura
672436bc5f
feat: allow user to assign parsing priorities in the macro and elab commands
2020-10-29 20:33:51 -07:00
Sebastian Ullrich
d8a1742d57
feat: introduce suppressInsideQuot
2020-10-27 16:50:58 +01:00
Leonardo de Moura
7e244686e9
chore: remove old notation
2020-10-26 09:16:51 -07:00
Leonardo de Moura
13c2a8ff51
chore: remove #lang lean4 header
2020-10-25 09:54:07 -07:00
Leonardo de Moura
1af6f14fa8
chore: move to new frontend
2020-10-21 09:17:02 -07:00
Leonardo de Moura
ef18b0ab49
chore: use [builtinInit]
2020-10-19 14:58:38 -07:00
Leonardo de Moura
3bd75d51d5
feat: add ParserDescr.noWs
2020-10-09 16:26:49 -07:00
Leonardo de Moura
7013ea4098
feat: add interpolatedStr to ParserDescr and Syntax
2020-10-09 14:04:53 -07:00
Sebastian Ullrich
5d76a981b0
chore: adjust pp spacing
2020-10-07 09:44:04 +02:00
Leonardo de Moura
10fc908463
chore: use Tactic.seq1 instead of Tactic.tacticSeq1Indented
...
Reason: antiquotations.
2020-10-06 08:28:41 -07:00
Leonardo de Moura
93dc94b3b0
chore: remove nodeSepBy1Unbox hack
2020-10-06 07:22:28 -07:00
Leonardo de Moura
87381e3329
feat: add support for parser priorities in the syntax command
...
@Kha Parser priorities are working :)
2020-09-19 18:47:08 -07:00
Leonardo de Moura
f679b7d803
feat: add notFollowedBy to syntax
2020-09-19 15:43:44 -07:00
Leonardo de Moura
ee6d723554
feat: add stx.quot
2020-09-19 14:40:17 -07:00
Leonardo de Moura
f876177f26
feat: expand macros in syntax declaration
2020-09-19 14:39:49 -07:00
Leonardo de Moura
71de0c8eb9
chore: rename category syntax to stx
...
Reason: `syntax` is a keywork. So, we can't write `macro "boo" x:syntax`
2020-09-19 14:11:35 -07:00
Leonardo de Moura
8142548237
fix: missing toggleInsideQuot
...
cc @Kha
2020-09-17 13:23:52 -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