by ct-1111 · 6y ago · 0 comments
https://github.com/JeffBezanson/femtolisp/blob/master/read.c
CMUCL has a fairly complex, but still comprehensible implementation of a Common Lisp reader:
https://gitlab.common-lisp.net/cmucl/cmucl/-/blob/master/src...
It uses a FSM to recognize numbers and symbols when tokenizing, and it demonstrates an implementation of Common Lisp readtables.
Here's how the Common Lisp Hyperspec specifies the Common Lisp reader (as an algorithm):
http://www.lispworks.com/documentation/HyperSpec/Body/02_b.h...
No comments yet.