[Python-Dev] Parsing vs. lexing.

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 22 Aug 2002 14:00:41 +1200 (NZST)

Alex Martelli <aleax@aleax.it>:

> This reminds me of a long-ago interview with Borland's techies about
> how they had managed to create Turbo Pascal, which ran well in a 64K
> (K, not M-) one-floppy PC

Even more impressive was the earlier version of Turbo Pascal which ran
on 64K Z80-based CP/M systems!

I have great respect for that one, because in a previous life I used
it to develop a cross-compiler for a Modula-2-like language targeting
the National 32000 architecture.

My compiler consisted of 3 overlays (for parsing, declaration analysis
and code generation), wasn't very fast, and had so little memory left
for a symbol table that it could only compile very small modules. :-(

In hindsight, my undoing was probably my insistence that the language
not require forward declarations (it was my language, so I could make
it how I wanted). If I had relaxed that, I could have used a single-
pass design that would have simplified things considerably.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+