3.1 Specification and Implementation Strategy
goal:
program text > [Front End] > syntax tree > [Interpreter] > answer
Interpreter is a program that looks at a data structure and performs some actions that depend on its structure.
3.2 LET: A Simple Language
3.2.1 Specifying the Syntax
3.2.2 Specification of Values
3.2.3 Environments
3.2.4 Specifying the Behavior of Expressions
3.2.5 Specifying the Behavior of Programs
3.2.6 Specifying Conditionals
3.2.7 Specifying let
3.2.8 Implementing the Specification of LET
3.3 PROC: A Language with Procedures
3.3.1 An Example
3.3.2 Representing Procedures
3.4 LETREC: A Language with Recursive Procedures
3.5 Scoping and Binding of Variables
變量會出現(xiàn)在兩個(gè)地方:reference(引用)和declaration(定義)贩绕。變量被bound(綁定)到它的值上火的。
定義變量是有一個(gè)作用域限制的,不同的作用域可以使用同一個(gè)變量表示不同的值淑倾。作用域規(guī)則說明引用是如何指定到定義上去的馏鹤。