0 Members and 1 Guest are viewing this topic.
I've been trying to learn how to write a compiler for a custom CPU I made
Assembly compiler? For a "C--" or "C" compiler, the best reference (in my opinion) is LCC.It has a good book, and good sources.
Oh This is good. So much memory taking this class in school. I think I got an A on this class.My first calculator program written in C using a Stack... Good Time!!!https://www.amazon.com/Compilers-Principles-Techniques-Alfred-Aho/dp/0201100886/ref=sr_1_1?crid=3MH2S7KFSSXMN&keywords=%E2%80%8E+978-0201100884&qid=1640159400&s=books&sprefix=978-0201100884%2Cstripbooks%2C265&sr=1-1
It's hard not to mention Wirth's "Compiler construction": https://people.inf.ethz.ch/wirth/CompilerConstruction/index.html
And we should mention the syntax diagrams used to create the Pascal compilers. It is a straightforward translation from syntax to code. BNF is fine but I like the diagrams.
Quote from: SiliconWizard on December 22, 2021, 06:54:53 pmIt's hard not to mention Wirth's "Compiler construction": https://people.inf.ethz.ch/wirth/CompilerConstruction/index.htmlAnd we should mention the syntax diagrams used to create the Pascal compilers. It is a straightforward translation from syntax to code. BNF is fine but I like the diagrams.