TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Writing a C Compiler (2017)

107 pointsby lrsjngalmost 2 years ago

5 comments

hcksalmost 2 years ago
Yet another “compiling” course that puts all the emphasis on parsing.<p>Rule of thumb: parsing&#x2F;lexing shouldn’t takes more than 10% of your compiler course.
评论 #36260214 未加载
评论 #36260537 未加载
评论 #36259734 未加载
评论 #36258759 未加载
评论 #36259740 未加载
评论 #36260171 未加载
评论 #36261172 未加载
评论 #36259177 未加载
dananjaya86almost 2 years ago
Book version to be released in October &#x27;23 : <a href="https:&#x2F;&#x2F;nostarch.com&#x2F;writing-c-compiler" rel="nofollow">https:&#x2F;&#x2F;nostarch.com&#x2F;writing-c-compiler</a>
评论 #36257865 未加载
bigdictalmost 2 years ago
Has anyone worked through this? Is it a good (soon to be) book?
userbinatoralmost 2 years ago
IMHO writing a compiler for a high-level language, in an even higher level language, somehow feels a bit &quot;anachronistic&quot; (for lack of better word).
评论 #36257603 未加载
评论 #36257906 未加载
评论 #36257703 未加载
RcouF1uZ4gsCalmost 2 years ago
Here is how to write a C compiler in Python that correctly compile the vast majority of C programs per the ISO C standard:<p><pre><code> print(“You have some form of undefined behavior, which means printing this is a valid response per the C standard”)</code></pre>
评论 #36257996 未加载