This commit is contained in:
woruyu 2024-06-17 10:29:40 +08:00 committed by GitHub
commit d4f5db36ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# Course Code: Course Name
## Descriptions
- Programming Languages: java and c
- Difficulty: 🌟🌟🌟
- Class Hour: 150h
The excellent Crafting Interpreters is writed by Bob Nystrom, available for free online. It's well organized, highly entertaining, and well suited to those whose primary goal is simply to better understand their languages and language tools.
The whole book is actually divided into two parts:
(1) Syntax tree: From the lexicon of Scanning to the recursive descent analysis of expressions to the syntax analysis of statements, and finally Resolving and Binding (semantic analysis operations that traverse the syntax tree), it will take you to realize the front-end part of the entire compilation theory, that is Get the data structure of the syntax tree and the results of error checking.
(2) Virtual machine: The syntax tree can be understood as a top-down analysis of a high-level language. This part is a bottom-up understanding of the compilation theory. The final results generated by compilation can be divided into two types. One is instructions, which directly It runs on the computer and is operated by the decoder, PC, etc. The second is Bytecode (bytecode), such as the compiled result class file of java, which runs in the JVM virtual machine, and the bytes generated by the virtual machine are interpreted and executed. Code, this part uses c to implement a virtual machine, and also includes Garbage Collection and other contents.
## Course Resources
- Course Website: https://craftinginterpreters.com/

View file

@ -0,0 +1,19 @@
# Crafting Interpreters
## 课程简介
- 编程语言java and c
- 课程难度:🌟🌟🌟
- 预计学时150h
Bob Nystrom 所著的优秀的 Crafting Interpreters可在网上免费获取。这本书条理清晰富有趣味性是一本非常好的入门书适合那些想要更好地理解语言和语言工具的人。
整本书实际分为两个部分:
1语法树从Scanning的词法到表达式的递归下降分析到statements的语法分析最后是Resolving and Binding遍历语法树的语义分析操作会带你实现整个编译理论的前端部分即得到语法树的数据结构和错误检查的结果。
2虚拟机: 语法树可以理解为从上而下的分析高级语言这部分就是从下往上的理解编译理论最后编译生成的结果可以分为两种其一是指令其直接运行在计算机上由译码器pc等共同操作其二是Bytecode字节码如java的编译结果class文件其运行在JVM虚拟机中由虚拟机解释执行生成的字节码这一部分使用c实现一个virtual machine还包括Garbage Collection等内容。
## 课程资源
- 课程网站https://craftinginterpreters.com/

View file

@ -234,6 +234,7 @@ nav:
- "PKU 编译原理实践": "编译原理/PKU-Compilers.md"
- "Stanford CS143: Compilers": "编译原理/CS143.md"
- "NJU 编译原理": "编译原理/NJU-Compilers.md"
- "craftingInterpreters": "编译原理/craftingInterpreters.md"
- 编程语言设计与分析:
- "Stanford CS242: Programming Languages": "编程语言设计与分析/CS242.md"
- "NJU 软件分析": "编程语言设计与分析/NJU-SoftwareAnalysis.md"