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
dfe15cf743
refactor(library/init): use get and set for State EState and Ref
...
TODO: use the same naming convention for array reads and writes.
2019-03-21 16:34:32 -07:00
Leonardo de Moura
2be87ecd92
chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false
2019-03-21 15:06:44 -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
Leonardo de Moura
ecdb9d6df0
feat(library/init, frontends/lean): add abbreviation for abbreviation
2019-03-15 16:01:25 -07:00
Leonardo de Moura
68ebc2a5c5
feat(library/init/data/string/basic): implement iterators using uft8 low level API
2019-03-12 06:56:05 -07:00
Sebastian Ullrich
9f90dbfd3d
feat(library/init/lean/parser/syntax): improve syntax.get_pos for more error positions
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
c17ba349f3
refactor(library/init/lean/parser/syntax): factor out syntax.(m)replace
2019-01-16 19:12:40 +01:00
Sebastian Ullrich
a1ecf14ebe
feat(library/init/lean/parser/syntax): syntax.to_format: show ident metadata
2019-01-06 15:45:23 +01:00
Sebastian Ullrich
e5aaf391ff
fix(library/init/lean/parser/syntax): macro_scopes.flip
2018-12-19 15:04:48 +01:00
Sebastian Ullrich
79b7a29d3f
fix(library/init/lean/parser/syntax): syntax.to_format: reverse scope stack
2018-12-04 13:44:46 +01:00
Sebastian Ullrich
ad27da3209
perf(library/init/lean/parser/syntax): optimize syntax.flip_scopes
2018-12-04 13:16:45 +01:00
Sebastian Ullrich
c3f8e219c0
feat(library/init/lean/expander): preresolve global references (not actually used anywhere yet)
2018-11-27 18:02:51 +01:00
Sebastian Ullrich
cd287629cb
feat(library/init/lean/elaborator): initial version of translating syntax trees to preterms
2018-11-19 13:38:45 +01: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
600b7ceb28
fix(library/init/lean/parser/syntax): make sure macro scopes are not pushed inside of ident nodes
2018-11-14 17:23:32 +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
fc4dcd19cf
refactor(library/init/lean/parser): use ident.view in syntax.to_format
2018-11-05 17:57:00 +01:00
Sebastian Ullrich
8c27f0aac6
refactor(frontends/lean/elaborator,library/init/lean): finish no_kind refactoring
2018-11-04 20:24:40 +01:00
Sebastian Ullrich
93fc1fd1de
fix(library/init/lean/parser/combinators): node: do not wrap error in first argument
2018-10-30 17:43:05 +01:00
Sebastian Ullrich
74bd182bc8
perf(library/init/lean/parser/combinators): make node semireducible
2018-10-30 17:43:05 +01:00
Leonardo de Moura
15a25d5aa9
chore(library/init/lean/parser): add a few comments
2018-10-11 15:54:57 -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
b443006e8f
fix(library/init/lean/parser/syntax): reprint: do not concatenate choice contents
2018-10-01 09:02:39 -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
bba8beca63
feat(library/init/lean/parser/token): give number a view
2018-09-25 14:18:52 -07:00
Sebastian Ullrich
65ddca1510
perf(library/init/lean/parser/syntax): avoid quadratic behavior in update_leading
2018-09-20 09:40:21 -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
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
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
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
ba7d3ee178
refactor(library/init/lean/parser/{reader/module,syntax}): move new coercions
2018-08-06 15:05:41 -07:00
Sebastian Ullrich
1e1bf4b0f8
feat(library/init/lean/parser/reader/basic): add explicit syntax.missing objects on error
2018-08-02 13:32:28 -07:00
Sebastian Ullrich
389e9b7b49
feat(library/init/lean/parser/parsec): use [inhabited μ] instead of unit for custom message type of basic parsers
...
In hindsight, this seems to simplify usage without compromising static typing much
2018-07-27 15:10:20 -07:00
Sebastian Ullrich
5955e3fce8
chore(library/init/lean/parser/parsec): proper namespacing
2018-07-12 10:35:22 +02: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
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
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
1bae8f8eab
refactor(library/init/lean/ir/parser): parser.lean => parser_t.lean
2018-06-05 08:00:13 -07:00
Sebastian Ullrich
6a0f3056f4
chore(library/init/lean/parser/syntax): cleanup
2018-06-04 11:02:45 +02:00
Leonardo de Moura
485b16a413
feat(library/init/lean/parser/syntax): use position
2018-04-30 16:13:01 -07:00
Leonardo de Moura
1b5c3c117e
fix(library/init/lean/parser/syntax): leanchecker error: multiple definitions of lean.parser.position
2018-04-30 13:44:23 -07:00
Leonardo de Moura
3c317a30db
chore(library/init/lean/parser): remove sorry warnings and init/meta dependencies
2018-04-30 13:38:25 -07:00