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
6fa4e56fbe
feat(library/init/lean/parser/syntax): add and test reprinter
2018-07-11 14:34:50 +02:00
Sebastian Ullrich
b2f9b2c180
feat(library/init/lean/parser/{syntax,reader}): store whitespace around tokens
2018-07-11 14:34:50 +02:00
Sebastian Ullrich
ab19966d65
feat(library/init/lean/parser/reader): automatically promote tokens through readers
2018-07-05 18:01:17 +02:00
Sebastian Ullrich
fbdb73665f
test(tests/lean/reader1): start testing the tokenizer on core.lean and fix a comment bug
2018-07-05 16:51:48 +02:00
Sebastian Ullrich
fea91abf88
chore(tests/lean): add leanpkg file to make sure the same cwd is used in test runs and the interactive server
2018-07-05 16:48:56 +02:00
Sebastian Ullrich
6b6c16b6d6
chore(library/init/lean/parser/reader/module): remove theory command
...
We plan to allow `noncomputable`, as well as more modifiers, on `namespace/section`
2018-07-05 10:42:52 +02:00
Sebastian Ullrich
80745ba776
chore(library/init/data/string/basic): rename string.iterator's next_to_string to remaining_to_string
...
The old name implied that `curr` was not part of its result
2018-07-05 10:42:37 +02:00
Sebastian Ullrich
8ef87818ce
feat(library/init/lean/parser/reader): implement basic tokenizer
2018-07-05 10:42:37 +02:00
Sebastian Ullrich
f31e5f407f
chore(tests/lean/run/handlers): fix test
2018-06-29 16:39:47 +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
70970ce5e0
feat(library/init/lean/parser/reader): add simplistic implementation of a tiny initial part of the Lean reader
...
Maybe 'reader' isn't the best name.
2018-06-18 19:23:58 +02:00
Sebastian Ullrich
7ae87705c2
feat(library/init/lean/parser/parser_t): introduce monad_parser
2018-06-15 17:48:20 +02:00
Leonardo de Moura
71fc35af1d
chore(library/vm): remove meta rb_map
...
We should use the non-meta rbmap that is implemented in Lean.
2018-06-14 17:34:43 -07:00
Leonardo de Moura
e41a2ef3d8
chore(tests/lean): fix tests
2018-06-12 13:06:33 -07:00
Sebastian Ullrich
b01288e118
chore(tests/lean/lisp): speed up test
2018-06-12 17:39:59 +02:00
Leonardo de Moura
03391006dc
chore(tests/lean/revert): fix test
2018-06-08 11:21:01 -07:00
Sebastian Ullrich
3304221aa2
chore(tests/lean/lisp.lean): update test output
2018-06-07 18:00:24 +02:00
Sebastian Ullrich
cdb1f22156
test(tests/lean/lisp.lean): add or and if macros
2018-06-07 17:39:51 +02:00
Sebastian Ullrich
7a435dfb48
test(tests/lean/lisp): add evaluator for completeness' sake
2018-06-07 16:55:15 +02:00
Sebastian Ullrich
f768160aa9
test(tests/lean/lisp): add simple Lisp-y parser with awful handcrafted syntax patterns
2018-06-07 15:04:09 +02:00
Sebastian Ullrich
b1aff14650
feat(library/init/lean/parser/syntax.lean): simplify syntax debug output
2018-06-07 14:57:13 +02:00
Sebastian Ullrich
1c380037d3
refactor(library/init/lean/parser/syntax): replace syntax.lst with syntax.node, remove span field from syntax_node
2018-06-06 15:46:39 +02:00
Sebastian Ullrich
732c823646
feat(library/init/lean/parser): remove syntax_id, use De Bruijn indices instead
2018-06-06 15:36:28 +02:00
Leonardo de Moura
8ae42417eb
fix(library/compiler/vm_compiler): missing case
2018-06-05 11:07:38 -07:00
Leonardo de Moura
1bae8f8eab
refactor(library/init/lean/ir/parser): parser.lean => parser_t.lean
2018-06-05 08:00:13 -07: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
Leonardo de Moura
d182aa7a5f
test(tests/lean/smart_unfolding): add smart_unfolding test back
2018-06-01 09:07:04 -07:00
Leonardo de Moura
3ca2bf432f
test(tests/lean/revert): add new tests for Lean without delayed abstraction macro
2018-05-30 10:19:11 -07:00
Leonardo de Moura
3df91f1567
chore(*): fix tests
2018-05-21 06:57:43 -07:00
Leonardo de Moura
ce1fabbf3b
chore(tests/lean): fix tests
2018-05-20 09:47:31 -07:00
Leonardo de Moura
d92679f969
refactor(*): replace name with lean.name
2018-05-20 09:42:44 -07:00
Sebastian Ullrich
bba55aad47
feat(library/init/lean/trace): implement conditional tracing via good old trace classes
2018-05-18 14:52:15 +02:00
Sebastian Ullrich
d3e915b6b9
refactor(tests/lean/macro1): move meta type adapters into library
2018-05-17 18:58:33 +02:00
Sebastian Ullrich
4a7c2fcafc
test(tests/lean/macro1): add examples from prototype
2018-05-17 17:45:02 +02:00
Sebastian Ullrich
581583832f
chore(tests/lean/parser1): fix test
2018-05-17 14:15:08 +02:00
Leonardo de Moura
0f2a8f09c2
chore(library/init/lean/ir): cleanup
2018-05-15 12:09:04 -07:00
Leonardo de Moura
5cfb442f2c
feat(library/init/lean/ir): add compilation unit initializer/finalizer
2018-05-15 11:57:53 -07:00
Sebastian Ullrich
839e65f27c
test(tests/lean/run/handlers): add "Handlers in Action" example implementation
2018-05-15 18:50:12 +02:00
Leonardo de Moura
31ce1a23e7
fix(library/init/lean/ir/extract_cpp): add support for bignum literals
2018-05-14 11:12:49 -07:00
Leonardo de Moura
37201b9192
feat(library/init/lean/ir/extract_cpp): add emit_closure
2018-05-14 09:53:45 -07:00
Leonardo de Moura
ba76d86a38
feat(library/init/lean/ir/extract_cpp): add emit_app, fix assignment
2018-05-14 09:28:17 -07:00
Leonardo de Moura
12854dc944
feat(library/init/lean/ir/extract_cpp): include uncurry
2018-05-13 14:47:54 -07:00
Leonardo de Moura
c00117a269
fix(library/init/lean/ir/ssa_check): bug
2018-05-13 14:43:13 -07:00
Leonardo de Moura
8b0a35fa5d
feat(library/init/lean/ir/extract_cpp): add uncurry for functions with many arguments
2018-05-13 13:28:18 -07:00
Leonardo de Moura
b7f194d389
feat(library/init/lean/ir): allow arbitrary C++ identifiers to be assigned to declarations
2018-05-13 11:04:42 -07:00
Leonardo de Moura
cfacb515c1
feat(library/init/lean/ir): add IR simple frontend
2018-05-13 10:45:26 -07:00
Leonardo de Moura
0c785f8ab7
feat(library/init/data): add instances for has_repr (id A) and has_to_string (id A)
2018-05-10 17:37:57 -07: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