Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!husc6!spdcc!ima!compilers-sender From: henry@zoo.toronto.edu (Henry Spencer) Newsgroups: comp.compilers Subject: Re: Lex surrogates Message-ID: <3324@ima.ima.isc.com> Date: 11 Feb 89 05:19:36 GMT Sender: compilers-sender@ima.ima.isc.com Reply-To: Henry Spencer Lines: 18 Approved: compilers@ima.UUCP In-Reply-To: <3304@ima.ima.isc.com> >...one way >flex gets its speed is by returning a pointer to the string comprising >the token in place (no string copying). This can bite you if you are >using flex with yacc/bison and you don't copy the string into your own >variable right away. After the next terminal has been matched is too >late. 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. 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