3 ms·
Not necessarily. Some grammars can be parsed with simpler code than others, but optimizations can make a compiler larger. Also of note is that Turbo Pascal was
by groovy2shoes 15y ago
Not necessarily. Some grammars can be parsed with simpler code than others, but optimizations can make a compiler larger. Also of note is that Turbo Pascal was written by hand in assembly language, and the executable wasn't likely to have been linked with any libraries.
- MatthewPhillips 15y agoInteresting, I didn't know this but Turbo Pascal was written by Anders Hejlsberg (of Delphi and C# fame).
- bhangi 15y agoIndeed TP did not have any linking step. I still recall trying to fruitlessly find "Link" on the menu for quite some time until it hit me -- oh, no linking needed. But TP did include a run-time with each of the generated executable. This run-time was part of the compiler and it was approximately 10K (from memory, so I could be wrong). That makes the compiler about 22Kbytes worth of code, which is even more impressive.
- groovy2shoes 15y agoI wasn't aware that the runtime was included in the executable. Oh, the things we did in the DOS days!