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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Would anyone be interested in a simple tiny compiler ebook?

5 点作者 bootcat超过 7 年前
https:&#x2F;&#x2F;github.com&#x2F;deepanprabhu&#x2F;simple-expression-compiler<p>Guys, would anybody be interested to read a simple, pithy ebook, that describes fundamentals of building a simple tiny compiler in Java to begin with ? I would also take the reader through building a simple compiler themselves, step by step, using Java. The exercise simple enough that i chose is, taking a mathematical expression like 6 * 5 + 3 * ( 2 -1 ), and generating NASM assembly code, that we would compile and execute using NASM. Please give me your thoughts !

3 条评论

PhilWright超过 7 年前
I think the best tutorial would not be for a toy language or just for simple expressions. But for a subset of a real language. That way the details learnt are directly applicable to the real world. Create a compiler for a subset of C or a subset of Java. Then it is possible for the reader to continue developing that compiler to include more and more features.
评论 #16264048 未加载
kotrunga超过 7 年前
That would be awesome! However, I think something that&#x27;s not Java... maybe, a &quot;simple&quot; book on building a compiler in C or something.
评论 #16272861 未加载
jetti超过 7 年前
One thing that I would be more interested in is either targeting LLVM IR, JVM or .NET instead of doing straight assembly with NASM.
评论 #16272856 未加载