Re: Why don't compiler writers adhere to the dragon book recommendation of one lexer rule for keywords and identifiers?

gah4 <gah4@u.washington.edu>
Sat, 25 Jun 2022 13:01:40 -0700 (PDT)

          From comp.compilers

Related articles
| List of all articles for this month |

From: gah4 <gah4@u.washington.edu>
Newsgroups: comp.compilers
Date: Sat, 25 Jun 2022 13:01:40 -0700 (PDT)
Organization: Compilers Central
References: 22-06-075
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="49113"; mail-complaints-to="abuse@iecc.com"
Keywords: parse, history
Posted-Date: 25 Jun 2022 20:47:47 EDT

On Saturday, June 25, 2022 at 9:41:32 AM UTC-7, Roger L Costello wrote:


(snip)


> Page 101-102 of the dragon book recommends having one lexer rule for both
> keyword and identifiers (symtab = symbol table):


(and our moderator says)
> [I think the answer to a lot of these questions contains the phrase "64K PDP-11." ...]


The lost art of small memory compilers.


Before the PDP-11 there were big computers like the IBM 704, where Fortran
originated, and when core was $1/bit or more. (The 704 with core was an
upgrade from the 701, using CRTs for main memory.) Big ones had 32K
words, but I think the Fortran compiler ran in 8K or 16K words.


After big computers got bigger, then we had minicomputers like the PDP-11
and Data General Nova and Eclipse, and some others, with 32K or so bytes.


And when minicomputers got bigger, everything happened again with
microcomputers, and again compilers had to fit. I do remember swapping
floppy disks for passes of a Fortran and Pascal compiler for MS-DOS 2.0.


Some years ago, the Hercules group was trying to get gcc running
on an emulated IBM S/370 running MVS, with an 8M region.
(Out of the 16M byte address space, MVS takes up about half.)
But you can't run gcc in 8M bytes.


When I remember S/370 and OS/VS2, the usual region was 300K,
which we thought was big.


And now, we can barely run a system with 4G main memory,
such as the Macbook Air that I am writing this on.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.