Leonardo de Moura
dda0e38802
chore(library/init): avoid local notation
2019-06-24 15:48:11 -07:00
Leonardo de Moura
da09ef4f66
feat(frontends/lean/builtin_exprs): minor improvement
2019-06-24 15:48:11 -07:00
Leonardo de Moura
24e3bff429
feat(frontends/lean): add simple parser! macro
2019-06-24 15:48:11 -07:00
Leonardo de Moura
6a740723a4
chore(frontends/lean): remove node! and nodeChoice! macros
...
They were used in the parsing framework based on `Parsec`
2019-06-24 15:48:11 -07:00
Leonardo de Moura
2c4cec184a
test(tests/bench): add C++ versions of rbmap benchmarks
2019-06-22 06:58:27 -07:00
Leonardo de Moura
8e98e4375f
chore(tests/bench): match order we used in the paper
2019-06-22 06:29:47 -07:00
Leonardo de Moura
3c4c413c2c
test(tests/bench/rbmap2): fix benchmark
2019-06-21 16:11:05 -07:00
Leonardo de Moura
82c90c7c96
test(tests/bench/unionfind_clean): add clean version
2019-06-21 16:10:53 -07:00
Leonardo de Moura
8f1345dc53
chore(library/init/lean/syntax): simplify SyntaxNodeKind
2019-06-21 14:24:44 -07:00
Leonardo de Moura
e4344b0c94
chore(library/init/lean/parser/default): update default
2019-06-21 14:20:40 -07:00
Leonardo de Moura
0fe8fd1307
feat(library/init/lean/parser/parser): notation
2019-06-21 14:20:22 -07:00
Leonardo de Moura
43fd0eeb94
chore(library/init/coe): minor
2019-06-21 14:15:26 -07:00
Leonardo de Moura
bc9e460f62
fix(library/init/lean/compiler/ir): collectUsedDecls must take initialization functions into account
...
Move builtin parser level to its own directory
2019-06-21 13:34:42 -07:00
Leonardo de Moura
7f3543096a
test(tests/playground/parser2): proof of concept
2019-06-20 16:48:17 -07:00
Leonardo de Moura
93e5746739
chore(library/init/lean/parser/parser): naming consistency
2019-06-20 16:47:55 -07:00
Leonardo de Moura
98879f1580
refactor(library/init/lean/parser/parser): simplify SyntaxNodeKind
...
The numeric `id` generation is works well for builtin parsers, but it
creates problems when defining dynamic ones.
2019-06-20 14:51:59 -07:00
Leonardo de Moura
4ab31275a4
chore(library/init, frontends/lean): remove foldl and foldr notation, and implement list notation in the old parser
2019-06-20 14:32:08 -07:00
Leonardo de Moura
807ec2169a
chore(frontends/lean/notation_cmd): remove scoped notation support
2019-06-20 14:13:56 -07:00
Leonardo de Moura
9e73d92e42
chore(library/init): remove instances of scoped notation
2019-06-20 14:08:35 -07:00
Leonardo de Moura
00aa2a3ffe
chore(library/user_recursors): remove [recursor] attribute and environment extension
2019-06-20 11:25:53 -07:00
Leonardo de Moura
1e30f76511
chore(frontends/lean/pp): remove ppAsAnonymousCtor attribute
2019-06-20 11:03:20 -07:00
Leonardo de Moura
64a592899f
chore(frontends/lean/notation_cmd): remove parsingOnly attribute
2019-06-20 11:00:40 -07:00
Leonardo de Moura
6b5408b69c
chore(library/derive_attribute): remove derive_attribute
...
We will reimplement it in Lean after we have the new frontend working.
2019-06-20 10:55:53 -07:00
Leonardo de Moura
ac43b82668
chore(library/init): remove [derive] uses
...
Trying to minimize the number of features we need to support in the new
frontend, and attributes we need to port to the new attribute manager.
2019-06-20 10:53:15 -07:00
Leonardo de Moura
8ad653ae2d
chore(stage0): update
2019-06-20 09:55:55 -07:00
Leonardo de Moura
0b99a18f97
chore(library): use >> as notation for andthen
...
We have other plans for `;`.
2019-06-20 09:54:53 -07:00
Leonardo de Moura
db325cb924
fix(stag0): missing file
2019-06-20 09:23:41 -07:00
Leonardo de Moura
8724a8cfd5
feat(library/init/lean/parser/parser): builtin parser attributes must be applied after compilation
2019-06-20 09:22:03 -07:00
Leonardo de Moura
e0ddacfd3e
feat(library/init/lean/attributes,frontends/lean): allow attributes to specify when they should be applied
2019-06-20 09:17:03 -07:00
Leonardo de Moura
e86e6af049
feat(library/init/lean/attributes): add applicationTime field and remove unnecessary parameters
2019-06-20 08:48:26 -07:00
Leonardo de Moura
d7fb0aa908
feat(library/init/lean/parser/parser): simpler cache
...
cc @kha
2019-06-19 16:48:18 -07:00
Leonardo de Moura
f180b3f32e
feat(library/init/lean/parser/parser): improve error messages on prattParser
2019-06-19 16:36:18 -07:00
Leonardo de Moura
4db487fb42
fix(library/init/lean/parser/parser): sepBy1
2019-06-19 16:34:49 -07:00
Leonardo de Moura
cf9a29152d
fix(library/init/lean/parser/parser): ParserInfo for ident, strLit, and numLit
2019-06-19 16:19:00 -07:00
Leonardo de Moura
86e1af2066
test(tests/playground/parser1): minor
2019-06-19 14:17:55 -07:00
Leonardo de Moura
401de35b6c
chore(library/init/lean/parser/parser): remove unnecessary import
...
It turns out we don't need evalConst for implementing `builtinParsers`.
2019-06-19 10:53:51 -07:00
Leonardo de Moura
5ccbb1ec1c
test(tests/playground/parser1): add first test
...
We use `attribute [testParser] ...` instead of `@[testParser]` as a
workaround for the issue described at 697f69020f
I will write a more detailed report for the new parser in the Lean4
channel. I will try to cover the pending issues and TODO list.
cc @kha
2019-06-19 10:52:22 -07:00
Leonardo de Moura
5f014415a9
feat(library/init/lean/parser/parser): add helper functions for invoking builting parsers
...
TODO: add scoped attributes for dynamically extending parsers.
2019-06-19 10:48:19 -07:00
Leonardo de Moura
89dae7f877
fix(library/init/lean/parser/parser): missing result
2019-06-19 10:33:53 -07:00
Leonardo de Moura
451ab72eea
fix(library/init/lean/attributes): typo
2019-06-19 10:21:40 -07:00
Leonardo de Moura
a55251618a
fix(library/init/lean): missing file
2019-06-19 09:53:34 -07:00
Leonardo de Moura
b502f178c2
chore(library/compiler/reduce_arity): fix typo
2019-06-19 09:53:00 -07:00
Leonardo de Moura
697f69020f
fix(library/init/lean/parser/parser): new registerBuiltinParserAttribute
...
It is still broken since we apply attributes before we compile code.
Recall that attributes such as `@[export]` and `@[extern]` must be applied before we
compile code.
On the other hand, any attribute `attrName`
```
@[attrName] def foo := ...
```
which creates auxiliary definitions that depend on `foo` must be applied
AFTER we generate code for `foo`. Otherwise, we will fail to compile the
auxiliary definition since we don't have code for `foo` yet.
I will fix the issue above by allowing attributes to specify when they
should be applied. I will start with only two options: before and after
code compilation. In the future, we may need more options (e.g., before
elaboration), but I don't see the need yet.
cc @kha
2019-06-19 09:52:56 -07:00
Leonardo de Moura
766467d095
fix(stage0): missing files
2019-06-18 18:35:18 -07:00
Leonardo de Moura
08cdb757b4
feat(library/init/lean/environment): add Environment.addAndCompile
...
To fix `BuiltinParserAttribute`, we need to be able to add auxiliary declarations programmatically.
2019-06-18 18:20:17 -07:00
Leonardo de Moura
66e3f68dbc
chore(library/compiler/procedure): remove dead code
2019-06-18 17:29:19 -07:00
Leonardo de Moura
dbe7078e80
feat(library/init/lean/attributes): add ParametricAttribute.setParam
2019-06-18 17:24:16 -07:00
Leonardo de Moura
0dfca42f6d
chore(library/init/lean/compiler/initattr): remove unnecessary @[export]
2019-06-18 16:15:48 -07:00
Leonardo de Moura
9da080d398
feat(library/compiler/init_attribute): switch to @[init] attribute in Lean
2019-06-18 16:03:52 -07:00
Leonardo de Moura
6219a2277a
fix(library/init/lean/compiler/initattr): getInitFnNameFor
2019-06-18 16:03:52 -07:00