Crafting Interpreters 中文翻译
说明
本目录用于翻译 Robert Nystrom 的 Crafting Interpreters。原书以 CC BY-NC-SA 4.0 协议发布;本译文用于学习与研究,并保留原书的署名、出处和许可信息。
本书通过 Java 版树遍历解释器 jlox 与 C 版字节码虚拟机 clox,循序构建一门名为 Lox 的编程语言实现。译文保留 Lox、jlox、clox 等专有名称,以及对理解实现有帮助的英文术语。
原书:Crafting Interpreters;作者:Robert Nystrom;许可:CC BY-NC-SA 4.0。
目录
前置内容(Frontmatter)
第 I 部分:启程(Welcome)
第 II 部分:树遍历解释器(A Tree-Walk Interpreter)
-
第 4 章:扫描(Scanning)
-
第 5 章:表示代码(Representing Code)
-
第 6 章:解析表达式(Parsing Expressions)
-
第 7 章:求值表达式(Evaluating Expressions)
-
第 8 章:语句与状态(Statements and State)
-
第 9 章:控制流(Control Flow)
-
第 10 章:函数(Functions)
-
第 11 章:解析与绑定(Resolving and Binding)
-
第 12 章:类(Classes)
-
第 13 章:继承(Inheritance)
第 III 部分:字节码虚拟机(A Bytecode Virtual Machine)
-
第 14 章:字节码块(Chunks of Bytecode)
-
第 15 章:虚拟机(A Virtual Machine)
-
第 16 章:按需扫描(Scanning on Demand)
-
第 17 章:编译表达式(Compiling Expressions)
-
第 18 章:值的类型(Types of Values)
-
第 19 章:字符串(Strings)
-
第 20 章:哈希表(Hash Tables)
-
第 21 章:全局变量(Global Variables)
-
第 22 章:局部变量(Local Variables)
-
第 23 章:跳转来回(Jumping Back and Forth)
-
第 24 章:调用与函数(Calls and Functions)
-
第 25 章:闭包(Closures)
-
第 26 章:垃圾收集(Garbage Collection)
-
第 27 章:类与实例(Classes and Instances)
-
第 28 章:方法与初始化器(Methods and Initializers)
-
第 29 章:超类(Superclasses)
-
第 30 章:优化(Optimization)
附录(Backmatter)
每章会保留原书相应的挑战与设计笔记,并按原书顺序逐步翻译。
翻译进度
- 第 1 章:引言(Introduction)
- 第 2 章:全景地图(A Map of the Territory)
- 第 3 章:Lox 语言(The Lox Language)
- 第 4 章:扫描(Scanning)
- 第 5 章:表示代码(Representing Code)
- 第 6 章:解析表达式(Parsing Expressions)
- 第 7 章:求值表达式(Evaluating Expressions)
- 第 8 章:语句与状态(Statements and State)
- 第 9 章:控制流(Control Flow)
- 第 10 章:函数(Functions)
- 第 11 章:解析与绑定(Resolving and Binding)
- 第 12 章:类(Classes)
- 第 13 章:继承(Inheritance)
- 第 14-30 章:字节码虚拟机
- 附录 I-II