Regex niceties for the parser (was Re: To get things started...)
[email protected] (Dan Sugalski) Mon, 27 Nov 2000 12:37:52 -0500
| Newsgroups | perl.perl6.internals.api.parser |
|---|---|
| Message-ID | <[email protected]> |
At 05:17 PM 11/27/00 +0000, Nicholas Clark wrote: > > >>>>> "ST" == Sam Tregar <[email protected]> writes: > > ST> Perhaps we really need a new kind of regex that works by-design against > > ST> streams of bytes? > >I don't think any change is needed in the regex syntax. I think just being >careful to use minimal matching whenever possible should be sufficient. What we could use, though, is a way to specify weighted alternatives in regexes, so we could have a single regex look for multiple things at once and match the one we'd prefer if there are alternatives. I don't even really care if we can't do it inside a regex specification itself and need to do odd things with regex objects. Yeah, I know we can do this with alternations and such, but that can get really messy when we're pasting a half-zillion regexes together. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [email protected] have teddy bears and even teddy bears get drunk