Sebastian Ullrich
623a6603cb
feat(library/init/lean/parser/term): lambda, pi, arrow
2018-09-19 12:36:34 -07:00
Sebastian Ullrich
e4c50b2b09
perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline
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
80e37aa8c5
chore(library/init/lean/parser): improve error messages
2018-09-19 12:36:34 -07:00
Sebastian Ullrich
1f239c9f2a
feat(library/init/lean/parser/syntax): pretty-print ident nodes
...
Painfully, because `ident.view` is not defined yet
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
fa0148e5b8
feat(library/init/lean/parser): declarations and binders
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
a6f25e2ae7
refactor(library/init/lean/parser/token): id ~> ident, ident ~> ident.parser
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
ea4d7af66d
refactor(library/init/lean/parser/command): move out notations
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
6b28162eee
chore(library/init/lean/parser/combinators): move out combinators
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
7012583245
feat(library/init/lean/parser/term): universes on identifiers
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
906f59e16e
fix(library/init/lean/parser/token): token': do not ignore source_info
2018-09-14 16:33:04 -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
b95ba21702
chore(library/init/lean/parser): fix syntax_node_kind names
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
0c3a1b07a5
chore(library/init/lean/parser/syntax): hide lean.parser prefix in syntax.to_format
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
8aa621efb2
refactor(library/init/lean/{syntax,macro}): remove syntax.ident, simply syntax.atom, remove expander prototype
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
6c11f99aae
fix(library/init/lean/parser): do not use raw_symbol on keywords
...
Otherwise `Type (maxx u v)` would be parsed as `Type (max x u v)`
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
468ac814a7
perf(library/init/lean/parser/token): move number' out of longest_match call
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
123adc1ae2
fix(library/init/lean/parser/parsec): longest_match: do not consume if no parser consumed
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
384389c84b
refactor(library/init/lean/parser/basic): move out rec_t and trie
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
6733d5ab21
feat(library/init/lean/parser/token): comments are not tokens anymore
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
e6b5598d7b
chore(library/init/lean/parser/term): actually remove Type*
2018-09-13 16:38:40 -07:00
Sebastian Ullrich
ce5618d332
chore(library/init/lean/parser/term): remove Sort*, Type*
...
These can be macros
2018-09-13 16:38:40 -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
a57573a5b7
fix(library/init/lean/parser/command): keywords in notation actions are not actual keywords
2018-09-13 16:38:40 -07:00
Leonardo de Moura
afd54039ab
chore(library): remove >>, we should use *>
2018-09-12 17:31:21 -07:00
Leonardo de Moura
9e305a5f26
chore(library): remove return, we should use pure
2018-09-12 16:51:11 -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
99ab0e9d67
refactor(library/messages): make an object_ref
2018-09-11 13:55:25 -07:00
Leonardo de Moura
0691d43153
feat(library/init/lean/parser/basic): define trie using rbnode (char × trie) nested inductice type
2018-09-09 18:19:28 -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
387cd25942
feat(library/init/lean/parser/term): implement Pratt parser
2018-09-06 17:17:50 -07:00
Sebastian Ullrich
c7d8271c84
feat(library/init/lean/parser/token): save lbp in token_config
2018-09-06 17:16:57 -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
149dd2a5e3
refactor(library/init/lean/parser): move command parsers into separate file
2018-09-06 10:46:29 -07:00
Sebastian Ullrich
d4105e1e16
chore(library/init/lean/parser/basic): avoid nesting rbnode in trie
...
The new two-layer rbnode/list structure is a little faster
2018-09-05 10:37:03 -07:00
Sebastian Ullrich
9c96aec3dc
perf(library/init/lean/parser/parsec): inline pure, bind, and left_over
2018-09-05 09:58:49 -07:00
Sebastian Ullrich
66ebd5d7d6
feat(library/init/lean/parser): implement new tokenizer using trie
...
test execution went down from 3.5s to 1.5s
2018-09-04 14:06:43 -07:00
Sebastian Ullrich
93d13ffea3
chore(library/init/lean): lean.parser.reader ~> lean.parser
2018-08-30 16:34:47 -07:00
Sebastian Ullrich
d60e3a66ce
refactor(library/init/lean/parser/reader): make monad stack not reducible
2018-08-30 15:59:38 -07:00
Sebastian Ullrich
de9d894c14
feat(library/init/lean/parser/reader): use coroutine on the module level
2018-08-29 16:42:24 -07:00
Sebastian Ullrich
2528aee72b
refactor(library/init/lean/parser/reader): use different monad stacks for different parts of the reader
2018-08-29 16:42:24 -07:00
Sebastian Ullrich
cec1ee2564
feat(library/init/lean/parser/parsec): reintroduce parsec_t
2018-08-29 16:42:24 -07:00
Sebastian Ullrich
a178f181a8
chore(library/init/lean/parser/macro): remove old name resolution prototype
2018-08-28 13:13:14 -07:00
Sebastian Ullrich
46f734b1b1
refactor(library/init/lean/parser/reader): replace macro with syntax_node_kind
...
Also make sure that the name inside a node kind is the full name of the
declaration. This way, we cannot have accidentally conflicting node kind names.
2018-08-28 13:13:14 -07:00
Sebastian Ullrich
61f8ebf4ef
refactor(library/init/lean/parser/reader): destructure reader into monad and has_tokens typeclass
2018-08-23 10:38:59 -07:00
Sebastian Ullrich
762259a96f
chore(library/init/lean/parser/reader): cleanup
2018-08-22 14:32:03 -07:00
Sebastian Ullrich
287fdce45b
refactor(library/init/lean/parser/reader): remove reader.has_view default instance
2018-08-22 14:32:03 -07:00
Sebastian Ullrich
c69cc61292
feat(frontends/lean,library/init/lean/parser/reader/module): add node_choice! macro
...
Creates an inductive type from an ordered choice reader
2018-08-22 14:32:03 -07:00
Sebastian Ullrich
1b8e74123c
feat(frontends/lean/{builtin_exprs,elaborator}): special-case try inside of node!
2018-08-22 14:32:03 -07:00