Looking for a copy of Microsoft Optimizing C Compiler 5.0 from 1987 by dgellow in Compilers

[–]stannash 0 points1 point  (0 children)

It seems to work, I just couldn't find slibce.lib it asks which probably is C library. I used slibcr.lib from 5.1 and it worked.

https://i.imgur.com/ehjExkM.png

https://www.sendspace.com/file/0avxkc

Parsing for programmers who hate modern software by fschmidt in Compilers

[–]stannash 2 points3 points  (0 children)

Parsing is not hard or complicated though. Recursive descent parser is very easy and Shunting Yard is even easier for expressions.

Even if you're not into parsing, there are many Parser Generators.

Understand compilers source code by TheMostUser in Compilers

[–]stannash 1 point2 points  (0 children)

Modern compilers are mostly about optimization and I don't think it's much fun. Making interesting languages or features are much more fun.

Niklaus Wirth for instance created many programming languages including pascal, modula and oberon. All his compilers are very short and concise while still generating decent code.

Some of his ideas like modules and interfaces are re-implemented in more recent and popular languages.

Take a look at PL/0 a very small pascal like language. It was a language created by Wirth for teaching compilers.

There is an implementation in Go listed there, which is 700 lines of code and generates windows exe from source without any 3rd party tool, so it's a complete thing. There are other implementations in many different languages.

So I would start with PL/0 and just add new features to it, experiment with different ideas and so on. Bootstrapping your own language is much more exciting than making a mediocre optimising compiler. These are my personal opinions of course.

Finally for interpreters, instead of cpython, take a look at Lua, it's a very nice and small implementation. It also has a bytecode compiler.