• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScanner question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScanner question


  • Subject: Re: NSScanner question
  • From: Graham Cox <email@hidden>
  • Date: Thu, 21 Mar 2013 10:51:05 +1100

On 21/03/2013, at 12:53 AM, Gerd Knops <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSScanner question (From: Koen van der Drift <email@hidden>)
 >Re: NSScanner question (From: Graham Cox <email@hidden>)
 >Re: NSScanner question (From: Jens Alfke <email@hidden>)
 >Re: NSScanner question (From: Gerd Knops <email@hidden>)

  • Prev by Date: Re: Adding toolbar items only works in viewWillAppear: (?)
  • Next by Date: Re: How to: NSPopover Refuse First Responder?
  • Previous by thread: Re: NSScanner question
  • Next by thread: Triggering an NSTextStorage Bug
  • Index(es):
    • Date
    • Thread