Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!husc6!spdcc!ima!compilers-sender From: rsalz@BBN.COM (Rich Salz) Newsgroups: comp.compilers Subject: Re: Lex surrogates Message-ID: <3299@ima.ima.isc.com> Date: 7 Feb 89 19:25:56 GMT References: <3295@ima.ima.isc.com> Sender: compilers-sender@ima.ima.isc.com Reply-To: Rich Salz Organization: BBN Systems and Technologies Corporation Lines: 30 Approved: compilers@ima.UUCP In <3295@ima.ima.isc.com> 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 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. -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request