Let's write a simple lisp parser from scratch. We take in a string of lisp-style code:
... and then output an abstract syntax tree (ast) like this:
The lisp code is editable! try changing stuff to see how the ast changes. This is the parser code:
I've first found out about this very straightforward style of parsing in the "compiler from scratch" screencast on destroy all software, check it out!
This is it for today, next time we can build an evaluator with this!