Hacker News new | ask | show | jobs
by EamonnMR 1825 days ago
I like this tutorial, but it's worth noting that you're building your own lisp with the author's bespoke parser generator.
5 comments

It seems the author has added an appendix [0] where he replaces the library parser with a hand-rolled one.

0. http://buildyourownlisp.com/appendix_a_hand_rolled_parser

Oh, neat. I'll have to give that a look.
the author should not have written this. why would anyone ever hand-roll a parser? it's neither useful nor interesting
The same reason that they wrote their own parser generator instead of using Lex/YACC.
Yes. I followed this tutorial a few years ago and found this to be quite disappointing.
I started going through the book, but from the start I deviated to use Rust and Pest PEG grammar to make the parser and the logic. Saved me many times of debugging, but also showed, that you do not have to stick to the library or parser that the book uses.
Previous discussion about the parser

https://news.ycombinator.com/item?id=17478992

yes, the parser library is definitely the most valuable part of this.