/pycompiler

A Python implementation of every component of compiler, mainly for tutorial blogs.

Primary LanguagePython

pycompiler

Python implement of a compiler, starting from absolute zero to a compiler of Cool programming language.

这是一个Python的编译器实现。我们将从零实现编译器实验课的Cool语言编译器。该项目包含完整的中文教程向博客。

该项目会实现Cool语言的词法分析器(lexer),语法分析器(parser),语义分析器(semant)和目标代码生成器(codegen)。

该项目的中文博客可以在blog/目录下找到,希望能对有自己手动从零实现编译器,又像我最初一样不知如何下手的同学有所帮助。这个博客会不断更新,以完善内容和改进篇章结构。