Implement lexer on mlstrings
- Dominant language
- Standard ML
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 16
Description
The CakeML lexer operates on a `char list`. Therefore the first thing the CakeML compiler does after reading in its input string is `explode` the string into a list. This is wasteful: I think the lexer can easily be made to work on `mlstring`s.
This issue is to make the lexer operate on `mlstring`s and update the compiler accordingly to avoid the `explode`.
Extension thoughts:
- The `sexp`-parsing option would still need to `explode` the input because the `sexp` parser operates on `char list`s in a possibly more unavoidable way. (This issue does not require avoiding the `explode` for `sexp`s.)
- For large input, we might want to be even more sophisticated and lex/parse/typecheck incrementally, to catch errors before reading in all the source code. (Obviously this issue doesn't require doing that.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.