develooper Front page | perl.perl6.internals.api.parser | Postings from November 2000

Re: To get things started...

Thread Previous
From:
Sam Tregar
Date:
November 21, 2000 17:56
Subject:
Re: To get things started...
Message ID:
Pine.LNX.4.30.0011212046090.1234-100000@airtrout.tregar.com
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.

-sam



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About