Leonardo de Moura
5e14a5f561
refactor(library/init/lean/parser/trie): use String.Pos instead of OldIterator
...
Renamed the old `matchPrefix` to `oldMatchPrefix`.
2019-03-29 18:17:27 -07:00
Leonardo de Moura
60f8d17942
refactor(library/init/data/string/basic): simplify String.Iterator
...
The `offset` field is problematic because it prevents us from having an
efficient way of moving back and forth between `String.Pos` and `String.Iterator`.
@kha I temporarily added `String.OldIterator` for making sure the
parser doesn't break. This is a temporary fix that will be eliminated
after we replace `parsec`.
2019-03-25 07:57:12 -07:00
Leonardo de Moura
04e20623e6
chore(*): use lowercase dir names
2019-03-21 15:06:44 -07:00
Leonardo de Moura
67fb78bb47
chore(*): renaming files
2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43
chore(library): capitalize types and namespaces
2019-03-21 15:06:43 -07:00
Sebastian Ullrich
b939162168
chore(library): switch from snake_case to camelCase
2019-03-21 15:06:43 -07:00
Sebastian Ullrich
9e8dfbad79
perf(library/init/lean/parser): reintroduce separate syntax.ident constructor with much simpler and more efficient encoding
2018-11-18 16:55:04 +01:00
Sebastian Ullrich
7fdfdb1784
chore(library/init/lean/parser): remove unnecessary class constraints
2018-11-06 21:45:08 +01:00
Sebastian Ullrich
090c4c0ce7
feat(library/init/lean/syntax): add lazily propagated macro scopes to syntax_node
2018-11-06 16:46:50 +01:00
Sebastian Ullrich
0d7ea62f9a
perf(frontends/lean/elaborator,library/init/lean): put out_params first to benefit from instance pre-filtering
2018-10-30 17:43:05 +01:00
Sebastian Ullrich
a820b9955f
perf(library/init/lean/parser/term): index term parsers by leading token
...
66% speedup on core.lean
2018-10-15 10:21:08 +02:00
Sebastian Ullrich
8a88d4d5e2
feat(library/init/lean/parser/token): string literals
...
hard-coded for now because we do not have general support for variable-length
tokens yet
2018-10-13 08:11:36 -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
bba8beca63
feat(library/init/lean/parser/token): give number a view
2018-09-25 14:18:52 -07:00
Sebastian Ullrich
c7c459d47b
Revert "perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline"
...
This reverts commit e4c50b2b09 .
Lists are efficient enough and make it easier to customize the trie construction.
Keep the `donotinline` though.
2018-09-20 09:38:10 -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
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
98e09c274f
feat(library/init/lean/parser/{pratt,level}): factor out pratt combinator, implement level parsers
2018-09-13 16:38:40 -07:00