On 21/03/2013, at 12:53 AM, Gerd Knops <gerti-cocoa...@bitart.com> wrote:

> Can't agree here, I have used NSScanner to parse quite a few even complex 
> file formats, and NSScanner was a pretty convenient (and fast!) solution for 
> these cases.


It's useful, but not as useful as it could be. It *looks* as if it could be 
used as a tokenizer (lexer) for e.g. a language compiler or interpreter, but if 
you try it, isn't good for that if any of your tokens are multi-character 
strings. Which is a pity, because if you have a simpler expression form that 
does have single-character tokens, it works fine for that. So that makes it 
look like an arbitrary limitation - why not extend it to operate on 
multi-character tokens? But I suspect the answer is because that's not really 
what it was designed for, and it only approaches this type of task.

--Graham

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to