SExpressions.jl
SExpressions.jl copied to clipboard
Roadmap
Meta
- [x] Register the SExpressions.jl package
Dependencies
- [ ] Sever
FunctionalCollectionsdependency (useappendfrom a lightweight vocabulary package)
Lisp Parser
- [x] Parse
.properly - [ ] Unquote splicing
- [ ] Add a test suite to check Racket compliance
- [ ] 50% compliance with Racket parsing rules
- [ ] 70% compliance with Racket parsing rules
- [ ] 80% compliance with Racket parsing rules
- [ ] 90% compliance with Racket parsing rules
- [ ] 95% compliance with Racket parsing rules
- [x] Improve the performance of the lisp parser
- [ ] Improve the error messages generated by the lisp parser
- [ ] Keep more syntactic information in the lisp parser
Printing of s-expressions
- [ ] Print improper lists reasonably
- [ ] Improve performance of
show(especially multiline) - [ ] Improve heuristics for multiline
show
I'm thinking of using I-Expressions for a project (i.e., adding indentation as an optional alternative to parentheses). Is that something that would be of interest as a feature in SExpressions.jl? (If so, I guess this is a “feature request,” but I could also volunteer some effort toward implementing the feature, if need be.)
(I'd be fine with a subset of the I-Expression specification; for example, it might make sense to require DEDENTs to match some earlier level of indentation, as in, e.g., Python – but I guess one could issue a warning if this isn't the case.)
@mlhetland I haven't had the time to maintain this package in some time, and don't know if I will have time in the future. So I'd recommend making a new package for what you need.
What's the status of this package, it looks like it is still largely dormant? There's been some talk of having a stdlib for parsing S-Expressions as a utility for testing the julia lowering passes over at https://github.com/JuliaLang/julia/pull/32201.
I think SExpressions could be a starting point for those purposes; would you be happy if we took some code / inspiration from this repository and adapted it to the needs of a stdlib? I think a stdlib might strive to be even more lightweight than what you've got here but I do like what I've seen so far :-)
Hi @c42f, sorry for the late response. I don't think I will necessarily have time to maintain this package in the future. Feel free to take any parts that are correct, lightweight, or helpful, if those parts do exist :smile:.
Awesome, many thanks :-) I'm sure those parts do exist.
I have some very lightweight S-expression functionality in Tody. The relevant file is here: expr.jl. Not saying it's a better alternative, but it's very lightweight and reasonably standalone :-). (I use the Call type there, which I define in the Tody.jl file, but it's a trivial wrapper around a vector.)
Thanks, it looks neat.
It turns out that with a few tweaks to make it easier to enter arbitrary Expr heads, I was able to support the needs of Base using normal Julia ASTs. So I probably won't be pursuing a stdlib for this after all.