Writing Interpreters with Python part two. Writing the Parser
The next step in developing a programming language is the development of the Parser. The role of the Parser is to request tokens which are then matched to the Grammar of the parser matches the correct sequence of tokens the sequence of tokens is then accepted as correct and then stored as a Node in an abstract syntax tree. Here is an example of the Parser implementation for a small Lisp like language.