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
变量会出现在两个地方:reference(引用)和declaration(定义)。变量被bound(绑定)到它的值上。
定义变量是有一个作用域限制的,不同的作用域可以使用同一个变量表示不同的值。作用域规则说明引用是如何指定到定义上去的。