Leonardo de Moura
eb69c914e8
chore(library/init/lean/parser/term): add missing [inline]
2019-07-08 22:06:52 -07:00
Leonardo de Moura
c00788a982
fix(library/init/lean/compiler/ir/emitcpp): header of big boxed functions
2019-07-08 21:52:01 -07:00
Leonardo de Moura
b89a389427
chore(library/init/lean/parser/parser): force eta-expansion
2019-07-08 20:46:34 -07:00
Leonardo de Moura
324a053f4c
fix(library/init/lean/compiler/ir/resetreuse): bug at Dmain
2019-07-08 20:37:54 -07:00
Leonardo de Moura
95dc2c5ade
chore(library/init/lean/parser): minor
2019-07-08 14:45:20 -07:00
Leonardo de Moura
f37cd3cd11
feat(library/init/lean/parser/term): match-expression
...
TODO: add whitespace sensitivity
2019-07-08 14:14:49 -07:00
Leonardo de Moura
5cfa13d08b
fix(library/init/lean/parser/parser): consume whitespace in the beginning of the input
2019-07-08 14:13:50 -07:00
Leonardo de Moura
f66f6fd455
fix(library/init/lean/parser/parser): The first tokens of try p are the first tokens of p
2019-07-08 13:46:19 -07:00
Leonardo de Moura
846ec9578d
fix(library/init/lean/parser/term): allow namedArgument notation in applications only
2019-07-08 13:43:12 -07:00
Leonardo de Moura
4a17cf134b
feat(library/init/lean/parser/term): add forall parser
2019-07-08 13:03:21 -07:00
Leonardo de Moura
a6f9633e64
feat(library/init/lean/parser/term): dependent arrow notation
2019-07-08 12:57:49 -07:00
Leonardo de Moura
d3ca360e7f
feat(library/init/lean/parser): depArrow proof of concept
2019-07-08 10:49:54 -07:00
Leonardo de Moura
e2bcf179ac
fix(library/init/lean/parser/parser): missing trim
2019-07-08 10:33:51 -07:00
Leonardo de Moura
8b3d932212
chore(library/init/lean/parser): maxPrec ==> appPrec
2019-07-08 09:17:32 -07:00
Leonardo de Moura
1a81d60820
chore(frontends/lean/parser): simplify binder notation
...
The `<ident> : <expr>` now requires explicit brackets.
2019-07-08 08:54:19 -07:00
Leonardo de Moura
9334f54b87
feat(library/init/lean/parser/parser): support for whitespace sensitive left binding power
...
We use this new feature to implement array access notation `a[i]`.
2019-07-07 07:21:10 -07:00
Leonardo de Moura
2498f197b8
feat(library/init/lean/parser/term): declare some builtin infix operators
...
In Lean4, several builtin operators will be defined programmatically to
make sure we can bootstrap the system before we have all primitives
necessary for defining parsers.
2019-07-05 18:51:14 -07:00
Leonardo de Moura
794edcb18c
chore(library/init/lean/parser): minor modifications
2019-07-05 18:31:03 -07:00
Leonardo de Moura
483b7ae51a
feat(library/init/lean/parser/term): add field notation trailing parser
2019-07-05 16:23:25 -07:00
Leonardo de Moura
ee5ec98fa9
feat(library/init/lean/parser/parser): add symbolNoWs trailing parser
2019-07-05 16:22:36 -07:00
Leonardo de Moura
fa96fb8deb
feat(library/init/lean/position): HasToString instance
2019-07-05 16:22:15 -07:00
Leonardo de Moura
113ab4824f
feat(library/init/lean/syntax): add Syntax.getTailInfo
2019-07-05 16:21:51 -07:00
Leonardo de Moura
9d5b0fd309
feat(library/init/data/array/basic): add findRev
2019-07-05 15:51:25 -07:00
Leonardo de Moura
dca0ba60fa
feat(library/init/lean/parser/parser): add fieldIdx parser
...
We should not use `numLit` for projections since it will parse
`p.1.2` as
```
Term.proj `p (numLit "1.2")
```
2019-07-05 15:07:51 -07:00
Leonardo de Moura
3285a9e77d
chore(library/init): unnecessary parentheses
2019-07-05 13:23:19 -07:00
Leonardo de Moura
68d29fcdd4
feat(library/init/lean/parser/term): structure instances and subtypes
2019-07-05 12:09:59 -07:00
Leonardo de Moura
e3c75d2af6
fix(library/init/lean/parser/parser): position information for strLit, numLit, ident
2019-07-05 12:07:37 -07:00
Leonardo de Moura
24f9cd9564
chore(library/init/lean/parser/parser): minor
2019-07-05 11:23:45 -07:00
Leonardo de Moura
70fbf58c50
fix(library/init/lean/parser/parser): bug at identFnAux
2019-07-05 10:46:20 -07:00
Leonardo de Moura
326c22e75d
feat(library/init/lean/parser/term): anonymous constructors and lambdas
2019-07-05 10:26:39 -07:00
Leonardo de Moura
ea6eee516b
chore(frontends/lean): use => instead of := in match-expressions
...
Motivation: use same separator used in lambda expressions as in
other programming languages.
2019-07-04 11:38:38 -07:00
Leonardo de Moura
009e8ecd59
chore(library/init/control/estate): style
2019-07-02 20:45:25 -07:00
Leonardo de Moura
df9b8feef6
chore(library/init/core): minor
2019-07-02 17:37:35 -07:00
Leonardo de Moura
07cff06b6e
chore(library): Π ==> ∀
2019-07-02 17:35:15 -07:00
Leonardo de Moura
f74f5bc33a
fix(library/init/core): show
2019-07-02 17:27:03 -07:00
Leonardo de Moura
0bee94886e
feat(frontends/lean/builtin_exprs): , from ==> from, and cleanup suffices
2019-07-02 17:22:50 -07:00
Leonardo de Moura
9f24e77200
chore(library/init/lean/parser/term): add show and have parsers
2019-07-02 16:59:43 -07:00
Leonardo de Moura
7ba9a5012a
chore(frontends/lean/builtin_exprs): make sure have-expression is consistent with let-expression
2019-07-02 16:46:51 -07:00
Leonardo de Moura
44730314ff
feat(library/init/lean/parser/term): add ifTerm
2019-07-02 16:32:09 -07:00
Leonardo de Moura
56007d7c97
feat(library/init/lean/parser/parser): display builtinParser name when updateTokens fails
2019-07-02 16:06:39 -07:00
Leonardo de Moura
92466272ed
fix(library/init/lean/compiler/ir/emitcpp): incorrectly emitting unicode characters in the range [128, 255]
...
For example, "·" was being stored as `\xb7` which is not the valid UTF8.
2019-07-02 15:56:32 -07:00
Leonardo de Moura
a02443d23d
chore(frontends/lean): fun x, e ==> fun x => e
2019-07-02 13:22:11 -07:00
Leonardo de Moura
e29bf35d15
chore(frontends/lean/builtin_exprs): remove hard coded (::) notation
2019-07-02 11:01:05 -07:00
Leonardo de Moura
39221adcd6
chore(frontends/lean/builtin_exprs): remove assume notation
2019-07-02 10:40:07 -07:00
Leonardo de Moura
d4a5306d82
feat(library/init/lean/parser/term): explicit universe notation in the new parser
2019-07-02 09:00:58 -07:00
Leonardo de Moura
300414e6e4
chore(frontends/lean): change explicit universe parameter notation in declarations
2019-07-02 08:57:08 -07:00
Leonardo de Moura
7cfbf94ca6
chore(frontends/lean/parser): comma separated universe levels
...
Make sure old C++ parsers uses the new Lean4 syntax for explicit
universe levels.
2019-07-02 08:21:16 -07:00
Leonardo de Moura
6841e47aa4
chore(frontends/lean/builtin_exprs): remove support for (<infix>) and (<infix> <expr>) notations
...
In Lean 4, we will support the more general
`a + ·` ==> `fun x, a + x`
`· + b` ==> `fun x, x + b`
`· + ·` ==> `fun x y, x + y`
`f · y` ==> `fun x, f a y`
`g · · b` ==> `fun x y, g x y b`
2019-07-02 08:06:06 -07:00
Leonardo de Moura
ee2d3faa63
feat(library/init/lean/parser/parser): change optional p behavior
...
It ignores error only if `p` does not consume any input. This change
improves the quality of the error messages. The previous behavior can be
obtained by using `optional (try p)`.
2019-07-02 07:52:22 -07:00
Leonardo de Moura
9d50b3ca47
feat(library/init/lean/parser/term): paren parser
2019-07-01 19:44:13 -07:00