Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!spdcc!ima!compilers-sender From: henry@zoo.toronto.edu Newsgroups: comp.compilers Subject: Re: Lex surrogates Message-ID: <3342@ima.ima.isc.com> Date: 16 Feb 89 11:10:11 GMT References: <3324@ima.ima.isc.com> Sender: compilers-sender@ima.ima.isc.com Reply-To: henry@zoo.toronto.edu Lines: 20 Approved: compilers@ima.UUCP In-Reply-To: <3332@ima.ima.isc.com> >>The stuff lex puts in yytext[] also changes for each terminal, and hence >>also must be saved immediately if you want to use it. I don't understand >>why the lack of copying makes a practical difference. > >In a FAST scanner, every machine instruction counts... Agreed, and I think FLEX does the right thing by not copying -- there never was a good reason for it, except that LEX was a quick hack that didn't ever get worked over properly for performance. The original discussion was about how it affected the programming semantics, not the performance, though, which is why I said what I did. Henry Spencer at U of Toronto Zoology uunet!attcan!utzoo!henry henry@zoo.toronto.edu -- 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