"Ara.T.Howard" <Ara.T.Howard / noaa.gov> writes:

> On Sat, 2 Jul 2005, Daniel Brockman wrote:
>
>> According to my tests, it is also more than twice as fast as that
>> enourmous strscan implementation.  (Can anyone confirm?)
>
> sure it is.  but with no error checking and it accepts
> invalid strings.

Perhaps there are no invalid strings?

> it will also fail for things like
>
>    42.0 : value

I didn't see that in the original post.  The key should be a symbol,
which I took to mean it had to be a valid Ruby identifier.

> since '.' is not a \w (tricky).

But the characters permitted in Ruby identifiers are.  (Though I
forgot `!' and `?'.)

> anyhow i didn't know the standard scan was so fast!

Regular expressions are pretty fast, because you compile them.
I think of them as OpenGL display lists. :-)

> [...]  %r/\s*(  [...]

I've never seen `%r/.../' used before --- interesting.

-- 
Daniel Brockman <daniel / brockman.se>

    So really, we all have to ask ourselves:
    Am I waiting for RMS to do this?   --TTN.