In order to learn about parser generators I built a parser (in PegJs) and then interpreter for the programming language PL/0. I call this language PLOP. I also attempted to use modern(ish) javascript engineering practices to create PLOP. You can find the entire source code for all of these components by taking a look at PLOP on my github page.

The first editor is an AST editor - it shows the output of the parsing step - the abstract syntax tree of PLOP. The second editor is an evaluator - it shows the output of running a PLOP program. Be careful as the program will not print out any statements if it runs as an infinite loop. Nor is there a way to preempt and stop this program besides closing this tab.

In both of the editors you can essentially program by poking. By playing around with the two programs you can hopefully see what gets generated by the parsing step and how that gets run.

Have fun.