Re: Lex surrogates

Rich Salz <rsalz@BBN.COM>
7 Feb 89 19:25:56 GMT

          From comp.compilers

Related articles
Lex surrogates!db@NSS.CS.UCL.AC.UK (Dave Berry) (1989-02-05)
Re: Lex surrogates schmidt@ORION.CF.UCI.EDU (Douglas C. Schmidt) (1989-02-05)
Re: Lex surrogates (Vern Paxson) (1989-02-06)
Re: Lex surrogates rsalz@BBN.COM (Rich Salz) (1989-02-07)
Re: Lex surrogates wpl@PRC.Unisys.COM (1989-02-06)
Re: Lex surrogates (Ken Yap) (1989-02-09)
Re: Lex surrogates (1989-02-09)
Re: Lex surrogates tower@bu-cs.BU.EDU (1989-02-10)
Re: Lex surrogates (1989-02-11)
Re: Lex surrogates (Henry Spencer) (1989-02-11)
[3 later articles]
| List of all articles for this month |

From: Rich Salz <rsalz@BBN.COM>
Newsgroups: comp.compilers
Date: 7 Feb 89 19:25:56 GMT
References: <>
Organization: BBN Systems and Technologies Corporation

In <> Vern Paxson <> writes:
>Allow me if I may to plug flex, which is my lex rewrite claiming to produce
>smaller and faster scanners than Lex....

Vern is much too modest. Flex is FAST.

If you need flex, and can do without the couple of missing features
(right-context awareness? I forget), then you should get it. As he
pointed out, the FSF folks distribute it as it's got a similar licensing

As for the general question: "it's true what they say about lex." Most
folks know about this comment because Peter Honeyman stuck it in the
change log of pathalias. It turns out to basically not be all that true.
Van Jacobson (also of LBL) spent a few some time tuning lex and spoke
about it at the Washington Usenix conference. As John pointed out, the
problem with Lex is that it was so space-conscious that the generated
code ran real slowly. By opening up the tables and a few other changes,
he was able to get the innermost loop to compile into a single 68000
instructions. He got an ovation when he showed timing charts where
lex was just a shade slower than cat(1). Van's changes were never
made available, but it doesn't matter: Use Flex. :-)
/rich $alz
Please send comp.sources.unix-related mail to

Post a followup to this message

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