4 ms·
Dated, but simple, and more importantly, concrete, using almost no abstractions (like lex and yacc), so there's no magic. Since the compiler described is for a
by barrkel 16y ago
Dated, but simple, and more importantly, concrete, using almost no abstractions (like lex and yacc), so there's no magic. Since the compiler described is for a subset of Pascal, and the compiler is itself written in Pascal, even the magic of the compiler itself is explained away.
This series is a large part of how I got started in the compiler business; and today I help maintain probably the most used Pascal compiler, in Delphi.
If anyone is interested in actually following along, TP 5.5 is freely available, though you'll need DosBox or similar if you're not running a 32-bit install of Windows:
http://edn.embarcadero.com/article/20803 http://edn.embarcadero.com/article/20803
- DisposaBoy 16y agoAnother alternative to following along might be to try and reimplement the code as you go along in another language you may know, the code is easy to follow and with very good explanations about what you're intending to do it shouldn't be much of a problem.
- klipt 16y agoIf anyone is interested in actually following along, TP 5.5 is freely available, though you'll need DosBox or similar if you're not running a 32-bit install of Windows Or there's Free Pascal, which is cross platform and backwards compatible with Turbo Pascal: http://freepascal.org/ http://freepascal.org/