英文链接源链接 [8998]
contenteditable="true"

Compiler Design - Home 介绍

编译器将以一种语言编写的代码转换为另一种语言,而无需更改程序的含义。还期望编译器应该使目标代码高效并在时间和空间方面进行优化。

Compiler design principles provide an in-depth view of translation and optimization process. Compiler design covers basic translation mechanism and error detection & recovery. It includes lexical, syntax, and semantic analysis as front end, and code generation and optimization as back-end.

为什么要学习编译器设计?

计算机是软件和硬件的平衡组合。硬件只是机械设备的一部分,其功能由兼容的软件控制。硬件以电子电荷的形式理解指令,这是软件编程中二进制语言的对应形式。二进制语言只有两个字母0和1。要进行指令,硬件代码必须以二进制格式编写,即一系列1和0。对于计算机程序员而言,编写此类代码将是一项艰巨而繁琐的任务,这就是为什么我们需要编译器来编写此类代码。

语言处理系统

We have learnt that any computer system is made of hardware and software. The hardware understands a language, which humans cannot understand. So we write programs in high-level language, which is easier for us to understand and remember. These programs are then fed into a series of tools and OS components to get the desired code that can be used by the machine. This is known as 语言处理系统.

听众

本教程是为有兴趣学习编译器基本原理的学生而设计的。希望对编译器有更多了解的热心读者以及希望自己设计编译器的读者可以从这里开始。

先决条件

本教程不需要具备编译器设计的先验知识,但需要对至少一种编程语言(如C,Java等)有基本的了解。如果您事先有过汇编编程的知识,那将是一个额外的优势。

点我分享笔记