Hacker News

Ask HN: Writing your first compiler resources/guides

I've reached that stage of life where one sits down and says: "I should invent and implement a compiled computer language".

What are the best practical resources, guides, and exercises available in order to get started on writing a compiler from scratch? (Ideally by partaking in little exercises and projects to actually make 'the things happen' at each stage from very minimal beginnings, and then some insight into some modern tools, philosophies and workflows in practice?)

2 pointsACow_Adonis posted a year ago1 Comment
1 Comment:
jerome-jh said a year ago:

You should start with a good course on automata, such as "Automata and computability" by Kozen. That will cover parsing and a bit more, but this is all "old stuff", or basics, as you see things. Then you would need a good course on type theory, but unfortunately I have no pointer for this. You may also read that http://lambda-the-ultimate.org/node/5569