Commit graph

61 commits

Author SHA1 Message Date
Sebastian Ullrich
1d524476b7 chore(tests/lean/parser1): restore #exit... 2018-12-12 11:06:52 +01:00
Sebastian Ullrich
94dec2cb9f feat(library/init/lean/elaborator): elaborate universe 2018-12-11 19:01:41 +01:00
Sebastian Ullrich
11e5d1a8a2 chore(tests/lean/parser1): reintroduce #exit in front of core.lean test 2018-12-06 13:23:25 +01:00
Sebastian Ullrich
58def30036 chore(tests/lean/parser1): clearly delimit components in profiler output 2018-12-04 12:31:13 +01:00
Sebastian Ullrich
fd121f03bd feat(library/init/lean/expander): make set of transformers configurable 2018-11-21 18:13:38 +01:00
Sebastian Ullrich
bd70dc1fc9 perf(library/init/lean/parser): move backtrackable state from parser_core_t to module_parser_m 2018-11-08 15:58:41 +01:00
Sebastian Ullrich
41f4a34d4b feat(library/init/lean/parser/token): cache hit statistics 2018-11-08 14:52:54 +01:00
Sebastian Ullrich
dcb7566e53 fix(tests/lean/parser1): fix test 2018-11-05 17:40:11 +01:00
Sebastian Ullrich
db6b9db07e fix(tests/lean/parser1): fix reprinting (`eoi node was missing) 2018-10-15 12:47:32 +02:00
Sebastian Ullrich
fdc06b39cd test(tests/lean/parser1): fix reprint check 2018-10-13 08:01:39 -07:00
Sebastian Ullrich
959948b901 feat(library/init/lean): even more core.lean progress 2018-10-03 16:00:08 -07:00
Sebastian Ullrich
ca8e75be9e fix(library/init/lean/elaborator): check for and consume end of input 2018-10-03 16:00:08 -07:00
Sebastian Ullrich
5274be8c3e feat(library/init/lean/elaborator): local notation
Implemented by treating the parser cfg as a cache that can be recreated from the
elaborator state after e.g. a scope has ended
2018-10-03 16:00:08 -07:00
Sebastian Ullrich
0563c60b1a feat(library/init/lean/elaborator): add coroutine, use it to implement section/namespace elaborators (they don't do anything yet except for checking the end name) 2018-10-02 14:55:28 -07:00
Sebastian Ullrich
5596eea27b test(tests/lean/parser1): deactivate core.lean test 2018-10-01 14:38:30 -07:00
Sebastian Ullrich
b443006e8f fix(library/init/lean/parser/syntax): reprint: do not concatenate choice contents 2018-10-01 09:02:39 -07:00
Sebastian Ullrich
945bf39e05 feat(library/init/lean): progress 2018-09-28 20:50:18 -07:00
Sebastian Ullrich
df278096c4 fix(library/init/lean): fixes fixes fixes 2018-09-28 13:08:25 -07:00
Sebastian Ullrich
63201c2a78 feat(library/init/lean/elaborator): add elaborator, elaborate notation and reserve notation 2018-09-28 13:08:24 -07:00
Sebastian Ullrich
2e5ea16e2f perf(library/init/lean/parser): cache consecutive calls to token at the same position
Parser performance improved by about 33%
2018-09-27 16:08:19 -07:00
Sebastian Ullrich
e661aaeacf refactor(library/init/lean/parser): store registered parsers in configs, use config hierarchy to avoid mutually recursive types
And other refactorings along the way
2018-09-27 10:05:10 -07:00
Sebastian Ullrich
2c07922327 refactor(library/init/lean/parser): minimize parser_state, have the module coroutine take and return parser_config 2018-09-26 13:20:07 -07:00
Sebastian Ullrich
07901fcfcb refactor(library/init/lean/parser/module): put prelude and imports into non-optional header parser to make the life of the elaborator and other consumers a bit easier 2018-09-26 13:20:07 -07:00
Sebastian Ullrich
377e256cc0 test(tests/lean/parser1): simple macro test 2018-09-25 18:37:43 -07:00
Sebastian Ullrich
1d01e81de8 refactor(library/init/lean/parser): do not construct final syntax tree independent from intermediate outputs
This makes sure we have a single consistent view of the file
2018-09-25 18:28:53 -07:00
Sebastian Ullrich
f8dd94c4bf feat(library/init/lean/expander): full mixfix and reserve_mixfix expanders 2018-09-25 15:05:47 -07:00
Sebastian Ullrich
db0fc4a448 feat(library/init/lean/expander): very basic expander 2018-09-24 09:53:28 -07:00
Sebastian Ullrich
b859560a83 feat(library/init/lean/parser/term): @/@@ notation 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
b8bd0cc5e6 feat(library/init/lean/parser/term): parentheses and tuples 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
6f68a0d1eb feat(library/init/lean/parser/basic): check for conflicting tokens 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
623a6603cb feat(library/init/lean/parser/term): lambda, pi, arrow 2018-09-19 12:36:34 -07:00
Sebastian Ullrich
e3afe02786 feat(library/init/lean/parser/declaration): doc comments and axioms 2018-09-19 12:36:34 -07:00
Sebastian Ullrich
ea4d7af66d refactor(library/init/lean/parser/command): move out notations 2018-09-17 18:47:50 -07:00
Sebastian Ullrich
ae7df32428 refactor(library/init/lean/parser/syntax): setting source_info.leading is much easier after parsing 2018-09-14 16:33:04 -07:00
Sebastian Ullrich
5e180cd170 feat(library/init/lean/parser/token): create structure-preserving syntax trees for identifiers
Also generalize `raw_symbol` to `raw`
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
98e09c274f feat(library/init/lean/parser/{pratt,level}): factor out pratt combinator, implement level parsers 2018-09-13 16:38:40 -07:00
Sebastian Ullrich
af55cb13e7 fix(library/messages,library/init/lean/message): wrap message_log in structure, reverse in the end 2018-09-11 13:55:25 -07:00
Sebastian Ullrich
0d865b37dd feat(library/init/lean/{message,parser}): enhance lean.message
Small regression: order of messages flipped, should eventually be sorted by
position
2018-09-08 18:37:58 -07:00
Sebastian Ullrich
1a53d4444b feat(library/init/lean/parser): parameterize recursive term parser with rbp 2018-09-06 17:16:22 -07:00
Sebastian Ullrich
93d13ffea3 chore(library/init/lean): lean.parser.reader ~> lean.parser 2018-08-30 16:34:47 -07:00
Sebastian Ullrich
72b255d4e1 chore(library/init/lean/parser/parser_t): rename module and type to parsec to avoid nested use of parser 2018-07-12 10:35:20 +02:00
Sebastian Ullrich
e57117a9b3 chore(library/init/lean/parser/parser_t): revert introduction of parser_t 2018-07-11 18:44:04 +02:00
Sebastian Ullrich
47f18661c5 refactor(library/init/lean/parser/parser_t): remove some uses of lift 2018-06-29 16:39:45 +02:00
Sebastian Ullrich
7ae87705c2 feat(library/init/lean/parser/parser_t): introduce monad_parser 2018-06-15 17:48:20 +02:00
Sebastian Ullrich
0f7c0ac8bf feat(init/lean/parser/parser): make a monad transformer
Also move parser combinators into the more specific namespace `init.lean.parser.parser_t`.
2018-06-04 12:57:23 +02:00
Sebastian Ullrich
581583832f chore(tests/lean/parser1): fix test 2018-05-17 14:15:08 +02:00
Leonardo de Moura
224fdc7a78 refactor(library/init/lean/ir): platform dependent IR
Motivation: in 64-bit machines, we can store boxed uint32 values as a
tagged pointer. In 32-bit machines, we need to allocated an object (like
Haskell) to store the uint32 value. So, the generated bytecode is quite
different in each platform.

This change also allow us to simplify the IR. Example: we don't need the
type `sizet` anymore.

Impact: To be able to bootstrap in both platforms,
we will have to store two versions of the generated code: 32 and 64
versions. In principle, we only need to store the 64-bit version,
and use cross-compilation to build the 32-bit version.
2018-05-10 13:15:02 -07:00
Leonardo de Moura
3ce96ae323 chore(tests/lean/parser1): fix test 2018-05-10 10:30:47 -07:00
Leonardo de Moura
50f883a946 chore(tests/lean/parser1): fix test 2018-05-07 18:11:41 -07:00
Leonardo de Moura
79f351d177 fix(library/init/lean/ir): parser and test 2018-05-07 18:07:04 -07:00