Crates.io | s-expr |
lib.rs | s-expr |
version | 0.1.1 |
source | src |
created_at | 2022-04-16 02:58:52.275969 |
updated_at | 2022-10-14 03:17:01.639066 |
description | lightweight customizable s-expression parser and printer |
homepage | https://github.com/vincenthz/s-expr |
repository | https://github.com/vincenthz/s-expr |
max_upload_size | |
id | 568812 |
size | 56,098 |
Rust library for S-expression like parsing and printing
parser keeps track of spans, and representation (e.g. number base)
number and decimal don't limit size
only 1 dependency on unicode-xid
Extra features which are not in usual s-expressions (cannot be turned off):
0b
or 0x
._
characters in number, e.g. 0xfedc__1240__abcd
or 100_000_000
to improve legibilityCurrently unsupported:
-123
will be tokenized as the ident -
followed by number 123
.6.022e23
will be parsed as decimal 6.022
then ident e
, then number 23
There's lots of variant of S-expression, so the parser allow to parse various different optional features that can be enabled/disabled depending on the user wishes:
#8BADF00D#
{ }
and bracket [ ]
group, which behave like ( )
but provide
equivalent grouping balancing check and flavor of grouping