I like the Dragon Book, it's got a lot of good details, but I think it jumps around a bit.
Language Implementation Patterns by Terance Parr is another fine choice. It focuses a bit more on ANTLR, but its ideas are universal, and I thought Parr did an excellent job motivating the more powerful parser techniques with actual language features.
But I wouldn't worry about it too much -- after all, part of the reason for the course is that it will provide you with the experience in the subject.
Just want to share my experience. I also did a course on compilers and found it pretty difficult. You will likely be required to understand and do the basics of the followings: Parsing the input program and detecting errors in it, constructing abstract syntax tree, semantics checking and code generation. I wouldn't consider it an important knowledge for most CS students at all however.
发布评论
评论(2)
我喜欢《龙之书》,它有很多好的细节,但我觉得它有点跳跃。
Terance Parr 的语言实现模式是另一个不错的选择。它更多地关注 ANTLR,但它的想法是通用的,我认为 Parr 做得非常出色,用实际的语言特性激发了更强大的解析器技术。
但我不会太担心 - 毕竟,该课程的部分原因是它将为您提供该主题的经验。
I like the Dragon Book, it's got a lot of good details, but I think it jumps around a bit.
Language Implementation Patterns by Terance Parr is another fine choice. It focuses a bit more on ANTLR, but its ideas are universal, and I thought Parr did an excellent job motivating the more powerful parser techniques with actual language features.
But I wouldn't worry about it too much -- after all, part of the reason for the course is that it will provide you with the experience in the subject.
只是想分享我的经验。我还上了一门关于编译器的课程,发现它相当困难。您可能需要了解并执行以下基础知识:
解析输入程序并检测其中的错误,构造抽象语法树,语义检查和代码生成。然而,对于大多数计算机科学学生来说,我根本不认为它是重要的知识。
Just want to share my experience. I also did a course on compilers and found it pretty difficult. You will likely be required to understand and do the basics of the followings:
Parsing the input program and detecting errors in it, constructing abstract syntax tree, semantics checking and code generation. I wouldn't consider it an important knowledge for most CS students at all however.