TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What are the best resources to learn about compilers?

8 点作者 neonbat将近 7 年前

6 条评论

theomega将近 7 年前
I can recommend the book „Compilers: Principles, Techniques and Tools“ [often called „Dragon Book“]. It explains from the basics with all the theory how to write a Leser, parser and much more features. It is one of the few books I bought after university.<p><a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Compilers:_Principles,_Techniques,_and_Tools" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Compilers:_Principles,_Techn...</a>
评论 #17653117 未加载
Someone将近 7 年前
Depends on what you want to learn. Structure and interpretation of computer programs is good for a high-level view of what a compiler does, but it compiles a lisp-like language, so it won’t learn you much about parsing or about generating good error messages when given syntactically or semantically incorrect programs (typically more work than parsing correct programs), and it compiles to some abstract ‘instruction set’, so it won’t be worthwhile if you want to know how to wring maximum performance out of any specific CPU.
SamReidHughes将近 7 年前
This book is not completionist but instead it&#x27;s to the point and avoids wasting your time: <a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;gp&#x2F;aw&#x2F;d&#x2F;155558179X&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;gp&#x2F;aw&#x2F;d&#x2F;155558179X&#x2F;</a><p>[Edit: it&#x27;s <i>Building an Optimizing Compiler</i> by Bob Morgan.]<p>That&#x27;s assuming you don&#x27;t want to waste your time reading about parsing, type checking, or serializing an AST into some form of assembly, the parts of a compiler which just aren&#x27;t that interesting.
sloaken将近 7 年前
Assuming you want to know this to make your own programming language...<p>Step one is to learn about BNF grammers.<p>When I was in school we used a book called Princples of Compiler Design. I felt this was an excellent bok at the time. It taught me a lot about how toprogram well.
Chyzwar将近 7 年前
<a href="https:&#x2F;&#x2F;github.com&#x2F;aalhour&#x2F;awesome-compilers" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aalhour&#x2F;awesome-compilers</a>
segmondy将近 7 年前
a college compiler class
评论 #17653120 未加载