| Crates.io | anysexpr |
| lib.rs | anysexpr |
| version | 0.4.0 |
| created_at | 2023-05-15 01:28:44.200691+00 |
| updated_at | 2023-05-27 23:48:11.011306+00 |
| description | (Universal) S-Expression parser and formatter |
| homepage | |
| repository | https://github.com/pflanze/anysexpr |
| max_upload_size | |
| id | 864572 |
| size | 122,457 |
This is an S-Expression parser and formatter with the following goals:
Offering direct access to the tokenizer, anysexpr::parse, but also
anysexpr::read to build an in-memory tree easily.
Good error reporting (precise location information and messages).
(Future) Make the data constructors for anysexpr::read
parametrizable (generic), e.g. like in the sexpr_parser crate.
Streaming: allow to read from and print to file handles lazily, for
use e.g. in communications. This currently works by using
anysexpr::parse directly for input, or creating tokens to print
via a custom loop for output. Future: more possibilities, e.g. turn
a tree into a token stream, or parameterize with a tree that's
generated on demand while printing.
(Future) Support various s-expression variants (R*RS, Guile, Clojure, Common Lisp, ..) via runtime (and compile-time?) settings.
(Perhaps) be usable on microcontrollers (small code, no-std?).
The author is quite new to Rust. There will be API guideline entries not currently being followed, help in that area is as welcome as in other areas.
See examples/main.rs.
Orthogonally:
lexpr crate in more detail (missed when researching
existing crates before starting this project)Christian Jaeger ch@christianjaeger.ch