[squeak-dev] Support Regular Expressions in Trunk

Tobias Pape Das.Linux at gmx.de
Tue May 12 22:35:34 UTC 2015


On 13.05.2015, at 00:17, David T. Lewis <lewis at mail.msen.com> wrote:

> On Tue, May 12, 2015 at 10:27:20AM -0700, tim Rowledge wrote:
>> I love the idea of well-integrated expressions etc being available for string handling and in tools. The tricky bit is that ?well-integrated?.
>> 
>> If at all possible it should be done without any extra primitives. Unless we have a convincing use case for such string handling needing to be frequently done and very fast I don?t see much value in adding more C code. With Cog and SISTA making the system so much faster we have to consider the possibility that doing all the marshalling, converting, stack fapping, c-code calling, returning, re-converting may take more time than leaving it to Smalltalk.
>> I suppose the counter-argument would be that using a standard library guarantees correct results. Except of course we have a lot of experience with supposedly standard libraries being utterly screwed. Jpeg libraries, anyone? ALSA?
>> 
>> As for the actual expression grammar, I imagine most people would be assuming the unix regexp form which has the advantage that a lot of people are familiar with it. And the disadvantage that a very large number of people are not.
>> 
> 
> There are two distict packages.
> 
> The package at www.squeaksource.com/Regex is the Vassili Bykov implementation.

To Quote there:

NB.
For Pharo users, this package is maintained as part of the core images. For Squeak users, the Pharo repositories might have recent snapshots that weren't actively tested on other branches of Squeak (yet).

Just to note that.


> It requires no plugin support or special primitives.
> 
> -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov
> -- See `documentation' protocol of RxParser class for user's guide.
> 
> The PCRE package is Andrew Greenberg's Perl compatible regular expressions.
> This uses the RePlugin plugin that can be found in the VMMaker package.
> RePlugin is an internal plugin in the Unix VMs (interpreter/cog/spur), I'm
> not sure about other platforms or SqueakJS.
> 
> http://wiki.squeak.org/squeak/558
> 
> Dave




More information about the Squeak-dev mailing list