Add readtables; implement quote and keyword through readtables. #17

Open
opened 2026-03-30 07:15:08 +00:00 by simon · 0 comments
Owner

As title.

A read table will be a map whose keys are single character strings (or else I implement character objects and make them character objects) and whose value is a function of two arguments, the character read and an input stream.

The reader will check the current readtable — the value of *readtable* — each time it reads a character, and if there is a binding, will apply the function that is the value of that binding to the character read and the stream, splicing the result returned by the function into its own output. Among other things, this will allow us to implement reading anything that is not a list or an atom in Lisp, making the C reader very simple.

As title. A read table will be a map whose keys are single character strings (or else I implement character objects and make them character objects) and whose value is a function of two arguments, the character read and an input stream. The reader will check the current readtable — the value of `*readtable*` — each time it reads a character, and if there is a binding, will apply the function that is the value of that binding to the character read and the stream, splicing the result returned by the function into its own output. Among other things, this will allow us to implement reading anything that is not a list or an atom in Lisp, making the C reader very simple.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: simon/post-scarcity#17
No description provided.