For faster navigation, this Iframe is preloading the Wikiwand page for Lisp reader.

Lisp reader

In the programming language Lisp, the reader or read function is the parser which converts the textual form of Lisp objects to the corresponding internal object structure.

In the original Lisp, S-expressions consisted only of symbols, integers, and the list constructors ( xi... ) and (x . y). Later Lisps, culminating in Common Lisp, added literals for floating-point, complex, and rational numbers, strings, and constructors for vectors.

The reader is responsible for parsing list structure, interning symbols, converting numbers to internal form, and calling read macros.

Read table

[edit]

The reader is controlled by the readtable, which defines the meaning of each character.

Read macros

[edit]

Unlike most programming languages, Lisp supports parse-time execution of programs, called "read macros" or "reader macros". These are used to extend the syntax either in universal or program-specific ways. For example, the quoted form (quote x) operator can be abbreviated as 'x. The ' operator can be defined as a read macro which reads the following list and wraps it with quote. Similarly, the backquote operator (` ) can be defined as a read macro.

References

[edit]

Bibliography

[edit]
{{bottomLinkPreText}} {{bottomLinkText}}
Lisp reader
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 ๐ŸŽ‰! the new version arrives on September 1st! Don't want to wait?