In computer programming, an S-expression (or symbolic expression, abbreviated as sexpr or sexp) is an expression in a like-named notation for nested list (tree-structured) data. S-expressions were invented for and popularized by the programming language Lisp, which uses them for source code as well as data.

In the usual parenthesized syntax of Lisp, an S-expression is classically defined as:

  1. an atom [Atom], or
  2. an expression of the form (x . y) where x and y are S-expressions.

[formatting added] (“S-Expression” 2022)

Tree data structure representing the s-expression (* 2 (+ 3 4)).

(“S-Expression” 2022)

Bibliography

“S-Expression.” 2022. Wikipedia, February. https://en.wikipedia.org/w/index.php?title=S-expression&oldid=1070385728.