You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ondřej Hruška
83996348cb
|
4 years ago | |
---|---|---|
.. | ||
src | 4 years ago | |
.gitignore | 4 years ago | |
Cargo.toml | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago |
README.md
CRSN Sexp
This is an updated and extended version of the "sexp" crate by Clark Gaebel: https://github.com/cgaebel/sexp.
Changes from "cgaebel/sexp"
- Updated to the 2018 Rust edition (that is, removed
try!()
and such) - All parsed atoms now track their source location. This enables better error reporting in subsequent parsing and processing.
- Quoted strings now support C-style escapes other than
\"
, such as\n
,\t
and\\
.- Unrecognized escapes result in the slash being removed and the next character being taken literally. Use
\\
to enter a backslash.
- Unrecognized escapes result in the slash being removed and the next character being taken literally. Use
- Added special parsing of "character literals" that use single quotes (
'A'
) and may contain backslash escapes ('\n'
).- This does not interfere with "apostrophe tokens" like
'foo
, that becomes an unquoted string atom.
- This does not interfere with "apostrophe tokens" like
- Added "quoted string", "unsigned" and "character" atom types
- Added parsing for
0x123
,#ff00ff
and0b123456
- Numeric literals may now contain underscores to separate digit groups
- Numbers are preferably parsed as the unsigned atom (u64). The signed atom (i64) is only used for negative numbers.
.