5 ms·
> it is perfectly possible to read it cover to cover and still have very little idea about how to write an actual compiler. I learned how compilers worked by s
by WalterBright 13y ago
> it is perfectly possible to read it cover to cover and still have very little idea about how to write an actual compiler.
I learned how compilers worked by studying a Pascal compiler written in BASIC that was published by BYTE back in the 70's. I thought the way it worked was a revelation, and completely magical.
Compiler books in general, however, tend to omit the messy details one has to deal with in building a production quality compiler.
- DanBC 13y agoI've heard several people say good things about BYTE. It's a shame there's nothing similar today. (Yet another thing for my list of what to do when I have lots of money). The Pascal compiler in BASIC was "Tiny Pascal"? Someone might have some scans of the issues here (http://atariage.com/forums/topic/167235-byte-magazine/page__st__375 http://atariage.com/forums/topic/167235-byte-magazine/page__...) Here's a PDF about TinyPascal (http://www.colorcomputerarchive.com/coco/Documents/Books/Pascal%20(1980)(Tab%20Books).pdf http://www.colorcomputerarchive.com/coco/Documents/Books/Pas...) I find lots of links talking about it, but without downloads eg (http://www.vintage-computer.com/byte.shtml http://www.vintage-computer.com/byte.shtml) Here's some discussion of something called "Augusta" which is a 'tiny Ada'. (http://computer-programming-forum.com/44-ada/240dcc3af63e1faa.htm http://computer-programming-forum.com/44-ada/240dcc3af63e1fa...)
- WalterBright 13y agoYes, it was Tiny Pascal. I still probably have the issue buried in the garage somewhere. I'm also partial to Creative Computing in the 1970's. It was full of fun artwork and silly games you could type in and run, and unabashedly optimistic editorial content. It's forgotten now, but it was very influential for me.
- e12e 13y agoOn a related note, I came across: "Source Text of Compilers": http://exmortis.narod.ru/src_compilers_eng.html http://exmortis.narod.ru/src_compilers_eng.html Does not have Tiny Pascal - but appears to have a few other variants.
- stiff 13y agoCompletely agree on your last point. I have written a compiler for a small subset of something like Pascal for the JVM and it was among all other things a big exercise in software engineering. E.g. several times almost all the structure of my code became obsolete because a change in grammar or a need of doing different passes through the code / parse tree was required for a new feature in the language to work and that completely changed how everything else needed to work.
- Someone 13y agoWarning: you will lose hours here: http://archive.org/details/byte-magazine-1978-09 http://archive.org/details/byte-magazine-1978-09 (also features a design for a touch screen) http://archive.org/details/byte-magazine-1978-10 http://archive.org/details/byte-magazine-1978-10 http://archive.org/details/byte-magazine-1978-11 http://archive.org/details/byte-magazine-1978-11