Crate sexp [] [src]

A lightweight, self-contained s-expression parser and data format. Use parse to get an s-expression from its string representation, and the Display trait to serialize it, potentially by doing sexp.to_string().

Structs

Error

The representation of an s-expression parse error.

Enums

Atom

A single data element in an s-expression. Floats are excluded to ensure atoms may be used as keys in ordered and hashed data structures.

Sexp

An s-expression is either an atom or a list of s-expressions. This is similar to the data format used by lisp.

Functions

atom_f

Constructs an atomic s-expression from a float.

atom_i

Constructs an atomic s-expression from an int.

atom_s

Constructs an atomic s-expression from a string.

list

Constructs a list s-expression given a slice of s-expressions.

parse

Reads an s-expression out of a &str.