Content deleted Content added
new |
|||
(11 intermediate revisions by 8 users not shown) | |||
Line 1:
In the programming language [[Lisp (programming language)|Lisp]], the '''reader''' or '''<code>read</code> 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 [[symbol (programming)|symbol]]s, integers, and the list constructors <code>(
The reader is responsible for parsing list structure, [[String interning|interning]] symbols, converting numbers to internal form, and calling read macros.
==Read table==
Line 7 ⟶ 9:
The reader is controlled by the <code>readtable</code>, which defines the meaning of each [[character (computing)|character]].
==Read macros
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 [[
==
{{Reflist}}
==Bibliography==
* [[John McCarthy (computer scientist)|John McCarthy]] ''et al.'', ''LISP 1.5 Programmer's Manual'', MIT Press, 1962.
* [[
* [[Guy Steele]], ''Common LISP: The Language'', Second Edition, 1990.
[[Category:Lisp (programming language)]]
[[Category:
|