Re: Lex surrogates

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

          From comp.compilers

Related articles
Lex surrogates lfcs.edinburgh.ac.uk!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@pistachio.ee.lbl.gov (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@cs.rochester.edu (Ken Yap) (1989-02-09)
Re: Lex surrogates mike@arizona.edu (1989-02-09)
Re: Lex surrogates tower@bu-cs.BU.EDU (1989-02-10)
Re: Lex surrogates pardo@june.cs.washington.edu (1989-02-11)
Re: Lex surrogates henry@zoo.toronto.edu (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: <3295@ima.ima.isc.com>
Organization: BBN Systems and Technologies Corporation

In <3295@ima.ima.isc.com> Vern Paxson <vern@pistachio.ee.lbl.gov> 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
philosophy.


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 rsalz@uunet.uu.net.
--


Post a followup to this message

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