Re: To get things started...
[email protected] (Dan Sugalski) Wed, 22 Nov 2000 15:19:55 -0500
| Newsgroups | perl.perl6.internals.api.parser |
|---|---|
| Message-ID | <[email protected]> |
At 08:51 PM 11/21/00 -0500, Sam Tregar wrote: >On Wed, 22 Nov 2000, Nicholas Clark wrote: > > > Are we hoping that we can mmap() most scripts, so read isn't hugely a > > problem? And sluuuurp the rest in one? [doesn't feel good] > > Are we going to have "lazy scalars" which collude with the regexp engine > > so that if the regexp engine hits the current end more is read from > > the file handle? > > Something else? > >Perhaps we could add a mode to the regex engine like: > > $filehandle =~ /.../; > >Where the engine itself would do the reading and buffering. Ok, that >might not be such a good idea... This probably never returns, eh: > > $filehandle =~ /(.*)/; > >However we solve the problem I hope we can allow Perl programmers access >to the solution. This is a very common problem with regex parsers. Probably the easiest thing is to implement some sort of file-tied scalar or something that can provide bytes to the regex engine until it stops asking for them. Some magic or other, though, will get us what we need. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [email protected] have teddy bears and even teddy bears get drunk