That's the algorithm for the common lisp reader. Writing a recursive descent parser based on that spec is fairly straightforward.
And once you hand write your own recursive descent parser you'll probably not want to give up the control that gives you to a parser generator. Yuck.
And, while a Haskell-style type system makes them nicer, they work really well in dynamically typed languages too. (e.g. https://github.com/drewc/smug )
http://craftinginterpreters.com/contents.html the book implements the Lox language in Java and C.
Building LISP: http://www.lwh.jp/lisp/index.html
- Parser: http://www.lwh.jp/lisp/parser.html
Full source: https://github.com/kimtg/ToyLisp
I've been hacking on it here and there and almost have it r4rs compliant -- replaced the lexer with re2c and was going to do the parser in lemon but the design they already have is just too simple to mess with.
[0]https://github.com/catseye/minischeme --note: the bog stock original is floating around on the internets if you google hard enough.
Equivalent JavaScript: https://github.com/sctb/lumen/blob/master/bin/reader.js
It’s 158 lines of lisp, fully bootstrapped, and zero fanciness.
It does make use of the author's grammar parser, which is my only minor complaint. Does anyone know a good resource in which the author handcrafts a parser? I'm aware of the various parser generators that exist. I also read the dragon book in my college's compiler design course ~12 years ago. But we also used a parser generator in that class.