using RegularExpressions for matching (was Re: deficience in
Squeak)
Ned Konz
ned at squeakland.org
Mon Nov 24 17:34:55 UTC 2003
On Sunday 23 November 2003 8:19 pm, Tim Rowledge wrote:
> > Surely you mean the "Full" release? I thought we were supposed to be
> > taking things *out* of the "Basic" release.
>
> Well, I don't know about that. I think I would like to urge at least
> considering the inclusion of regexp stuff in the base system (for some
> defintition of base system that I don't want to get distracted by right
> now) because quite a lot of tools could benefit from using it.
I was thinking about this the other day as I was composing that response using
it.
I remembered all the times I'd done string processing using various bits and
pieces of low-level Squeak.
I remembered again how powerful the full regex capabilities in Perl and Ruby
are, and how much I tended to use them in those languages.
> For example, the find facility in paragraph editor would be much more
> useful. Searching for matching selectors might be faster and/or more
> useful. Filename parsing would probably benefit. Hell, it might even be
> useful in the Parser classes for compiling code. Maybe it would tie-in
> to the Stream peek/upTo protocols?
The regex stuff is set up to parse from Streams, which is pretty handy.
However, it does so a line at a time. The backtracking could require
buffering in the general case.
More information about the Squeak-dev
mailing list
|