DEV Community

Discussion on: ELI5: How does someone write a new computer language?

stereobooster profile image
stereobooster • Edited on

Here is Peter Norvig write minimalistic Lisp interpreter from scratch Basically what you need to do is to take program(string), tokenize it (turn text into words), convert tokens to abstract syntax tree (tree data structure, looks like a tree if you draw it on paper), walk over it starting from the root (visit each branch of the tree one by one) and execute each command in the branch.

Which of this needs more explanation? I'm curious because I want to write article on the subject.