Sebastian Ullrich
0c91b3769e
chore: replace variables in src/
2021-01-22 14:36:05 +01:00
Sebastian Ullrich
21a826ee51
chore: naming
2021-01-20 22:47:18 +01:00
Sebastian Ullrich
79107a2316
feat: copy & store whole ref range in SourceInfo
2021-01-20 16:48:50 +01:00
Sebastian Ullrich
021a823f49
feat: add option printMessageEndPos
2021-01-15 16:27:59 +01:00
Leonardo de Moura
f53721e1c9
chore: adapt code to previous change
2020-12-23 08:31:20 -08:00
Leonardo de Moura
78aa3d8e72
chore: use deriving BEq
2020-12-22 18:10:20 -08:00
Leonardo de Moura
7b813622c6
chore: increase precedence of |>, <|, $ parsers
...
@Kha Now, all parsers defined by `Init/Std/Lean` packages have
precedence >= `min` and <= `max`.
The only exception is `<|>` since it is an infix operator sharead with
the tactic DSL.
BTW, the meaning of `f $ a <|> b` changed with this commit.
It was `f (a <|> b)`, and now is `(f a) <|> b`. The problem is that
the precedence of the `$` parser is now greater than the `<|>` parser.
I will try another experiment where I make sure we do not "reuse"
term infix operators in the tactic DSL.
2020-12-22 14:10:07 -08:00
Sebastian Ullrich
07c7638fd7
feat: token source info antiquotations tk%$id
...
/cc @leodemoura
2020-12-22 13:11:04 +01:00
Sebastian Ullrich
4380d4a9da
feat: parser: store options & pass to evalConst
2020-12-16 23:15:58 +01:00
Sebastian Ullrich
d22d639fcb
refactor: rename "antiquot scope" ~> "antiquot splice"
2020-12-16 17:44:20 +01: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
a46505cb8b
feat: use new precedence syntax
2020-12-14 15:14:03 -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
3b6d65c3c3
chore: use deriving Inhabited
2020-12-13 10:09:20 -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
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
Sebastian Ullrich
4dfa7e1187
feat: use actual separator in sepBy antiquotation scope
2020-12-09 17:48:05 +01:00
Sebastian Ullrich
04f09cc34f
perf: avoid redundant token collections from antiquotation scopes
2020-12-04 22:43:31 +01:00
Sebastian Ullrich
d7f27a140e
feat: antiquotation scopes
2020-12-04 19:24:32 +01:00
Sebastian Ullrich
80d4ae82e8
feat: arbitrary quotation kinds via name resolution in the parser and execution in the interpreter
2020-12-03 17:46:13 +01:00
Sebastian Ullrich
21f4257da5
feat: name resolution during parsing
2020-12-03 17:46:13 +01:00
Leonardo de Moura
b95c4788c1
refactor: OfDecimal ==> OfScientific
...
`decimalLit` ==> `scientificLit`
2020-12-03 08:08:19 -08:00
Leonardo de Moura
d1f4d4f57e
feat: scientific notation
2020-12-03 07:49:20 -08:00
Leonardo de Moura
85c9ab072c
feat: elaborate and delaborate decimals
2020-12-02 15:31:06 -08:00
Leonardo de Moura
facb28d080
feat: basic support for decimal numbers
2020-12-02 14:54:59 -08:00
Sebastian Ullrich
3c86f79bad
fix: one instance of parenthesizer "visiting a syntax tree without precedences"
2020-11-28 12:37:35 +01:00
Leonardo de Moura
0869f38de4
chore: update structure, class, inductive
2020-11-27 15:09:30 -08:00
Leonardo de Moura
d6f778bec4
refactor: arbitrary without explicit arguments
...
@Kha I was tired of writing `arbitrary _` :)
There 0 places in the stdlib where the type needs to be provided.
If in the future we need to specify the type we can use
`arbitrary (α := <type>)`
2020-11-25 09:07:38 -08:00
Leonardo de Moura
c7a31ed52e
chore: remove duplicate instances
2020-11-21 11:05:52 -08:00
Leonardo de Moura
c305c2691f
chore: use :=
2020-11-19 07:22:31 -08:00
Leonardo de Moura
96db4985eb
feat: allow anonymous antiquotations at ParserDescr.nodeWithAntiquot
2020-11-17 10:48:22 -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
6fbaea6563
feat: simplify syntax command syntax
2020-11-12 07:01:20 -08:00
Leonardo de Moura
bd8bb163e2
feat: add parser aliases tables
2020-11-11 17:41:20 -08:00
Leonardo de Moura
f17e226638
chore: naming convention
...
Example: `mkNameStr` => `Name.mkStr`
cc @Kha
2020-11-11 10:08:55 -08:00
Leonardo de Moura
df5b7fdc24
chore: naming convention
...
Use namespaces (e.g., `mkStxLit` ==> `Syntax.mkLit`)
cc @Kha
2020-11-11 09:55:23 -08: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
6765440724
chore: remove clutter
2020-10-28 14:11:06 -07:00
Leonardo de Moura
88fb6acae3
chore: remove clutter
2020-10-28 13:29:17 -07:00
Leonardo de Moura
898a08a0c1
chore: avoid Has prefix in type classes
...
closes #203
2020-10-27 18:29:19 -07:00
Leonardo de Moura
10c32fcf94
chore: HasToString => ToString
2020-10-27 16:11:48 -07:00
Sebastian Ullrich
bc1acf7a9f
doc: document orelse restriction for the pretty printer
2020-10-27 17:29:57 +01: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
ea829b75c0
chore: remove coercions for old frontend
2020-10-21 17:37:35 -07:00
Leonardo de Moura
cb66295149
chore: cleanup
2020-10-21 11:34:44 -07:00
Leonardo de Moura
d25ec3417b
chore: remove some [inline] and [specialize] annotations from Parser/Basic
2020-10-21 11:27:18 -07:00