sexpr

sexpr (or sexp, or s-expression) stands for Symbolic Expression.

In Lisp 1.5 it is defined like this:

"An S-expression is either an atomic symbol or it is composed of these elements in the following order, a left parenthesis, an S-expression, a dot, an S-expression, and a right parenthesis."

But this is history. Today I'd describe them like this: s-expression is a list of atoms or s-expressions, where the first element of the list defines the meaning of the whole s-expression.

Note that symbol is an atom, but so are numbers, strings, characters and other objects (actually, anything that is not a list).

Note also that this description is heavily influenced by Common Lisp.

Some examples of Symbolic Expressions:

abc "foo" 42 (print 17) (list a b c (+ 1 2))


This page is linked from: HTML-from-sexpr  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively