← 返回专栏列表

Crafting Interpreters:手写解释器

共 35 篇文章

1. Crafting Interpreters:Welcome

作者:Robert Nystrom 原文章节:I. Welcome

2. Introduction:为什么要实现 programming language

作者:Robert Nystrom 原文章节:1 Introduction

3. Crafting Interpreters:A Map of the Territory

作者:Robert Nystrom 原文章节:2 A Map of the Territory

4. Crafting Interpreters:The Lox Language

作者:Robert Nystrom 原文章节:3 The Lox Language

5. A Tree-Walk Interpreter:用 Java 实现 jlox

作者:Robert Nystrom 原文章节:II A Tree-Walk Interpreter

6. Crafting Interpreters:Scanning

作者:Robert Nystrom 原文章节:4 Scanning

7. Crafting Interpreters:Representing Code

作者:Robert Nystrom 原文章节:5 Representing Code

8. Parsing Expressions:从 grammar 到 recursive descent parser

本章把上一章的 expression grammar 手写成一个具有优先级、结合性和错误恢复能力的 recursive descent parser。

9. Evaluating Expressions:实现 Lox expression interpreter

本章为 Lox expression tree 添加 interpreter:从 Literal、Grouping、Unary 到 Binary,递归求值并处理 runtime error。

10. Statements and State:变量、环境与 lexical scope

本章让 Lox 从只能计算 expression,扩展为能执行 statements、保存变量状态,并支持 assignment、block 和 lexical scope。

第 1 / 4 页 · 共 35 篇