Sample Video Frame

Created by Zed A. Shaw Updated 2024-10-08 04:45:56
 

Exercise 35: Interpreters

This final exercise in parsing should be both challenging and fun. You finally get to see your Puny Python script run and do something. It is quite alright to be struggling with this section and the concept of parsing. If you find that you've reached this point and you don't quite understand what's going on, take a step back and consider doing the exercises in this part again. Repeating this section a couple times before you continue will help you in the last two exercises where you make your own little languages.

I am purposefully not including any code in this exercise so that you have to attempt it based on the description of how an Interpreter works. You already have Python as a reference for how these little statements in our Puny Python example should operate. You know how to walk your parse tree with the visitor pattern. All that's left is for you to write an interpreter that can glue this all together and make your little script run.

Previous Lesson Next Lesson

Register for Learn More Python the Hard Way

Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.