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

Re: To get things started...

Thread Previous | Thread Next
From:
Chaim Frenkel
Date:
November 27, 2000 08:09
Subject:
Re: To get things started...
Message ID:
m31yvxe6sg.fsf@csamnycln01.nyc.csam.com
Look throught the RFCs this was one of Damian Conway's.

<chaim> =~ /RFC/

>>>>> "ST" == Sam Tregar <sam@tregar.com> writes:

ST> On Wed, 22 Nov 2000, Dan Sugalski wrote:
>> 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.

ST> That might be the easiest thing for us - as internals programmers - but
ST> does it answer the general need?  Everyone writing regex-based parsers
ST> faces this problem.  Maybe this is something to toss to perl6-language and
ST> get some RFC'd Larry-fried syntax?

ST> Also, a nagging question - how does a regex-based parser work without
ST> ending up reading the entire file into memory most of the time?  Even with
ST> an intelligent tied-scalar reading bytes there's going to be failing cases
ST> where the regex has to walk to the end of the "string" to find out it
ST> failed.  Presumably it would also need to seek back to the start which
ST> means we'd have to buffer as we go.

ST> Perhaps we really need a new kind of regex that works by-design against
ST> streams of bytes?

ST> -sam





-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

Thread Previous | Thread Next


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