Lurker News

Comments (75) 20 threads

Earlier comments
whistlerbrk#
A little late to the party here, but I'll throw another tutorial that I absolutely loved, buildyourownlisp.com which guides you to building 'lispy' in C.
d0m2 replies#
One question here for the more advanced compiler writers.. How do you go about writing a "pre-lexer" for LISP like language where you want to expand sexpr? I.e. Does the lexer even see `(...), or does it get pre-extracted to (quote ..)? And if so, how does the pre-extraction work exactly? Is it built using regex..? That can be tricky.
munificent#
Those are handled by the reader. If you Google "Lisp reader" and "Lisp reader macro", you should find a bunch of info.
kazinator#
Lisp dialects usually have an input mechanism called a "reader". It scans the character syntax and produces the equivalent object, combining lexical analysis and parsing. Special notations like 'x denoting the same thing (quote x) are easily handled here. When the reader sees a quote, it consumes it, calls itself recursively to scan the expression which follows to get an object O and then returns the object (quote O).
plttn1 reply#
Just from reading the first few pages of the book, I'm already a fan.

However my one tiny complaint is that the sign-up box is on every page, and even after I've signed up, it still has to be closed every page I go to.

Load more comments