December 2021
Beginner
840 pages
47h 29m
English
We start by implementing only primitive operations in this chapter. Then, we develop an evaluate-expression function that accepts an expression and an environment as arguments, evaluates the passed expression in the passed environment, and returns the result. This function, which is at the heart of any interpreter, constitutes a large conditional structure based on the type of expression passed (e.g., a variable reference or function definition).
Adding support for a new concept or feature to the language typically involves adding a new grammar rule (in camilleparse.py) and/or primitive (in camillelib.py), adding a new field to the abstract-syntax representation of an expression ...
Read now
Unlock full access