编译原理 I
- [1]K. D. Cooper and L. Torczon, Engineering a Compiler, 3rd ed. Morgan Kaufmann, 2022. Accessed: Sep. 29, 2026. [Online]. Available: https://shop.elsevier.com/books/engineering-a-compiler/cooper/978-0-12-815412-0
- [2]A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman, Compilers: Principles, Techniques, and Tools, 2nd ed. Pearson, 2006. Accessed: Sep. 29, 2026. [Hardcover]. Available: https://www.pearson.com/en-us/subject-catalog/p/compilers-principles-techniques-and-tools/P200000003472/9780321486813其它链接:
- [3]A. W. Appel, Modern Compiler Implementation in C, First paperback edition. Cambridge: Cambridge University Press, 2004. Accessed: Sep. 29, 2026. [Paperback]. Available: https://www.cambridge.org/core/books/modern-compiler-implementation-in-c/0F85704413FC010C1D1C691C4D2A0865
- [4]S. S. Muchnick, Advanced Compiler Design and Implementation, 1st ed. San Francisco, CA: Morgan Kaufmann, 1997. Accessed: Sep. 29, 2026. [Hardcover]. Available: https://shop.elsevier.com/books/advanced-compiler-design-and-implementation/muchnick/978-0-08-049871-3其它链接:
- [5]K. C. Louden, Compiler Construction. Boston: PWS Publishing Company, 1997. Accessed: Sep. 29, 2026. [Online]. Available: https://www.cs.sjsu.edu/~louden/cmptext/
- [6]D. Grune and C. J. H. Jacobs, Parsing Techniques, 2nd ed. in Monographs in Computer Science. New York, NY: Springer New York, 2007. doi: 10.1007/978-0-387-68954-8.
- [7]D. Grune, K. van Reeuwijk, H. E. Bal, C. J. H. Jacobs, and K. G. Langendoen, Modern Compiler Design, 2nd ed. New York, NY: Springer New York, 2012. doi: 10.1007/978-1-4614-4699-6.
Kenneth C. Louden《Compiler Construction: Principles and Practice》[5]是我本科阶段用的。任课老师说以前他们试过换成包括 “龙书”[2]在内的其它书目,但后来又换了回来。原因我不记得了。但我觉得这本实在太老了,而且第 5 章开始有不少我都没读懂。“龙书” 我看了前几章,感觉侧重理论,出版日期也较早(2006),现列作参考书。
词法分析器生成器、句法分析器生成器等部分都可以跳过,暂时不看(除非考试要考):用我们老师的话来说,就是 “你知道有这么个东西就行”。事实上,主流实现往往是手写句法分析器的[19][20][21][22],而语义分析器通常也是手写的[8, p. 6](04-semantics.pdf)。
Dick Grune《Parsing Techniques》[6]这本书,基本上你听过的句法分析方法都在里面了。我估计你们没什么人能看完。作为参考就行。
- [8]M. L. Scott, “Programming Language Design and Implementation.” in CSC 2/454. 2025. Accessed: Nov. 11, 2026. [PDF and plain text]. Available: https://www.cs.rochester.edu/courses/254/fall2025/notes/机构:
- University of Rochester
- [9]“CoCo Assignments 2025.” 2025. Accessed: Oct. 30, 2026. [PDF]. Available: https://download.vusec.net/vms/coco/CoCoAssignments2025.pdf机构:
- Vrije Universiteit Amsterdam
其它链接:
- [10]LLVM Project, “My First Language Frontend with LLVM Tutorial.” Accessed: Oct. 30, 2026. [Online]. Available: https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html
- [11]LLVM Project, “Building a JIT in LLVM.” Accessed: Oct. 30, 2026. [Online]. Available: https://llvm.org/docs/tutorial/BuildingAJIT1.html
- [12]LLVM Project, “Writing an LLVM Pass.” Accessed: Oct. 30, 2026. [Online]. Available: https://llvm.org/docs/WritingAnLLVMNewPMPass.html
- [13]The Clang Team, “Introduction to the Clang AST.” Accessed: Oct. 30, 2026. [Online]. Available: https://clang.llvm.org/docs/IntroductionToTheClangAST.html
- [14]The Clang Team, “How to write RecursiveASTVisitor based ASTFrontendActions.” Accessed: Oct. 30, 2026. [Online]. Available: https://clang.llvm.org/docs/RAVFrontendAction.html
- [15]The Clang Team, “Tutorial for building tools using LibTooling and LibASTMatchers.” Accessed: Oct. 30, 2026. [Online]. Available: https://clang.llvm.org/docs/LibASTMatchersTutorial.html
- [16]The Clang Team, “Clang Transformer Tutorial.” Accessed: Oct. 30, 2026. [Online]. Available: https://clang.llvm.org/docs/ClangTransformerTutorial.html
- [17]The Clang Team, “Clang Plugins.” Accessed: Oct. 30, 2026. [Online]. Available: https://clang.llvm.org/docs/ClangPlugins.html
- [18]The Clang Team, “Data flow analysis: an informal introduction.” Accessed: Oct. 30, 2026. [Online]. Available: https://clang.llvm.org/docs/DataFlowAnalysisIntro.html
- [19]P. Eaton, “Parser generators vs. handwritten parsers: surveying major language implementations in 2021,” notes.eatonphil.com. Accessed: Nov. 11, 2026. [Online]. Available: https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-survey-2021.html
- [20]K. Newton, “Rewriting the Ruby parser,” Rails at Scale. Accessed: Nov. 11, 2026. [Online]. Available: https://railsatscale.com/2023-06-12-rewriting-the-ruby-parser/
- [21]U. Luvsanbat, “Announcing: MSVC Conforms to the C++ Standard,” C++ Team Blog. Accessed: Nov. 11, 2026. [Online]. Available: https://devblogs.microsoft.com/cppblog/announcing-msvc-conforms-to-the-c-standard/
- [22]E. Brumer, “MSVC Build Tools Version 14.51 Release Candidate Now Available,” C++ Team Blog. Accessed: Nov. 11, 2026. [Online]. Available: https://devblogs.microsoft.com/cppblog/msvc-build-tools-version-14-51-release-candidate-now-available/