Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> Does Parrot have anything available (yet?) for testing membership in
> character classes-- things like isspace, isupper, islower, etc?

RSN or when Dan's string stuff is merged.

> How about for creating and manipulating character classes?

There is an implementation of bit sets in imcc/sets.c. The old rx code
has some bitmap stuff in src/rx.c. But that's broken WRT memory leaks.
It uses a bitmap for chars < 256 and a linear string for anything bigger
- suboptimal.

So it's probably best to to create a BitSet PMC. That could use a bitset
for the "normal" range of the charset and an additional hash for other
values, which is searched only if it's there.

> Apologies in advance if I've simply overlooked something.

No problem, the source tree is huge.

> Pm

leo

Reply via email to