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-0183Thread Previous | Thread Next